Browse Source

修改费用合计 采购计划 新加检索条件 结算中心 状态 库存管理

Qukatie 1 year ago
parent
commit
4feba073de

+ 21 - 1
src/api/basicData/configuration.js

@@ -17,6 +17,14 @@ export function typeSave(data) {
         data: data
     })
 }
+//客户资料列表修改和新增
+export function agencyOrder(data) {
+  return request({
+      url: '/api/blade-purchase-sales/agencyOrder/submit',
+      method: 'post',
+      data: data
+  })
+}
 //客户资料列表查看明细
 export function detail(data) {
     return request({
@@ -142,7 +150,19 @@ export const getList = (current, size, params, goodsTypeId) => {
         }
     })
 }
-
+export function getAgencyOrder() {
+  return request({
+      url: '/api/blade-purchase-sales/agencyOrder/getAgencyOrder',
+      method: 'get'
+  })
+}
+export const getAgencyOrderItem = (data) => {
+  return request({
+      url: '/api/blade-purchase-sales/agencyOrder/getAgencyOrderItem',
+      method: 'get',
+      params:data
+  })
+}
 //查询客户类型下拉
 export function corpstypeTree() {
     return request({

+ 6 - 6
src/components/tradeAgency/fee-oceanFreight.vue

@@ -922,12 +922,12 @@ export default {
                 })
                 this.sumData.push({
                     corpCnName: e,
-                    rmbD: rmbD,
-                    rmbC: rmbC,
-                    usdD: usdD,
-                    usdC: usdC,
-                    sumD: sumD,
-                    sumC: sumC
+                    rmbD: _.round(rmbD, 2),
+                    rmbC: _.round(rmbC, 2),
+                    usdD: _.round(usdD, 2),
+                    usdC: _.round(usdC, 2),
+                    sumD: _.round(sumD, 2),
+                    sumC: _.round(sumC, 2)
                 })
             })
         },

+ 7 - 0
src/enums/column-name.js

@@ -1893,6 +1893,13 @@ const columnName = [{
     code: 419,
     name: '达沃特-国内贸易-采购合同M明细'
   }
+  ,{
+    code: 420,
+    name: '达沃特-国内贸易-采购计划'
+  },{
+    code: 421,
+    name: '达沃特-国内贸易-采购计划'
+  }
 ]
 export const getColumnName = (key) => {
   for (let index = 0; index < columnName.length; index++) {

+ 1 - 1
src/views/businessManagement/proxyOrder/configuration/mainList.json

@@ -69,7 +69,7 @@
     },
     {
       "label": "业务日期",
-      "prop": "requiredArrivalDate",
+      "prop": "businesDate",
       "index": 3,
       "overHidden": true
     }

+ 26 - 24
src/views/businessManagement/proxyOrder/detailsPageEdit.vue

@@ -80,7 +80,7 @@
                 <crop-select v-else-if="item.prop === 'productionPlant'" v-model="form[item.prop]"
                   @getCorpData="getPlantRow" corpType="GYS" :disabled="detailData.seeDisabled || browse"
                   style="width: 100%"></crop-select>
-                  <el-select v-else-if="item.prop === 'brand'" v-model="form[item.prop]" placeholder="请选择" clearable
+                <el-select v-else-if="item.prop === 'brand'" v-model="form[item.prop]" placeholder="请选择" clearable
                   filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled || browse">
                   <el-option v-for="(item, index) in brandOption" :key="index" :label="item.dictValue"
                     :value="item.dictValue"></el-option>
@@ -454,7 +454,7 @@
 
 <script>
 import {
-  typeSave, deleteDetails,
+  agencyOrder, deleteDetails,
   corpstypeTree,
   corpsattn,
   corpsbank,
@@ -1104,8 +1104,10 @@ export default {
           },
           {
             label: '业务日期',
-            prop: 'requiredArrivalDate',
+            prop: 'businesDate',
             type: 'date',
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd 00:00:00",
             rules: [
               {
                 required: true,
@@ -1232,7 +1234,7 @@ export default {
           //   ]
           // }, {
           //   label: '要求到货日期',
-          //   prop: 'requiredArrivalDate',
+          //   prop: 'businesDate',
           //   type: 'date',
           //   rules: [
           //     {
@@ -1287,7 +1289,7 @@ export default {
           },
           {
             label: '总条数',
-            prop: 'sumNumber',
+            prop: 'minOrder',
             disabled: true
           },
           {
@@ -1304,7 +1306,7 @@ export default {
       // 银行账号下拉
       bankList: [],
       paymentOption: [],
-      brandOption:[],
+      brandOption: [],
       statusOption: [],
       // 费用信息排序的最大值
       maxFeeNum: 0,
@@ -1396,7 +1398,7 @@ export default {
   //初始化查询
   async created() {
     this.rowHeight = (window.innerHeight - 130) + 'px'
-    this.customerContact = await this.getColumnData(this.getColumnName(15), customerContact);
+    this.customerContact = await this.getColumnData(this.getColumnName(421), customerContact);
     this.getWorkDicts("payment_term").then(res => {
       this.paymentOption = res.data.data
     })
@@ -1487,7 +1489,7 @@ export default {
         itemType: event.typeno,
         tradeType: 'GN'
       }).then(res => {
-        row.storageQuantity = res.data.data
+        row.storageQuantity =  res.data.data.length?res.data.data[0].balanceQuantity:0
       })
       row.integralMultiples = event.integralMultiples
       this.quantityChange(row)
@@ -2117,7 +2119,7 @@ export default {
         itemType: event[0].typeno,
         tradeType: 'GN'
       }).then(res => {
-        row.storageQuantity = res.data.data
+        row.storageQuantity =  res.data.data.length?res.data.data[0].balanceQuantity:0
       })
       row.integralMultiples = event[0].integralMultiples
       this.quantityChange(row)
@@ -2147,7 +2149,7 @@ export default {
           itemType: this.tableData[0].typeno,
           tradeType: 'GN'
         }).then(res => {
-          this.goodsShowData[this.choiceIndexT].storageQuantity = res.data.data
+          this.goodsShowData[this.choiceIndexT].storageQuantity = res.data.data.length?res.data.data[0].balanceQuantity:0
         })
       }
       this.dialogVisible = !this.dialogVisible
@@ -2216,7 +2218,7 @@ export default {
           itemType: this.goodsListSave[item].typeno,
           tradeType: 'GN'
         }).then(res => {
-          this.$set(this.goodsListSave[item], 'storageQuantity', res.data.data)
+          this.$set(this.goodsListSave[item], 'storageQuantity',  res.data.data.length?res.data.data[0].balanceQuantity:0)
           // this.goodsListSave[item].storageQuantity =  res.data.data
           this.$set(this.goodsListSave[item], 'priceCategory', this.goodsListSave[item].goodsTypeName)
           // this.goodsListSave[item].priceCategory = this.goodsListSave[item].goodsTypeName
@@ -2286,7 +2288,7 @@ export default {
           tradeType: 'GN'
         }).then(res => {
           this.tableData[item].priceCategory = this.tableData[item].goodsTypeName;
-          this.tableData[item].storageQuantity = res.data.data;
+          this.tableData[item].storageQuantity =  res.data.data.length?res.data.data[0].balanceQuantity:0;
           delete this.tableData[item].goodsTypeName;
           this.tableData[item].itemId = this.tableData[item].id;
           this.$set(this.tableData[item], 'corpName', this.tableData[item].corpName);
@@ -2459,9 +2461,9 @@ export default {
           itemType: list[item].typeno,
           tradeType: 'GN'
         }).then(res => {
-          this.$set(list[item], 'storageQuantity', res.data.data)
+          this.$set(list[item], 'storageQuantity',  res.data.data.length?res.data.data[0].balanceQuantity:0)
           if (listLength != 0) {
-            this.$set(buyFree[item], 'storageQuantity', res.data.data)
+            this.$set(buyFree[item], 'storageQuantity',  res.data.data.length?res.data.data[0].balanceQuantity:0)
           }
 
           this.$set(list[item], 'itemType', list[item].typeno)
@@ -2807,11 +2809,11 @@ export default {
           if (typeof this.form.corpsTypeId == 'object') {
             this.form.corpsTypeId = this.form.corpsTypeId.join(",")
           }
-          this.form.billType = 'XS'
+          this.form.billType = 'DLDD'
           // 如果有id解锁,没有跳过
           // this.form.id && this.unLock({moduleName: 'xs',tableName: 'business_order', billId: this.form.id})
           this.saveLoading = true
-          typeSave(this.form).then(res => {
+          agencyOrder(this.form).then(res => {
             // this.$set(this.detailData, 'seeDisabled', true);
             this.$message({ type: "success", message: this.form.id ? "修改成功!" : "新增成功!" });
             if (isBack) {
@@ -2967,12 +2969,12 @@ export default {
         }).then(() => {
           this.editCustomer(true)
         }).catch(() => {
-          !this.detailData.seeDisabled && this.form.id && this.unLock({ moduleName: 'xs', tableName: 'business_order', billId: this.form.id })
+          !this.detailData.seeDisabled && this.form.id && this.unLock({ moduleName: 'DLDD', tableName: 'business_order', billId: this.form.id })
           this.$emit("goBack");
           this.leaveDetailsKey(this.$route.name)
         })
       } else {
-        !this.detailData.seeDisabled && this.form.id && this.unLock({ moduleName: 'xs', tableName: 'business_order', billId: this.form.id })
+        !this.detailData.seeDisabled && this.form.id && this.unLock({ moduleName: 'DLDD', tableName: 'business_order', billId: this.form.id })
         this.$emit("goBack");
         this.leaveDetailsKey(this.$route.name)
       }
@@ -2981,7 +2983,7 @@ export default {
     async saveColumn(name) {
       if (name == 'goods') {
         const inSave = await this.saveColumnData(
-          this.getColumnName(15),
+          this.getColumnName(421),
           this.customerContact
         );
         if (inSave) {
@@ -3007,7 +3009,7 @@ export default {
     async resetColumn() {
       this.customerContact = customerContact
       const inSave = await this.delColumnData(
-        this.getColumnName(15),
+        this.getColumnName(421),
         customerContact
       );
       if (inSave) {
@@ -3375,7 +3377,7 @@ export default {
     },
     editHandle() {
       const data = {
-        moduleName: 'xs',
+        moduleName: 'DLDD',
         tableName: 'business_order',
         billId: this.form.id,
         no: localStorage.getItem('browserID'),
@@ -3389,7 +3391,7 @@ export default {
             this.queryData(this.form.id)
           })
           this.inDetailsKey(this.$route.name, {
-            moduleName: 'xs',
+            moduleName: 'DLDD',
             tableName: 'business_order',
             billId: this.form.id,
           })
@@ -3431,7 +3433,7 @@ export default {
           tradeType: 'GN',
           storageId: this.form.storageId
         }).then(res => {
-          item.storageQuantity = res.data.data
+          item.storageQuantity =  res.data.data.length?res.data.data[0].balanceQuantity:0
         })
       })
       this.$message.success('刷新成功')
@@ -3499,7 +3501,7 @@ export default {
 //.add-customer-btn {
 //  position: fixed;
 //  right: 36px;
-//  top: 115px;
+//  top: 1421px;
 //}
 
 ::v-deep .el-form-item {

+ 55 - 55
src/views/businessManagement/proxyOrder/index.vue

@@ -168,9 +168,9 @@ export default {
   },
   async created() {
     // this.search.businesDate = defaultDate(1)
-    this.search.createTime = defaultDate(3)
+    // this.search.createTime = defaultDate(3)
     // this.option = option
-    this.option = await this.getColumnData(this.getColumnName(14), option);
+    this.option = await this.getColumnData(this.getColumnName(420), option);
     this.getWorkDicts("payment_term").then(res => {
       this.findObject(this.option.column, "paymentType").dicData = res.data.data;
     });
@@ -384,31 +384,31 @@ export default {
     },
     //点击搜索按钮触发
     searchChange(params, done) {
-      if (params.businesDate) {
-        params.orderStartDate = params.businesDate[0]+ " " + "00:00:00"
-        params.orderEndDate = params.businesDate[1]+ " " + "23:59:59"
-        delete params.businesDate;
-      }
-      if (params.requiredDeliveryDate) {
-        params.deliveryStartDate = params.requiredDeliveryDate[0]+ " " + "00:00:00"
-        params.deliveryEndDate = params.requiredDeliveryDate[1]+ " " + "23:59:59"
-        this.$delete(params,'requiredDeliveryDate')
-      }
-      if (params.requiredArrivalDate) {
-        params.arrivalDateStart = params.requiredArrivalDate[0]+ " " + "00:00:00"
-        params.arrivalDateEnd = params.requiredArrivalDate[1]+ " " + "23:59:59"
-        this.$delete(params,'requiredArrivalDate')
-      }
-      if (params.actualDeliveryDate) {
-        params.actualDeliveryDateStart = params.actualDeliveryDate[0]+ " " + "00:00:00"
-        params.actualDeliveryDateEnd = params.actualDeliveryDate[1]+ " " + "23:59:59"
-        this.$delete(params,'actualDeliveryDate')
-      }
-      if (params.createTime) {
-        params.createTimeStart = params.createTime[0]+ " " + "00:00:00"
-        params.createTimeEnd = params.createTime[1]+ " " + "23:59:59"
-        this.$delete(params,'createTime')
-      }
+      // if (params.businesDate) {
+      //   params.orderStartDate = params.businesDate[0]+ " " + "00:00:00"
+      //   params.orderEndDate = params.businesDate[1]+ " " + "23:59:59"
+      //   delete params.businesDate;
+      // }
+      // if (params.requiredDeliveryDate) {
+      //   params.deliveryStartDate = params.requiredDeliveryDate[0]+ " " + "00:00:00"
+      //   params.deliveryEndDate = params.requiredDeliveryDate[1]+ " " + "23:59:59"
+      //   this.$delete(params,'requiredDeliveryDate')
+      // }
+      // if (params.requiredArrivalDate) {
+      //   params.arrivalDateStart = params.requiredArrivalDate[0]+ " " + "00:00:00"
+      //   params.arrivalDateEnd = params.requiredArrivalDate[1]+ " " + "23:59:59"
+      //   this.$delete(params,'requiredArrivalDate')
+      // }
+      // if (params.actualDeliveryDate) {
+      //   params.actualDeliveryDateStart = params.actualDeliveryDate[0]+ " " + "00:00:00"
+      //   params.actualDeliveryDateEnd = params.actualDeliveryDate[1]+ " " + "23:59:59"
+      //   this.$delete(params,'actualDeliveryDate')
+      // }
+      // if (params.createTime) {
+      //   params.createTimeStart = params.createTime[0]+ " " + "00:00:00"
+      //   params.createTimeEnd = params.createTime[1]+ " " + "23:59:59"
+      //   this.$delete(params,'createTime')
+      // }
       this.page.currentPage = 1;
       this.onLoad(this.page, params);
       done()
@@ -454,7 +454,7 @@ export default {
       let queryParams = Object.assign({}, data, {
         size: page.pageSize,
         current: page.currentPage,
-        billType:'XS',
+        billType:'DLDD',
         corpsTypeId: this.treeDeptId
       })
       this.loading = true;
@@ -493,31 +493,31 @@ export default {
     },
     gobackSearch(params) {
       params = Object.assign({}, this.search)
-      if (params.businesDate && params.businesDate != '') {
-        params.orderStartDate = params.businesDate[0]+ " " + "00:00:00"
-        params.orderEndDate = params.businesDate[1]+ " " + "23:59:59"
-        this.$delete(params,'businesDate')
-      }
-      if (params.requiredDeliveryDate && params.requiredDeliveryDate != '') {
-        params.deliveryStartDate = params.requiredDeliveryDate[0]+ " " + "00:00:00"
-        params.deliveryEndDate = params.requiredDeliveryDate[1]+ " " + "23:59:59"
-        this.$delete(params,'requiredDeliveryDate')
-      }
-      if (params.requiredArrivalDate && params.requiredArrivalDate != '') {
-        params.arrivalDateStart = params.requiredArrivalDate[0]+ " " + "00:00:00"
-        params.arrivalDateEnd = params.requiredArrivalDate[1]+ " " + "23:59:59"
-        this.$delete(params,'requiredArrivalDate')
-      }
-      if (params.actualDeliveryDate && params.actualDeliveryDate != '') {
-        params.actualDeliveryDateStart = params.actualDeliveryDate[0]+ " " + "00:00:00"
-        params.actualDeliveryDateEnd = params.actualDeliveryDate[1]+ " " + "23:59:59"
-        this.$delete(params,'actualDeliveryDate')
-      }
-      if (params.createTime && params.createTime != '') {
-        params.createTimeStart = params.createTime[0]+ " " + "00:00:00"
-        params.createTimeEnd = params.createTime[1]+ " " + "23:59:59"
-        this.$delete(params,'createTime')
-      }
+      // if (params.businesDate && params.businesDate != '') {
+      //   params.orderStartDate = params.businesDate[0]+ " " + "00:00:00"
+      //   params.orderEndDate = params.businesDate[1]+ " " + "23:59:59"
+      //   this.$delete(params,'businesDate')
+      // }
+      // if (params.requiredDeliveryDate && params.requiredDeliveryDate != '') {
+      //   params.deliveryStartDate = params.requiredDeliveryDate[0]+ " " + "00:00:00"
+      //   params.deliveryEndDate = params.requiredDeliveryDate[1]+ " " + "23:59:59"
+      //   this.$delete(params,'requiredDeliveryDate')
+      // }
+      // if (params.requiredArrivalDate && params.requiredArrivalDate != '') {
+      //   params.arrivalDateStart = params.requiredArrivalDate[0]+ " " + "00:00:00"
+      //   params.arrivalDateEnd = params.requiredArrivalDate[1]+ " " + "23:59:59"
+      //   this.$delete(params,'requiredArrivalDate')
+      // }
+      // if (params.actualDeliveryDate && params.actualDeliveryDate != '') {
+      //   params.actualDeliveryDateStart = params.actualDeliveryDate[0]+ " " + "00:00:00"
+      //   params.actualDeliveryDateEnd = params.actualDeliveryDate[1]+ " " + "23:59:59"
+      //   this.$delete(params,'actualDeliveryDate')
+      // }
+      // if (params.createTime && params.createTime != '') {
+      //   params.createTimeStart = params.createTime[0]+ " " + "00:00:00"
+      //   params.createTimeEnd = params.createTime[1]+ " " + "23:59:59"
+      //   this.$delete(params,'createTime')
+      // }
       return params
     },
     //列保存触发
@@ -528,7 +528,7 @@ export default {
        * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
        */
       const inSave = await this.saveColumnData(
-        this.getColumnName(14),
+        this.getColumnName(420),
         this.option
       );
       if (inSave) {
@@ -543,7 +543,7 @@ export default {
     },
     async resetColumn() {
       this.option = option;
-      const inSave = await this.delColumnData(this.getColumnName(14),option);
+      const inSave = await this.delColumnData(this.getColumnName(420),option);
       if (inSave) {
         this.$nextTick(() => {
           this.$refs.crud.doLayout()

+ 367 - 133
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -8,8 +8,8 @@
         </el-button>
       </div>
       <div class="add-customer-btn">
-        <el-button v-if="detailData.seeDisabled" size="small" @click="editHandle" type="primary" style="margin-right: 8px"
-          :loading="saveLoading">编 辑
+        <el-button v-if="detailData.seeDisabled" size="small" @click="editHandle" type="primary"
+          style="margin-right: 8px" :loading="saveLoading">编 辑
         </el-button>
         <el-dropdown style="margin-right: 8px;">
           <el-button type="primary" size="small" :loading="saveLoading">
@@ -127,8 +127,8 @@
                     :value="item.accountNo"></el-option>
                 </el-select>
                 <el-select v-else-if="item.prop === 'corpAttn'" v-model="form[item.prop]" placeholder="请选择" clearable
-                  filterable allow-create default-first-option size="small" style="width: 100%;" @change="corpAttnChange"
-                  :disabled="detailData.seeDisabled || browse">
+                  filterable allow-create default-first-option size="small" style="width: 100%;"
+                  @change="corpAttnChange" :disabled="detailData.seeDisabled || browse">
                   <el-option v-for="(item, index) in khInfoList" :key="index" :label="item.cname"
                     :value="item.id"></el-option>
                 </el-select>
@@ -140,13 +140,14 @@
                   <el-radio size="small" :disabled="item.disabled || detailData.seeDisabled || browse"
                     v-model.trim="form[item.prop]" :label="0">否</el-radio>
                 </span>
-                <el-select v-else-if="item.prop === 'chargeMember'" v-model="form[item.prop]" placeholder="请选择" filterable
-                  size="small" style="width: 100%;" :disabled="detailData.seeDisabled || browse">
+                <el-select v-else-if="item.prop === 'chargeMember'" v-model="form[item.prop]" placeholder="请选择"
+                  filterable size="small" style="width: 100%;" :disabled="detailData.seeDisabled || browse">
                   <el-option v-for="(item, index) in userList" :key="index" :label="item.cname"
                     :value="item.cname"></el-option>
                 </el-select>
-                <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model.trim="form[item.prop]" size="small"
-                  autocomplete="off" :disabled="item.disabled || detailData.seeDisabled || browse"></el-input>
+                <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model.trim="form[item.prop]"
+                  size="small" autocomplete="off"
+                  :disabled="item.disabled || detailData.seeDisabled || browse"></el-input>
                 <el-input type="age" v-else v-model.trim="form[item.prop]" size="small" autocomplete="off"
                   :disabled="item.disabled || detailData.seeDisabled || browse" clearable></el-input>
               </el-form-item>
@@ -192,8 +193,9 @@
                 </el-input>
                 <el-input v-else-if="item.type == 'number'" placeholder="请输入" v-input-limit="2" size="small"
                   :disabled="item.disabled || detailData.seeDisabled || browse" v-model.trim="form[item.prop]" />
-                <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model.trim="form[item.prop]" size="small"
-                  autocomplete="off" :disabled="item.disabled || detailData.seeDisabled || browse"></el-input>
+                <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model.trim="form[item.prop]"
+                  size="small" autocomplete="off"
+                  :disabled="item.disabled || detailData.seeDisabled || browse"></el-input>
                 <el-input v-else type="age" v-model.trim="form[item.prop]" size="small" autocomplete="off"
                   :disabled="item.disabled || detailData.seeDisabled || browse"></el-input>
               </el-form-item>
@@ -203,9 +205,9 @@
         <containerTitle title="商品信息"></containerTitle>
         <basic-container style="margin-bottom: 10px">
           <avue-crud :option="customerContact" v-model="contactsForm" :data="goodsShowData" ref="crudContact"
-            @row-save="rowSave" @row-click="handleRowClick" @row-update="rowUpdate" @selection-change="productSelection"
-            @row-del="rowDel" @saveColumn="saveColumn('goods')" @resetColumn="resetColumn" :summary-method="summaryMethod"
-            :cell-style="goodsRowClassName" :table-loading="goodsLoading" :key="index">
+            @row-save="rowSave" @row-update="rowUpdate" @selection-change="productSelection"
+            @row-del="rowDel" @saveColumn="saveColumn('goods')" @resetColumn="resetColumn"
+            :summary-method="summaryMethod" :cell-style="goodsRowClassName" :table-loading="goodsLoading" :key="index">
             <template slot="headerSerial">
               <span class="order_number">序号</span>
               <el-button class="number_button" type="primary" icon="el-icon-circle-plus-outline" circle size="mini"
@@ -233,11 +235,11 @@
               <span>{{ row.code }}</span>
             </template>
             <template slot="storageId" slot-scope="{ row }">
-                <!--v-input-limit="2" 代表可以输入2位小数的数字 -->
-              <el-select v-if="row.$cellEdit" v-model="row.storageId" allow-create filterable
-                default-first-option @change="handleStorageNameChange(row)">
-                <el-option v-for="(item, index) in row.storageQuantityList" :key="index" :label="item.storageName +'-'+ item.corpName"
-                  :value="item.storageId"></el-option>
+              <!--v-input-limit="2" 代表可以输入2位小数的数字 -->
+              <el-select v-if="row.$cellEdit" v-model="row.storageId" allow-create filterable default-first-option
+                @change="handleStorageNameChange(row)">
+                <el-option v-for="(item, index) in row.storageQuantityList" :key="index"
+                  :label="item.storageName + '-' + item.corpName" :value="item.storageId"></el-option>
               </el-select>
               <span v-else>{{ row.storageName }}</span>
             </template>
@@ -317,6 +319,10 @@
                 :disabled="detailData.seeDisabled || !form.corpId || browse" v-show="goodsActives == 'goods'">
                 政策
               </el-button>
+              <el-button type="primary" icon="el-icon-plus" size="small" @click="DLSelection"
+                :disabled="detailData.seeDisabled || !form.corpId || browse">
+                代理订单
+              </el-button>
               <!--              禁用规则:未选择明细,未点击编辑按钮,未进行审批,已经生成过-->
               <!-- <el-button type="warning" icon="el-icon-plus" size="small"
                 :disabled="selection.length !== goodsShowData.length || detailData.seeDisabled || !form.status || form.status < 3 || form.createFreight == 1 || goodsShowData.length == 0"
@@ -395,11 +401,55 @@
       </el-row>
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisible = false" :loading="saveLoading">取 消</el-button>
-        <el-button type="primary" @click="importGoods" v-if="commodityData !== true" :loading="saveLoading">导入</el-button>
+        <el-button type="primary" @click="importGoods" v-if="commodityData !== true"
+          :loading="saveLoading">导入</el-button>
         <el-button type="primary" @click="importChoice" v-if="commodityData === true" :loading="saveLoading"
           :disabled="tableData.length !== 1">导入</el-button>
       </span>
     </el-dialog>
+    <el-dialog title="代理订单" append-to-body class="el-dialogDeep" :visible.sync="dialogVisibleDL" width="80%"
+      :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" @close="closeDL">
+      <el-row :style="{ height: rowHeight }">
+        <el-col :span="10" style="height: 100%;overflow-y: auto">
+          <div>
+            <avue-crud :data="dataDL" :option="optionDL" @row-click="handleRowClick"></avue-crud>
+          </div>
+        </el-col>
+        <el-col :span="14">
+          <basic-container>
+            <avue-crud :option="optionTwo" :table-loading="loading" :data="DLListShow" ref="crud"
+              @refresh-change="refreshChangeDL" @selection-change="selectionChangeDL" @search-change="DLSearch"
+              :page.sync="page">
+              <template slot="menuLeft">
+                <el-tabs v-model="activeName" @tab-click="tabHandleDL">
+                  <el-tab-pane label="查询结果" name="searchList" />
+                  <el-tab-pane label="已选定数据" name="importStaging" />
+                </el-tabs>
+              </template>
+              <template slot="orderQuantity" slot-scope="{row}">
+                <el-input-number v-model="row.orderQuantity" size="small" :controls="false" :precision="0"
+                  @input="amountChange(row)" style="width: 100%" />
+              </template>
+              <template slot-scope="scope" slot="menu">
+                <el-button type="text" icon="el-icon-edit" size="small"
+                  @click.stop="importStagList(scope.row, scope.index, 'DL')" v-if="activeName == 'searchList'"
+                  :disabled="DLListSave.findIndex(item => item.id == scope.row.id) !== -1">选择
+                </el-button>
+                <el-button type="text" icon="el-icon-delete" size="small"
+                  @click.stop="removeStagList(scope.row, scope.index, 'DL')" v-else>移除
+                </el-button>
+              </template>
+            </avue-crud>
+          </basic-container>
+        </el-col>
+      </el-row>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false" :loading="saveLoading">取 消</el-button>
+        <el-button type="primary" @click="importDL" v-if="commodityData !== true" :loading="saveLoading">导入</el-button>
+        <!-- <el-button type="primary" @click="importDL" v-if="commodityData === true" :loading="saveLoading"
+          :disabled="tableData.length !== 1">导入</el-button> -->
+      </span>
+    </el-dialog>
     <el-dialog title="导入政策" append-to-body class="el-dialogDeep" :visible.sync="policyDialog" width="80%"
       :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" @close="closePolicy">
       <el-row :style="{ height: rowHeight }">
@@ -433,9 +483,9 @@
               <template slot="menuLeft">
                 <el-button type="info" size="mini" icon="el-icon-download" @click="downLoadPolicy">下载模板</el-button>
                 <el-upload :action="policyUrl + '?policyName=' + uploadPolicy.policyName + '&salesType=1'"
-                  :headers="headers" :disabled="uploadPolicy.policyName === '' || loadingPolicy" :on-progress="uploading"
-                  :show-file-list=false accept=".xls,.xlsx" multiple :on-success="successPolicy" :on-error="uploadError"
-                  style="float: right">
+                  :headers="headers" :disabled="uploadPolicy.policyName === '' || loadingPolicy"
+                  :on-progress="uploading" :show-file-list=false accept=".xls,.xlsx" multiple
+                  :on-success="successPolicy" :on-error="uploadError" style="float: right">
                   <el-button type="warning" size="mini" icon="el-icon-upload"
                     :disabled="uploadPolicy.policyName === '' || loadingPolicy" :loading="loadingPolicy">导 入
                   </el-button>
@@ -452,8 +502,8 @@
           </basic-container>
           <containerTitle title="买赠促销"></containerTitle>
           <basic-container>
-            <avue-crud :option="customerBuyFree" :data="contactsDataBuyFree" @selection-change="selectionChangePolicyTwo"
-              :table-loading="loadingPolicy" ref="crudContactE">
+            <avue-crud :option="customerBuyFree" :data="contactsDataBuyFree"
+              @selection-change="selectionChangePolicyTwo" :table-loading="loadingPolicy" ref="crudContactE">
               <template slot-scope="scope" slot="menu">
                 <el-button type="text" icon="el-icon-edit" size="mini" v-if="activeName == 'searchList'"
                   @click.stop="importStagList(scope.row, scope.index, 'policy_buyAndGive')"
@@ -553,7 +603,9 @@ import {
   removeList,
   repealCancel,
   saveSell,
-  typeSave
+  typeSave,
+  getAgencyOrder,
+  getAgencyOrderItem
 } from "@/api/basicData/configuration"
 import { getList } from "@/api/basicData/commodityType";
 import { getCorpDetail } from "@/api/maintenance/overpayment"
@@ -613,10 +665,34 @@ export default {
   },
   data() {
     return {
+      dataDL: [],
+      optionDL: {
+        header: false,
+        menu:false,
+        column: [
+          {
+            label: '订单号',
+            prop: 'orgOrderNo',
+            overHidden: true
+          }, {
+            label: '订单日期',
+            prop: 'businesDate',
+            overHidden: true
+          }, {
+            label: '收货地址',
+            prop: 'arrivalAddress',
+            overHidden: true
+          }, {
+            label: '品牌',
+            prop: 'brand',
+            overHidden: true
+          }
+        ]
+      },
       storageNameList: [],
       surplusRouteQuantityOption: [],
       saveLoading: false,
-      userInfo:null,
+      userInfo: null,
       disabled: false,
       form: {
         corpId: null,
@@ -662,6 +738,7 @@ export default {
       choiceData: false,
       commodityData: false,
       dataCost: [],
+      treeDataDL: [],
       treeDataPolicy: [],
       treeDataGoods: [],
       choiceIndex: '',
@@ -1367,6 +1444,7 @@ export default {
       switchDialog: false,
       // 商品信息表格loading
       goodsLoading: false,
+      dialogVisibleDL: false,
       // 上传时带的参数
       uploadPolicy: {
         policyName: '',
@@ -1378,10 +1456,12 @@ export default {
       activeName: 'searchList',
       // 商品列表数据合计
       goodsListShow: [],
+      DLListShow: [],
       dataTwo: [],
       dataThree: [],
       // 商品列表暂存
       goodsListSave: [],
+      DLListSave: [],
       goodsListPolicy: [],
       buyAndGiveList: [],
       goodsListTotal: 0,
@@ -1488,7 +1568,7 @@ export default {
     }
     this.getDefault()
     if (this.detailData.id) {
-       // 详情进入
+      // 详情进入
       this.queryData(this.detailData.id)
     }
     if (this.detailData.check) {
@@ -1503,7 +1583,7 @@ export default {
 
     }
     if (this.detailData.copyId) {
-        // 复制进入
+      // 复制进入
       this.queryData(this.detailData.copyId, true)
     }
     this.oldForm = Object.assign({}, this.form);
@@ -1533,7 +1613,7 @@ export default {
       }
     },
     handleStorageNameChange(row) {
-        console.log(row,1535)
+      console.log(row, 1535)
       this.choiceIndexT = row.$index
       let index = row.storageQuantityList.findIndex(function (item) {
         return item.storageId === row.storageId;
@@ -1543,9 +1623,9 @@ export default {
       this.goodsShowData[this.choiceIndexT].storageName = row.storageQuantityList[index].storageName;
       this.goodsShowData[this.choiceIndexT].purchaseAmount = row.storageQuantityList[index].stockPrice;
 
-        // 获取供应商名称
-        this.goodsShowData[this.choiceIndexT].corpId = row.storageQuantityList[index].corpId;
-        this.goodsShowData[this.choiceIndexT].corpName = row.storageQuantityList[index].corpName;
+      // 获取供应商名称
+      this.goodsShowData[this.choiceIndexT].corpId = row.storageQuantityList[index].corpId;
+      this.goodsShowData[this.choiceIndexT].corpName = row.storageQuantityList[index].corpName;
     },
     getGoodsRow(event, row) {
       row.priceCategory = event.goodsTypeName
@@ -1567,9 +1647,9 @@ export default {
           row.storageId = res.data.data[0].storageId
           row.storageName = res.data.data[0].storageName
           row.storageQuantity = res.data.data[0].surplusRouteQuantity
-            // 获取供应商名称
-            row.corpId = res.data.data[0].corpId;
-            row.corpName = res.data.data[0].corpName;
+          // 获取供应商名称
+          row.corpId = res.data.data[0].corpId;
+          row.corpName = res.data.data[0].corpName;
           if (res.data.data[0].tenantId !== "681169") {
             row.purchaseAmount = res.data.data[0].stockPrice
           }
@@ -1580,7 +1660,7 @@ export default {
       this.quantityChange(row)
     },
     queryData(id, isCopy = false, other) {
-        console.log(id,isCopy,other,'1573')
+      console.log(id, isCopy, other, '1573')
       this.pageLoading = true
       this.saveLoading = true
       detail(id).then(async res => {
@@ -1593,18 +1673,18 @@ export default {
         })
 
         this.contactsData = this.form.orderItemsList.filter(item => {
-            return item.goodType == 0
+          return item.goodType == 0
         })
-          for(let item of this.contactsData) {
-              item.storageId = item.storageId + '-' + item.corpId
-          }
-          console.log(this.contactsData,1598)
+        for (let item of this.contactsData) {
+          item.storageId = item.storageId + '-' + item.corpId
+        }
+        console.log(this.contactsData, 1598)
         this.giftData = this.form.orderItemsList.filter(item => {
           return item.goodType == 1
         })
-          for(let item of this.giftData) {
-              item.storageId = item.storageId + '-' + item.corpId
-          }
+        for (let item of this.giftData) {
+          item.storageId = item.storageId + '-' + item.corpId
+        }
         this.goodsShowData = this.giftData;
         this.goodsActives = 'goods';
         this.handleClick({ name: this.goodsActives })
@@ -1685,19 +1765,19 @@ export default {
         this.oldFeesList = this.deepClone(this.advantageProjectData)
         this.oldUploadList = this.deepClone(this.bankOfDepositData)
         if (isCopy) {
-            // 复制的处理数据
+          // 复制的处理数据
           this.$set(this.form, 'orderStatus', '录入')
           this.form.status = 0
           this.browse = false
 
-            // 复制的数据要清除 生产时间
-            this.form.actualDeliveryDate = null
-            // 已收款复制零
-            this.form.settlmentAmount = 0
-            this.form.thisUsedProfit = 0
-            this.form.purchaseStatus = null
-            this.form.receivingStatus = null
-            this.form.specialCheckStatus = 0
+          // 复制的数据要清除 生产时间
+          this.form.actualDeliveryDate = null
+          // 已收款复制零
+          this.form.settlmentAmount = 0
+          this.form.thisUsedProfit = 0
+          this.form.purchaseStatus = null
+          this.form.receivingStatus = null
+          this.form.specialCheckStatus = 0
 
           delete this.form.id
           delete this.form.orgOrderNo
@@ -1834,6 +1914,7 @@ export default {
     },
     //点击行可编辑
     handleRowClick(row, event, column) {
+      this.onLoadDL(row)
     },
     //商品编辑
     rowCell(row, index) {
@@ -1851,20 +1932,20 @@ export default {
           warehouseId: selectedValue
         }).then(res => {
           if (res.data.data.length > 0) {
-              var datas = res.data.data;
+            var datas = res.data.data;
 
-              var arr = datas.map(item=>{
-                  item.storageId = item.storageId + '-' + item.corpId
-                  return item
-              })
+            var arr = datas.map(item => {
+              item.storageId = item.storageId + '-' + item.corpId
+              return item
+            })
             this.$set(this.goodsShowData[row.$index], 'storageQuantityList', arr)
             // this.goodsShowData[row.$index].storageQuantityList = res.data.data;
             this.goodsShowData[row.$index].storageId = res.data.data[0].storageId;
             this.goodsShowData[row.$index].storageName = res.data.data[0].storageName;
             this.goodsShowData[row.$index].storageQuantity = res.data.data[0].surplusRouteQuantity;
             // 获取供应商名称
-              this.goodsShowData[row.$index].corpId = res.data.data[0].corpId;
-              this.goodsShowData[row.$index].corpName = res.data.data[0].corpName;
+            this.goodsShowData[row.$index].corpId = res.data.data[0].corpId;
+            this.goodsShowData[row.$index].corpName = res.data.data[0].corpName;
             if (res.data.data[0].tenantId !== "681169") {
               this.goodsShowData[row.$index].purchaseAmount = res.data.data[0].stockPrice
             }
@@ -1894,6 +1975,18 @@ export default {
       this.commodityData = false
       this.goodsListSave = [];
     },
+    DLSelection() {
+      if (this.form.storageId == '') {
+        return this.$message.error('请选择仓库')
+      }
+      this.dialogVisibleDL = !this.dialogVisibleDL
+      this.tableData = []
+      this.commodityData = false
+      this.DLListSave = [];
+      getAgencyOrder().then(res => {
+        this.dataDL = res.data.data
+      })
+    },
     //政策价格导入
     policy() {
       this.$set(this.customerBuyFree, 'menu', true)
@@ -1986,7 +2079,7 @@ export default {
         this.$set(item, 'amount', '0')
         this.$set(item, 'sort', this.maxFeeNum + 1)
 
-          this.$set(item, 'storageId',item.storageId + '-' + item.corpId)
+        this.$set(item, 'storageId', item.storageId + '-' + item.corpId)
 
         this.maxFeeNum++
         let a = {
@@ -2314,9 +2407,9 @@ export default {
           row.storageId = res.data.data[0].storageId
           row.storageName = res.data.data[0].storageName
           row.storageQuantity = res.data.data[0].surplusRouteQuantity
-            // 获取供应商名称
-            row.corpId = res.data.data[0].corpId
-            row.corpName = res.data.data[0].corpName
+          // 获取供应商名称
+          row.corpId = res.data.data[0].corpId
+          row.corpName = res.data.data[0].corpName
           if (res.data.data[0].tenantId !== "681169") {
             row.purchaseAmount = res.data.data[0].stockPrice
           }
@@ -2356,9 +2449,9 @@ export default {
             this.goodsShowData[this.choiceIndexT].storageId = res.data.data[0].storageId
             this.goodsShowData[this.choiceIndexT].storageName = res.data.data[0].storageName
             this.goodsShowData[this.choiceIndexT].storageQuantity = res.data.data[0].surplusRouteQuantity
-              // 获取供应商名称
-              this.goodsShowData[this.choiceIndexT].corpId = res.data.data[0].corpId
-              this.goodsShowData[this.choiceIndexT].corpName = res.data.data[0].corpName
+            // 获取供应商名称
+            this.goodsShowData[this.choiceIndexT].corpId = res.data.data[0].corpId
+            this.goodsShowData[this.choiceIndexT].corpName = res.data.data[0].corpName
             if (res.data.data[0].tenantId !== "681169") {
               this.goodsShowData[this.choiceIndexT].purchaseAmount = res.data.data[0].stockPrice
             }
@@ -2409,6 +2502,107 @@ export default {
         }
       }
     },
+    async importDL() {
+      this.surplusRouteQuantityOption.push({ storageQuantity: '0' });
+      if (this.DLListSave.length > 0) {
+        this.DLListSaveHandle()
+      } else {
+        if (this.tableData.length > 0) {
+          this.tableDataHandle()
+        }
+      }
+    },
+    DLListSaveHandle() {
+      this.saveLoading = true;
+      for (let item in this.DLListSave) {
+        getMarketPrice({
+          code: this.DLListSave[item].code,
+          isFreight: this.form.isFreight,
+          isLabel: this.form.isLabel
+        }).then(res => {
+          if (res.data.data.length > 0) {
+            this.$set(this.DLListSave[item], 'price', res.data.data[0].salePrice)
+          } else {
+            this.$set(this.DLListSave[item], 'price', '0')
+          }
+          this.priceChange(this.DLListSave[item])
+        })
+        selectGoodsNum({
+          goodsId: this.DLListSave[item].id,
+          itemType: this.DLListSave[item].typeno,
+          tradeType: 'GN',
+          warehouseId: this.form.storageId
+        }).then(res => {
+          if (res.data.data.length > 0) {
+            res.data.data.forEach(e => {
+              e.storageId = e.storageId + '-' + e.corpId
+            })
+            this.$set(this.DLListSave[item], 'storageQuantityList', res.data.data)
+            this.$set(this.DLListSave[item], 'storageId', res.data.data[0].storageId)
+            this.$set(this.DLListSave[item], 'storageName', res.data.data[0].storageName)
+            this.$set(this.DLListSave[item], 'storageQuantity', res.data.data[0].surplusRouteQuantity)
+            // 获取供应商名称
+            this.$set(this.DLListSave[item], 'corpId', res.data.data[0].corpId)
+            this.$set(this.DLListSave[item], 'corpName', res.data.data[0].corpName)
+            if (res.data.data[0].tenantId !== "681169") {
+              this.$set(this.DLListSave[item], 'purchaseAmount', res.data.data[0].stockPrice)
+            }
+          }
+
+          // this.DLListSave[item].storageQuantity =  res.data.data
+          this.$set(this.DLListSave[item], 'priceCategory', this.DLListSave[item].goodsTypeName)
+          // this.DLListSave[item].priceCategory = this.DLListSave[item].goodsTypeName
+          delete this.DLListSave[item].goodsTypeName
+          this.DLListSave[item].itemId = this.DLListSave[item].id
+          this.$set(this.DLListSave[item], 'corpName', this.DLListSave[item].corpName)
+          this.$set(this.DLListSave[item], 'itemType', this.DLListSave[item].typeno)
+          // this.$set(this.DLListSave[item], 'orderQuantity', 1)
+          this.$set(this.DLListSave[item], 'actualQuantity', 0)
+          this.$set(this.DLListSave[item], 'invoiceWeight', this.DLListSave[item].cartonWeight)
+          this.$set(this.DLListSave[item], 'shopQuality', 0)
+          this.$set(this.DLListSave[item], 'inputMold', 0) // 判断是商品还是政策 商品 0 特价 1 买赠2
+          // this.$set(this.DLListSave[item], 'priceType', this.DLListSave[item].policyName)
+          this.DLListSave[item].amount = 0
+          if (this.goodsActives == "goods") {
+            this.$set(this.DLListSave[item], 'goodType', 0)
+          } else {
+            this.$set(this.DLListSave[item], 'goodType', 1)
+            this.$set(this.DLListSave[item], 'integralMultiples', this.DLListSave[item].integral)
+          }
+          this.$set(this.DLListSave[item], 'integral', '0')
+          this.DLListSave[item].sort = this.maxGoodsNum + 1
+          if (this.form.packageRemarks) {
+            this.DLListSave[item].packageRemarks = this.form.packageRemarks
+          }
+          delete this.DLListSave[item].id
+          delete this.DLListSave[item].pid
+          delete this.DLListSave[item].isDeleted
+          delete this.DLListSave[item].status
+          delete this.DLListSave[item].tenantId
+          delete this.DLListSave[item].updateTime
+          delete this.DLListSave[item].updateUser
+          delete this.DLListSave[item].updateUserName
+          this.maxGoodsNum++
+
+          getPurchasePrice({ code: this.DLListSave[item].code }).then(res => {
+            if (res.data.data.length > 0) {
+              this.$set(this.DLListSave[item], 'purchaseAmount', res.data.data[0].purchasePrice)
+              this.$set(this.DLListSave[item], 'purchaseRebatePrice', res.data.data[0].purchaseRebatePrice)
+            } else {
+              this.$set(this.DLListSave[item], 'purchaseAmount', '0')
+            }
+            this.quantityChange(this.DLListSave[item])
+            this.$refs.crudContact.rowCellAdd(this.DLListSave[item]);
+            this.$nextTick(() => {
+              this.quantityChange(this.DLListSave[item])
+            })
+          })
+          // this.$refs.crudContact.rowCell(this.DLListSave[item], this.DLListSave.length - 1)
+        })
+      }
+      this.saveLoading = false;
+      this.dialogVisibleDL = false
+    },
     goodsListSaveHandle() {
       this.saveLoading = true;
       for (let item in this.goodsListSave) {
@@ -2431,16 +2625,16 @@ export default {
           warehouseId: this.form.storageId
         }).then(res => {
           if (res.data.data.length > 0) {
-              res.data.data.forEach(e=>{
-                  e.storageId = e.storageId + '-' + e.corpId
-              })
+            res.data.data.forEach(e => {
+              e.storageId = e.storageId + '-' + e.corpId
+            })
             this.$set(this.goodsListSave[item], 'storageQuantityList', res.data.data)
             this.$set(this.goodsListSave[item], 'storageId', res.data.data[0].storageId)
             this.$set(this.goodsListSave[item], 'storageName', res.data.data[0].storageName)
             this.$set(this.goodsListSave[item], 'storageQuantity', res.data.data[0].surplusRouteQuantity)
-              // 获取供应商名称
-              this.$set(this.goodsListSave[item], 'corpId', res.data.data[0].corpId)
-              this.$set(this.goodsListSave[item], 'corpName', res.data.data[0].corpName)
+            // 获取供应商名称
+            this.$set(this.goodsListSave[item], 'corpId', res.data.data[0].corpId)
+            this.$set(this.goodsListSave[item], 'corpName', res.data.data[0].corpName)
             if (res.data.data[0].tenantId !== "681169") {
               this.$set(this.goodsListSave[item], 'purchaseAmount', res.data.data[0].stockPrice)
             }
@@ -2523,16 +2717,16 @@ export default {
           warehouseId: selectedValue
         }).then(res => {
           if (res.data.data.length > 0) {
-              res.data.data.forEach(e=>{
-                  e.storageId = e.storageId + '-' + e.corpId
-              })
+            res.data.data.forEach(e => {
+              e.storageId = e.storageId + '-' + e.corpId
+            })
             this.tableData[item].storageQuantityList = res.data.data;
             this.tableData[item].storageId = res.data.data[0].storageId;
             this.tableData[item].storageName = res.data.data[0].storageName;
             this.tableData[item].storageQuantity = res.data.data[0].surplusRouteQuantity;
-              // 获取供应商名称
-              this.tableData[item].corpId = res.data.data[0].corpId;
-              this.tableData[item].corpName = res.data.data[0].corpName;
+            // 获取供应商名称
+            this.tableData[item].corpId = res.data.data[0].corpId;
+            this.tableData[item].corpName = res.data.data[0].corpName;
             if (res.data.data[0].tenantId !== "681169") {
               this.tableData[item].purchaseAmount = res.data.data[0].stockPrice;
             }
@@ -2594,6 +2788,11 @@ export default {
       this.treeDeptId = "";
       this.activeName = "searchList";
     },
+    closeDL() {
+      this.treeDataDL = [];
+      this.treeDeptId = "";
+      this.activeName = "searchList";
+    },
     closeFees() {
       this.treeDeptIdCost = "";
       this.treeData = [];
@@ -2610,6 +2809,10 @@ export default {
     selectionChange(list) {
       this.tableData = list
     },
+    //选中触发
+    selectionChangeDl(list) {
+      this.tableData = list
+    },
     //费用选中触发
     selectionChangeCost(list) {
       this.tableDataCost = list
@@ -2620,6 +2823,11 @@ export default {
       this.page.currentPage = 1;
       this.onLoad(this.page);
     },
+    nodeClickDL(data) {
+      this.treeDeptId = data.id;
+      this.page.currentPage = 1;
+      this.onLoadDL(this.page);
+    },
     //导入页销售政策查询
     policyNodeClick(data) {
       this.uploadPolicy.policyName = data.id;
@@ -2699,8 +2907,8 @@ export default {
       if (this.policyDataTwo.length > 0 || this.goodsListPolicy.length > 0 || this.buyAndGiveList.length > 0) {
         buyFree = this.deepClone((this.policyDataTwo.concat(this.goodsListPolicy)).concat(this.buyAndGiveList))
       }
-        console.log(this.policyData,'上面选择的数据')
-        console.log(this.goodsListPolicy,'下面选择的数据')
+      console.log(this.policyData, '上面选择的数据')
+      console.log(this.goodsListPolicy, '下面选择的数据')
       for (let item in list) {
         if (this.policyData.length > 0 || this.buyAndGiveList > 0) {
           if (!list[item].specialOffer) {
@@ -2744,9 +2952,9 @@ export default {
           }
           this.$set(list[item], 'inputMold', 2)
           this.$set(buyFree[item], 'inputMold', 2)
-            // 赠品价格是零
+          // 赠品价格是零
           // this.$set(buyFree[item], 'price', list[item].salesPrice)
-            this.$set(buyFree[item], 'price', 0)
+          this.$set(buyFree[item], 'price', 0)
           this.$set(buyFree[item], 'orderQuantity', list[item].salesVolume)
           this.$set(buyFree[item], 'itemType', list[item].typeno)
           this.$set(list[item], 'goodType', 0)
@@ -2758,16 +2966,16 @@ export default {
           warehouseId: this.form.storageId
         }).then(res => {
           if (res.data.data.length > 0) {
-              res.data.data.forEach(e=>{
-                  e.storageId = e.storageId + '-' + e.corpId
-              })
+            res.data.data.forEach(e => {
+              e.storageId = e.storageId + '-' + e.corpId
+            })
             this.$set(list[item], 'storageQuantityList', res.data.data)
             this.$set(list[item], 'storageId', res.data.data[0].storageId)
             this.$set(list[item], 'storageName', res.data.data[0].storageName)
             this.$set(list[item], 'storageQuantity', res.data.data[0].surplusRouteQuantity)
-              // 获取供应商名称
-              this.$set(list[item], 'corpId', res.data.data[0].corpId)
-              this.$set(list[item], 'corpName', res.data.data[0].corpName)
+            // 获取供应商名称
+            this.$set(list[item], 'corpId', res.data.data[0].corpId)
+            this.$set(list[item], 'corpName', res.data.data[0].corpName)
             if (res.data.data[0].tenantId !== "681169") {
               this.$set(list[item], 'purchaseAmount', res.data.data[0].stockPrice)
             }
@@ -2813,12 +3021,12 @@ export default {
             this.$set(buyFree[item], 'shopQuality', 0)
             this.$set(buyFree[item], 'goodType', 0)
 
-              // 把采购价格赋值给返利价格
+            // 把采购价格赋值给返利价格
             this.$set(buyFree[item], 'purchaseRebatePrice', buyFree[item].purchaseAmount)
-              // 把买的库区赋值给赠的库区上
-              this.$set(buyFree[item], 'storageId', list[item].storageId)
-              // 把买的库存赋值给赠的库存上
-              this.$set(buyFree[item], 'storageQuantity', list[item].storageQuantity)
+            // 把买的库区赋值给赠的库区上
+            this.$set(buyFree[item], 'storageId', list[item].storageId)
+            // 把买的库存赋值给赠的库存上
+            this.$set(buyFree[item], 'storageQuantity', list[item].storageQuantity)
 
             this.maxGoodsNum++
             delete buyFree[item].id
@@ -2851,35 +3059,35 @@ export default {
               // for (let i = 0; i < this.$refs.crudContact.list.length; i++) {
               //   this.$refs.crudContact.list[i].purchaseRebatePrice = rest.data.data[0].purchaseRebatePrice;
               // }
-                this.$nextTick(()=>{
-                    this.$refs.crudContact.rowCellAdd(list[item]);
-                    this.quantityChange(list[item])
-                })
-                if (listLength != 0) {
-                    this.$refs.crudContact.rowCellAdd(buyFree[item]);
-                    this.quantityChange(buyFree[item])
-                }
+              this.$nextTick(() => {
+                this.$refs.crudContact.rowCellAdd(list[item]);
+                this.quantityChange(list[item])
+              })
+              if (listLength != 0) {
+                this.$refs.crudContact.rowCellAdd(buyFree[item]);
+                this.quantityChange(buyFree[item])
+              }
             } else {
               console.log('rest>>>2', rest);
               this.$set(this.$refs.crudContact.list[this.$refs.crudContact.list.length - 1], 'purchaseRebatePrice', 0)
               // this.$refs.crudContact.list[item].purchaseRebatePrice = 0
               this.$refs.crudContact.rowCellAdd(list[item]);
-                if (listLength != 0) {
-                    this.$refs.crudContact.rowCellAdd(buyFree[item]);
-                    this.quantityChange(buyFree[item])
-                }
-            }
-          }).catch(err=>{
-            this.$refs.crudContact.rowCellAdd(list[item]);
               if (listLength != 0) {
-                  this.$refs.crudContact.rowCellAdd(buyFree[item]);
-                  this.quantityChange(buyFree[item])
+                this.$refs.crudContact.rowCellAdd(buyFree[item]);
+                this.quantityChange(buyFree[item])
               }
+            }
+          }).catch(err => {
+            this.$refs.crudContact.rowCellAdd(list[item]);
+            if (listLength != 0) {
+              this.$refs.crudContact.rowCellAdd(buyFree[item]);
+              this.quantityChange(buyFree[item])
+            }
           })
 
-            // this.$refs.crudContact.rowCellAdd(list[item]);
-            console.log('rest>>>', this.$refs.crudContact);
-            console.log(this.$refs.crudContact,'this.$refs.crudContact')
+          // this.$refs.crudContact.rowCellAdd(list[item]);
+          console.log('rest>>>', this.$refs.crudContact);
+          console.log(this.$refs.crudContact, 'this.$refs.crudContact')
           // this.$nextTick(() => {
           //     // 先让赠送的添加进去 延迟添加数据
           //     // this.$refs.crudContact.rowCellAdd(list[item]);
@@ -3035,6 +3243,15 @@ export default {
       this.onLoad(this.page, params);
       done()
     },
+    DLSearch(params, done) {
+      this.treeDeptId = ''
+      params = {
+        ...params,
+        artsVision: this.form.belongToCorpId
+      }
+      this.onLoadDL(this.page, params);
+      done()
+    },
     //商品列表查询
     onLoad(page, params = { artsVision: this.form.belongToCorpId }) {
       this.loading = true;
@@ -3047,6 +3264,14 @@ export default {
         this.loading = false;
       });
     },
+    //商品列表查询
+    onLoadDL(row) {
+      this.loading = true;
+      getAgencyOrderItem({id:row.id}).then(res => {
+        this.DLListShow = res.data.data;
+        this.loading = false;
+      });
+    },
     // 费用查询按钮
     feesSearch(params, done) {
       this.treeDeptIdCost = '';
@@ -3142,10 +3367,10 @@ export default {
           let packFee;
           if (this.form.packageRemarks && this.form.packageRemarks.indexOf('无包装') == -1) {
             let arr = this.form.orderFeesList.filter(item => {
-                return item.feesType == 1
+              return item.feesType == 1
             })
             packFee = arr.findIndex(item => {
-                return item.feeName == '包装费'
+              return item.feeName == '包装费'
             })
           }
           if (packFee == -1) {
@@ -3201,12 +3426,12 @@ export default {
             });*/
           await this.computedCost()
 
-            // 把库区拼接的id拆开
-            for(let item of this.form.orderItemsList) {
-                console.log(item.storageId,item.storageId.indexOf('-'),3151)
-                item.storageId = item.storageId.slice(0,item.storageId.indexOf('-'))
-                console.log(item.storageId.slice(0,item.storageId.indexOf('-')))
-            }
+          // 把库区拼接的id拆开
+          for (let item of this.form.orderItemsList) {
+            console.log(item.storageId, item.storageId.indexOf('-'), 3151)
+            item.storageId = item.storageId.slice(0, item.storageId.indexOf('-'))
+            console.log(item.storageId.slice(0, item.storageId.indexOf('-')))
+          }
 
           typeSave(this.form).then(res => {
             if (!other) {
@@ -3258,9 +3483,9 @@ export default {
               this.beforeBillData(true, type)
               this.applySettlementDialog = true;
             }
-          }).catch(()=>{
-            for(let item of this.form.orderItemsList) {
-                item.storageId =item.storageQuantityList.length? item.storageQuantityList[0].storageId:item.storageId
+          }).catch(() => {
+            for (let item of this.form.orderItemsList) {
+              item.storageId = item.storageQuantityList.length ? item.storageQuantityList[0].storageId : item.storageId
             }
           }).finally(() => {
             this.saveLoading = false
@@ -3567,6 +3792,15 @@ export default {
       }
       return sums;
     },
+    tabHandleDL(data) {
+      if (data.name == 'searchList') {
+        this.DLListShow = this.data;
+        this.page.total = this.pageList.total
+      } else if (data.name == 'importStaging') {
+        this.DLListShow = this.DLListSave;
+        this.page.total = 0
+      }
+    },
     // 标签页切换
     tabHandle(data) {
       if (data.name == 'searchList') {
@@ -3920,19 +4154,19 @@ export default {
           goodsId: item.itemId,
           itemType: item.itemType ? item.itemType : item.typeno,
           tradeType: 'GN',
-          storageId: item.storageId.slice(0,item.storageId.indexOf('-'))
+          storageId: item.storageId.slice(0, item.storageId.indexOf('-'))
         }).then(res => {
           if (res.data.data.length > 0) {
-              res.data.data.forEach(e=>{
-                  e.storageId = e.storageId + '-' + e.corpId
-              })
+            res.data.data.forEach(e => {
+              e.storageId = e.storageId + '-' + e.corpId
+            })
             item.storageQuantityList = res.data.data
             item.storageId = res.data.data[0].storageId
             item.storageName = res.data.data[0].storageName
             item.storageQuantity = res.data.data[0].surplusRouteQuantity
-              // 获取供应商名称
-              item.corpId = res.data.data[0].corpId
-              item.corpName = res.data.data[0].corpName
+            // 获取供应商名称
+            item.corpId = res.data.data[0].corpId
+            item.corpName = res.data.data[0].corpName
             if (res.data.data[0].tenantId !== "681169") {
               item.purchaseAmount = res.data.data[0].stockPrice
             }
@@ -3940,7 +4174,7 @@ export default {
 
         })
       })
-        console.log(this.goodsShowData,3885)
+      console.log(this.goodsShowData, 3885)
       this.$message.success('刷新成功')
     },
     // 导入政策下载模板

+ 20 - 1
src/views/iosBasicData/ComputationCenter/index.vue

@@ -100,7 +100,7 @@ export default {
                 calcHeight: 30,
                 tip: false,
                 searchShow: true,
-                searchMenuSpan: 12,
+                searchMenuSpan: 18,
                 searchLabelWidth: '100',
                 border: true,
                 index: true,
@@ -279,6 +279,25 @@ export default {
                         overHidden: true,
                     },
                     {
+                        label: "对账单号",
+                        prop: "checkNo",
+                        search: true,
+                        width: "100",
+                        overHidden: true
+                    },
+                    {
+                        label: "船名",
+                        prop: "vesselCnName",
+                        search: true,
+                        overHidden: true
+                    },
+                    {
+                        label: "航次",
+                        prop: "voyageNo",
+                        search: true,
+                        overHidden: true
+                    },
+                    {
                         label: "CNY",
                         prop: "amountSub",
                         overHidden: true,

+ 7 - 7
src/views/iosBasicData/OceanFreightImport/bills/assembly/feecenter.vue

@@ -509,7 +509,7 @@ import reportformsList from "@/views/iosBasicData/OceanFreightImport/bills/assem
 import { getList as reportsList } from "@/api/iosBasicData/reports";
 import { dateFormat } from "@/util/date";
 import { getToken } from "@/util/auth";
-
+import _ from "lodash";
 export default {
     components: { reportContainer, SearchQuery, reportformsList },
     props: {
@@ -1336,12 +1336,12 @@ export default {
                 })
                 this.sumData.push({
                     corpCnName: e,
-                    rmbD: rmbD,
-                    rmbC: rmbC,
-                    usdD: usdD,
-                    usdC: usdC,
-                    sumD: sumD,
-                    sumC: sumC
+                    rmbD: _.round(rmbD, 2),
+                    rmbC: _.round(rmbC, 2),
+                    usdD: _.round(usdD, 2),
+                    usdC: _.round(usdC, 2),
+                    sumD: _.round(sumD, 2),
+                    sumC: _.round(sumC, 2)
                 })
             })
         },

+ 1 - 1
src/views/iosBasicData/PaymentApplication/assembly/finstlbillsitems.vue

@@ -54,7 +54,7 @@
             <el-table-column prop="currentStlAmountRMB" label="本次CNY" width="100px">
                 <template slot-scope="scope">
                     <el-input style="width: 100%;" v-model="scope.row.currentStlAmountRMB"
-                        :disabled="scope.row.curCode != 'CNY' || settlementdistar" v-if="(brfalse && !editSave)"
+                        :disabled="scope.row.curCode != 'CNY' || settlementdistar||!(form.status == '0' || form.status == '4')" v-if="(brfalse && !editSave)"
                         size="mini" autocomplete="off" clearable placeholder="请输入USD" @change="armbChange(scope.row)">
                     </el-input>
                     <span v-else>{{ scope.row.currentStlAmountRMB }}</span>

+ 7 - 7
src/views/iosBasicData/SeafreightExportF/bills/assembly/feecenter.vue

@@ -519,7 +519,7 @@ import { getList as reportsList } from "@/api/iosBasicData/reports";
 import { dateFormat } from "@/util/date";
 import { regularBurdenfloating } from "@/util/regularJudgment";
 import { getToken } from "@/util/auth";
-
+import _ from "lodash";
 export default {
     components: { reportContainer, SearchQuery, reportformsList },
     props: {
@@ -1347,12 +1347,12 @@ export default {
                 })
                 this.sumData.push({
                     corpCnName: e,
-                    rmbD: rmbD,
-                    rmbC: rmbC,
-                    usdD: usdD,
-                    usdC: usdC,
-                    sumD: sumD,
-                    sumC: sumC
+                    rmbD: _.round(rmbD, 2),
+                    rmbC: _.round(rmbC, 2),
+                    usdD: _.round(usdD, 2),
+                    usdC: _.round(usdC, 2),
+                    sumD: _.round(sumD, 2),
+                    sumC: _.round(sumC, 2)
                 })
             })
         },

+ 2 - 2
src/views/iosBasicData/SeafreightExportF/bills/index.vue

@@ -493,9 +493,9 @@
                             style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #409EFF;">
                             部分申请
                         </span>
-                        <span v-if="row.checkCrStatusDescr == '全部申请'"
+                        <span v-if="row.checkCrStatusDescr == '申请'"
                             style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #F56C6C;">
-                            全部申请
+                            申请
                         </span>
                     </div>
                 </template>

+ 1 - 1
src/views/serviceConfiguration/configurationModification/detailsPage.vue

@@ -208,7 +208,7 @@ export default {
                         rules: [
                             {
                                 required: true,
-                                message: '请选择商品类别',
+                                message: '',
                                 trigger: 'blur'
                             }
                         ]

+ 2 - 2
src/views/tirePartsMall/basicData/warehouse/index.vue

@@ -144,10 +144,10 @@ export default {
           type: "select",
           dicData: [{
             label: "自有库",
-            value: 0
+            value: "0"
           }, {
             label: "融资库",
-            value: 1
+            value: "1"
           }],
         }, {
           label: "所属公司",

+ 9 - 1
src/views/tirePartsMall/purchasingManagement/financingProcurement/detailsPage.vue

@@ -715,10 +715,18 @@ export default {
                     disabled: true,
                 },
                 {
+                    label: '返利金额',
+                    prop: "rebateAmount",
+                    type: 'number',
+                    controls: false,
+                    disabled: false,
+                    span: 6,
+                },
+                {
                     label: '参考号',
                     prop: "refno",
                     disabled: false,
-                    span: 12,
+                    span: 6,
                 },
                 {
                     label: '备注',