luobang 2 years ago
parent
commit
aeabf54f5b

+ 3 - 3
src/views/index/components/printReceipt1.vue

@@ -20,7 +20,7 @@
         <div class="title" style="margin: auto">
           <h5 align="center">{{ shippername }}</h5>
           <div style="height: 10px"></div>
-          <span style="margin-left: 480px">物资送货单</span>
+          <span style="margin-left: 450px">物资送货单</span>
         </div>
         <div style="height: 20px"></div>
         <div>
@@ -34,8 +34,8 @@
             class="tablePart0"
           >
             <tr>
-              <th style="width: 14.5%">销售订单号:</th>
-              <td style="width: 85.5%">{{ saleNo }}</td>
+              <th style="width: 14.5%">运输订单号:</th>
+              <td style="width: 85.5%">{{ orderNumber }}</td>
             </tr>
           </table>
         </div>

+ 30 - 9
src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckDetailsOrderNew.vue

@@ -859,6 +859,10 @@ export default {
         {
           value: '分录ID',
           lable: '分录ID'
+        },
+        {
+          value: '下货地址',
+          lable: '下货地址'
         }
       ],
       options1: [
@@ -873,6 +877,10 @@ export default {
         {
           value: '车号',
           lable: '车号'
+        },
+        {
+          value: '下货地址',
+          lable: '下货地址'
         }
       ],
       //合计净重(磅重)
@@ -3054,13 +3062,21 @@ export default {
       } else {
         remark = this.input
       }
-      if (this.screen1 == '客户') {
+      if (this.screen1 == '客户' && this.input1 != null && this.input1 != '') {
         consigneeName = this.input1
-      } else if (this.screen1 == '承运商') {
+      } else if (
+        this.screen1 == '承运商' &&
+        this.input1 != null &&
+        this.input1 != ''
+      ) {
         carrierName = this.input1
-      } else if (this.screen1 == '车号') {
+      } else if (
+        this.screen1 == '车号' &&
+        this.input1 != null &&
+        this.input1 != ''
+      ) {
         capacityNo = this.input1
-      } else {
+      } else if (this.input1 != null && this.input1 != '') {
         remark = this.input1
       }
       this.axios
@@ -3117,6 +3133,10 @@ export default {
           this.getSpanArr(this.visibleList)
           this.getTotalNum(this.tableData)
           console.log(this.visibleList)
+          loading.close()
+        })
+        .catch(() => {
+          loading.close()
         })
       this.axios
         .post(
@@ -3167,12 +3187,10 @@ export default {
             0,
             Math.floor(this.maxHeight / this.itemHeight) + 1
           )
-
           console.log(this.visibleList1, 'this.visibleList1')
           this.getSpanArr1(this.visibleList1)
           this.getTotalNum(this.tableData1)
         })
-      loading.close()
     },
     //重新获取表格数据
     refresh() {
@@ -3344,7 +3362,9 @@ export default {
           this.getTotalNum(this.tableData)
           loading.close()
         })
-        .catch(() => {})
+        .catch(() => {
+          loading.close()
+        })
 
       this.axios
         .post(
@@ -3387,8 +3407,9 @@ export default {
           this.getTotalNum(this.tableData1)
           loading.close()
         })
-        .catch(() => {})
-      loading.close()
+        .catch(() => {
+          loading.close()
+        })
     }
   }
 }

+ 51 - 19
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -1555,6 +1555,10 @@ export default {
         {
           value: '分录ID',
           lable: '分录ID'
+        },
+        {
+          value: '收货地址',
+          lable: '收货地址'
         }
       ],
       input1: null,
@@ -1575,6 +1579,10 @@ export default {
         {
           value: '分录ID',
           lable: '分录ID'
+        },
+        {
+          value: '收货地址',
+          lable: '收货地址'
         }
       ],
       pickerOptions: {
@@ -2029,7 +2037,7 @@ export default {
       this.capacityId = selection.capacityId
     },
     //批量修改车牌号
-    batchEditCapacity() {
+    async batchEditCapacity() {
       if (this.capacityId && this.capacityNo) {
         if (
           !(
@@ -2043,7 +2051,8 @@ export default {
           return
         }
         console.log('this.batchCapacityList', this.batchCapacityList)
-        this.batchCapacityList.forEach(row => {
+        // this.batchCapacityList.forEach(row => {})
+        for (let i = 0; i < this.batchCapacityList.length; i++) {
           row.capacityId = this.capacityId
           row.capacityNumber = this.capacityNo
           //是否校验GPS
@@ -2054,7 +2063,7 @@ export default {
             return
           }
           if (row.capacityIds != 0) {
-            this.axios
+            await this.axios
               .post('/api/v1/ams/updateCapacityNumberInFactory', row)
               .then(res => {
                 if (res.data.code == 200) {
@@ -2067,15 +2076,17 @@ export default {
             row.lineId = this.lineSpelling[row.size]
             let arr = []
             arr.push(row)
-            this.axios.post('/api/v1/ams/dispatchSteelOrder', arr).then(res => {
-              if (res.data.code == '200') {
-                this.$message.success('派车成功!')
-              } else {
-                this.$message.error(res.data.data)
-              }
-            })
+            await this.axios
+              .post('/api/v1/ams/dispatchSteelOrder', arr)
+              .then(res => {
+                if (res.data.code == '200') {
+                  this.$message.success('派车成功!')
+                } else {
+                  this.$message.error(res.data.data)
+                }
+              })
           }
-        })
+        }
         this.batchCarrierVisible = false
         this.getSteelReport()
       } else {
@@ -3949,9 +3960,14 @@ export default {
         saler = getCookie('loginName')
       }
       if (getCookie('orgCode') == 'shouhuokehu') {
-        consigneeLoginName = getCookie('loginName')
+        console.log('userinfo')
+        console.log(getCookie('userInfo'))
+        consigneeLoginName =
+          JSON.parse(getCookie('userInfo')).userCode || getCookie('loginName')
         obj.consigneeLoginName = consigneeLoginName
       }
+      console.log('this.input', this.input)
+      console.log('this.input1', this.input1)
       if (this.screen == '客户') {
         consigneeName = this.input
       } else if (this.screen == '承运商') {
@@ -3963,17 +3979,30 @@ export default {
       } else {
         remark = this.input
       }
-      if (this.screen1 == '客户') {
+      if (this.screen1 == '客户' && this.input1 != null && this.input1 != '') {
         consigneeName = this.input1
-      } else if (this.screen1 == '承运商') {
+      } else if (
+        this.screen1 == '承运商' &&
+        this.input1 != null &&
+        this.input1 != ''
+      ) {
         carrierName = this.input1
-      } else if (this.screen1 == '车牌号') {
+      } else if (
+        this.screen1 == '车牌号' &&
+        this.input1 != null &&
+        this.input1 != ''
+      ) {
         capacityNo = this.input1
-      } else if (this.screen == '分录ID') {
-        easPrimaryId = this.input
-      } else {
+      } else if (
+        this.screen == '分录ID' &&
+        this.input1 != null &&
+        this.input1 != ''
+      ) {
+        easPrimaryId = this.input1
+      } else if (this.input1 != null && this.input1 != '') {
         remark = this.input1
       }
+      console.log(remark)
       this.axios
         .post(
           '/api/v1/tms/getSaleSteelReport?startTime=' +
@@ -4090,7 +4119,10 @@ export default {
         saler = getCookie('loginName')
       }
       if (getCookie('orgCode') == 'shouhuokehu') {
-        consigneeLoginName = getCookie('loginName')
+        consigneeLoginName =
+          JSON.parse(getCookie('userInfo')).userCode || getCookie('loginName')
+        // console.log('userinfo')
+        // JSON.parse(getCookie('userInfo')).userCode
         this.filterMap.consigneeLoginName = consigneeLoginName
       }
       if (this.screen == '客户') {