chenrui 1 yıl önce
ebeveyn
işleme
7b877292c8

+ 30 - 6
src/views/productManagement/productSourcePath/chooseImportModal.vue

@@ -15,10 +15,10 @@
         <p>
           <a-tooltip placement="right">
             <template slot="title">
-              <span v-for="(con,i) in countData" :key="i"><strong>业务单号</strong>({{ con.bizCode }}){{ con.productCode }} (<span class="red">{{ con.productNum }}</span>/{{ con.bizProductNum }});
-              </span></template>
+              <div v-for="(con,i) in countData" :key="i"><strong>业务单号</strong>({{ con.bizCode }})<span v-for="(item,j) in con.info" :key="j">{{ item.productCode }}(<span class="red">{{ item.productNum }}</span>/{{ item.bizProductNum }});</span></div>
+            </template>
             <div class="text-overflows2" v-if="countData && countData.length>0">
-              可导入产品数量与实际销售数量有差异:<span v-for="(con,i) in countData" :key="i"><strong>业务单号</strong>({{ con.bizCode }}){{ con.productCode }} (<span class="red">{{ con.productNum }}</span>/{{ con.bizProductNum }});</span>
+              可导入产品数量与实际销售数量有差异:<span v-for="(con,i) in countData" :key="i"><strong>业务单号</strong>({{ con.bizCode }})<span v-for="(item,j) in con.info" :key="j">{{ item.productCode }}(<span class="red">{{ item.productNum }}</span>/{{ item.bizProductNum }});</span></span>
             </div>
           </a-tooltip>
         </p>
@@ -27,7 +27,8 @@
         class="sTable"
         ref="table"
         size="small"
-        :rowKey="(record) => record.allocateSn"
+        :rowKey="(record) => record.no"
+        rowKeyName="no"
         :columns="nowColumns"
         :dataSource="loadData"
         :loading="loading"
@@ -42,7 +43,8 @@
         class="unTable"
         ref="unTable"
         size="small"
-        :rowKey="(record) => record.errorDesc"
+        :rowKey="(record) => record.no"
+        rowKeyName="no"
         :columns="nowUnColumns"
         :dataSource="unLoadData"
         :loading="loading"
@@ -127,13 +129,35 @@ export default {
       const paramsData = JSON.parse(JSON.stringify(_this.paramsData))
       this.loadData = paramsData.rightList || []
       this.unLoadData = paramsData.errorList || []
-      this.countData = paramsData.billList || []
       this.loadData.map((item, index) => {
         item.no = index + 1
       })
       this.unLoadData.map((item, index) => {
         item.no = index + 1
       })
+      if (paramsData.billList && paramsData.billList.length > 0) {
+        const newCountData = paramsData.billList || []
+        newCountData.map(item => {
+          item.info = [{ productCode: item.productCode,
+            productNum: item.productNum,
+            bizProductNum: item.bizProductNum }]
+        })
+        const mergedObjects = newCountData.reduce((acc, obj) => {
+          const index = acc.findIndex(o => { return o.bizCode == obj.bizCode })
+          if (index != -1) {
+            acc[index].info.push({ productCode: obj.productCode,
+              productNum: obj.productNum,
+              bizProductNum: obj.bizProductNum })
+          } else {
+            acc.push(obj)
+          }
+          return acc
+        }, [])
+        this.countData = mergedObjects
+      }
+    },
+    compareObjects (obj1, obj2) {
+      return Object.keys(obj1).every(key => obj1[key] === obj2[key])
     },
     // 确认导入
     handleSubmit () {

+ 2 - 1
src/views/productManagement/productSourcePath/list.vue

@@ -126,12 +126,13 @@
     <a-card size="small" :bordered="false">
       <a-spin :spinning="spinning" tip="Loading...">
         <!-- 统计 -->
+        <!-- v-if="$hasPermissions('B_productSourceImport')" -->
         <div style="display:flex;align-items:center;margin-bottom:10px;">
           <a-button
             type="primary"
             id="outboundOrder-export"
             :loading="loading"
-            v-if="$hasPermissions('B_productSourceImport')"
+
             @click="openGuideModal = true">导入</a-button>
           <div class="tongji-bar" style="margin-left:10px;">
             产品总款数:<strong>{{ totalData&&(totalData.productTypeNum || totalData.productTypeNum==0) ? totalData.productTypeNum : '0' }}</strong>;

+ 6 - 5
src/views/productManagement/productSourcePath/warrantyInfoModal.vue

@@ -44,7 +44,8 @@
               alt="图片走丢啦"
               width="86"
               height="55"
-              align="middle" @click="viewLargeImg"/>
+              align="middle"
+              @click="viewLargeImg"/>
             <div style="text-align:right;">
               <img v-if="detailsData.state ==='END'" src="@/assets/img/finishImg.png" alt="" width="50" height="50">
               <img v-if="detailsData.state ==='RUN'" src="@/assets/img/ongoing.png" alt="" width="50" height="50">
@@ -121,7 +122,7 @@ export default {
       type: String,
       default: ''
     },
-    productCode:{
+    productCode: {
       type: String,
       default: ''
     }
@@ -130,8 +131,8 @@ export default {
     return {
       isShow: this.openModal, //  是否打开弹框
       spinning: false,
-      detailsData: null ,//  详情数据
-      openImgModal:false
+      detailsData: null, //  详情数据
+      openImgModal: false
     }
   },
   methods: {
@@ -146,7 +147,7 @@ export default {
       })
     },
     // 查看图片
-    viewLargeImg(){
+    viewLargeImg () {
       this.openImgModal = true
     }
   },

+ 1 - 1
src/views/reportData/tireSalesReport/dealerList.vue

@@ -256,7 +256,7 @@ export default {
       const params = _this.queryParam
       _this.exportLoading = true
       _this.spinning = true
-      hdExportExcel(excelSaleOnlineExport, params, '轮胎销售报表(经销商)', function () {
+      hdExportExcel(excelSaleOnlineExport, params, '轮胎销售报表(客户)', function () {
         _this.exportLoading = false
         _this.spinning = false
       })