huangfuli 3 年之前
父节点
当前提交
82c7add5e5

+ 8 - 2
src/views/tranManagement/tranManagementShippingArrangemen.vue

@@ -314,7 +314,7 @@
               </ws-form-item>
             </div>
             <span
-              v-if="item.status == '未装车'&& item.shipType == '散船'" 
+              v-if="(item.status == '未装车'&& item.shipType == '散船') || item.status == null" 
               width="22"
               height="22"
               class="del"
@@ -552,7 +552,12 @@ export default {
       this.$router.go(-1)
     },
     del(index, row) {
-      this.$confirm('船次信息删除后不可恢复,是否确定删除?', '提示', {
+      if(row.status == null){
+        if (this.deptBudgetList.tranCarInfoList.length > 1) {
+                  this.deptBudgetList.tranCarInfoList.splice(index, 1)
+               }
+      }else{
+        this.$confirm('船次信息删除后不可恢复,是否确定删除?', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning',
@@ -566,6 +571,7 @@ export default {
                }
             })
         })
+      }
     },
     add() {
       this.deptBudgetList.tranCarInfoList.push({

+ 6 - 0
src/views/tranManagement/tranManagementVehicleDispatching.vue

@@ -488,6 +488,11 @@ export default {
       this.$router.go(-1)
     },
     del(index, row) {
+      if(row.status == null){
+        if (this.deptBudgetList.tranCarInfoList.length > 1) {
+                  this.deptBudgetList.tranCarInfoList.splice(index, 1)
+               }
+      }else{
       this.$confirm('派车信息删除后不可恢复,是否确定删除?', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
@@ -502,6 +507,7 @@ export default {
                }
             })
         })
+      }
     },
     add() {
       if(!this.deptBudgetList.tranPrice){