ccjgmwz 3 lat temu
rodzic
commit
52eacaa93f

+ 0 - 1
pages/erpbusiness/acquisitionInspection/add_check_the_weight.vue

@@ -214,7 +214,6 @@
 		.row {
 			display: flex;
 			justify-content: space-between;
-			border-bottom: 1px solid #EEEEEE;
 			padding: 31rpx 0;
 
 			.right {

+ 0 - 1
pages/erpbusiness/acquisitionInspection/grossWeightDetail.vue

@@ -108,7 +108,6 @@
 	.row{
 		display: flex;
 		justify-content: space-between;
-		border-bottom: 1px solid #EEEEEE;
 		padding:31rpx 0;
 		.right{
 			font-size: 28rpx;

+ 0 - 1
pages/erpbusiness/acquisitionInspection/grossWeightDetail1.vue

@@ -213,7 +213,6 @@
 		.row {
 			display: flex;
 			justify-content: space-between;
-			border-bottom: 1px solid #EEEEEE;
 			padding: 21rpx 0;
 
 			.right,input {

+ 0 - 1
pages/erpbusiness/acquisitionInspection/tareDetail.vue

@@ -126,7 +126,6 @@
 	.row{
 		display: flex;
 		justify-content: space-between;
-		border-bottom: 1px solid #EEEEEE;
 		padding:21rpx 0;
 		.right{
 			font-size: 28rpx;

+ 0 - 1
pages/erpbusiness/acquisitionInspection/tareDetail1.vue

@@ -230,7 +230,6 @@
 		.row {
 			display: flex;
 			justify-content: space-between;
-			border-bottom: 1px solid #EEEEEE;
 			padding: 31rpx 0;
 
 			.right {

+ 0 - 1
pages/erpbusiness/acquisitionInspection/tareDetail2.vue

@@ -219,7 +219,6 @@
 		.row {
 			display: flex;
 			justify-content: space-between;
-			border-bottom: 1px solid #EEEEEE;
 			padding: 31rpx 0;
 
 			.right {

+ 60 - 4
pages/erpbusiness/add_quality_testing.vue

@@ -77,12 +77,19 @@
 					</u-picker>
 				</view>
 			</view>
-			<view class="c-row">
+			<view v-if="gridList.type == '潮粮'" class="c-row">
 				<view class="title">净重单价(元/公斤)</view>
 				<view class="con-list">
 					{{gridList.tidalGrainPrice}}
 				</view>
 			</view>
+			<view v-if="gridList.type == '干粮'" class="c-row">
+				<view class="title">干粮单价(元/公斤)</view>
+				<view class="con-list">
+					<input v-model='gridList.dryGrainPrice' placeholder="请输入干粮单价"
+						 name="input"></input>
+				</view>
+			</view>
 		</view>
 		<view style='margin-bottom:100px;' class='wrap'>
 			<view class='title_b'>化验信息</view>
@@ -98,14 +105,14 @@
 			<view class="c-row ">
 				<view class="title">水分(%)</view>
 				<view class="con-list">
-					<input v-model='gridList.waterContent' placeholder="请输入水分占比"
+					<input v-model='gridList.waterContent' placeholder="请输入水分占比" @input="waterContentChange"
 					 name="input"></input>
 				</view>
 			</view>
 			<view class="c-row ">
 				<view class="title">容重(克/升)</view>
 				<view class="con-list">
-					<input v-model='gridList.bulkDensity' placeholder="请输入容重"
+					<input v-model='gridList.bulkDensity' placeholder="请输入容重" 
 					 name="input"></input>
 				</view>
 			</view>
@@ -188,7 +195,9 @@
 				username:"请更改昵称",
 				gridList: {
 					natureOfGrainPurchase:'贸易粮',
-					type:'潮粮'
+					type:'潮粮',
+					tidalGrainPrice:'',
+					dryGrainPrice:''
 				},
 				typeList:['潮粮','干粮'],
 				managementType:'',
@@ -292,6 +301,34 @@
 				})
 		},
 		methods: {
+			waterContentChange() {
+				var that = this
+				if (this.gridList.goodsName) {
+				  for (var i = 0; i < this.purchasePriceList.length; i++) {
+					if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
+					  this.gridList.buckleWeightRatio = this.purchasePriceList[i].deductWeight
+					}
+				  }
+				}
+				var numReg = /^[0-9]*$/
+				var numRe = new RegExp(numReg)
+				//潮粮单价改变事件
+				if (
+				  this.gridList.goodsName &&
+				  this.gridList.waterContent &&
+				  this.gridList.grade&&
+				  numRe.test(this.gridList.waterContent)
+				) {
+					this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice',{
+						warehouseId:this.cangid,
+						goodsName:this.gridList.goodsName,
+						waterContent: this.gridList.waterContent,
+						grade: this.gridList.grade,
+					}).then(res => {
+						that.gridList.tidalGrainPrice = res.data.data
+					})
+				}
+			},
 			gocustomer(){
 				uni.navigateTo({
 					url:'/pages/erpbusiness/customer'
@@ -416,15 +453,34 @@
 				// this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
 				this.gridList.grade=this.gradeList[e[0]].value
 				this.gridList.gradeKey=this.gradeList[e[0]].key
+				this.waterContentChange()
 			},
 			goodspicker(e){
 				console.log(e)
 				// this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
 				this.gridList.goodsName=this.goodsList[e[0]].goodsName
 				uni.setStorageSync('goodsName',this.gridList.goodsName)
+				if(this.gridList.type == "干粮" && this.gridList.goodsName){
+				  this.$api.doRequest('get', '/purchasePrice/dryGrainPrice',{
+					warehouseId:this.cangid,
+					goodsName:this.gridList.goodsName
+				  }).then(res => {
+					that.gridList.dryGrainPrice = res.data.data
+				  })
+				}
+				this.waterContentChange()
 			},
 			typepicker(e){
+				var that = this
 				this.gridList.type=this.typeList[e[0]]
+				if(this.gridList.type == "干粮" &&this.gridList.goodsName){
+				  this.$api.doRequest('get', '/purchasePrice/dryGrainPrice',{
+					warehouseId:this.cangid,
+					goodsName:this.gridList.goodsName
+				  }).then(res => {
+					that.gridList.dryGrainPrice = res.data.data
+				  })
+				}
 			},
 			binNumberpicker(e){
 				this.gridList.binNumber=this.warehouseList[e[0]].binNumber