基础管理增加计算

This commit is contained in:
likehai 2024-06-11 17:43:48 +08:00
parent e5506bab06
commit 1d69006cde

View File

@ -227,7 +227,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="折扣" prop="reserveTwo"> <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 <el-option
v-for="dict in dict.type.hfh_discount_type" v-for="dict in dict.type.hfh_discount_type"
:key="dict.value" :key="dict.value"
@ -444,7 +444,6 @@ export default {
this.$message.success('上传成功') this.$message.success('上传成功')
// this.open = false; // this.open = false;
// this.getList(); // this.getList();
console.log('查看上传结果:', res)
if (res.data) { if (res.data) {
this.form.video = res.data.fileUrl this.form.video = res.data.fileUrl
} }
@ -464,6 +463,18 @@ export default {
this.templateInfoList = response.rows this.templateInfoList = response.rows
this.total = response.total this.total = response.total
this.loading = false 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.form = response.data
this.open = true this.open = true
this.title = 'Vlog价格配置' 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(() => { }).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() { handleExport() {
this.download('godTemplateInfo/templateInfo/export', { this.download('godTemplateInfo/templateInfo/export', {