pull/17/head^2
xiaozhiyong 2 years ago
parent a7d6f5dd7d
commit 2e2dd46d96
  1. 37
      src/views/order/components/confirmSubmit.vue

@ -30,7 +30,9 @@
</li> </li>
</ul> </ul>
<el-descriptions style="width: 50%; margin: 0 auto" direction="vertical" :column="3" border> <el-descriptions style="width: 50%; margin: 0 auto" direction="vertical" :column="3" border>
<el-descriptions-item label="价格">{{ controlWindows.addInfo.salePrice }}</el-descriptions-item> <el-descriptions-item label="价格"
>{{ controlWindows.addInfo.salePrice }} /{{ controlWindows.addInfo.productMeasurement }}</el-descriptions-item
>
<el-descriptions-item label="订单提货量"> <el-descriptions-item label="订单提货量">
{{ controlWindows.addInfo.preQuantity | toNumberFixed }} {{ controlWindows.addInfo.preQuantity | toNumberFixed }}
{{ controlWindows.addInfo.productMeasurement }} {{ controlWindows.addInfo.productMeasurement }}
@ -66,13 +68,13 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="销售价格"> <el-table-column label="销售价格">
<template slot-scope="{ row }"> {{ row.salePrice }} </template> <template slot-scope="{ row }"> {{ row.salePrice }} /{{ controlWindows.addInfo.productMeasurement }} </template>
</el-table-column> </el-table-column>
<el-table-column label="销售总金额"> <el-table-column label="销售总金额">
<template slot-scope="{ row }"> {{ row.preAmount }} </template> <template slot-scope="{ row }"> {{ row.preAmount }} </template>
</el-table-column> </el-table-column>
<el-table-column label="成本价格"> <el-table-column label="成本价格">
<template slot-scope="{ row }"> {{ row.floorPrice }} </template> <template slot-scope="{ row }"> {{ row.floorPrice }} /{{ controlWindows.addInfo.productMeasurement }} </template>
</el-table-column> </el-table-column>
<el-table-column label="成本总金额"> <el-table-column label="成本总金额">
<template slot-scope="{ row }"> {{ row.preCostAmount }} </template> <template slot-scope="{ row }"> {{ row.preCostAmount }} </template>
@ -95,8 +97,8 @@ export default {
}, },
data() { data() {
return { return {
newCostPrice: '', // newCostPrice: '',
newSalePrice: '', // newSalePrice: '',
undergoChanges: false, undergoChanges: false,
tableData: [ tableData: [
{ {
@ -146,12 +148,8 @@ export default {
serve.getRefineryProduct(productId).then(res => { serve.getRefineryProduct(productId).then(res => {
let data = res.data let data = res.data
if (data.salePrice2company != salePrice || data.floorPrice != floorPrice) { if (data.salePrice2company != salePrice || data.floorPrice != floorPrice) {
console.log('价格发生变化了捏') this.policyPopulation(data.salePrice2company, data.floorPrice)
// }
this.newSalePrice = data.salePrice2company
this.newCostPrice = data.floorPrice
this.policyPopulation()
} else console.log('芜湖 没变')
}) })
} }
}, },
@ -174,7 +172,7 @@ export default {
} }
}, },
// //
policyPopulation() { policyPopulation(newSalePrice, newCostPrice) {
let { salePrice, floorPrice, preQuantity, preAmount } = this.controlWindows.addInfo let { salePrice, floorPrice, preQuantity, preAmount } = this.controlWindows.addInfo
if (salePrice && floorPrice && preQuantity && preAmount) { if (salePrice && floorPrice && preQuantity && preAmount) {
let strategyArr = [ let strategyArr = [
@ -184,8 +182,8 @@ export default {
}, },
// //
() => { () => {
let _salePrice = this.newSalePrice let _salePrice = newSalePrice
let _floorPrice = this.newCostPrice let _floorPrice = newCostPrice
return { return {
salePrice: _salePrice, salePrice: _salePrice,
floorPrice: _floorPrice, floorPrice: _floorPrice,
@ -196,8 +194,8 @@ export default {
}, },
// // // //
// () => { // () => {
// let _salePrice = this.newSalePrice // let _salePrice = newSalePrice
// let _floorPrice = this.newCostPrice // let _floorPrice = newCostPrice
// return { // return {
// salePrice: _salePrice, // salePrice: _salePrice,
// floorPrice: _floorPrice, // floorPrice: _floorPrice,
@ -208,11 +206,9 @@ export default {
// }, // },
// //
() => { () => {
let _salePrice = this.newSalePrice
let _floorPrice = this.newCostPrice
return { return {
salePrice: _salePrice, salePrice: newSalePrice,
floorPrice: _floorPrice, floorPrice: newCostPrice,
preQuantity: '', preQuantity: '',
preAmount: '', preAmount: '',
preCostAmount: '' preCostAmount: ''
@ -231,7 +227,6 @@ export default {
} }
Object.assign(originData, data) Object.assign(originData, data)
}) })
this.undergoChanges = true this.undergoChanges = true
} }
}, },

Loading…
Cancel
Save