|
@@ -142,7 +142,7 @@
|
|
|
</template>
|
|
|
<template slot="is_stock">
|
|
|
<el-tag :size="'mini'">{{
|
|
|
- goods_sitem.is_stock + '' === "1" ? "是" : "否"
|
|
|
+ goods_sitem.is_stock + "" === "1" ? "是" : "否"
|
|
|
}}</el-tag>
|
|
|
</template>
|
|
|
<template slot="weight">
|
|
@@ -157,9 +157,9 @@
|
|
|
}}g--{{ goods_sitem.metal_name }}---{{
|
|
|
goods_sitem.gold_price ? goods_sitem.gold_price : "0"
|
|
|
}}元/g--{{
|
|
|
- goods_sitem.is_gold_price + '' === "0" ? "不" : ""
|
|
|
+ goods_sitem.is_gold_price + "" === "0" ? "不" : ""
|
|
|
}}启用实时金价--{{
|
|
|
- goods_sitem.is_diff + '' === "1" ? "有" : "无"
|
|
|
+ goods_sitem.is_diff + "" === "1" ? "有" : "无"
|
|
|
}}工差--{{ goods_sitem.config }}---{{
|
|
|
goods_sitem.other_config
|
|
|
}}</span
|
|
@@ -1141,12 +1141,15 @@ export default {
|
|
|
if (key === "new_good_price") {
|
|
|
console.log(key + "----" + this.ruleForm.new_good_price);
|
|
|
}
|
|
|
-
|
|
|
- this.$refs.ruleForm.validateField(key);
|
|
|
- if (key === "good_num") {
|
|
|
+ const { good_num } = this.ruleForm;
|
|
|
+ //key === "good_num"
|
|
|
+ if (Number(good_num ?? "0") !== 0) {
|
|
|
await this.get_new_price();
|
|
|
await this.get_goods_active();
|
|
|
}
|
|
|
+ if (this.$refs.ruleForm) {
|
|
|
+ this.$refs.ruleForm.validateField(key);
|
|
|
+ }
|
|
|
},
|
|
|
async get_new_price() {
|
|
|
console.log(
|
|
@@ -1378,8 +1381,10 @@ export default {
|
|
|
model.goodtype = key_0 === "is_activity_1" ? "1" : key_1;
|
|
|
model.act_code = key_0 === "is_activity_1" ? key_1 : "";
|
|
|
|
|
|
- Object.keys(model).forEach(key => {
|
|
|
- if(typeof model[key] === 'string'){ model[key] = replaceTextWrapAndSpace(model[key])}
|
|
|
+ Object.keys(model).forEach((key) => {
|
|
|
+ if (typeof model[key] === "string") {
|
|
|
+ model[key] = replaceTextWrapAndSpace(model[key]);
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
let res = await asyncRequest.add(model);
|