seimin лет назад: 2
Родитель
Сommit
26679fea29
2 измененных файлов с 30 добавлено и 53 удалено
  1. 12 1
      pages/my_list/my_list.vue
  2. 18 52
      pages/scanning_B/scanning_B.vue

+ 12 - 1
pages/my_list/my_list.vue

@@ -114,7 +114,7 @@
114 114
             </view>
115 115
             <view class="page_item_foot_text">
116 116
               <text class="text1">扫描接收数量</text>&nbsp;&nbsp;
117
-              <text class="text1">{{ infoDATA.actualReceiveNum || 0 }}</text>
117
+              <text class="text1 b">{{ infoDATA.actualReceiveNum || 0 }}</text>
118 118
             </view>
119 119
           </view>
120 120
         </view>
@@ -290,6 +290,11 @@
290 290
         post("/api/getOrdersByDate/" + this.types, data).then((res) => {
291 291
           uni.hideLoading();
292 292
           if (res.status == 200) {
293
+            res.data.data.forEach(v=>{
294
+              if(v.completeTime){
295
+                v.completeTime = v.completeTime.slice(5,16)
296
+              }
297
+            })
293 298
             this.workData = res.data.data;
294 299
           } else {
295 300
             uni.showToast({
@@ -745,6 +750,9 @@
745 750
 
746 751
               .text1 {
747 752
                 color: rgb(102, 102, 102);
753
+                &.b{
754
+                  font-weight: bolder;
755
+                }
748 756
               }
749 757
 
750 758
               .text2 {
@@ -776,6 +784,9 @@
776 784
 
777 785
                 .text1 {
778 786
                   color: rgb(102, 102, 102);
787
+                  &.b{
788
+                    font-weight: bolder;
789
+                  }
779 790
                 }
780 791
 
781 792
                 .text2 {

+ 18 - 52
pages/scanning_B/scanning_B.vue

@@ -34,7 +34,7 @@
34 34
     <view class="foot_btn">
35 35
       <view class="btn3" @click="showAlert()">知道了</view>
36 36
       <block v-if="res.scanCodeSpecimenOrderSign == 1">
37
-        <view class="btn3" @click="specimenAssignAndSign(res.workOrder.id)" v-if="res.workOrder&&(res.workOrder.gdState.value == 2||res.workOrder.gdState.value == 4)">接单并签到</view>
37
+        <view class="btn3" @click="buildAndOrderSign(res.data.id,res.workOrder.id)" v-if="res.workOrder&&(res.workOrder.gdState.value == 2||res.workOrder.gdState.value == 4)">接单并签到</view>
38 38
         <view class="btn3" @click="orderSign(res.workOrder)" v-if="res.workOrder&&res.workOrder.gdState.value != 2&&res.workOrder.gdState.value != 4">执行工单</view>
39 39
         <view class="btn3" @click="buildAndOrderSign(res.data.id)" v-if="!res.workOrder && res.data">建单并签到</view>
40 40
       </block>
@@ -146,62 +146,28 @@
146 146
           }
147 147
         });
148 148
       },
149
-      // 接单并签到workorderId
150
-      specimenAssignAndSign(orderId) {
151
-        this.type = 'specimenAssignAndSign';
152
-        uni.showLoading({
153
-          title: "加载中",
154
-          mask: true,
155
-        });
156
-        post("/workerOrder/specimenAssignAndSign", {
157
-          orderId,
158
-        }).then((res) => {
159
-          if (res.state == 200 || res.state == 201) {
160
-            uni.hideLoading();
161
-            if (res.status == 200) {
162
-              // 跳转到扫描科室
163
-              // type1: res.type, //type类型
164
-              // id: data.id, //工单ID
165
-              // deptCode: code, //二维码
166
-              // dept: res.dept //科室名称
167
-              uni.navigateTo({
168
-                url: `/pages/scanning_code/scanning_code?type=${
169
-                res.workOrder.taskType.associationType.value
170
-              }&type1=${res.type}&id=${res.workOrder.id}&deptCode=${
171
-                this.currentCode
172
-              }&dept=${res.dept}&accountObj=${encodeURIComponent(
173
-                JSON.stringify(undefined)
174
-              )}&deptId=${res.deptId}`,
175
-              });
176
-            } else {
177
-              uni.navigateTo({
178
-                url: `/pages/scanning_Result/scanning_Result?type=${res.workOrder.taskType.associationType.value}&type1=${res.type}&id=${res.workOrder.id}&status=600&msg=${res.msg}&isKs=1`,
179
-              });
180
-            }
181
-          } else if (res.state == "0000") {
182
-            uni.hideLoading();
183
-            this.currentCode = res.code;
184
-            this.res.workOrder = res.workOrder;
185
-            this.showSelectAccount();
186
-          } else {
187
-            uni.hideLoading();
188
-            uni.showToast({
189
-              icon: "none",
190
-              title: res.msg || "请求失败!",
191
-            });
192
-          }
193
-        });
194
-      },
195
-      // 建单并签到
196
-      buildAndOrderSign(speId) {
149
+      // 接单并签到或建单并签到
150
+      buildAndOrderSign(speId,orderId) {
197 151
         this.type = 'buildAndOrderSign';
152
+        if(orderId){
153
+          // 接单并签到
154
+          this.type = 'specimenAssignAndSign';
155
+        }else{
156
+          // 建单并签到
157
+          this.type = 'buildAndOrderSign';
158
+        }
198 159
         uni.showLoading({
199 160
           title: "加载中",
200 161
           mask: true,
201 162
         });
202
-        post("/workerOrder/specimenCreateAndSign", {
203
-          speId,
204
-        }).then((res) => {
163
+        let postData = {
164
+          speId
165
+        }
166
+        if(orderId){
167
+          // 接单并签到
168
+          postData.orderId = orderId;
169
+        }
170
+        post("/workerOrder/specimenCreateAndSign", postData).then((res) => {
205 171
           if (res.state == 200 || res.state == 201) {
206 172
             uni.hideLoading();
207 173
             if (res.status == 200) {