|
@@ -179,7 +179,6 @@ export default {
|
|
|
if (this.$refs.ruleForm) {
|
|
|
this.$refs.ruleForm.resetFields();
|
|
|
this.$refs.ruleForm.clearValidate();
|
|
|
- console.log(this.sitem);
|
|
|
const {
|
|
|
id,
|
|
|
status,
|
|
@@ -197,7 +196,9 @@ export default {
|
|
|
platform_name,
|
|
|
} = this.sitem;
|
|
|
|
|
|
+
|
|
|
console.log(this.sitem)
|
|
|
+
|
|
|
|
|
|
this.cgd_charge = cgd_charge;
|
|
|
this.price = price;
|
|
@@ -234,8 +235,10 @@ export default {
|
|
|
this.$refs.ruleForm.validateField("platform_id");
|
|
|
},
|
|
|
async number_change(e, key) {
|
|
|
+ if(Number(this.ruleForm[key]) === e) {
|
|
|
+ return
|
|
|
+ }
|
|
|
this.ruleForm[key] = e + "" || "0";
|
|
|
- console.log(e)
|
|
|
this.$refs.ruleForm.validateField(key);
|
|
|
await this.num(key);
|
|
|
},
|
|
@@ -285,9 +288,8 @@ export default {
|
|
|
rate = accSub(1, accDiv(cgdAdd, qrdAdd));
|
|
|
await this.set_number_change("service_proportion", rate);
|
|
|
}
|
|
|
+
|
|
|
if (!is_sale && key === "service_proportion") {
|
|
|
- // qrdAdd = cgdAdd / (100 - rate);
|
|
|
- // serAdd = qrdAdd - cgdAdd;
|
|
|
if (rate === 100) {
|
|
|
this.$message.error("服务费比例不能等于100!");
|
|
|
await this.set_number_change("service_charge", "0");
|
|
@@ -296,6 +298,7 @@ export default {
|
|
|
}
|
|
|
qrdAdd = accDiv(cgdAdd, accSub(100, rate));
|
|
|
serAdd = accSub(qrdAdd, cgdAdd);
|
|
|
+
|
|
|
await this.set_number_change("service_charge", serAdd);
|
|
|
}
|
|
|
},
|