htc 3 месяцев назад
Родитель
Сommit
67981988c2
1 измененных файлов с 25 добавлено и 4 удалено
  1. 25 4
      pagesStorage/inStorage/add.vue

+ 25 - 4
pagesStorage/inStorage/add.vue

@@ -59,8 +59,9 @@
 				</div> -->
 				<div class="item">
 					<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 class="right" @tap="selectPurchaser">
+						<text v-if="receiptDto.purchaser">{{receiptDto.purchaser}} ></text>
+						<text class="tip" v-else>采购负责人 ></text>
 					</div>
 				</div>
 				<div class="item">
@@ -118,6 +119,9 @@
 			@cancel="merchantShow=false" @confirm="merchantConfirm" :immediateChange="true">
 		</u-picker>
 		<u-calendar title="到货日期" :minDate="minDate" :maxDate="maxDate" :monthNum="5" :show="dateShow" mode="single" @confirm="dateConfirm" @close="dateShow = false"></u-calendar>
+		<u-picker title="采购负责人" :show="purchaserShow" :columns="purchaserList" keyName="dictLabel" 
+			@cancel="purchaserShow=false" @confirm="purchaserConfirm" :immediateChange="true">
+		</u-picker>
 	</view>
 </template>
 
@@ -143,7 +147,8 @@
 					arrivalDate:'',
 					details: [],
 					projectId:'',
-					projectName:''
+					projectName:'',
+					purchaser:'',
 				},
 				warehouseShow:false,
 				warehouseList:[],
@@ -155,7 +160,9 @@
 				minDate:'',
 				maxDate:'',
 				projectShow:false,
-				projectList:[]
+				projectList:[],
+				purchaserShow:false,
+				purchaserList:[],
 			}
 		},
 		mounted() {
@@ -209,6 +216,20 @@
 				this.receiptDto.optTypeName = e.value[0].dictLabel;
 				this.receiptTypeShow = false;
 			},
+			selectPurchaser(){
+				this.purchaserShow = true;
+				this.$nextTick(()=>{
+					this.$api.get('/sys/dict/data/getListByType/wms_purchaser').then(res=>{
+						if(res.data.code===0){
+							this.purchaserList = [res.data.data];
+						}else this.$showToast(res.data.msg)
+					})
+				})
+			},
+			purchaserConfirm(e){
+				this.receiptDto.purchaser = e.value[0].dictValue;
+				this.purchaserShow = false;
+			},
 			selectMerchant(){
 				this.merchantShow = true;
 				this.$nextTick(()=>{