zhongtianhaoyuan 2 anni fa
parent
commit
d3dc72e37d

+ 8 - 5
src/views/tranManagement/tranManagementVehicleDispatching.vue

@@ -92,7 +92,6 @@
             </div>
           
           <div class="myTest">
-            
             <el-form-item v-if='pricetype==1' label="当前运输单价(元/吨):" prop="tranPrice" label-width="150px" class="input-item-margin">
               <el-input v-model="deptBudgetList.tranPrice" maxlength="70" disabled />
             </el-form-item>
@@ -259,8 +258,6 @@
               <span v-if="!item.id" width="22" height="22" class="del"
                 @click="del(index, item,1)" src="../../../public/img/del.png" alt="">×</span>
             </div>
-
-
           </div>
           <div style="text-align: right; color: #8890b1; font-size: 16px">
             共{{ total }}/{{ deptBudgetList.weight }}
@@ -701,7 +698,6 @@
         });
       },
       priceSubmit(status) {
-        console.log(status,this.deptBudgetList.tranPriceIng,this.deptBudgetList.tranPriceIngCar)
         if(status==1&&!this.deptBudgetList.tranPriceIng){
           this.$message({
             message: '请输入运输单价元/吨!',
@@ -753,11 +749,18 @@
       },
       //提交按钮
       submit() {
-        if (!this.deptBudgetList.tranPrice&&this.deptBudgetList.tranPrice!= 0) {
+        if (!this.deptBudgetList.tranPrice&&this.deptBudgetList.tranPrice!= 0 && this.pricetype==1) {
           this.$message({
             message: '请设置运输单价!',
             type: 'warning',
           })
+          return
+        } else if(!this.deptBudgetList.tranPriceCar&&this.deptBudgetList.tranPriceCar!= 0 && this.pricetype!=1){
+          this.$message({
+            message: '请设置运输单价!',
+            type: 'warning',
+          })
+          return
         } else {
           for (var i = this.index; i < this.deptBudgetList.tranCarInfoList.length; i++) {
             if (!this.deptBudgetList.tranCarInfoList[i].driver&&this.deptBudgetList.tranCarInfoList[i].fleetFlag==0) {