seimin 1 місяць тому
батько
коміт
d5efd416ed

+ 2 - 2
pages/inspection/inspectionExecute/inspectionExecute.vue

@@ -115,7 +115,7 @@
115 115
     SM().then((ress1) => {
116 116
       // ----------------------------------
117 117
       let postData = {
118
-        queryTask: 'all',
118
+        queryTask: 'todo',
119 119
         code: ress1,
120 120
         idx: 0,
121 121
         sum: 1,
@@ -147,7 +147,7 @@
147 147
           }else{
148 148
             uni.hideLoading();
149 149
             uni.navigateTo({
150
-              url: `/pages/inspection/inspectionScanning/inspectionScanning?inspectionNodeCode=${res.data.code}&inspectionNodeName=${res.data.name}`
150
+              url: `/pages/inspection/inspectionScanning/inspectionScanning?inspectionNodeNewCode=${ress1}&inspectionNodeCode=${res.data.code}&inspectionNodeName=${res.data.name}`
151 151
             })
152 152
           }
153 153
         } else {

+ 21 - 23
pages/inspection/inspectionScanning/inspectionScanning.vue

@@ -77,13 +77,14 @@
77 77
   
78 78
   // 数据
79 79
   const dataInfo = reactive({
80
-    tabs: [{id: 0, name: '巡检工单', value: 'all', num: ''}, {id: 1, name: '历史工单', value: '', num: ''}],
80
+    tabs: [{id: 0, name: '巡检工单', value: 'todo', num: ''}, {id: 1, name: '历史工单', value: 'close', num: ''}],
81 81
     tabActiveId: 0,//当前选择的tab
82 82
     list: [],//工单列表
83 83
     idx: 0,//页码
84 84
     hasMore: true,//是否有更多数据
85 85
     inspectionNodeDTO: {},
86
-    inspectionNodeCode: '',
86
+    inspectionNodeNewCode: '',//巡检点二维码
87
+    inspectionNodeCode: '',//巡检点原始二维码
87 88
     inspectionNodeName: '',
88 89
   })
89 90
   
@@ -93,31 +94,27 @@
93 94
       title: "加载中",
94 95
       mask: true,
95 96
     });
97
+    let postData = {
98
+      code: dataInfo.inspectionNodeNewCode,
99
+      taskId: data.id,
100
+      account: loginUserStore.loginUser.user.account,
101
+    };
96 102
     // 'inspection|$|1bd0c704-0962-4ed4-b5a6-b5bda3d78231'
97 103
     // 'inspection|$|bc9f61af-99c8-4c86-88f9-f29dd3fc43c0'
98 104
 		// 'inspection|$|92e7bb9a-5f58-42f6-991a-fcd67247e295'
99
-    SM().then((ress1) => {
100
-      let postData = {
101
-        code: ress1,
102
-        taskId: data.id,
103
-        account: loginUserStore.loginUser.user.account,
104
-      };
105
-      api_scanCode(postData).then((res) => {
106
-        uni.hideLoading();
107
-        if (res.status == 200) {
108
-          inspectionValueStore.setInspectionValueData(res.data);
109
-          uni.navigateTo({
110
-            url: `/pages/inspection/inspectionValue/inspectionValue?inspectionExecuteId=${data.id}`
111
-          })
112
-        } else {
113
-          uni.showToast({
114
-            icon: 'none',
115
-            title: res.msg || '请求数据失败!'
116
-          });
117
-        }
118
-      });
119
-    }).catch(err=>{
105
+    api_scanCode(postData).then((res) => {
120 106
       uni.hideLoading();
107
+      if (res.status == 200) {
108
+        inspectionValueStore.setInspectionValueData(res.data);
109
+        uni.navigateTo({
110
+          url: `/pages/inspection/inspectionValue/inspectionValue?inspectionExecuteId=${data.id}`
111
+        })
112
+      } else {
113
+        uni.showToast({
114
+          icon: 'none',
115
+          title: res.msg || '请求数据失败!'
116
+        });
117
+      }
121 118
     });
122 119
   }
123 120
 
@@ -208,6 +205,7 @@
208 205
   
209 206
   onLoad((option) => {
210 207
     dataInfo.inspectionNodeCode = option.inspectionNodeCode;
208
+    dataInfo.inspectionNodeNewCode = option.inspectionNodeNewCode;
211 209
     dataInfo.inspectionNodeName = option.inspectionNodeName;
212 210
     getList(0);
213 211
   })