傅豪杰 7 hónapja
szülő
commit
5cf7c229b3
1 módosított fájl, 23 hozzáadás és 4 törlés
  1. 23 4
      src/pages/new/storage.vue

+ 23 - 4
src/pages/new/storage.vue

@@ -150,6 +150,8 @@ export default {
     async mounted() {
         this.getUser()
         this.floorId = this.$store.state.user.expressScope
+        const expressData = await appFindInsideInfoByExpressNo({insideNum:'S6000000363245086'})
+        this.handleAppFindInsideInfoByExpressNoCallback(expressData)
     },
     methods: {
 
@@ -165,8 +167,8 @@ export default {
                         result = result1[result1.length - 1];
                     }
                     this.object.expressNo = result
-                    const expressData = await appFindInsideInfoByExpressNo({insideNum:result})
-                    this.handleAppFindInsideInfoByExpressNoCallback(expressData)
+                    const expressData = await appFindInsideInfoByExpressNo({insideNum})
+                    handleAppFindInsideInfoByExpressNoCallback(expressData.data)
                     console.log(expressData)
                 },
                 error: function (res) {
@@ -177,7 +179,16 @@ export default {
 
         // 查询快递单号回调
         handleAppFindInsideInfoByExpressNoCallback(data){
-            this.expressInfo
+            if(!data) return
+            this.expressInfo = data;
+            this.object.value = this.$store.state.user.company;
+            this.onGroupObject.phone = data.addressee_phone
+            this.onGroupObject.NAME = data.addressee_name
+            this.onGroupObject.departmentName = data.addressee_dept_name
+            this.onGroupObject.mailRoomName = data.mailRoomName
+            this.onGroupObject.seat_no = data.addressee_seat_no
+            this.object.remark = data.express_remark
+            this.object.radio = data.express_type == '1'? '文件' :'物品'
         },
         // 手机号点击聚焦
         onFocus() {
@@ -252,6 +263,14 @@ export default {
                 ...values,
                 ...originalObj
             }
+
+            if(values.isPayOnDelivery){
+                // 内部件
+                value.senderName = this.expressInfo.send_name
+                value.senderNumber = this.expressInfo.send_phone
+                value.senderDepartmentId = this.expressInfo.send_dept_name
+            }
+
             const res = await appSaveExpressRecord({ ...params, ...value, departmentId: this.onGroupObject.departmentName }, { emulateJSON: true })
             this.value14 = this.object.value4
             if (res.msg == 'success') {
@@ -300,7 +319,7 @@ export default {
                 return;
             }
             if(getPrinters.data.length === 1){
-                this.onPrinter(getPrinters.data[0])
+                this.onPrinter(getPrinters.data)
                 return;
             }
             if (getPrinters.code == 0) {