|
@@ -7,7 +7,6 @@
|
|
|
:size="'mini'"
|
|
|
v-loading="loading"
|
|
|
label-width="110px"
|
|
|
- class="demo-ruleForm"
|
|
|
>
|
|
|
<el-row class="ddiv">
|
|
|
<el-col :span="1" class="dtitle">
|
|
@@ -45,7 +44,7 @@
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="12">
|
|
|
<el-form-item label="业务公司" prop="company_id">
|
|
|
<search-work-company
|
|
|
:value="ruleForm.company_id"
|
|
@@ -59,7 +58,7 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="16">
|
|
|
+ <el-col :span="12">
|
|
|
<el-form-item label="供应商" prop="supplierNo">
|
|
|
<search-supplier
|
|
|
:value="ruleForm.supplierNo"
|
|
@@ -134,21 +133,15 @@
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="专属类型" prop="is_exclusive">
|
|
|
- <el-select
|
|
|
- v-model="ruleForm.is_exclusive"
|
|
|
- filterable
|
|
|
- clearable
|
|
|
+ <search-exclusive
|
|
|
:disabled="type === 'view' || type === 'editCoin'"
|
|
|
style="width: 100%"
|
|
|
+ :isDetail="type !== 'add'"
|
|
|
+ :size="'mini'"
|
|
|
placeholder="专属类型"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="group in options2"
|
|
|
- :key="group.id"
|
|
|
- :label="group.name"
|
|
|
- :value="group.id"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
+ :value="ruleForm.is_exclusive"
|
|
|
+ @selectChange="exclusiveSearchChange"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
@@ -194,10 +187,7 @@
|
|
|
<el-col :span="24" v-show="is_noble">
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item
|
|
|
- label="贵金属重量"
|
|
|
- :prop="is_noble ? 'noble_weight' : ''"
|
|
|
- >
|
|
|
+ <el-form-item label="贵金属重量" prop="noble_weight">
|
|
|
<digital-input
|
|
|
:values="ruleForm.noble_weight"
|
|
|
:placeholder="'贵金属重量'"
|
|
@@ -219,10 +209,7 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item
|
|
|
- label="贵金属种类"
|
|
|
- :prop="is_noble ? 'noble_metal' : ''"
|
|
|
- >
|
|
|
+ <el-form-item label="贵金属种类" prop="noble_metal">
|
|
|
<search-metal-kind
|
|
|
:value="ruleForm.noble_metal"
|
|
|
:disabled="
|
|
@@ -238,10 +225,7 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item
|
|
|
- label="启用实时金价"
|
|
|
- :prop="is_noble ? 'is_gold_price' : ''"
|
|
|
- >
|
|
|
+ <el-form-item label="启用实时金价" prop="is_gold_price">
|
|
|
<el-select
|
|
|
v-model="ruleForm.is_gold_price"
|
|
|
filterable
|
|
@@ -263,7 +247,7 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="有无工差" prop="is_diff">
|
|
|
<el-select
|
|
|
v-model="ruleForm.is_diff"
|
|
@@ -286,12 +270,11 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="配置要求" prop="config">
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="配置要求" prop="config" label-width="85px">
|
|
|
<el-select
|
|
|
v-model="ruleForm.config"
|
|
|
multiple
|
|
|
- collapse-tags
|
|
|
:disabled="type === 'view'"
|
|
|
style="width: 100%"
|
|
|
placeholder="配置要求"
|
|
@@ -307,9 +290,9 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="其他要求" prop="other_config">
|
|
|
+ <el-form-item label="其他配置要求" prop="other_config">
|
|
|
<el-input
|
|
|
- placeholder="其他要求"
|
|
|
+ placeholder="其他配置要求"
|
|
|
maxlength="100"
|
|
|
:disabled="type === 'view'"
|
|
|
v-model="ruleForm.other_config"
|
|
@@ -367,6 +350,7 @@
|
|
|
clearable
|
|
|
style="width: 100%"
|
|
|
placeholder="是否定制"
|
|
|
+ @change="good_type_change"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="group in options1"
|
|
@@ -378,16 +362,13 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8" v-show="ruleForm.good_type === '1'">
|
|
|
- <el-form-item
|
|
|
- label="定制起订量"
|
|
|
- :prop="ruleForm.good_type === '1' ? 'moq' : ''"
|
|
|
- >
|
|
|
+ <el-form-item label="定制起订量" prop="moq">
|
|
|
<digital-input
|
|
|
:values="ruleForm.moq"
|
|
|
:placeholder="'定制起订量'"
|
|
|
:name="'ruleForm.moq'"
|
|
|
:min="0"
|
|
|
- :disabled="type === 'view' || type === 'editCoin'"
|
|
|
+ :disabled=" type === 'view' || type === 'editBase'"
|
|
|
:max="100000000000"
|
|
|
:position="'right'"
|
|
|
:precision="0"
|
|
@@ -399,16 +380,13 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8" v-show="ruleForm.good_type === '1'">
|
|
|
- <el-form-item
|
|
|
- label="定制工期"
|
|
|
- :prop="ruleForm.good_type === '1' ? 'customized' : ''"
|
|
|
- >
|
|
|
+ <el-form-item label="定制工期" prop="customized">
|
|
|
<digital-input
|
|
|
:values="ruleForm.customized"
|
|
|
:placeholder="'定制工期'"
|
|
|
:name="'ruleForm.customized'"
|
|
|
:min="0"
|
|
|
- :disabled="type === 'view' || type === 'editCoin'"
|
|
|
+ :disabled=" type === 'view' || type === 'editBase' "
|
|
|
:max="100000000000"
|
|
|
:position="'right'"
|
|
|
:precision="0"
|
|
@@ -497,17 +475,7 @@
|
|
|
>
|
|
|
<el-col :span="23" class="dmain">
|
|
|
<el-row>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="包装清单" prop="packing_list">
|
|
|
- <el-input
|
|
|
- placeholder="包装清单"
|
|
|
- :disabled="type === 'view' || type === 'editCoin'"
|
|
|
- v-model="ruleForm.packing_list"
|
|
|
- maxlength="250"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="包装方式" prop="packing_way">
|
|
|
<el-input
|
|
|
placeholder="包装方式"
|
|
@@ -517,7 +485,7 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="装箱规格" prop="packing_spec">
|
|
|
<el-input
|
|
|
placeholder="装箱规格"
|
|
@@ -527,7 +495,7 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="装箱重量" prop="packing_weight">
|
|
|
<digital-input
|
|
|
:values="ruleForm.packing_weight"
|
|
@@ -545,7 +513,7 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="装箱尺寸" prop="packing_size">
|
|
|
<el-input
|
|
|
placeholder="装箱尺寸"
|
|
@@ -555,8 +523,17 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
-
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="商品尺寸" prop="good_size">
|
|
|
+ <el-input
|
|
|
+ placeholder="商品尺寸"
|
|
|
+ :disabled="type === 'view' || type === 'editCoin'"
|
|
|
+ v-model="ruleForm.good_size"
|
|
|
+ maxlength="250"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="商品条形码" prop="good_bar">
|
|
|
<el-input
|
|
|
placeholder="商品条形码"
|
|
@@ -569,6 +546,16 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="包装清单" prop="packing_list">
|
|
|
+ <el-input
|
|
|
+ placeholder="包装清单"
|
|
|
+ :disabled="type === 'view' || type === 'editCoin'"
|
|
|
+ v-model="ruleForm.packing_list"
|
|
|
+ maxlength="250"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -1099,7 +1086,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- spec_tableData:[],
|
|
|
+ spec_tableData: [],
|
|
|
cat_id_name: "",
|
|
|
brand_name: "",
|
|
|
unit_name: "",
|
|
@@ -1142,6 +1129,7 @@ export default {
|
|
|
this.resetFormData();
|
|
|
this.rulesThis = this.rules;
|
|
|
await this.resetForm();
|
|
|
+
|
|
|
this.loading = false;
|
|
|
},
|
|
|
number_change(e, key) {
|
|
@@ -1390,12 +1378,12 @@ export default {
|
|
|
this.ladder_tableData.push(item);
|
|
|
} else {
|
|
|
this.ladder_tableData.forEach((i, findex) => {
|
|
|
- if (findex === parseInt(i.index)) {
|
|
|
- this.spec_tableData[findex].id = id;
|
|
|
- this.spec_tableData[findex].cost_fee = cost_fee;
|
|
|
- this.spec_tableData[findex].delivery_fee = delivery_fee;
|
|
|
- this.spec_tableData[findex].min_num = min_num;
|
|
|
- this.spec_tableData[findex].spec_value_value = spec_value_value;
|
|
|
+ if (findex=== parseInt(index+"")) {
|
|
|
+ this.ladder_tableData[findex].id = id;
|
|
|
+ this.ladder_tableData[findex].cost_fee = cost_fee;
|
|
|
+ this.ladder_tableData[findex].delivery_fee = delivery_fee;
|
|
|
+ this.ladder_tableData[findex].min_num = min_num;
|
|
|
+ this.ladder_tableData[findex].spec_value_value = spec_value_value;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -1435,7 +1423,7 @@ export default {
|
|
|
tax: "",
|
|
|
good_name: "",
|
|
|
unit: [],
|
|
|
- is_exclusive: "",
|
|
|
+ is_exclusive: [],
|
|
|
noble_metal: "",
|
|
|
is_gold_price: "",
|
|
|
moq: "0",
|
|
@@ -1449,6 +1437,7 @@ export default {
|
|
|
packing_spec: "",
|
|
|
packing_weight: "",
|
|
|
packing_size: "",
|
|
|
+ good_size: "",
|
|
|
good_bar: "",
|
|
|
supply_area: "",
|
|
|
delivery_place: [],
|
|
@@ -1512,6 +1501,7 @@ export default {
|
|
|
weight, // string 重量
|
|
|
packing_way, // string 包装方式
|
|
|
packing_size, // string 包装尺寸
|
|
|
+ good_size, //商品尺寸
|
|
|
packing_spec, // string 包装规格
|
|
|
packing_list, // string 包装清单
|
|
|
packing_weight, // string 装箱重量
|
|
@@ -1563,6 +1553,7 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
this.is_noble = isok;
|
|
|
+ this.sch_is_noble();
|
|
|
|
|
|
let spec_list1 =
|
|
|
speclist && speclist.length > 0
|
|
@@ -1612,7 +1603,7 @@ export default {
|
|
|
tax: tax ? tax + "%" : "",
|
|
|
good_name: good_name || "",
|
|
|
unit: good_unit ? [good_unit] : [],
|
|
|
- is_exclusive: is_exclusive || "",
|
|
|
+ is_exclusive: is_exclusive || [],
|
|
|
noble_metal: noble_metal || "",
|
|
|
is_gold_price: is_gold_price || "",
|
|
|
moq: moq || "0",
|
|
@@ -1626,6 +1617,7 @@ export default {
|
|
|
packing_spec: packing_spec || "",
|
|
|
packing_weight: packing_weight || "",
|
|
|
packing_size: packing_size || "",
|
|
|
+ good_size: good_size || "",
|
|
|
good_bar: good_bar || "",
|
|
|
supply_area: supply_area || "",
|
|
|
delivery_place: (delivery_place || "").split(","),
|
|
@@ -1653,10 +1645,23 @@ export default {
|
|
|
config: config ? config.split(",") : [],
|
|
|
other_config: other_config || "",
|
|
|
};
|
|
|
- // console.log(this.ruleForm.noble_metal);
|
|
|
+ this.good_type_change();
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ sch_is_noble() {
|
|
|
+ let list = [
|
|
|
+ "noble_weight",
|
|
|
+ "noble_metal",
|
|
|
+ "is_gold_price",
|
|
|
+ "is_diff",
|
|
|
+ "config",
|
|
|
+ "other_config",
|
|
|
+ ];
|
|
|
+ for (let i = 0; i < list.length; i++) {
|
|
|
+ this.rulesThis[list[i]].required = this.is_noble;
|
|
|
+ }
|
|
|
+ },
|
|
|
setModel(model, type) {
|
|
|
let item = null;
|
|
|
if (type === 1) {
|
|
@@ -1718,6 +1723,7 @@ export default {
|
|
|
this.ruleForm.after_sales = cat_desc || "";
|
|
|
this.$refs.ruleForm.validateField("after_sales");
|
|
|
this.is_noble = pid === "6";
|
|
|
+ this.sch_is_noble();
|
|
|
},
|
|
|
|
|
|
//商品品牌选择
|
|
@@ -1756,6 +1762,11 @@ export default {
|
|
|
this.ruleForm.tax = e;
|
|
|
this.$refs.ruleForm.validateField("tax");
|
|
|
},
|
|
|
+ //专属类型选择
|
|
|
+ exclusiveSearchChange(e) {
|
|
|
+ this.ruleForm.is_exclusive = e;
|
|
|
+ this.$refs.ruleForm.validateField("is_exclusive");
|
|
|
+ },
|
|
|
//单位选择
|
|
|
unitsearchChange(e) {
|
|
|
const { id, code, label } = e;
|
|
@@ -1822,6 +1833,12 @@ export default {
|
|
|
this.$message.success("图片上传成功!");
|
|
|
}
|
|
|
},
|
|
|
+ good_type_change() {
|
|
|
+ let list = ["moq", "customized"];
|
|
|
+ for (let i = 0; i < list.length; i++) {
|
|
|
+ this.rulesThis[list[i]].required = this.ruleForm.good_type === "1";
|
|
|
+ }
|
|
|
+ },
|
|
|
//图片上传失败
|
|
|
UploadErrorEventgood_thumb_img(res) {
|
|
|
this.imgUploadError(1, res);
|