Browse Source

白求恩优化

seimin 1 week ago
parent
commit
504cf87cf1
1 changed files with 12 additions and 9 deletions
  1. 12 9
      pages/newDrug/createOrder/createOrder.vue

+ 12 - 9
pages/newDrug/createOrder/createOrder.vue

@@ -34,9 +34,10 @@
34
     <view class="foot_btn_spe">
34
     <view class="foot_btn_spe">
35
       <view class="column">
35
       <view class="column">
36
         <view class="btn" @click="goIndex()">返回</view>
36
         <view class="btn" @click="goIndex()">返回</view>
37
-        <view class="btn" @click="createOrBuildOrder()" v-if="queryObj.type === 'build' && config.drugsCreateSign === 1">建单并签到</view>
38
-        <view class="btn" @click="createOrBuildOrder()" v-if="queryObj.type === 'receive' && config.drugsReceiveSign === 1">接单并签到</view>
39
-        <view class="btn" @click="createOrBuildOrder()" v-if="queryObj.type === 'merge'">合并工单配送</view>
37
+        <view class="btn" @click="createOrBuildOrder('build')" v-if="queryObj.type === 'build' && config.drugsCreateSign === 1">建单并签到</view>
38
+        <view class="btn" @click="createOrBuildOrder('receive')" v-if="queryObj.type === 'receive' && config.drugsReceiveSign === 1">接单并签到</view>
39
+        <view class="btn" @click="createOrBuildOrder('merge')" v-if="queryObj.type === 'merge'">合并工单配送</view>
40
+        <view class="btn" @click="createOrBuildOrder('build')" v-if="workOrder.gdState && (workOrder.gdState.value == 4 || workOrder.gdState.value == 5) && config.urgentCreateOrder == 1">紧急配送建单</view>
40
       </view>
41
       </view>
41
     </view>
42
     </view>
42
   </view>
43
   </view>
@@ -55,6 +56,7 @@
55
         drugsBag: {}, //药包信息
56
         drugsBag: {}, //药包信息
56
         config: {}, //药品的业务流程配置
57
         config: {}, //药品的业务流程配置
57
         orderId: undefined, //根据药包查询到的工单ID
58
         orderId: undefined, //根据药包查询到的工单ID
59
+        workOrder: {}, //工单
58
       };
60
       };
59
     },
61
     },
60
     methods: {
62
     methods: {
@@ -154,13 +156,13 @@
154
         })
156
         })
155
       },
157
       },
156
       // 建单并签到/接单并签到
158
       // 建单并签到/接单并签到
157
-      createOrBuildOrder(){
159
+      createOrBuildOrder(type){
158
         let content = '';
160
         let content = '';
159
-        if(this.queryObj.type === 'build'){
161
+        if(type === 'build'){
160
           content = `请确认是否建单并签到?`;
162
           content = `请确认是否建单并签到?`;
161
-        }else if(this.queryObj.type === 'receive'){
163
+        }else if(type === 'receive'){
162
           content = `请确认是否接单并签到?`;
164
           content = `请确认是否接单并签到?`;
163
-        }else if(this.queryObj.type === 'merge'){
165
+        }else if(type === 'merge'){
164
           content = `您确认要合并工单进行配送吗?`;
166
           content = `您确认要合并工单进行配送吗?`;
165
         }
167
         }
166
         uni.showModal({
168
         uni.showModal({
@@ -174,9 +176,9 @@
174
                 id: +this.queryObj.drugsBagId,
176
                 id: +this.queryObj.drugsBagId,
175
               };
177
               };
176
               
178
               
177
-              if(this.queryObj.type === 'receive'){
179
+              if(type === 'receive'){
178
                 postData.orderId = this.orderId;
180
                 postData.orderId = this.orderId;
179
-              }else if(this.queryObj.type === 'merge'){
181
+              }else if(type === 'merge'){
180
                 postData.orderId = this.queryObj.newOrderId || undefined;
182
                 postData.orderId = this.queryObj.newOrderId || undefined;
181
                 postData.oldOrderId = this.queryObj.orderId || undefined;
183
                 postData.oldOrderId = this.queryObj.orderId || undefined;
182
               }
184
               }
@@ -223,6 +225,7 @@
223
               this.drugsBag = res.data.dto || {};
225
               this.drugsBag = res.data.dto || {};
224
               this.orderId = this.queryObj.orderId;
226
               this.orderId = this.queryObj.orderId;
225
               this.config = res.data.taskTypeConfig || {};
227
               this.config = res.data.taskTypeConfig || {};
228
+              this.workOrder = res.data.workOrder || {};
226
             }
229
             }
227
           }else{
230
           }else{
228
             uni.showToast({
231
             uni.showToast({