snow 2 年 前
コミット
5aaee20273

ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/0.js


+ 7 - 7
src/views/goodStore/goodsOnline/add.vue

@@ -306,22 +306,22 @@ export default {
               let htmlList = "<ul>";
               resList.forEach((v) => {
                 htmlList += `<li>
-          <img src='${v.good_img}' style='width: 20px; height: 20px'
+                <img src='${v.good_img}' style='width: 20px; height: 20px'
                   class='hover'
                   v-viewer/>
                   <span>${v.good_name}__</span>`;
                 const { speclist } = v;
                 let str = "<span>";
-                speclist.forEach((a, ai) => {
-                  str += `${ai !== 0 ? "--" : ""}${a.spec_name}[${
-                    a.spec_value
-                  }]`;
-                });
+                // speclist.forEach((a, ai) => {
+                //   str += `${ai !== 0 ? "--" : ""}${a.spec_name}[${
+                //     a.spec_value
+                //   }]`;
+                // });
                 htmlList += str + "</span>" + `</li>`;
               });
               htmlList += "</ul>";
               this.$notify({
-                title: "以下商品已上线或已经在审批流程中!",
+                title: "以下商品的业务公司和平台支付渠道中的业务公司重复,不允许上线!",
                 dangerouslyUseHTMLString: true,
                 message: htmlList,
               });

+ 99 - 90
src/views/goodStore/goodsOnline/components/handle-online-form.vue

@@ -1,7 +1,7 @@
 <template>
   <el-form
-    v-loading="loading"
     ref="ruleForm"
+    v-loading="loading"
     :model="ruleForm"
     status-icon
     :rules="rulesThis"
@@ -10,42 +10,49 @@
     :size="'mini'"
   >
     <el-row>
-      <el-col :span="12"
-        ><el-form-item label="审核状态" prop="state">
-          <el-radio-group
-            v-model="ruleForm.state"
-            placeholder="请选择审核状态"
-            style="width: 100%"
-            :size="size || 'medium'"
-            @change="stateChange"
-          >
-            <el-radio v-for="item in stateList" :key="item.value" :label="item.value">{{
-              item.label
-            }}</el-radio>
-          </el-radio-group>
-        </el-form-item>
+      <el-col
+        :span="12"
+      ><el-form-item label="审核状态" prop="state">
+        <el-radio-group
+          v-model="ruleForm.state"
+          placeholder="请选择审核状态"
+          style="width: 100%"
+          :size="size || 'medium'"
+          @change="stateChange"
+        >
+          <el-radio v-for="item in stateList" :key="item.value" :label="item.value">{{
+            item.label
+          }}</el-radio>
+        </el-radio-group>
+      </el-form-item>
       </el-col>
       <el-col :span="12" class="tr">
-        <el-form-item label="审核备注" v-if="ruleForm.state === '0'" prop="remark">
+        <el-form-item v-if="ruleForm.state === '0'" label="审核备注" prop="remark">
           <el-input
+            v-model="ruleForm.remark"
             type="textarea"
             placeholder="审核备注"
-            v-model="ruleForm.remark"
             :disabled="disabled"
             maxlength="250"
             show-word-limit
             :autosize="{ minRows: 3, maxRows: 3 }"
           />
         </el-form-item>
-        <el-form-item class="fr" v-if="ruleForm.state + '' === '1'">
-          <el-button :size="'mini'" type="primary" @click="submitForm('6')"
-            >保 存
+        <el-form-item v-if="ruleForm.state + '' === '1'" class="fr">
+          <el-button
+            :size="'mini'"
+            type="primary"
+            @click="submitForm('6')"
+          >保 存
           </el-button>
         </el-form-item>
 
-        <el-form-item class="fr" v-if="ruleForm.state + '' === '0'">
-          <el-button :size="'mini'" type="primary" @click="submitForm('')"
-            >驳回重新审核
+        <el-form-item v-if="ruleForm.state + '' === '0'" class="fr">
+          <el-button
+            :size="'mini'"
+            type="primary"
+            @click="submitForm('')"
+          >驳回重新审核
           </el-button>
         </el-form-item>
         <!-- <el-form-item class="fr" v-if="ruleForm.state === '0'" >
@@ -57,29 +64,31 @@
           </el-button>
         </el-form-item> -->
       </el-col>
-      <el-col :span="24" v-if="ruleForm.state + '' === '1'"
-        ><el-form-item label="平台商品编码" prop="plat_code">
-          <el-input
-            v-model="ruleForm.plat_code"
-            placeholder="平台商品编码"
-            maxlength="100"
-          ></el-input>
-        </el-form-item>
+      <el-col
+        v-if="ruleForm.state + '' === '1'"
+        :span="24"
+      ><el-form-item label="平台商品编码" prop="plat_code">
+        <el-input
+          v-model="ruleForm.plat_code"
+          placeholder="平台商品编码"
+          maxlength="100"
+        />
+      </el-form-item>
       </el-col>
     </el-row>
   </el-form>
 </template>
 
 <script>
-import costFormAddEdit from "./costFormAddEdit";
-import asyncRequest from "@/apis/service/goodStore/goodsOnline";
-import { isnumber, isAlphanumeric, validAlphabets } from "@/utils/validate";
+import costFormAddEdit from './costFormAddEdit'
+import asyncRequest from '@/apis/service/goodStore/goodsOnline'
+import { isnumber, isAlphanumeric, validAlphabets } from '@/utils/validate'
 export default {
-  name: "exam-form",
-  props: ["size", "statusList", "disabled", "isMust", "labelWidth", "id", "code"],
+  name: 'ExamForm',
   components: {
-    costFormAddEdit,
+    costFormAddEdit
   },
+  props: ['size', 'statusList', 'disabled', 'isMust', 'labelWidth', 'id', 'code'],
   /**
    * 属性集合
    * @param {String}        size             : 组件大小             非必填
@@ -95,44 +104,44 @@ export default {
    */
   data() {
     const validate_plat_code = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("平台商品编号不能为空!"));
+      if (value === '') {
+        callback(new Error('平台商品编号不能为空!'))
       } else {
         if (isnumber(value)) {
-          callback();
+          callback()
         } else if (validAlphabets(value)) {
-          callback();
+          callback()
         } else if (isAlphanumeric(value)) {
-          callback();
+          callback()
         } else {
-          callback("平台商品编号仅支持数字和字母!");
+          callback('平台商品编号仅支持数字和字母!')
         }
       }
-    };
+    }
     return {
       stateList: [
         {
-          value: "1",
-          label: "通过",
+          value: '1',
+          label: '通过'
         },
         {
-          value: "0",
-          label: "驳回",
-        },
+          value: '0',
+          label: '驳回'
+        }
       ],
       loading: false,
 
       showModelThis: this.showModel,
       pickerOptions: {
         disabledDate(time) {
-          return time.getTime() < Date.now() - 60 * 60 * 24 * 1000;
-        },
+          return time.getTime() < Date.now() - 60 * 60 * 24 * 1000
+        }
       },
 
       ruleForm: {
-        state: "1", // 通过or驳回
-        remark: "",
-        plat_code: "",
+        state: '1', // 通过or驳回
+        remark: '',
+        plat_code: ''
       },
       rulesThis: this.rules,
       rules: {
@@ -140,75 +149,75 @@ export default {
           {
             required: true,
             validator: validate_plat_code,
-            trigger: "blur",
-          },
+            trigger: 'blur'
+          }
         ],
         state: [
           {
             required: true,
-            message: "请选择审核状态",
-            trigger: "change",
-          },
+            message: '请选择审核状态',
+            trigger: 'change'
+          }
         ],
         remark: [
-          { required: true, message: "请输入审核备注", trigger: "blur" },
+          { required: true, message: '请输入审核备注', trigger: 'blur' },
           {
             min: 1,
             max: 250,
-            message: "长度在 1 到 250 个字符",
-            trigger: "blur",
-          },
-        ],
-      },
-    };
+            message: '长度在 1 到 250 个字符',
+            trigger: 'blur'
+          }
+        ]
+      }
+    }
   },
-  newTime: function (val) {
+  newTime: function(val) {
     if (val) {
-      this.initForm();
+      this.initForm()
     }
   },
   mounted() {
-    this.initForm();
+    this.initForm()
   },
   methods: {
     async initForm() {
-      this.loading = true;
-      this.rulesThis = this.rules;
-      await this.resetForm();
-      this.loading = false;
+      this.loading = true
+      this.rulesThis = this.rules
+      await this.resetForm()
+      this.loading = false
     },
 
     async resetForm() {
       // 重置
       await this.$nextTick(() => {
         if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields();
-          this.$refs.ruleForm.clearValidate();
+          this.$refs.ruleForm.resetFields()
+          this.$refs.ruleForm.clearValidate()
 
           this.ruleForm = {
-            plat_code: this.code || "",
-            state: "1", // 通过or驳回
-            remark: "",
-          };
+            plat_code: this.code || '',
+            state: '1', // 通过or驳回
+            remark: ''
+          }
         }
-      });
+      })
     },
     async submitForm(numStatus) {
-      this.ruleForm.numStatus = numStatus;
-      await this.$refs.ruleForm.validate(async (valid) => {
+      this.ruleForm.numStatus = numStatus
+      await this.$refs.ruleForm.validate(async(valid) => {
         if (valid) {
-          let model = JSON.parse(JSON.stringify(this.ruleForm));
+          const model = JSON.parse(JSON.stringify(this.ruleForm))
           // 刷新
-          this.$emit("resSuccess", model);
+          this.$emit('resSuccess', model)
           // this.routeReGoto("goodsOnline", {});
         } else {
-          console.log("error submit!!");
-          return false;
+          console.log('error submit!!')
+          return false
         }
-      });
-    },
-  },
-};
+      })
+    }
+  }
+}
 </script>
 
 <style lang="scss" scoped>

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません