瀏覽代碼

工单关于破损处理

loustwo 4 年之前
父節點
當前提交
5168fd28e2

+ 1 - 1
resources/views/order/index/delivering.blade.php

@@ -1516,7 +1516,7 @@
                     let filter = this.workOrder.commodities.filter(e=>{
                         return Number(e.price) <=0 || Number(e.abnormal_amount) <= 0;
                     })
-                    if (filter.length > 0){
+                    if (filter.length > 0 && !this.isBaoShi){
                         message = '破损商品的数量和价格不能为0';
                     }
                     if (message){

+ 3 - 2
resources/views/order/workOrder/_logistic_fill_work_order_modal.blade.php

@@ -76,7 +76,7 @@
                         <td class="text-wrap" v-text="item.commodity ? item.commodity.sku : ''"></td>
                         <td v-text="item.amount"></td>
                         <td v-text="item.abnormal_amount"></td>
-                        <td v-text="item.price"></td>
+                        <td v-text="Number(item.price) === 0?'待提供' : item.price"></td>
                         <td>
                             <input type="number" class="form-control form-control-sm"
                                    v-model="item.check_amount" @input="logisticDamageWorkOrderAuto(item)">
@@ -125,7 +125,8 @@
 
     <div slot="footer" class="dialog-footer">
         <el-button @click="dialogShowLogisticVisible = false">关 闭</el-button>
-        <el-button type="primary" @click="logisticEdit">提交</el-button>
+        <el-button type="primary" @click="logisticEdit" v-show="'破损' === logisticEditWorkOrder.issue_type_name && logisticCheckDamage" disabled>提交</el-button>
+        <el-button type="primary" @click="logisticEdit" v-show="'破损' !== logisticEditWorkOrder.issue_type_name">提交</el-button>
     </div>
 </el-dialog>
 

+ 1 - 1
resources/views/order/workOrder/_work_order_show.blade.php

@@ -118,7 +118,7 @@
                         <td v-text="item.abnormal_type"></td>
                         <td class="text-wrap" v-text="item.commodity ? item.commodity.name : ''"></td>
                         <td v-text="item.amount"></td>
-                        <td v-text="item.price"></td>
+                        <td v-text="Number(item.price) === 0 ? '待提供' : item.price"></td>
                         <td v-text="item.abnormal_amount"></td>
                     </tr>
                     </tbody>

+ 8 - 0
resources/views/order/workOrder/index.blade.php

@@ -1734,6 +1734,10 @@
                         this.dialogShowLogisticVisible = true;
                     }
                 },
+                logisticCheckDamage(){
+                    let {commodities} = this.logisticEditWorkOrder;
+                    return commodities.filter(e=>Number(e.price) === 0).length > 0;
+                },
                 logisticEdit() {
                     let {issue_type_name, commodities, detail_id, process_progress} = this.logisticEditWorkOrder;
                     if (issue_type_name === '拦截') {
@@ -1760,6 +1764,10 @@
                             this.errorTempTip(res.message);
                             return;
                         }
+                        if (this.logisticCheckDamage(0)){
+                            this.errorTempTip('破损商待补充,工单暂不可修改');
+                            return;
+                        }
                         let url = '{{route('workOrder.damage.logistic.handlerApi')}}';
                         let formData = new FormData();
                         formData.append('detail_id', detail_id);