浏览代码

工单列表完成

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 190
       queryWorkOrdersRequest(idxPlus = false) {
191
+        console.log(this.selectedGdState, this.selectedAssociationType);
192
+        console.log(this.gdStates, this.associationTypes);
191 193
         if (idxPlus) {
192 194
           //累加
193 195
           ++this.idx;
194 196
         } else {
195 197
           this.idx = 0;
196 198
         }
197
-        return reqFetchDataList("nurse", "workOrder", {
199
+        let postData = {
198 200
           workOrder: {
199 201
             createDept: this.loginInfo.user.dept.id,
200 202
             platform: 2,
@@ -202,7 +204,29 @@
202 204
           },
203 205
           idx: this.idx,
204 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 232
       queryWorkOrdersResponse(res, idxPlus = false) {
@@ -252,7 +276,6 @@
252 276
       },
253 277
       // 获取数据字典
254 278
       queryDictionaryResponse(res, type) {
255
-        console.log(res, type);
256 279
         switch (type) {
257 280
           case 'association_types':
258 281
             let arr = res.map(v => ({