Compare commits
7 Commits
xiaozy_051
...
KongDuo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
81015fd44f | ||
| 0c88d0fa1d | |||
|
|
e45ef1d44c | ||
|
|
5c077dbb4d | ||
|
|
cfc1094879 | ||
|
|
5e42064d71 | ||
|
|
e58836f1dd |
@@ -51,15 +51,21 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="type" label="策略类型"> </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="订单提货量">
|
<el-table-column label="订单提货量">
|
||||||
<template slot-scope="{ row }"> {{ row.preQuantity | toNumberFixed }}{{ controlWindows.addInfo.productMeasurement }} </template>
|
<template slot-scope="{ row }"> {{ row.preQuantity | toNumberFixed }}{{ controlWindows.addInfo.productMeasurement }} </template>
|
||||||
</el-table-column>
|
</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>
|
<template slot-scope="{ row }"> {{ row.preAmount | toNumberFixed }}元 </template>
|
||||||
</el-table-column>
|
</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>
|
</el-table>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
@@ -78,6 +84,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
newCostPrice: '',
|
||||||
newSalePrice: '',
|
newSalePrice: '',
|
||||||
undergoChanges: false,
|
undergoChanges: false,
|
||||||
tableData: [
|
tableData: [
|
||||||
@@ -116,14 +123,15 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openDrawer() {
|
openDrawer() {
|
||||||
let { productId, salePrice } = this.controlWindows.addInfo
|
let { productId, salePrice, floorPrice } = this.controlWindows.addInfo
|
||||||
if (productId) {
|
if (productId) {
|
||||||
serve.getRefineryProduct(productId).then(res => {
|
serve.getRefineryProduct(productId).then(res => {
|
||||||
let { salePrice2company } = res.data
|
let data = res.data;
|
||||||
if (salePrice2company != salePrice) {
|
if (data.salePrice2company != salePrice || data.floorPrice != floorPrice) {
|
||||||
console.log('价格发生变化了捏')
|
console.log('价格发生变化了捏')
|
||||||
// 新的价格
|
// 新的价格
|
||||||
this.newSalePrice = salePrice2company
|
this.newSalePrice = data.salePrice2company
|
||||||
|
this.newCostPrice = data.floorPrice
|
||||||
this.policyPopulation()
|
this.policyPopulation()
|
||||||
} else console.log('芜湖 没变')
|
} else console.log('芜湖 没变')
|
||||||
})
|
})
|
||||||
@@ -135,16 +143,30 @@ export default {
|
|||||||
this.tableData[index].isChecked = true
|
this.tableData[index].isChecked = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 策略选择
|
||||||
policyPopulation() {
|
policyPopulation() {
|
||||||
let { salePrice, preQuantity, preAmount } = this.controlWindows.addInfo
|
let { salePrice, floorPrice, preQuantity, preAmount } = this.controlWindows.addInfo
|
||||||
console.log(salePrice, preQuantity, preAmount)
|
// console.log(salePrice, preQuantity, preAmount)
|
||||||
if ((salePrice, preQuantity, preAmount)) {
|
if ((salePrice, preQuantity, preAmount)) {
|
||||||
// 原策略
|
// 原策略
|
||||||
Object.assign(this.tableData[0], { salePrice, preQuantity, preAmount })
|
Object.assign(this.tableData[0], { salePrice: salePrice.toFixed(2),
|
||||||
|
floorPrice: floorPrice.toFixed(2),
|
||||||
|
preQuantity: preQuantity.toFixed(2),
|
||||||
|
preAmount: preAmount.toFixed(2) })
|
||||||
// 以提货量为准
|
// 以提货量为准
|
||||||
Object.assign(this.tableData[1], { salePrice: this.newSalePrice, preQuantity, preAmount: +this.newSalePrice * +preQuantity })
|
Object.assign(this.tableData[1], {
|
||||||
|
salePrice: (this.newSalePrice).toFixed(2),
|
||||||
|
floorPrice: (this.newCostPrice).toFixed(2),
|
||||||
|
preQuantity: preQuantity.toFixed(2),
|
||||||
|
preAmount: (+this.newSalePrice * +preQuantity).toFixed(2)
|
||||||
|
})
|
||||||
// 以订单金额为准
|
// 以订单金额为准
|
||||||
Object.assign(this.tableData[2], { salePrice: this.newSalePrice, preQuantity: +preAmount / +this.newSalePrice, preAmount })
|
Object.assign(this.tableData[2], {
|
||||||
|
salePrice: (this.newSalePrice).toFixed(2),
|
||||||
|
floorPrice: (this.newCostPrice).toFixed(2),
|
||||||
|
preQuantity: (+preAmount / +this.newSalePrice).toFixed(2),
|
||||||
|
preAmount: preAmount.toFixed(2)
|
||||||
|
})
|
||||||
this.undergoChanges = true
|
this.undergoChanges = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -157,6 +179,7 @@ export default {
|
|||||||
}
|
}
|
||||||
serve.orderSuccess({ id: this.controlWindows.addInfo.id, ...targetPolicy[0] }).then(res => {
|
serve.orderSuccess({ id: this.controlWindows.addInfo.id, ...targetPolicy[0] }).then(res => {
|
||||||
if (res.code == 20000) {
|
if (res.code == 20000) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
this.closeWindow()
|
this.closeWindow()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -164,6 +187,7 @@ export default {
|
|||||||
}
|
}
|
||||||
serve.orderSuccess({ id: this.controlWindows.addInfo.id }).then(res => {
|
serve.orderSuccess({ id: this.controlWindows.addInfo.id }).then(res => {
|
||||||
if (res.code == 20000) {
|
if (res.code == 20000) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
this.closeWindow()
|
this.closeWindow()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
</el-option>
|
</el-option>
|
||||||
</el-select> -->
|
</el-select> -->
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<el-button icon="el-icon-search" @click="handleCurrentChange(1)">查询</el-button>
|
<el-button icon="el-icon-search" @click="search">查询</el-button>
|
||||||
<el-button icon="el-icon-refresh" @click="reset">重置</el-button>
|
<el-button icon="el-icon-refresh" @click="reset">重置</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
<el-link slot="reference" type="primary" :underline="false">订单锁定</el-link>
|
<el-link slot="reference" type="primary" :underline="false">订单锁定</el-link>
|
||||||
</el-popconfirm>
|
</el-popconfirm>
|
||||||
|
|
||||||
<el-link v-else type="primary" :underline="false" @click="confirmSubmit(row)">下单确认</el-link>
|
<el-link v-if="row.orderStatus == 'ORDER_LOCKED'" type="primary" :underline="false" @click="confirmSubmit(row)">下单确认</el-link>
|
||||||
|
|
||||||
<el-popconfirm
|
<el-popconfirm
|
||||||
:title="row.orderStatus == 'SUBMITED' || row.orderStatus == 'ORDER_LOCKED' ? '是否确认取消订单?' : '是否确认退款?'"
|
:title="row.orderStatus == 'SUBMITED' || row.orderStatus == 'ORDER_LOCKED' ? '是否确认取消订单?' : '是否确认退款?'"
|
||||||
@@ -156,8 +156,8 @@
|
|||||||
</general-details>
|
</general-details>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
<!-- 提货单 -->
|
<!-- 提货单 -->
|
||||||
<billOfLading :billData="billData" :controlWindows="controlWindows" @closeWindow="handleCurrentChange" />
|
<billOfLading :billData="billData" :controlWindows="controlWindows" @closeWindow="getByPage" />
|
||||||
<confirmSubmit :controlWindows="controlWindows" @closeWindow="() => {}" />
|
<confirmSubmit :controlWindows="controlWindows" @closeWindow="getByPage" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -319,6 +319,10 @@ export default {
|
|||||||
this.parameter.pageSize = size
|
this.parameter.pageSize = size
|
||||||
this.getByPage()
|
this.getByPage()
|
||||||
},
|
},
|
||||||
|
search() {
|
||||||
|
this.parameter.currentPage = 1
|
||||||
|
this.getByPage()
|
||||||
|
},
|
||||||
//table list
|
//table list
|
||||||
getByPage() {
|
getByPage() {
|
||||||
order.getByPage(this.parameter).then(res => {
|
order.getByPage(this.parameter).then(res => {
|
||||||
|
|||||||
Reference in New Issue
Block a user