|
@@ -582,13 +582,63 @@
|
|
|
that.value = false
|
|
|
}
|
|
|
that.gridList = data
|
|
|
- if(that.gridList.dryGrainPrice){
|
|
|
- that.dryGrainPrice=that.gridList.dryGrainPrice
|
|
|
- }
|
|
|
- if(that.gridList.tidalGrainPrice){
|
|
|
- that.tidalGrainPrice=that.gridList.tidalGrainPrice
|
|
|
+ if(that.gridList.type=='干粮'){
|
|
|
+ if (this.gridList.goodsName &&
|
|
|
+ this.gridList.bulkDensity &&
|
|
|
+ this.cangid) {
|
|
|
+ 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
|
|
|
+ this.dryGrainPrice = res.data.data
|
|
|
+ this.deductionchange()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }else if(that.gridList.type=='潮粮'){
|
|
|
+ if (
|
|
|
+ this.gridList.goodsName &&
|
|
|
+ this.gridList.waterContent &&
|
|
|
+ this.gridList.grade
|
|
|
+ ) {
|
|
|
+ console.log('123123')
|
|
|
+ this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
|
|
|
+ warehouseId: this.cangid,
|
|
|
+ goodsName: this.gridList.goodsName,
|
|
|
+ waterContent: this.gridList.waterContent,
|
|
|
+ grade: this.gridList.grade,
|
|
|
+ }).then(res => {
|
|
|
+
|
|
|
+ if (that.gridList.paramType == '1') {
|
|
|
+ // console.log(that.gridList)
|
|
|
+ if(that.gridList.buckleMiscellaneous){
|
|
|
+ that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
|
|
|
+ .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
|
|
|
+ .dryGrainPrice)).toFixed(4)
|
|
|
+ that.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
|
|
|
+ that.tidalGrainPrice = res.data.data
|
|
|
+ }
|
|
|
+ this.deductionchange()
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
+ // if(that.gridList.dryGrainPrice){
|
|
|
+ // that.dryGrainPrice=that.gridList.dryGrainPrice
|
|
|
+ // }
|
|
|
+ // if(that.gridList.tidalGrainPrice){
|
|
|
+ // that.tidalGrainPrice=that.gridList.tidalGrainPrice
|
|
|
+ // }
|
|
|
if(!that.gridList.reGrade){
|
|
|
that.gridList.reGrade=that.gridList.grade
|
|
|
}
|