|
|
|
@ -148,7 +148,7 @@ |
|
|
|
<view class=""><view class="submit-popup-title">购买数量(张)</view></view> |
|
|
|
<view class="submit-number-line"> |
|
|
|
<uni-number-box v-model="addObj.quantity"></uni-number-box> |
|
|
|
<text class="submit-number-text">预估重量:{{ Math.round(addObj.gramWeight * addObj.width * addObj.length * addObj.quantity * 1e-12, 4) }}</text> |
|
|
|
<text class="submit-number-text">预估重量:{{ round(addObj.gramWeight * addObj.width * addObj.length * addObj.quantity * 1e-12, 4) }}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class=""><button class="submit-btn submit-number-btn" type="primary" @click="sureModifyPaper()">确认修改纸品</button></view> |
|
|
|
@ -220,6 +220,7 @@ import { back, go2 } from '@/utils/hook.js' |
|
|
|
import qnHeader from '@/components/qn-header/qn-header.vue' |
|
|
|
import uGap from '@/components/u-gap/u-gap.vue' |
|
|
|
import { updateEnquiryReply, enquiryReplyDetail } from '@/apis/trade' |
|
|
|
import { round } from '@/utils/index.js' |
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
|
@ -274,6 +275,7 @@ export default { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
back, |
|
|
|
round, |
|
|
|
// 获取详情 |
|
|
|
getDetail(id) { |
|
|
|
enquiryReplyDetail(id) |
|
|
|
@ -289,7 +291,7 @@ export default { |
|
|
|
// 计算每个纸品的重量 |
|
|
|
for (let i = 0; i < this.upDataObj.itemList.length; i++) { |
|
|
|
let target = this.upDataObj.itemList[i] |
|
|
|
target.weight = Math.round(target.gramWeight * target.width * target.length * target.quantity * 1e-12, 4) |
|
|
|
target.weight = round(target.gramWeight * target.width * target.length * target.quantity * 1e-12, 4) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
@ -396,7 +398,7 @@ export default { |
|
|
|
sureModifyPaper() { |
|
|
|
this.$refs.popup.close() |
|
|
|
// 同时更改重量 |
|
|
|
this.addObj.weight = Math.round(this.addObj.gramWeight * this.addObj.width * this.addObj.length * this.addObj.quantity * 1e-12, 4) |
|
|
|
this.addObj.weight = round(this.addObj.gramWeight * this.addObj.width * this.addObj.length * this.addObj.quantity * 1e-12, 4) |
|
|
|
this.upDataObj.itemList[this.modifyIndex] = JSON.parse(JSON.stringify(this.addObj)) |
|
|
|
this.upDataObj = JSON.parse(JSON.stringify(this.upDataObj)) |
|
|
|
|
|
|
|
@ -411,8 +413,8 @@ export default { |
|
|
|
pricesSure() { |
|
|
|
this.$set(this.upDataObj.itemList[this.pricesIndex], 'otherFee', this.prices.otherFee) |
|
|
|
this.$set(this.upDataObj.itemList[this.pricesIndex], 'unitFee', this.prices.unitFee) |
|
|
|
var abs = Math.round(this.prices.unitFee * this.prices.weight + (this.prices.otherFee - 0), 2) |
|
|
|
this.$set(this.upDataObj.itemList[this.pricesIndex], 'totalPrice', Math.round(abs, 2)) |
|
|
|
var abs = round(this.prices.unitFee * this.prices.weight + (this.prices.otherFee - 0), 2) |
|
|
|
this.$set(this.upDataObj.itemList[this.pricesIndex], 'totalPrice', round(abs, 2)) |
|
|
|
this.upDataObj = JSON.parse(JSON.stringify(this.upDataObj)) |
|
|
|
this.$refs.popupPrice.close() |
|
|
|
console.log(this.upDataObj.itemList) |
|
|
|
@ -423,9 +425,9 @@ export default { |
|
|
|
this.upDataObj.otherFee = 0 |
|
|
|
for (let i = 0; i < this.upDataObj.itemList.length; i++) { |
|
|
|
var totalAllPrice = parseFloat(this.upDataObj.totalAllPrice) + parseFloat(this.upDataObj.itemList[i].totalPrice) |
|
|
|
this.upDataObj.totalAllPrice = Math.round(totalAllPrice, 2) |
|
|
|
this.upDataObj.totalAllPrice = round(totalAllPrice, 2) |
|
|
|
var otherFee = parseFloat(this.upDataObj.otherFee) + parseFloat(this.upDataObj.itemList[i].otherFee) |
|
|
|
this.upDataObj.otherFee = Math.round(otherFee, 2) |
|
|
|
this.upDataObj.otherFee = round(otherFee, 2) |
|
|
|
} |
|
|
|
}, |
|
|
|
//提交报价 |
|
|
|
|