<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="https://www.thymeleaf.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="https://www.thymeleaf.org ">
<head>
    <title>采美365网--医疗美容生活美容正品采购平台</title>
    <template th:replace="components/head-link"></template>
    <link rel="stylesheet" th:href="@{/css/base/center.css(v=${version})}" type="text/css">
    <link rel="stylesheet" th:href="@{/css/supplier-center/order/logistics.css(v=${version})}" type="text/css">
</head>
<body>
<!-- 引用头部 -->
<template th:replace="components/header"></template>

<!-- 我的采美 -->
<div id="addlogistics">
    <div class="navLayout">
        <div class="crumbs" v-if="isPC">
            <span>我的交易</span>
            <span>&gt;</span>
            <span>我的订单</span>
            <span>&gt;</span>
            <span>添加物流</span>
        </div>
        <div class="wrap clear">
            <!--左侧面包屑-->
            <div v-show="open">
                <template th:replace="supplier-center/components/tableft"></template>
            </div>
            <div class="right">
                <div class="userinfo">
                    <p class="info">
                        <span>买家信息</span>
                        <button @click="history.go(-1)" class="comback" type="button">返回</button>
                    </p>
                    <div class="user">
                        <p>买家名称：<span>{{userInfo.name}}</span></p>
                        <p>收货人：<span>{{userInfo.shouHuoRen}}</span></p>
                        <p>联系方式：<span>{{userInfo.mobile}}</span></p>
                    </div>
                    <p class="address">收货地址：<span>{{userInfo.address}}</span></p>
                </div>
                <div class="product-info">
                    <div class="price">
                        <p class="protitle">商品信息</p>
                    </div>
                    <div class="product">
                        <ul class="product-title">
                            <li>商品信息</li>
                            <li>购买数量</li>
                            <li>已发数量</li>
                            <li>未发数量</li>
                            <li>本次发货</li>
                        </ul>
                        <ul class="pro-information">
                            <li :orderProductId = 'order.orderProductID' :shopOrderID="order.shopOrderID" v-for="order in orderList ">
                                <div class="product-img">
                                    <img :src="order.image"/>
                                    <h3>{{order.productName}}</h3>
                                </div>
                                <div>{{order.buyNum}}</div>
                                <div>{{order.shipmentsNum}}</div>
                                <div>{{order.notShippedNum}}</div>
                                <div class="del-num">{{order.num}}</div>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="add-logistics">
                    <div class="add-wrap">
                        <div :key="index" class="company-number" v-for="(item,index) in logisticList">
                            <div class="logist-left">
                                <i class="red icon">*</i>
                                物流公司：
                                <select :id="'logistics'+ index" @change="ChangeLogistics($event,item,index)" class="logistics-company-name company" name="">
                                <option value="0">请选择</option>
                                    <option :key="kdIndex" :name='kd.label' :value="kd.value" v-for="(kd,kdIndex) in kdlist">{{kd.label}}</option>
                                </select>
                                <button class="add-company companyBtn icon mIcon" @click="addBtn()" v-if="index==0"></button>
                                <button class="sub-company companyBtn icon mIcon" @click="subBtn(item)" v-else></button>
                            </div>
                            <div class="logist-right">
                                <div :key="numIndex" v-for="(num,numIndex) in item.numList">
                                    <i class="red">*</i>
                                    物流编号：
                                    <input class="logistics-order-number company" oninput="value=value.replace(/[^\d]/g,'')" placeholder="请输入物流编号" type="text" v-model="num.number">
                                    <button class="add-company companyBtn icon mIcon" @click="addNum(item,numIndex)"
                                            v-if="numIndex==0">
                                    </button>
                                    <button class="sub-company companyBtn icon mIcon" v-else @click="reduceBtn(item)"></button>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="upload-img">
                        <div class="release-from ">
                            <span class="red-color">&nbsp;图片备注：</span>
                            <div class="release-input" id="uploadGoodsImages">
                                <div :key="index" class="upload-file" v-for="(item, index) in GoodsImagesList">
                                    <img :data-image="item" :data-original='item' :src="item" alt="" class="upload-img" @click="bigImage">
                                    <i @click="removeGoodsImagesFn(index)" class="icon mIcon del"></i>
                                </div>
                                <div class="upload-file" v-show="GoodsImagesList.length<5">
                                    <i class="icon mIcon add"></i>
                                    <input @change="uploadGoodsImagesFn" accept="image/png,image/jpeg,image/gif,image/jpg" class="input-file" name="file" ref="goodsImages"
                                           type="file"
                                           value="">
                                </div>
                                <div class="form-upload-tips">
                                    <i class="icon mIcon icon-wen"></i>
                                    <div class="wen-tips">请备注快递单，发货现场和货物的照片，最多10张</div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="remarks">
                        <span class="rema">备注：</span>
                        <textarea maxlength="200" placeholder="文字备注，200字以内" v-model="params.remark"></textarea>
                        <div class="size-num">{{params.remark.length}}/200</div>
                    </div>
                    <div class="defineBtn">
                        <div>
                            <button @click="turnBtn" type="button">确定</button>
                            <button @click="history.go(-1)" type="button">取消</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    </div>

    <!-- 引入底部 -->
    <template th:replace="components/footer"></template>
<template th:replace="components/foot-link"></template>
<script charset="utf-8" type="text/javascript" th:src="@{/js/center.js(v=${version})}"></script>
    <script charset="utf-8" th:src="@{/js/common/serviceapi/supplier.service.js(v=${version})}" type="text/javascript"></script>
    <script charset="utf-8" th:src="@{/js/supplier-center/order/logistics-add.js(v=${version})}" type="text/javascript"></script>
</body>
</html>
