Przeglądaj źródła

出入库增加必填校验

htc 1 miesiąc temu
rodzic
commit
b55c7dd04b

+ 4 - 2
pagesStorage/inStorage/add.vue

@@ -32,7 +32,7 @@
 					</div>
 				</div>
 				<div class="item">
-					<div class="left">到货日期</div>
+					<div class="left"><span>*</span>到货日期</div>
 					<div class="right" @tap="dateShow = true">
 						<text v-if="receiptDto.arrivalDate">{{receiptDto.arrivalDate}} ></text>
 						<text class="tip" v-else>请选择 ></text>
@@ -51,7 +51,7 @@
 					</div>
 				</div> -->
 				<div class="item">
-					<div class="left">采购负责人</div>
+					<div class="left"><span>*</span>采购负责人</div>
 					<div class="right">
 						<input type="text" placeholder-class="storage-inp-ph" placeholder="请输入" v-model="receiptDto.purchaser" @blur="e=>setReceipt(e,'purchaser')">
 					</div>
@@ -263,6 +263,8 @@
 				if(!this.receiptDto.orderNo) return this.$showToast('请输入入库单号');
 				if(!this.receiptDto.warehouseId) return this.$showToast('请选择仓库');
 				if(!this.receiptDto.optType) return this.$showToast('请选择入库类型');
+				if(!this.receiptDto.arrivalDate) return this.$showToast('请选择到货日期');
+				if(!this.receiptDto.purchaser) return this.$showToast('请输入采购负责人');
 				
 				let temp = JSON.parse(JSON.stringify(this.receiptDto.details));
 				let details = temp.map(d=>{

+ 4 - 2
pagesStorage/outStorage/add.vue

@@ -32,7 +32,7 @@
 					</div>
 				</div>
 				<div class="item">
-					<div class="left">出库日期</div>
+					<div class="left"><span>*</span>出库日期</div>
 					<div class="right" @tap="dateShow = true">
 						<text v-if="shipmentDto.shipmentDate">{{shipmentDto.shipmentDate}} ></text>
 						<text class="tip" v-else>请选择 ></text>
@@ -45,7 +45,7 @@
 					</div>
 				</div>
 				<div class="item">
-					<div class="left">领料人</div>
+					<div class="left"><span>*</span>领料人</div>
 					<div class="right">
 						<input type="text" placeholder-class="storage-inp-ph" placeholder="请输入" v-model="shipmentDto.collector" @blur="e=>setShipment(e,'collector')">
 					</div>
@@ -245,6 +245,8 @@
 				if(!this.shipmentDto.orderNo) return this.$showToast('请输入出库单号');
 				if(!this.shipmentDto.warehouseId) return this.$showToast('请选择仓库');
 				if(!this.shipmentDto.optType) return this.$showToast('请选择出库类型');
+				if(!this.shipmentDto.shipmentDate) return this.$showToast('请选择出库日期');
+				if(!this.shipmentDto.collector) return this.$showToast('请输入领料人');
 				
 				let temp = JSON.parse(JSON.stringify(this.shipmentDto.details));
 				let details = temp.map(d=>{