|
@@ -27,13 +27,20 @@
|
|
|
name="input"></input>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="c-row ">
|
|
|
+ <view v-if="gridList.paramType != '1'" class="c-row ">
|
|
|
<view class="title">扣重比</view>
|
|
|
<view class="con-list">
|
|
|
<input v-model='gridList.buckleWeightRatio' placeholder="请输入扣重比"
|
|
|
name="input"></input>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view v-else class="c-row ">
|
|
|
+ <view class="title">扣杂</view>
|
|
|
+ <view class="con-list">
|
|
|
+ <input v-model='gridList.buckleMiscellaneous' placeholder="请输入扣杂" @input="waterContentChange"
|
|
|
+ name="input"></input>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<view class="c-row ">
|
|
|
<view class="title">购粮性质</view>
|
|
|
<view class="con-list">
|
|
@@ -253,6 +260,23 @@
|
|
|
methods: {
|
|
|
waterContentChange() {
|
|
|
var that = this
|
|
|
+ if(this.gridList.goodsName && this.cangid){
|
|
|
+ this.$api.doRequest('get', '/purchasePrice/dryGrainPrice',{
|
|
|
+ warehouseId:this.cangid,
|
|
|
+ goodsName:this.gridList.goodsName
|
|
|
+ }).then(res => {
|
|
|
+ that.gridList.dryGrainPrice = res.data.data
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ 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 numRe = new RegExp(numReg)
|
|
|
//潮粮单价改变事件
|
|
@@ -268,7 +292,14 @@
|
|
|
waterContent: this.gridList.waterContent,
|
|
|
grade: this.gridList.grade,
|
|
|
}).then(res => {
|
|
|
- that.gridList.tidalGrainPrice = res.data.data
|
|
|
+ if(that.gridList.paramType == '1'){
|
|
|
+ that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that.gridList.buckleMiscellaneous)/100*parseFloat(that.gridList.dryGrainPrice)).toFixed(4)
|
|
|
+ if(!that.gridList.tidalGrainPrice){
|
|
|
+ that.gridList.tidalGrainPrice = ''
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ that.gridList.tidalGrainPrice = res.data.data
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
},
|