戴艳蓉 пре 3 година
родитељ
комит
d086b9e928

+ 6 - 7
src/views/goodStore/active/components/baseForm.vue

@@ -164,7 +164,6 @@
     />
     <el-col
       :span="24"
-      v-if="type === 'editBase' || type === 'add' || type === 'editCoin'"
       style="
         text-align: right;
         padding: 15px 0 15px 0;
@@ -339,7 +338,7 @@ export default {
         this.ruleForm.platform_code = id ? [id] : [];
       }
       this.$refs.ruleForm.validateField("platform_code");
-       let newList = JSON.parse(JSON.stringify(this.ruleForm.platform_code));
+      let newList = JSON.parse(JSON.stringify(this.ruleForm.platform_code));
       if (old !== this.ruleForm.platform_code) {
         this.ruleForm.good_list = [];
       }
@@ -388,11 +387,11 @@ export default {
       await this.$refs.ruleForm.validate(async (valid) => {
         if (valid) {
           this.loading = true;
-          // if (this.spec_tableData.length === 0) {
-          //   this.$message.warning("请录入商品规格信息!");
-          //   this.loading = false;
-          //   return;
-          // }
+          if (this.ruleForm.good_list.length === 0) {
+            this.$message.warning("请选择活动商品信息!");
+            this.loading = false;
+            return;
+          }
           // if (this.ladder_tableData.length === 0) {
           //   this.$message.warning("请录入阶梯成本!");
           //   this.loading = false;

+ 13 - 34
src/views/goodStore/active/index.vue

@@ -111,7 +111,7 @@
                 <el-select
                   v-model="select"
                   slot="prepend"
-                  style="width: 120px"
+                  style="width: 130px"
                   placeholder="关键字类型"
                 >
                   <el-option label="活动名称" value="1" />
@@ -119,32 +119,6 @@
                   <el-option label="创建人" value="3" /> </el-select
               ></el-input>
             </el-col>
-            <el-col :span="6" style="width: 250px; padding: 0 0 0 10px">
-              <el-input
-                :size="searchSize"
-                v-model="parmValue.goodStore_code"
-                :maxlength="40"
-                @blur="
-                  pageInfo.curr = 1;
-                  parmValue.page = 1;
-                  searchList();
-                "
-                placeholder="活动编号"
-              ></el-input>
-            </el-col>
-            <el-col :span="4" style="width: 170px; padding: 0 0 0 10px">
-              <el-input
-                :size="searchSize"
-                v-model="parmValue.creater"
-                :maxlength="40"
-                @change="
-                  pageInfo.curr = 1;
-                  parmValue.page = 1;
-                  searchList();
-                "
-                placeholder="创建人"
-              ></el-input>
-            </el-col>
             <el-col
               :span="3"
               class="fr"
@@ -157,7 +131,6 @@
                 style="float: right"
                 @click="routeGoto('activeDetail', { id: 'add', type: 'add' })"
               >
-                <!-- @click="routeGoto('activeAdd', {})" -->
                 添加
               </el-button>
             </el-col>
@@ -279,19 +252,22 @@ export default {
   },
   data() {
     return {
-      statusList: statusList,
-      roleLevel: roleLevel,
+      select: "1",
+      sinput: "",
       loading: false,
       showModel: false,
       modelId: "000",
       sitem: {},
       parmValue: {
-        page: 1, // 页码
-        size: 15, // 每页显示条数
-        starttime: "",
+        activity_name: "",
+        activity_code: "",
+        status: "",
         platform_code: [],
+        starttime: "",
         endtime: "",
-        status: "",
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+        company_id: "",
         creater: "",
       },
       // 状态
@@ -472,6 +448,9 @@ export default {
       this.loading = true;
       let model = JSON.parse(JSON.stringify(this.parmValue));
       model.platform_code = model.platform_code.toString();
+      model.activity_name = this.select === "1" ? this.sinput : "";
+      model.activity_code = this.select === "2" ? this.sinput : "";
+      model.creater = this.select === "3" ? this.sinput : "";
       const res = await asyncRequest.list(model);
       if (res && res.code === 0 && res.data) {
         this.tableData = res.data.list;

+ 44 - 18
src/views/goodStore/goodsOnline/columns.js

@@ -43,11 +43,13 @@ const options8 = [
   { id: "4", name: "待财务审核定价" },
   { id: "5", name: "待上线" },
   { id: "6", name: "上线成功" },
+  { id: "7", name: "审核失败" },
 ]
 const listCol = [
   {
-    prop: "spuCode",
+    prop: "skuCode",
     label: "编号",
+    fixed: "left",
     width: "160px",
   },
   {
@@ -62,19 +64,16 @@ const listCol = [
     "min-width": "160px",
   },
   {
-    prop: "cat_name",
-    label: "分类",
-  },
-  {
-    prop: "brand_name",
-    label: "品牌",
+    prop: "platform_code_en",
+    label: "平台编号",
+    width: "170px",
   },
   {
-    prop: "good_type",
-    label: "是否定制",
-    _slot_: "good_type",
-    width: "70px",
+    prop: "platform_name",
+    label: "平台名称",
+    width: "118px",
   },
+
   {
     prop: "status",
     label: "状态",
@@ -82,15 +81,38 @@ const listCol = [
     width: "118px",
   },
   {
-    prop: "supplierNo",
-    label: "供应商编号",
-    width: "110px",
+    prop: "cat_name",
+    label: "分类",
+    width: "118px",
   },
   {
-    prop: "supplier_name",
-    label: "供应商名称",
-    width: "110px",
+    prop: "good_type",
+    label: "是否定制",
+    _slot_: "good_type",
+    width: "70px",
   },
+  // {
+  //   prop: "good_type",
+  //   label: "库存类型",
+  //   _slot_: "good_type",
+  //   width: "70px",
+  // },
+
+  {
+    prop: "brand_name",
+    label: "品牌",
+  },
+
+  // {
+  //   prop: "supplierNo",
+  //   label: "供应商编号",
+  //   width: "110px",
+  // },
+  // {
+  //   prop: "supplier_name",
+  //   label: "供应商名称",
+  //   width: "110px",
+  // },
   {
     prop: "companyNo",
     label: "业务公司编号",
@@ -102,7 +124,11 @@ const listCol = [
     width: "110px",
   },
 
-
+  {
+    prop: "creater",
+    label: "创建人",
+    width: "70px",
+  },
   {
     prop: "addtime",
     label: "创建时间",

+ 4 - 4
src/views/goodStore/goodsOnline/detail.vue

@@ -286,7 +286,7 @@ export default {
           skuCode: this.queryId,
           exam_status: e.state === "1" ? "3" : e.rebut,
           online_time: e.online_time,
-          remark: remark,
+          remark: e.remark,
         };
         await this.setstatus("提交产品部门审核结果", model);
       }
@@ -297,8 +297,8 @@ export default {
       if (!this.loading) {
         let model = {
           skuCode: this.queryId,
-          exam_status: e.state === "1" ? "5" : "3",
-          remark: remark,
+          exam_status: e.state === "1" ? "5" : "4",
+          remark: e.remark,
         };
         await this.setstatus("提交财务审核结果", model);
       }
@@ -311,7 +311,7 @@ export default {
           skuCode: this.queryId,
           exam_status: "6",
           plat_code: e.plat_code,
-          remark: "",
+          remark: e.remark||"",
         };
         await this.setstatus("提交商品上线结果", model);
       }

+ 53 - 71
src/views/goodStore/goodsOnline/index.vue

@@ -92,10 +92,10 @@
                 "
               >
                 <el-option
-                  v-for="item in statusList"
-                  :key="'status' + item.code"
+                  v-for="item in options8"
+                  :key="'status' + item.id"
                   :label="item.name"
-                  :value="item.code"
+                  :value="item.id"
                 />
               </el-select>
             </el-col>
@@ -124,14 +124,14 @@
             <el-col :span="4" style="width: 513px; padding: 0 0 0 10px">
               <el-input
                 :size="searchSize"
-                v-model="parmValue.name"
+                v-model="sinput"
                 :maxlength="40"
                 @blur="
                   pageInfo.curr = 1;
                   parmValue.page = 1;
                   searchList();
                 "
-                placeholder="单位名称"
+                placeholder="关键字"
                 ><el-select
                   v-model="select"
                   slot="prepend"
@@ -139,8 +139,13 @@
                   style="width: 140px"
                   placeholder="关键字类型"
                 >
-                  <el-option label="商品编号" value="1" />
-                  <el-option label="商品名称" value="2" /> </el-select
+                  <el-option label="商品名称" value="1" />
+                  <el-option label="商品编号" value="2" />
+                  <el-option label="平台编号" value="3" />
+                  <!-- <el-option label="供应商编号" value="4" /> -->
+                  <el-option label="业务企业编号" value="5" />
+                  <el-option label="平台商品编号" value="6" />
+                  <el-option label="创建人" value="7" /> </el-select
               ></el-input>
             </el-col>
             <el-col
@@ -180,8 +185,8 @@
           :size="tablebtnSize"
           :type="scope.row.status == '0' ? '' : 'warning'"
           v-text="
-            (statusList.find((item) => item.code == scope.row.status) || {})
-              .name || '--'
+            (options8.find((item) => item.id == scope.row.status) || {}).name ||
+            '--'
           "
         ></el-tag>
       </template>
@@ -231,8 +236,7 @@ import asyncRequest from "@/apis/service/goodStore/goodsOnline";
 import mixinPage from "@/mixins/elPaginationHandle";
 import { mapGetters } from "vuex";
 import resToken from "@/mixins/resToken";
-
-import { listCol, options1 } from "./columns";
+import { listCol, options1, options8 } from "./columns";
 export default {
   name: "goodsOnline",
   mixins: [mixinPage, resToken],
@@ -253,26 +257,8 @@ export default {
   },
   data() {
     return {
-      statusList: [
-        {
-          code: "0",
-          name: "新建待审核",
-        },
-        {
-          code: "1",
-          name: "审核通过",
-        },
-        {
-          code: "2",
-          name: "基础修改待审核",
-        },
-        {
-          code: "3",
-          name: "成本修改待审核",
-        },
-      ],
-
       options1: options1,
+      options8: options8,
       loading: false,
       parmValue: {
         good_name: "", //商品名称
@@ -280,12 +266,16 @@ export default {
         cat_id: "", //商品分类
         start: "", //开始日期
         end: "", //结束日期
-        platform_code:"",//平台编码
-        is_stock:"",//是否库存品
+        platform_code: "", //平台编码
+        is_stock: "", //是否库存品
         page: 1, // 页码
         size: 15, // 每页显示条数
-
-        status: "", //状态
+        supplierNo: "", //供应商编号
+        good_type: "", //是否定制
+        brand_id: "", //品牌
+        companyNo: "", //业务企业编号
+        exam_status: "", //审核状态
+        plat_code: "", //平台商品编号
         creater: "", //
       },
 
@@ -305,20 +295,19 @@ export default {
       },
       // 表格 - 列参数
       columns: listCol,
-      supplierNo: [],
       cat_id: [],
       brandid: [],
+      select: "1",
+      sinput: "",
     };
   },
   mounted() {
-    this.supplierNo = [];
     this.cat_id = [];
     this.brandid = [];
     this.searchList();
   },
   methods: {
     restSearch() {
-      this.supplierNo = [];
       this.cat_id = [];
       this.brandid = [];
       // 表格 - 分页
@@ -328,41 +317,25 @@ export default {
         total: 0,
       };
       this.parmValue = {
+        good_name: "", //商品名称
+        spucodecode: "", //商品编号
+        cat_id: "", //商品分类
+        start: "", //开始日期
+        end: "", //结束日期
+        platform_code: "", //平台编码
+        is_stock: "", //是否库存品
         page: 1, // 页码
         size: 15, // 每页显示条数
-        start: "",
-        end: "",
-        status: "",
-        creater: "",
+        supplierNo: "", //供应商编号
+        good_type: "", //是否定制
+        brand_id: "", //品牌
+        companyNo: "", //业务企业编号
+        exam_status: "", //审核状态
+        plat_code: "", //平台商品编号
+        creater: "", //
       };
       this.searchList();
     },
-    //供应商选择
-    async supplierNosearchChange(e) {
-      console.log(e);
-      const { id, code, label } = e;
-      if (id) {
-        this.supplierNo = [code];
-      } else {
-        this.supplierNo = [code];
-      }
-      this.parmValue.supplierNo = this.supplierNo.toString();
-      this.pageInfo.curr = 1;
-      this.parmValue.page = 1;
-      await this.searchList();
-    },
-    //业务企业选择
-    async company_idsearchChange(e) {
-      const { id, code, label } = e;
-      if (id) {
-        this.parmValue.company_id = code;
-      } else {
-        this.parmValue.company_id = "";
-      }
-      this.pageInfo.curr = 1;
-      this.parmValue.page = 1;
-      await this.searchList();
-    },
     //商品品牌选择
     async brandidsearchChange(e) {
       const { id, code, label } = e;
@@ -371,7 +344,7 @@ export default {
       } else {
         this.brandid = [];
       }
-      this.ruleForm.brandid = this.this.brandid.toString();
+      this.parmValue.brand_id = this.brandid.toString();
       this.pageInfo.curr = 1;
       this.parmValue.page = 1;
       await this.searchList();
@@ -455,6 +428,15 @@ export default {
     // 刷新表格
     async searchList() {
       this.loading = true;
+      let model = JSON.parse(JSON.stringify(this.parmValue));
+      model.good_name = this.select === "1" ? this.sinput : ""; //商品名称
+      model.spucodecode = this.select === "1" ? this.sinput : ""; //商品编号
+      model.platform_code = this.select === "1" ? this.sinput : ""; //平台编码
+      model.supplierNo = this.select === "1" ? this.sinput : ""; //供应商编号
+      model.companyNo = this.select === "1" ? this.sinput : ""; //业务企业编号
+      model.exam_status = this.select === "1" ? this.sinput : ""; //审核状态
+      model.plat_code = this.select === "1" ? this.sinput : ""; //平台商品编号
+      model.creater = this.select === "1" ? this.sinput : ""; //
       const res = await asyncRequest.list(this.parmValue);
       if (res && res.code === 0 && res.data) {
         this.tableData = res.data.list;
@@ -476,9 +458,9 @@ export default {
     },
     //商品分类选择
     async goods_class_change(e) {
-      const { value } = e;
-      this.cat_id = value || [];
-      this.pageInfo.cat_id = this.cat_id.toString();
+      this.cat_id = e;
+      this.parmValue.cat_id =
+        this.cat_id.length === 0 ? "" : this.cat_id[this.cat_id.length - 1];
       this.pageInfo.curr = 1;
       this.parmValue.page = 1;
       await this.searchList();