瀏覽代碼

工单列表完成

seimin 3 年之前
父節點
當前提交
29b25be465
共有 1 個文件被更改,包括 26 次插入3 次删除
  1. 26 3
      pages/orderList/orderList.vue

+ 26 - 3
pages/orderList/orderList.vue

@@ -188,13 +188,15 @@
188
       },
188
       },
189
       // 查询最新工单列表
189
       // 查询最新工单列表
190
       queryWorkOrdersRequest(idxPlus = false) {
190
       queryWorkOrdersRequest(idxPlus = false) {
191
+        console.log(this.selectedGdState, this.selectedAssociationType);
192
+        console.log(this.gdStates, this.associationTypes);
191
         if (idxPlus) {
193
         if (idxPlus) {
192
           //累加
194
           //累加
193
           ++this.idx;
195
           ++this.idx;
194
         } else {
196
         } else {
195
           this.idx = 0;
197
           this.idx = 0;
196
         }
198
         }
197
-        return reqFetchDataList("nurse", "workOrder", {
199
+        let postData = {
198
           workOrder: {
200
           workOrder: {
199
             createDept: this.loginInfo.user.dept.id,
201
             createDept: this.loginInfo.user.dept.id,
200
             platform: 2,
202
             platform: 2,
@@ -202,7 +204,29 @@
202
           },
204
           },
203
           idx: this.idx,
205
           idx: this.idx,
204
           sum: this.pageNum,
206
           sum: this.pageNum,
205
-        });
207
+        };
208
+        let selectedGdStateValue = this.gdStates.find(v => v.label == this.selectedGdState).value;
209
+        let associationTypesValue = this.associationTypes.find(v => v.label == this.selectedAssociationType).value;
210
+        // 工单状态
211
+        // 执行中包含状态:待抢单、待接单、待到达、待送达、执行中、定时预约
212
+        if (selectedGdStateValue == 1) {
213
+          // 执行中
214
+          postData.workOrder.nurseState = 1;
215
+        } else if (selectedGdStateValue == 2) {
216
+          // 待评价
217
+          postData.workOrder.gdState = {
218
+            id: "73"
219
+          };
220
+        }
221
+        //关联类型
222
+        if (associationTypesValue != -1) {
223
+          postData.workOrder.taskType = {
224
+            associationType: {
225
+              id: associationTypesValue,
226
+            }
227
+          }
228
+        }
229
+        return reqFetchDataList("nurse", "workOrder", postData);
206
       },
230
       },
207
       // 查询最新工单列表
231
       // 查询最新工单列表
208
       queryWorkOrdersResponse(res, idxPlus = false) {
232
       queryWorkOrdersResponse(res, idxPlus = false) {
@@ -252,7 +276,6 @@
252
       },
276
       },
253
       // 获取数据字典
277
       // 获取数据字典
254
       queryDictionaryResponse(res, type) {
278
       queryDictionaryResponse(res, type) {
255
-        console.log(res, type);
256
         switch (type) {
279
         switch (type) {
257
           case 'association_types':
280
           case 'association_types':
258
             let arr = res.map(v => ({
281
             let arr = res.map(v => ({