|
@@ -311,9 +311,9 @@
|
|
<view v-else class="title">蛋白</view>
|
|
<view v-else class="title">蛋白</view>
|
|
<view class="con-list">
|
|
<view class="con-list">
|
|
<input :disabled='flag==1' type="digit" v-model='gridList.bulkDensity' placeholder="请输入容重"
|
|
<input :disabled='flag==1' type="digit" v-model='gridList.bulkDensity' placeholder="请输入容重"
|
|
- name="input"></input>
|
|
|
|
- <input v-if='flag==1||flag==2' type="digit" v-model='gridList.reBulkDensity' placeholder="请输入容重"
|
|
|
|
- name="input"></input>
|
|
|
|
|
|
+ name="input" @input="obtainPrice"></input>
|
|
|
|
+ <input v-if='flag==1||flag==2' type="digit" v-model='gridList.reBulkDensity' placeholder="请输入容重"
|
|
|
|
+ name="input" @input="obtainPrice"></input>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="c-row ">
|
|
<view class="c-row ">
|
|
@@ -640,6 +640,21 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ obtainPrice(){//根据容重获取价格
|
|
|
|
+ if (this.gridList.goodsName && this.cangid && this.gridList.bulkDensity) {
|
|
|
|
+ // if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
|
|
|
|
+ this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
|
|
|
|
+ warehouseId: this.cangid,
|
|
|
|
+ goodsName: this.gridList.goodsName,
|
|
|
|
+ bulkDensity:this.gridList.bulkDensity
|
|
|
|
+ }).then(res => {
|
|
|
|
+ if(res.data.data != 0){
|
|
|
|
+ this.gridList.dryGrainPrice = res.data.data
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ // }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
changeprice(){
|
|
changeprice(){
|
|
if(this.pricetext=='解锁'){
|
|
if(this.pricetext=='解锁'){
|
|
this.pricedisabled=false
|
|
this.pricedisabled=false
|
|
@@ -784,6 +799,17 @@
|
|
},
|
|
},
|
|
waterContentChange() {
|
|
waterContentChange() {
|
|
var that = this
|
|
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
|
|
|
|
+ this.gridList.paramType = this.purchasePriceList[i].paramType
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(this.gridList.serviceManagementType == 3){ //收购入库 不需在获取价格
|
|
|
|
+ return
|
|
|
|
+ }
|
|
if (this.gridList.goodsName && this.cangid) {
|
|
if (this.gridList.goodsName && this.cangid) {
|
|
if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
|
|
if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
|
|
this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
|
|
this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
|
|
@@ -794,14 +820,7 @@
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- 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
|
|
|
|
- this.gridList.paramType = this.purchasePriceList[i].paramType
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
var numReg = /^[0-9]*$/
|
|
var numReg = /^[0-9]*$/
|
|
var numRe = new RegExp(numReg)
|
|
var numRe = new RegExp(numReg)
|
|
//潮粮单价改变事件
|
|
//潮粮单价改变事件
|