zhangyuewww 1 rok temu
rodzic
commit
20ab3e531b
1 zmienionych plików z 16 dodań i 1 usunięć
  1. 16 1
      pages/erp/exWarehousing/exWarehousing.vue

+ 16 - 1
pages/erp/exWarehousing/exWarehousing.vue

@@ -26,6 +26,11 @@
 				<view class="right">{{detailData.goodsName ? detailData.goodsName : "选择合同,自动获取"}}
 				</view>
 			</view>
+			<view class="row row-bottom" v-if="detailData.inOutType == '销售出库'">
+				<view class="left">价格(元/吨)</view>
+				<input type="digit"  v-model='detailData.cost' class="right-bottom"
+					placeholder="输入价格"></input>
+			</view>
 			<!-- <view class="row">
 				<view class="left">类型</view>
 				<view @click='show1=true'>{{detailData.type}}</view>
@@ -329,6 +334,7 @@
 					grossWeight: "",
 					tare: "",
 					tips: '',
+					cost:'',
 					carNo:'',
 					selfLoading:"0",
 					goodsName:"",
@@ -512,6 +518,9 @@
 								// "MYCGYMHLJ2021102401"
 									if (this.detailData.inOutType == '销售出库') {
 										this.detailData.tips = '买方' + res.data.data.buyer
+										if(res.data.data.unitContractPrice){
+											this.detailData.cost=res.data.data.unitContractPrice
+										}
 									} else if (this.detailData.inOutType == '移库出库') {
 										this.detailData.tips = '入货库' + this.inOutNoList[0].receiveWarehouse
 									}
@@ -588,13 +597,15 @@
 					if(uni.getStorageSync('compName1')){
 						this.weightbills.seller = uni.getStorageSync('compName1').company
 					}
-					if (this.detailData.tips = '买方' + this.contractList.buyer) {
+					if (this.contractList.unitContractPrice) {
 						this.detailData.tips = '买方' + this.contractList.buyer +
 							'( ' +
 							this.contractList.unitContractPrice +
 							'元/吨)'
+						this.detailData.cost=this.contractList.unitContractPrice
 					} else {
 						this.detailData.tips = '买方' + this.contractList.buyer
+						this.detailData.cost=''
 					}
 				} else if (this.detailData.inOutType == '移库出库') {
 					this.weightbills.buyer = this.inOutNoList[e[0]].receiveWarehouse
@@ -833,6 +844,10 @@
 					this.$api.msg('品级不能为空')
 					return
 				}
+				if (!this.detailData.cost && this.detailData.inOutType == '销售出库'&& num == 2) {
+					this.$api.msg('价格不能为空')
+					return
+				}
 				if (this.detailData.agent == "请选择经办人") {
 					this.$api.msg('经办人不能为空')
 					return