Browse Source

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

zengyf 2 years ago
parent
commit
498453daec

+ 39 - 9
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -1057,6 +1057,7 @@
           <el-upload
             ref="arrival"
             list-type="picture-card"
+            :file-list="arriavlList"
             action="/api/v1/otms/addtmstruckArrivalResult"
             :limit="2"
             :on-change="fileChange1"
@@ -1072,6 +1073,7 @@
           <el-upload
             ref="receive"
             list-type="picture-card"
+            :file-list="receiveList"
             action="null"
             :limit="11"
             :on-change="fileChange2"
@@ -1299,6 +1301,8 @@ export default {
       orderNumber: null,
       capacityNumber: null,
       arrivalReceiving: false,
+      arriavlList:[],
+      receiveList:[],
       fileListArrival: [],
       fileListReceive: [],
       dialogImageUrl: '',
@@ -1579,6 +1583,38 @@ export default {
       this.orderNumber = row.orderNo
       this.capacityNumber = row.capacityNo
       this.arrivalReceiving = true
+      //抵达图片
+      this.axios
+        .post('/api/v1/otms/getArrivalPhoto?orderNumber=' + row.orderNo)
+        .then(res => {
+          console.log("arrivalPhoto:",res);
+          if(res.data){
+            this.arriavlList=[];
+            res.data.forEach((e,index) => {
+              this.arriavlList.push({
+                name:"file"+index,
+                url:e
+              });
+            });
+            this.fileListArrival=this.arriavlList;
+          }
+        })
+      //签收图片
+      this.axios
+        .post('/api/v1/otms/getReceivingPhotoByUrl?orderNumber=' + row.orderNo)
+        .then(res => {
+          console.log("ReceivingPhoto:",res);
+          if(res.data){
+            this.receiveList=[];
+            res.data.forEach((e,index) => {
+              this.receiveList.push({
+                name:"file"+index,
+                url:e
+              });
+            });
+            this.fileListReceive=this.receiveList;
+          }
+        })
     },
     arrivalAndReceive() {
       if (!this.location) {
@@ -1621,7 +1657,7 @@ export default {
         formData.append('resultArrivalAddress', this.location)
         formData.append('num', request.length)
         let options = {
-          url: '/api/v1/otms/addTmstruckReceiptResult',
+          url: '/api/v1/otms/addTmstruckReceiptResultForWeb',
           data: formData,
           method: 'post',
           headers: {
@@ -1630,14 +1666,8 @@ export default {
         }
         this.axios(options).then(res => {
           console.log('receiveRes:', res)
-          if (res.data.data == 4) {
-            this.$message.error('新增抵达失败!')
-            this.isLoading = false
-          } else {
-            this.$message.success('上传成功!')
-            this.closeUpload()
-            this.$router.go(0)
-          }
+          this.$message.success('上传成功!')
+          this.closeUpload()
         })
       })
     },