Browse Source

bug修改,需求单清空数据

黄梓星 2 years ago
parent
commit
2fffbc9a7a

+ 24 - 4
src/views/purchase/PurchaseDemandList/add.vue

@@ -332,7 +332,7 @@
           <el-table-column label="收货仓库" align="center"  prop="deliveryWarehouseName" width="200px">
           <el-table-column label="收货仓库" align="center"  prop="deliveryWarehouseName" width="200px">
             <template slot-scope="scope">
             <template slot-scope="scope">
               <el-form-item class="hang">
               <el-form-item class="hang">
-                <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.deliveryWarehouseName" @focus="chooseDept(scope.$index, 'WAREHOUSE_PARAM', true, '选择收货仓库')">
+                <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.deliveryWarehouseName" @clear="clearHang(scope.$index, '选择收货仓库')" @focus="chooseDept(scope.$index, 'WAREHOUSE_PARAM', true, '选择收货仓库')">
                   <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'WAREHOUSE_PARAM', true, '选择收货仓库')"></el-button>
                   <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'WAREHOUSE_PARAM', true, '选择收货仓库')"></el-button>
                 </el-input>
                 </el-input>
               </el-form-item>
               </el-form-item>
@@ -341,7 +341,7 @@
           <el-table-column label="收货货位" align="center"  prop="deliveryAllocationName" width="200px">
           <el-table-column label="收货货位" align="center"  prop="deliveryAllocationName" width="200px">
             <template slot-scope="scope">
             <template slot-scope="scope">
               <el-form-item class="hang">
               <el-form-item class="hang">
-                <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.deliveryAllocationName" @focus="choosehuoWei(scope.$index, 'ALLOCATION_PARAM', true, '选择收货货位', scope.row.deliveryWarehouse)">
+                <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.deliveryAllocationName" @clear="clearHang(scope.$index, '选择收货货位')" @focus="choosehuoWei(scope.$index, 'ALLOCATION_PARAM', true, '选择收货货位', scope.row.deliveryWarehouse)">
                   <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="choosehuoWei(scope.$index, 'ALLOCATION_PARAM', true, '选择收货货位', scope.row.deliveryWarehouse)"></el-button>
                   <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="choosehuoWei(scope.$index, 'ALLOCATION_PARAM', true, '选择收货货位', scope.row.deliveryWarehouse)"></el-button>
                 </el-input>
                 </el-input>
               </el-form-item>
               </el-form-item>
@@ -416,7 +416,7 @@
           <el-table-column label="收货地址" align="center"  prop="deliveryAddressName" width="200px">
           <el-table-column label="收货地址" align="center"  prop="deliveryAddressName" width="200px">
             <template slot-scope="scope">
             <template slot-scope="scope">
               <el-form-item class="hang">
               <el-form-item class="hang">
-                <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.deliveryAddressName" @focus="chooseDept(scope.$index, 'ADDRESS_PARAM', true, '选择收货地址')">
+                <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.deliveryAddressName" @clear="clearHang(scope.$index, '选择收货地址')" @focus="chooseDept(scope.$index, 'ADDRESS_PARAM', true, '选择收货地址')">
                   <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'ADDRESS_PARAM', true, '选择收货地址')"></el-button>
                   <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'ADDRESS_PARAM', true, '选择收货地址')"></el-button>
                 </el-input>
                 </el-input>
               </el-form-item>
               </el-form-item>
@@ -964,7 +964,27 @@ export default {
       } else {
       } else {
         this.$modal.msgWarning("请先选择收货仓库");
         this.$modal.msgWarning("请先选择收货仓库");
       }
       }
-    }
+    },
+    // 明细行清空收货仓库,货位,收货地址档案等
+    clearHang(index, title) {
+      if (title == '选择收货仓库') {
+        this.basicForm.puDemandItemList[index].deliveryWarehouseName = null
+        this.basicForm.puDemandItemList[index].deliveryWarehouse = null
+        this.basicForm.puDemandItemList[index].deliveryAllocationName = null
+        this.basicForm.puDemandItemList[index].deliveryAllocation = null
+      }
+      if (title == '选择收货货位') {
+        this.basicForm.puDemandItemList[index].deliveryAllocationName = null
+        this.basicForm.puDemandItemList[index].deliveryAllocation = null
+      }
+      if (title == '选择收货地址') {
+        this.basicForm.puDemandItemList[index].deliveryAddressName = null
+        this.basicForm.puDemandItemList[index].deliveryAddress = null
+        this.basicForm.puDemandItemList[index].contacts = null
+        this.basicForm.puDemandItemList[index].contactsPhone = null
+        this.basicForm.puDemandItemList[index].address = null
+      }
+    },
   }
   }
 }
 }
 </script>
 </script>

+ 14 - 0
src/views/purchase/transferOrder/add.vue

@@ -309,6 +309,19 @@
             </template>
             </template>
           </el-table-column>
           </el-table-column>
           <el-table-column label="有效期至/失效日期" align="center" prop="periodEndDate" width="150px"/>
           <el-table-column label="有效期至/失效日期" align="center" prop="periodEndDate" width="150px"/>
+          <el-table-column label="调拨日期" align="center" prop="allotDate" width="230px">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-date-picker
+                  v-model="scope.row.allotDate"
+                  :readonly="sonDisable"
+                  type="date"
+                  size="small"
+                  value-format="yyyy-MM-dd">
+                </el-date-picker>
+              </el-form-item>
+            </template>
+          </el-table-column>
           <el-table-column label="批准文号" align="center" prop="ratifyCode" width="200px"/>
           <el-table-column label="批准文号" align="center" prop="ratifyCode" width="200px"/>
           <el-table-column label="注册证号" align="center" prop="registration" width="200px"/>
           <el-table-column label="注册证号" align="center" prop="registration" width="200px"/>
           <el-table-column label="商品名" align="center" prop="productCode" width="150px"/>
           <el-table-column label="商品名" align="center" prop="productCode" width="150px"/>
@@ -806,6 +819,7 @@ export default {
         producBatch: null,
         producBatch: null,
         manufactureDate: null,
         manufactureDate: null,
         periodEndDate: null,
         periodEndDate: null,
+        allotDate: null,
         ratifyCode: null,
         ratifyCode: null,
         registration: null,
         registration: null,
         productCode: null,
         productCode: null,