Bläddra i källkod

Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass

liyg 2 år sedan
förälder
incheckning
09730edc6f

+ 1 - 1
build/utils.js

@@ -17,7 +17,7 @@ const devPathSrc = path.resolve(__dirname, '../../../src') // node_modules应用
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow','ADMINISTRATORS']
 
 let devModules = ['all']
-// let devModules = ['index', 'statisticalReport', 'queue', 'sale']
+// let devModules = ['index', 'sale']
 // let devModules = ['all']
 
 // let devModules = ['index', 'ADMINISTRATORS']

+ 24 - 3
src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckDetailsOrderNew.vue

@@ -156,13 +156,20 @@
             <i class="el-icon-document"></i>签收抵达</el-button
           >
         </el-form-item> -->
-        <el-form-item>
+        <el-form-item v-show="activeName == 'first'">
           <label
             class="el-form-item__label"
             style="width: auto;font-size: 16px;line-height: auto;"
             >车数/件数: {{ totalCapacity }}/{{ totalNumber }}
           </label>
         </el-form-item>
+        <el-form-item v-show="activeName == 'second'">
+          <label
+            class="el-form-item__label"
+            style="width: auto;font-size: 16px;line-height: auto;"
+            >车数/件数: {{ setteldTotalCapacity }}/{{ setteldTotalNumber }}
+          </label>
+        </el-form-item>
       </el-form>
     </div>
     <div class="table11">
@@ -1072,6 +1079,8 @@ export default {
       totalNumber: 0,
       //合计车数
       totalCapacity: 0,
+      setteldTotalNumber: 0,
+      setteldTotalCapacity: 0,
       tableTitle: '销售统计报表',
       capacityList: [],
       carrierList: [],
@@ -3497,6 +3506,18 @@ export default {
         return prev + item.materialNum
       }, 0)
     },
+    //计算总件数和总车数
+    getTotalNumSettled(data) {
+      //通过车序号的个数来计算车数
+      let arr = []
+      arr = data.map(e => {
+        return e.saleOrderMaterialId
+      })
+      this.setteldTotalCapacity = Array.from(new Set(arr)).length
+      this.setteldTotalNumber = data.reduce(function(prev, item) {
+        return prev + item.materialNum
+      }, 0)
+    },
     //减少物资件数
     updateBillOrder(row) {
       const loading = this.$loading({
@@ -3836,7 +3857,7 @@ export default {
             )
             console.log(this.visibleList1, 'this.visibleList1')
             this.getSpanArr1(this.visibleList1)
-            this.getTotalNum(this.tableData1)
+            this.getTotalNumSettled(this.tableData1)
             this.filterListChange(this.tableData1)
             loading.close()
           })
@@ -4062,7 +4083,7 @@ export default {
           )
           console.log(this.visibleList1)
           this.getSpanArr1(this.visibleList1)
-          this.getTotalNum(this.tableData1)
+          this.getTotalNumSettled(this.tableData1)
           if (this.activeName == 'first') {
             this.filterListChange(this.tableData)
           } else {

+ 38 - 34
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -379,8 +379,14 @@
           v-if="!columnNoRoutList.includes('收货地址')"
         >
           <template slot-scope="scope">
-            <span v-if="scope.row.addressPlace.indexOf('新地址')>=0" style="color:red">{{scope.row.addressPlace}}</span>
-            <span v-show="scope.row.addressPlace.indexOf('新地址')<0">{{scope.row.addressPlace}}</span>
+            <span
+              v-if="scope.row.addressPlace.indexOf('新地址') >= 0"
+              style="color:red"
+              >{{ scope.row.addressPlace }}</span
+            >
+            <span v-show="scope.row.addressPlace.indexOf('新地址') < 0">{{
+              scope.row.addressPlace
+            }}</span>
           </template>
         </el-table-column>
 
@@ -965,9 +971,12 @@
                 <template slot="prefix">
                   {{ steelMap.remark }}
                 </template> -->
-                  </el-input></el-form-item>
+                  </el-input></el-form-item
+                >
                 <el-form-item>
-                  <el-button @click="openRemarkPic" type="primary">备注图片</el-button>
+                  <el-button @click="openRemarkPic" type="primary"
+                    >备注图片</el-button
+                  >
                 </el-form-item>
               </el-form>
             </div>
@@ -1265,7 +1274,7 @@
       :before-close="closeUpload2"
     >
       <el-form style="margin-left:20%">
-        <el-form-item >
+        <el-form-item>
           <el-upload
             ref="remarkPic"
             list-type="picture-card"
@@ -1996,8 +2005,8 @@ export default {
       filterMap: {},
       //权限控制
       notRoutList: [],
-      remarkPic:false,
-      remarkPicList:[],
+      remarkPic: false,
+      remarkPicList: [],
       location: null,
       orderNumber: null,
       capacityNumber: null,
@@ -2297,7 +2306,7 @@ export default {
       // console.log('headCellStyle column.property: ', column.property)
       if (column.property && this.headColumnList.includes(column.property)) {
         console.log(this.headColumnList, 'this.headColumnList', column.property)
-        return { color: 'red !important', fontWeight: 700, fontSize: '15px' }
+        return { fontWeight: 700, fontSize: '15px' }
         //return {}
       }
       return {}
@@ -2928,32 +2937,32 @@ export default {
       downloadFile(src, `${this.downloadCapacityNo}${title}照片`, '.jpg')
       // this.dialogVisible = true
     },
-    openRemarkPic(){
+    openRemarkPic() {
       //获取图片到本地
-      this.axios.post("/api/v1/uc/getPicture",this.steelMap).then((res)=>{
-        console.log(res);
+      this.axios.post('/api/v1/uc/getPicture', this.steelMap).then(res => {
+        console.log(res)
         if (res.data) {
-            let remarkPicList=[]
-            res.data.forEach((e, index) => {
-              creatImageFile(e, 'file2-' + index).then(res => {
-                remarkPicList.push({
-                  name: 'file' + index,
-                  raw: res,
-                  url: e
-                })
+          let remarkPicList = []
+          res.data.forEach((e, index) => {
+            creatImageFile(e, 'file2-' + index).then(res => {
+              remarkPicList.push({
+                name: 'file' + index,
+                raw: res,
+                url: e
               })
             })
-            this.remarkPicList=remarkPicList;
-        }else{
+          })
+          this.remarkPicList = remarkPicList
+        } else {
           this.remarkPicList = []
         }
-        this.remarkPic=true;
-      });
+        this.remarkPic = true
+      })
     },
-    uploadRemarkPic(){
-      if(this.remarkPicList.length<=0){
+    uploadRemarkPic() {
+      if (this.remarkPicList.length <= 0) {
         this.$message.error('请上传图片!')
-        return;
+        return
       }
       //上传备注图片
       let formData = new window.FormData()
@@ -2971,9 +2980,9 @@ export default {
       this.axios(options).then(res => {
         console.log(res)
         this.$message.success('暂存成功!')
-        this.remarkPic=false;
-        this.steelMap.urls = res.data;
-        this.closeUpload2();
+        this.remarkPic = false
+        this.steelMap.urls = res.data
+        this.closeUpload2()
       })
     },
     openReceive() {
@@ -3143,11 +3152,6 @@ export default {
       this.$refs.arrival.clearFiles()
       this.$refs.receive.clearFiles()
     },
-    closeUpload2() {
-      this.remarkPic = false
-      this.isLoading = false
-      this.$refs.remarkPic.clearFiles()
-    },
     //防抖函数--防止用户重复点击
     debounce(func, delay) {
       let timer = null