基础管理增加计算
This commit is contained in:
parent
e5506bab06
commit
1d69006cde
@ -227,7 +227,7 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="折扣" prop="reserveTwo">
|
||||
<el-select v-model="form.reserveTwo" placeholder="请选择折扣" style="width: 100%">
|
||||
<el-select v-model="form.reserveTwo" placeholder="请选择折扣" style="width: 100%" @change="changeA">
|
||||
<el-option
|
||||
v-for="dict in dict.type.hfh_discount_type"
|
||||
:key="dict.value"
|
||||
@ -444,7 +444,6 @@ export default {
|
||||
this.$message.success('上传成功')
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
console.log('查看上传结果:', res)
|
||||
if (res.data) {
|
||||
this.form.video = res.data.fileUrl
|
||||
}
|
||||
@ -464,6 +463,18 @@ export default {
|
||||
this.templateInfoList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
this.templateInfoList.forEach(item => {
|
||||
if(item.reserveTwo){
|
||||
if(item.reserveTwo === '1'){
|
||||
item.reserveThree = (item.price * 0.68).toFixed(2)
|
||||
}
|
||||
if(item.reserveTwo === '2'){
|
||||
item.reserveThree = (item.price * 0.88).toFixed(2)
|
||||
}
|
||||
}else {
|
||||
item.reserveThree = 0.00
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
@ -525,6 +536,11 @@ export default {
|
||||
this.form = response.data
|
||||
this.open = true
|
||||
this.title = 'Vlog价格配置'
|
||||
if(this.form.reserveTwo){
|
||||
this.changeA(this.form.reserveTwo);
|
||||
}else {
|
||||
this.form.reserveThree = 0.00
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 提交按钮 */
|
||||
@ -558,6 +574,14 @@ export default {
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
changeA(res){
|
||||
if(res === '1'){
|
||||
this.form.reserveThree = (this.form.price * 0.68).toFixed(2)
|
||||
}
|
||||
if(res === '2'){
|
||||
this.form.reserveThree = (this.form.price * 0.88).toFixed(2)
|
||||
}
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('godTemplateInfo/templateInfo/export', {
|
||||
|
Loading…
Reference in New Issue
Block a user