炼厂下单确认 #12

Merged
kongduo merged 1 commits from KongDuo into master 2 years ago
  1. 30
      src/views/order/components/confirmSubmit.vue

@ -51,15 +51,21 @@
</template>
</el-table-column>
<el-table-column prop="type" label="策略类型"> </el-table-column>
<el-table-column label="价格">
<template slot-scope="{ row }"> {{ row.salePrice }} </template>
</el-table-column>
<el-table-column label="订单提货量">
<template slot-scope="{ row }"> {{ row.preQuantity | toNumberFixed }}{{ controlWindows.addInfo.productMeasurement }} </template>
</el-table-column>
<el-table-column label="订单金额">
<el-table-column label="销售价格">
<template slot-scope="{ row }"> {{ row.salePrice }} </template>
</el-table-column>
<el-table-column label="销售总金额">
<template slot-scope="{ row }"> {{ row.preAmount | toNumberFixed }} </template>
</el-table-column>
<el-table-column label="成本价格">
<template slot-scope="{ row }"> {{ row.floorPrice }} </template>
</el-table-column>
<el-table-column label="成本总金额">
<template slot-scope="{ row }"> {{ row.floorPrice * row.preQuantity | toNumberFixed }} </template>
</el-table-column>
</el-table>
</template>
</div>
@ -78,6 +84,7 @@ export default {
},
data() {
return {
newCostPrice: '',
newSalePrice: '',
undergoChanges: false,
tableData: [
@ -116,15 +123,15 @@ export default {
},
methods: {
openDrawer() {
let { productId, salePrice } = this.controlWindows.addInfo
let { productId, salePrice, floorPrice } = this.controlWindows.addInfo
if (productId) {
serve.getRefineryProduct(productId).then(res => {
let { salePrice2company } = res.data
if (salePrice2company != salePrice) {
let data = res.data;
if (data.salePrice2company != salePrice || data.floorPrice != floorPrice) {
console.log('价格发生变化了捏')
//
this.newSalePrice = salePrice2company
this.newSalePrice = data.salePrice2company
this.newCostPrice = data.floorPrice
this.policyPopulation()
} else console.log('芜湖 没变')
})
@ -136,6 +143,7 @@ export default {
this.tableData[index].isChecked = true
}
},
//
policyPopulation() {
let { salePrice, floorPrice, preQuantity, preAmount } = this.controlWindows.addInfo
// console.log(salePrice, preQuantity, preAmount)
@ -145,14 +153,14 @@ export default {
//
Object.assign(this.tableData[1], {
salePrice: this.newSalePrice,
floorPrice: this.newSalePrice,
floorPrice: this.newCostPrice,
preQuantity,
preAmount: +this.newSalePrice * +preQuantity
})
//
Object.assign(this.tableData[2], {
salePrice: this.newSalePrice,
floorPrice: this.newSalePrice,
floorPrice: this.newCostPrice,
preQuantity: +preAmount / +this.newSalePrice,
preAmount
})

Loading…
Cancel
Save