戴艳蓉 3 năm trước cách đây
mục cha
commit
f4623f6089

+ 30 - 1
src/views/goodStore/goodsCost/columns.js

@@ -36,6 +36,13 @@ const options7 = [
   { id: "1", name: "是" },
 ]
 
+//有无工差
+const options8 = [
+  { id: "0", name: "无工差" },
+  { id: "1", name: "有工差" },
+]
+//配置要求
+const options9 = ["证书", "包装盒", "绒布袋", "标签", "其他"]
 const listCol = [
   {
     prop: "spuCode",
@@ -415,6 +422,28 @@ const rules = {
       trigger: "blur",
     },
   ],
+  is_diff: [
+    {
+      required: true,
+      message: "请选择有无工差",
+      trigger: "change",
+    },
+  ],
+  config: [
+    {
+      required: true,
+      type: 'array',
+      message: "请选择配置要求",
+      trigger: "change",
+    },
+  ],
+  other_config: [
+    {
+      required: true,
+      message: "其他要求不能为空",
+      trigger: "blur",
+    },
+  ],
   open_fee: [
     {
       required: true,
@@ -450,4 +479,4 @@ const rules = {
   },
 }
 
-export { options1, options2, options3, options4, options5, options6, options7, listCol, rules }
+export { options1, options2, options3, options4, options5, options6, options7, options8, options9, listCol, rules }

+ 70 - 1
src/views/goodStore/goodsCost/components/baseForm.vue

@@ -273,6 +273,60 @@
                   </el-select>
                 </el-form-item>
               </el-col>
+              <el-col :span="8">
+                <el-form-item label="有无工差" prop="is_diff">
+                  <el-select
+                    v-model="ruleForm.is_diff"
+                    filterable
+                    clearable
+                    :disabled="
+                      type === 'view' ||
+                      type === 'editBase' ||
+                      type === 'editCoin'
+                    "
+                    style="width: 100%"
+                    placeholder="有无工差"
+                  >
+                    <el-option
+                      v-for="group in options8"
+                      :key="group.id"
+                      :label="group.name"
+                      :value="group.id"
+                    />
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="配置要求" prop="config">
+                  <el-select
+                    v-model="ruleForm.config"
+                    multiple
+                    collapse-tags
+                    :disabled="type === 'view'"
+                    style="width: 100%"
+                    placeholder="配置要求"
+                  >
+                    <el-option
+                      v-for="(item, index) in options9"
+                      :key="item + index"
+                      :label="item"
+                      :value="item"
+                    >
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="其他要求" prop="other_config">
+                  <el-input
+                    placeholder="其他要求"
+                    maxlength="100"
+                    :disabled="type === 'view'"
+                    v-model="ruleForm.other_config"
+                  >
+                  </el-input>
+                </el-form-item>
+              </el-col>
             </el-row>
           </el-col>
 
@@ -1020,6 +1074,8 @@ import {
   options5,
   options6,
   options7,
+  options8,
+  options9,
   rules,
 } from "../columns";
 export default {
@@ -1075,6 +1131,8 @@ export default {
       options5: options5,
       options6: options6,
       options7: options7,
+      options8: options8,
+      options9: options9,
       ruleForm: {},
       spec_tableData: [],
       old_spec_tableData: [],
@@ -1167,6 +1225,7 @@ export default {
           model.unit = model.unit.toString();
           model.speclist = JSON.parse(JSON.stringify(this.setResData(1)));
           model.good_ladder = JSON.parse(JSON.stringify(this.setResData(2)));
+          model.config = model.config.toString();
           let res = {};
           delete model["id"];
           if (this.type === "add") {
@@ -1418,8 +1477,12 @@ export default {
         market_price: "0",
         nake_price: "0",
         is_step: "",
+        is_diff: "",
+        config: [],
+        other_config: "",
       };
     },
+
     async resetForm() {
       // 重置
       await this.$nextTick(async () => {
@@ -1488,6 +1551,9 @@ export default {
             nakelist, //階梯成本
             speclist, //商品规格
             brand_name,
+            config,
+            is_diff,
+            other_config,
           } = this.sitem;
           let cat_id_name = "";
           let cat_id = [];
@@ -1591,8 +1657,11 @@ export default {
             market_price: market_price || "",
             nake_price: nake_price || "",
             is_step: is_step || "",
+            is_diff: is_diff || "",
+            config: config ? config.split(",") : [],
+            other_config: other_config || "",
           };
-          console.log(this.ruleForm.noble_metal);
+          // console.log(this.ruleForm.noble_metal);
         }
       });
     },

+ 1 - 1
src/views/purchaseIn/workbench/columns.js

@@ -338,7 +338,7 @@ const rules = {
     {
       required: true,
       type: 'array',
-      message: "请选择有无工差",
+      message: "请选择配置要求",
       trigger: "change",
     },
   ],