|
@@ -2,7 +2,7 @@
|
|
|
<el-form
|
|
|
:model="ruleForm"
|
|
|
status-icon
|
|
|
- :rules="rulesThis"
|
|
|
+ :rules="rules"
|
|
|
ref="ruleForm"
|
|
|
:size="'mini'"
|
|
|
v-loading="loading"
|
|
@@ -816,7 +816,7 @@ export default {
|
|
|
this.setrules();
|
|
|
this.loading = false;
|
|
|
},
|
|
|
-
|
|
|
+ //计算价格
|
|
|
computedCost() {
|
|
|
const { num } = this.askItem;
|
|
|
const {
|
|
@@ -982,7 +982,15 @@ export default {
|
|
|
this.$message.warning("上传图片不能超过10张");
|
|
|
return;
|
|
|
}
|
|
|
+
|
|
|
+ // for (let key in this.ruleForm) {
|
|
|
+ // console.log(this.rulesThis[key]);
|
|
|
+ // console.log(
|
|
|
+ // key + "---" + this.rulesThis[key][0].required + "-----" + this.ruleForm[key]
|
|
|
+ // );
|
|
|
+ // }
|
|
|
await this.$refs.ruleForm.validate(async (valid) => {
|
|
|
+ console.log(valid);
|
|
|
if (valid) {
|
|
|
if (!this.loading) {
|
|
|
this.loading = true;
|
|
@@ -1049,7 +1057,7 @@ export default {
|
|
|
this.$refs.ruleForm.resetFields();
|
|
|
this.$refs.ruleForm.clearValidate();
|
|
|
this.spec_tableData = [];
|
|
|
- console.log(this.askItem);
|
|
|
+ // console.log(this.askItem);
|
|
|
this.is_noble = false;
|
|
|
const { can_id_arr, is_gold_price } = this.askItem;
|
|
|
can_id_arr.forEach((e, index) => {
|
|
@@ -1159,11 +1167,11 @@ export default {
|
|
|
setrules() {
|
|
|
let list1 = ["noble_weight", "is_gold_price", "is_diff"];
|
|
|
for (let i = 0; i < list1.length; i++) {
|
|
|
- this.rules[list1[i]][0].required = this.is_noble;
|
|
|
+ this.rulesThis[list1[i]][0].required = this.is_noble;
|
|
|
}
|
|
|
let list2 = ["metal_id", "config", "other_config"];
|
|
|
for (let i = 0; i < list2.length; i++) {
|
|
|
- this.rules[list2[i]][0].required = this.pid === "6";
|
|
|
+ this.rulesThis[list2[i]][0].required = this.pid === "6";
|
|
|
}
|
|
|
},
|
|
|
is_gold_price_change() {
|