Kaynağa Gözat

页面修复

Zhouzhendong 5 yıl önce
ebeveyn
işleme
4201148dd8

+ 3 - 3
resources/views/customer/project/create.blade.php

@@ -425,12 +425,12 @@
                             this._loadOperation();
                             res.owner_price_operations.forEach((operation,i)=>{
                                 if (operation.discount_count){
-                                    res.owner_price_operations[i].discount_count = operation.discount_count.split(",");
-                                    res.owner_price_operations[i].total_discount_price = operation.total_discount_price.split(",");
+                                    if (operation.discount_count) res.owner_price_operations[i].discount_count = operation.discount_count.split(",");
+                                    if (operation.total_discount_price) res.owner_price_operations[i].total_discount_price = operation.total_discount_price.split(",");
                                     operation.isDiscount = true;
                                 }
                                 operation.items.forEach((item,i)=>{
-                                    res.owner_price_operations[i].items[i].discount_price = item.discount_price.split(",");
+                                    if (item.discount_price) res.owner_price_operations[i].items[i].discount_price = item.discount_price.split(",");
                                 });
                                 if (operation.total_price)operation.isSingle = true;
                             });

+ 1 - 0
resources/views/maintenance/priceModel/operation/create.blade.php

@@ -115,6 +115,7 @@
                                     <strong>必须为整数</strong>
                                 </span>
                             </div>
+
                             <div class="col-4 form-inline">
                                 <label for="unit_id">单位:</label>
                                 <select id="unit_id" v-model="item.unit_id" class="form-control" :class="errors['items.'+i+'.unit_id'] ? 'is-invalid' : ''" required>