戴艳蓉 3 years ago
parent
commit
529fe924b9

+ 3 - 2
src/components/search-good-modal/main.vue

@@ -50,11 +50,11 @@
               </el-col>
               <el-col :span="4" style="width: 228px; padding: 0 0 0 10px">
                 <search-brand
-                  :value="brandid"
+                  :value="parmValue.brandid"
                   :disabled="false"
                   :size="'mini'"
                   :isDetail="false"
-                  :names="brand_name"
+                  :names="''"
                   :placeholder="'品牌'"
                   @searchChange="brandidsearchChange"
                 />
@@ -114,6 +114,7 @@
                   :size="searchSize"
                   v-model="sinput"
                   :maxlength="40"
+                  clearable
                   @blur="
                     pageInfo.curr = 1;
                     parmValue.page = 1;

+ 40 - 58
src/components/search-good-online-modal/columns.js

@@ -1,84 +1,66 @@
 export default [
   { type: "selection", fixed: "left", _noset_: true },
   {
-    prop: "good_code",
+    prop: "skuCode",
     label: "商品编码",
-    width: "150",
+    width: "160",
+  },
+  {
+    prop: "good_thumb_img",
+    label: "图片",
+    _slot_: "good_thumb_img", 
+    "width": "50",
   },
   {
     prop: "good_name",
     label: "商品名称",
+    // good_thumb_img
     "min-width": "120",
   },
-
   {
-    prop: "gys_code",
-    label: "供应商编码",
-    width: "142",
+    prop: "plat_code",
+    label: "平台商品编号",
+    "width": "160",
   },
   {
-    prop: "supplier_name",
-    label: "供货商",
-    "min-width": "160",
+    prop: "cat_name",
+    label: "商品分类",
+    width: "120",
   },
-  // {
-  //   prop: "cg_saler",
-  //   label: "采购员",
-  //   width: "60",
-  // },
-  // {
-  //   prop: "usable_stock",
-  //   label: "商品库存",
-  //   width: "70",
-  // },
+
   {
     prop: "unit",
     label: "单位",
     width: "45",
   },
-  // {
-  //   prop: "bstatus",
-  //   label: "当前状态",
-  //   _slot_: "status",
-  //   width: "80px",
-  // },
-
-
-  // {
-  //   prop: "classArr",
-  //   label: "商品类别",
-  // },
   {
-    prop: "color",
-    label: "商品颜色",
-    width: "70",
+    prop: "model",
+    label: "规格",
+    _slot_: "model",
+    width: "110",
+  },
+  
+  {
+    prop: "brand_name",
+    label: "品牌",
+    "width": "100",
   },
   {
-    prop: "material",
-    label: "商品材质",
-    width: "70",
+    prop: "is_stock",
+    label: "库存类型",
+    _slot_: "is_stock",
+    "width": "100",
   },
+  
   {
-    prop: "brand",
-    label: "品牌",
-    "width": "70",
+    prop: "platform_name",
+    label: "所属平台",
+    "width": "100",
+  },
+  
+  {
+    prop: "company",
+    label: "业务公司",
+    "min-width": "150",
   },
-  // {
-  //   prop: "good_type",
-  //   label: "商品类型",
-  // },
-  // {后端有接口但是没有值。
-  //   prop: "specs",
-  //   label: "商品规格",
-  // },
-
-  // {
-  //   prop: "",
-  //   label: "操作",
-  //   width: "80px",
-  //   fixed: "right",
-  //   _noset_: true,
-  //   _slot_: "operation",
-  // },
-
 ]

+ 124 - 93
src/components/search-good-online-modal/main.vue

@@ -39,31 +39,25 @@
           <div style="width: 100%">
             <el-row style="margin-top: -15px">
               <el-col :span="24">
-                <el-col :span="4" style="width: 280px; padding: 0 0 0 0px">
-                  <el-input
+                <el-col :span="4" style="width: 210px">
+                  <search-brand
+                    :value="parmValue.brandid"
+                    :disabled="false"
                     :size="'mini'"
-                    v-model="parmValue.good_code"
-                    :maxlength="40"
-                    clearable
-                    placeholder="商品分类"
+                    :isDetail="false"
+                    :names="''"
+                    :placeholder="'品牌'"
+                    @searchChange="brandidsearchChange"
                   />
                 </el-col>
-                <el-col :span="4" style="width: 190px; padding: 0 0 0 10px">
-                  <el-input
-                    :size="'mini'"
-                    v-model="parmValue.good_code"
-                    :maxlength="40"
-                    clearable
-                    placeholder="所属平台"
-                  />
-                </el-col>
-                <el-col :span="4" style="width: 260px; padding: 0 0 0 10px">
-                  <el-input
-                    :size="'mini'"
-                    v-model="parmValue.good_code"
-                    :maxlength="40"
-                    clearable
-                    placeholder="商品编号"
+                <el-col :span="6" style="width: 370px; padding: 0 0 0 10px">
+                  <good-class
+                    :value="parmValue.cat_id"
+                    @handleChange="goods_class_change"
+                    :disabled="false"
+                    :size="searchSize"
+                    :isDetail="false"
+                    :placeholder="'分类'"
                   />
                 </el-col>
 
@@ -89,51 +83,24 @@
                 </el-col>
               </el-col>
               <el-col :span="24" style="padding: 10px 0 0 0">
-                <el-col :span="4" style="width: 280px; padding: 0">
-                  <el-select
-                    v-model="supplierCode"
-                    multiple
-                    filterable
-                    remote
-                    :multiple-limit="1"
-                    reserve-keyword
-                    :size="'mini'"
-                    clearable
-                    style="width: 100%"
-                    :placeholder="'供应商名称'"
-                    :remote-method="remoteMethod"
-                    :loading="selectLoading"
-                    @change="supplierChange"
-                  >
-                    <el-option
-                      v-for="(item, index) in options"
-                      :key="item.id + index"
-                      :label="item.name"
-                      :value="item.code + ''"
-                      :disabled="item.status !== '1'"
-                    >
-                    </el-option>
-                  </el-select>
-                </el-col>
-                <el-col :span="4" style="width: 190px; padding: 0 0 0 10px">
-                  <el-select v-model="parmValue.value"  :size="'mini'" placeholder="库存类型">
-                    <el-option
-                      v-for="item in options"
-                      :key="item.id"
-                      :label="item.name"
-                      :value="item.id"
-                    >
-                    </el-option>
-                  </el-select>
-                </el-col>
-                <el-col :span="4" style="width: 260px; padding: 0 0 0 10px">
+                <el-col :span="4" style="width: 450px">
                   <el-input
+                    clearable
                     :size="'mini'"
-                    v-model="parmValue.good_name"
+                    v-model="sinput"
                     :maxlength="40"
-                    clearable
-                    placeholder="商品名称"
-                  />
+                    placeholder="关键字"
+                  >
+                    <el-select
+                      v-model="select"
+                      style="width: 120px"
+                      slot="prepend"
+                      placeholder="关键字类型"
+                    >
+                      <el-option label="商品名称" value="1" />
+                      <el-option label="商品编码" value="2" />
+                      <el-option label="平台商品编码" value="3" /> </el-select
+                  ></el-input>
                 </el-col>
 
                 <el-col :span="3" style="width: 66px; float: right">
@@ -150,6 +117,29 @@
             </el-row>
           </div>
         </template>
+        <template #good_thumb_img="{ scope }">
+          <div
+            v-if="scope.row.good_thumb_img"
+            style="width: 20px; height: 20px"
+            class="hover"
+            v-viewer
+          >
+            <img
+              :src="scope.row.good_thumb_img"
+              style="display: inline-block; width: 100%; height: 100%"
+              alt=""
+            />
+          </div>
+        </template>
+        <template #model="{ scope }">
+          <span v-for="(si, sii) in scope.row.specinfo" :key="si.spec_id">
+            <span v-if="sii !== 0">--</span
+            ><span>{{ si.spec_name }}[{{ si.spec_value }}]</span></span
+          >
+        </template>
+        <template #is_stock="{ scope }">
+          <span>{{ scope.row.is_stock === "1" ? "库存品" : "非库存品" }} </span>
+        </template>
       </ex-table>
     </el-card>
   </el-dialog>
@@ -167,7 +157,7 @@ export default {
   computed: {
     ...mapGetters(["tablebtnSize", "searchSize", "size"]),
   },
-  props: ["showModel", "once"],
+  props: ["showModel", "once", "sitem", "active"],
 
   /**
    * 属性集合
@@ -180,7 +170,9 @@ export default {
    */
   data() {
     return {
-      options: [
+      select: "1",
+      sinput: "",
+      is_stock: [
         { id: "0", name: "非库存品" },
         { id: "1", name: "库存品" },
       ],
@@ -190,11 +182,15 @@ export default {
       loading: true,
       showModelThis: false,
       parmValue: {
-        type_code: "", // 商品属性code
-        supplierNo: "", // 供应商code
+        platform_code: [],
+        companyNo: "",
+        is_stock: "",
+        exam_status: "",
+        cat_id: [], // 商品属性code
+        brandid: [],
         good_code: "", // 商品编码
         good_name: "", // 商品名称
-        wsmcode: "", //仓库code
+        plat_code: "",
         page: 1, // 页码
         size: 15, // 每页显示条数
       },
@@ -224,8 +220,7 @@ export default {
     showModel: function (val) {
       this.showModelThis = val;
       if (val) {
-        this.supplierCode = [];
-        this.searchList();
+        this.restSearch();
       }
     },
     showModelThis(val) {
@@ -236,23 +231,21 @@ export default {
   },
 
   methods: {
-    supplierChange(e) {
-      if (e && e.length === 1) {
-        this.parmValue.supplierNo = e[0];
-      } else {
-        this.parmValue.supplierNo = "";
-      }
-      this.parmValue.page = 1;
-      this.searchList();
-    },
     restSearch() {
-      this.supplierCode = [];
+      console.log(this.active);
+      console.log(this.sitem);
+      const { platform_code, company_id, is_stock } = this.sitem;
+
       this.parmValue = {
-        type_code: "", // 商品属性code
-        supplierNo: "", // 供应商code
+        platform_code: this.active ? platform_code : [],
+        companyNo: this.active ? company_id : "",
+        is_stock: this.active ? is_stock : "",
+        cat_id: [], // 商品属性code
+        brandid: [],
+        exam_status: this.active ? "6" : "",
         good_code: "", // 商品编码
         good_name: "", // 商品名称
-        wsmcode: "", //仓库code
+        plat_code: "",
         page: 1, // 页码
         size: 15, // 每页显示条数
       };
@@ -264,19 +257,57 @@ export default {
       };
       this.searchList();
     },
+    async goods_class_change(e) {
+      this.parmValue.cat_id = e;
+      this.pageInfo.curr = 1;
+      this.parmValue.page = 1;
+      await this.searchList();
+    },
+    async brandidsearchChange(e) {
+      const { id } = e;
+      this.parmValue.brandid = id ? [id] : [];
+      this.pageInfo.curr = 1;
+      this.parmValue.page = 1;
+      await this.searchList();
+    },
+    async platform_codesearchChange(e) {
+      const { id, code, label } = e;
+      this.parmValue.platform_code = id ? [id] : [];
+      this.pageInfo.curr = 1;
+      this.parmValue.page = 1;
+      await this.searchList();
+    },
+    async company_idsearchChange(e) {
+      const { id, code, label } = e;
+      this.parmValue.company_id = code || "";
+      this.pageInfo.curr = 1;
+      this.parmValue.page = 1;
+      await this.searchList();
+    },
     async searchList() {
       this.loading = true;
-      const res = await asyncRequest.list(this.parmValue);
+      let model = JSON.parse(JSON.stringify(this.parmValue));
+      model.cat_id =
+        model.cat_id.length > 0 ? model.cat_id[model.cat_id.length - 1] : "";
+      model.brandid =
+        model.brandid.length > 0 ? model.brandid[model.brandid.length - 1] : "";
+      model.platform_code =
+        model.platform_code.length > 0
+          ? model.platform_code[model.platform_code.length - 1]
+          : "";
+      const res = await asyncRequest.list(model);
       if (res && res.code === 0 && res.data) {
         this.tableData = res.data.list;
-        // this.tableData.map((v) => {
-        //   // v.sale_price = this.setNum(v.sale_price);
-        //   // v.sale_fee = this.setNum(v.sale_fee);
-        //   // // v.num =
-        //   // //pa (v.sale_price);
-        //   return v;
-        // });
-        //
+        this.tableData.map((e) => {
+          e.cat_name = "";
+          if (e.cat_info && e.cat_info.length > 0) {
+            e.cat_info.forEach((si, sii) => {
+              e.cat_name += `${sii !== 0 ? "_" : ""}${si.name}`;
+            });
+          }
+          return e;
+        });
+
         this.pageInfo.total = Number(res.data.count);
       } else if (res && res.code >= 100 && res.code <= 104) {
         await this.logout();

+ 151 - 137
src/components/show-good-data-modal/ShowDataTableColumns.js

@@ -26,10 +26,15 @@ export default [
   {
     prop: "online_reason",
     label: "上线原因",
+  },
+    {
+      prop: "skuCode",
+      label: "上线后商品编号",
+      span: 8,
   },
   {
     prop: "spuCode",
-    label: "商品编号",
+    label: "成本商品编号",
     span: 8,
   },
 
@@ -49,21 +54,17 @@ export default [
     label: "平台商品编码",
     span: 8,
   },
-  {
-    prop: "online_time",
-    label: "上线时间",
-    span: 8,
-  },
+  // {
+  //   prop: "online_time",
+  //   label: "上线时间",
+  //   span: 8,
+  // },
   {
     prop: "cat",
     label: "分类",
     span: 8,
   },
-  {
-    prop: "online_remark",
-    label: "上线备注",
-    span: 24,
-  },
+  
   {
     prop: "brand_name",
     label: "品牌",
@@ -72,160 +73,169 @@ export default [
   {
     prop: "unit",
     label: "单位",
-    span: 8,
-  },
-
-  {
-    prop: "is_auth",
-    label: "供应商权限",
-    _slot_: "is_auth",
-    span: 8,
-  },
-  {
-    prop: "exclusive",
-    label: "专属类型",
-    // _slot_: "exclusive",
-    span: 8,
-  },
-  {
-    prop: "weight",
-    label: "商品总克重",
-    span: 8,
-  },
-  {
-    prop: "is_stock",
-    label: "是否库存品",
-    _slot_: "is_stock",
-    span: 8,
+    span: 4,
   },
   {
     prop: "tax",
     label: "税点",
-    span: 8,
+    append: '%',
+    span: 4,
   },
+
+  // {
+  //   prop: "is_auth",
+  //   label: "供应商权限",
+  //   _slot_: "is_auth",
+  //   span: 6,
+  // },
   {
     prop: "good_type",
     label: "是否定制",
     _slot_: "good_type",
     span: 8,
   },
-
   {
-    prop: "packing_list",
-    label: "包装清单",
-    span: 8,
+    prop: "is_stock",
+    label: "是否库存品",
+    _slot_: "is_stock",
+    span: 6,
   },
+ 
+ 
   {
-    prop: "packing_way",
-    label: "包装方式",
-    span: 8,
+    prop: "delivery_day",
+    label: "物流时间",
+    append: '天',
+    span: 6,
   },
   {
-    prop: "packing_spec",
-    label: "装箱规格",
-    span: 8,
+    prop: "lead_time",
+    label: "供货周期",
+    append: '天',
+    span: 6,
   },
   {
-    prop: "packing_weight",
-    label: "装箱重量(g)",
-    span: 8,
+    prop: "sample_day",
+    label: "调样周期",
+    append: '天',
+    span: 6,
   },
+  
   {
-    prop: "packing_size",
-    label: "装箱尺寸",
+    prop: "exclusive",
+    label: "专属类型",
+    _slot_: "exclusive",
     span: 8,
   },
   {
-    prop: "good_bar",
-    label: "商品条形码",
+    prop: "weight",
+    label: "商品总克重",
+    append: 'g',
     span: 8,
   },
+
+  // {
+  //   prop: "packing_list",
+  //   label: "包装清单",
+  //   span: 8,
+  // },
+  // {
+  //   prop: "packing_way",
+  //   label: "包装方式",
+  //   span: 8,
+  // },
+  // {
+  //   prop: "packing_spec",
+  //   label: "装箱规格",
+  //   span: 8,
+  // },
+  // {
+  //   prop: "packing_weight",
+  //   label: "装箱重量(g)",
+  //   span: 8,
+  // },
+  // {
+  //   prop: "packing_size",
+  //   label: "装箱尺寸",
+  //   span: 8,
+  // },
+  // {
+  //   prop: "good_bar",
+  //   label: "商品条形码",
+  //   span: 8,
+  // },
   {
     prop: "supply_area",
     label: "供货区域",
     _slot_: "supply_area",
     span: 8,
   },
-  {
-    prop: "delivery_place_cn",
-    label: "发货地",
-    span: 8,
-  },
-  {
-    prop: "origin_place_cn",
-    label: "产地",
-    span: 8,
-  },
-  {
-    prop: "delivery_day",
-    label: "物流时间(天)",
-    span: 8,
-  },
-  {
-    prop: "lead_time",
-    label: "供货周期(天)",
-    span: 8,
-  },
-  {
-    prop: "sample_day",
-    label: "调样周期(天)",
-    span: 8,
-  },
+  // {
+  //   prop: "delivery_place_cn",
+  //   label: "发货地",
+  //   span: 8,
+  // },
+  // {
+  //   prop: "origin_place_cn",
+  //   label: "产地",
+  //   span: 8,
+  // },
 
 
-  {
-    prop: "cert_fee",
-    label: "证书费(元)",
-    span: 8,
-  },
-  {
-    prop: "packing_fee",
-    label: "包装费(元)",
-    span: 8,
-  },
-  {
-    prop: "cost_fee",
-    label: "成本工艺费(元)",
-    span: 8,
-  },
 
-  {
-    prop: "mark_fee",
-    label: "加标费(元)",
-    span: 8,
-  },
-  {
-    prop: "demo_fee",
-    label: "打样费(元)",
-    span: 8,
-  },
-  {
-    prop: "open_fee",
-    label: "开模费(元)",
-    span: 8,
-  },
+  // {
+  //   prop: "cert_fee",
+  //   label: "证书费(元)",
+  //   span: 8,
+  // },
+  // {
+  //   prop: "packing_fee",
+  //   label: "包装费(元)",
+  //   span: 8,
+  // },
+  // {
+  //   prop: "cost_fee",
+  //   label: "成本工艺费(元)",
+  //   span: 8,
+  // },
 
-  {
-    prop: "sample_fee",
-    label: "调样费(元)",
-    span: 8,
-  },
-  {
-    prop: "market_price",
-    label: "市场价(元)",
-    span: 8,
-  },
-  {
-    prop: "nake_price",
-    label: "含税成本合计",
-    span: 8,
-  },
-  {
-    prop: "is_step",
-    label: "启用阶梯",
-    _slot_: "is_step",
-    span: 8,
-  },
+  // {
+  //   prop: "mark_fee",
+  //   label: "加标费(元)",
+  //   span: 8,
+  // },
+  // {
+  //   prop: "demo_fee",
+  //   label: "打样费(元)",
+  //   span: 8,
+  // },
+  // {
+  //   prop: "open_fee",
+  //   label: "开模费(元)",
+  //   span: 8,
+  // },
+
+  // {
+  //   prop: "sample_fee",
+  //   label: "调样费(元)",
+  //   span: 8,
+  // },
+  // {
+  //   prop: "market_price",
+  //   label: "市场价(元)",
+  //   span: 8,
+  // },
+  // {
+  //   prop: "nake_price",
+  //   label: "成本裸价",
+  //   span: 8,
+  // },
+  // {
+  //   prop: "is_step",
+  //   label: "启用阶梯",
+  //   _slot_: "is_step",
+  //   span: 8,
+  // },
   {
     prop: "exam_status",
     label: "状态",
@@ -243,7 +253,11 @@ export default [
     span: 8,
   },
 
-
+  {
+    prop: "online_remark",
+    label: "上线备注",
+    span: 24,
+  },
   {
     prop: "after_sales",
     label: "售后说明",
@@ -261,12 +275,12 @@ export default [
     span: 24,
   },
 
-  {
-    prop: "purchase",
-    label: "采购起订量信息",
-    _slot_: "purchase",
-    span: 24,
-  },
+  // {
+  //   prop: "purchase",
+  //   label: "采购起订量信息",
+  //   _slot_: "purchase",
+  //   span: 24,
+  // },
   {
     prop: "ladderlist",
     label: "销售起订量",

+ 25 - 26
src/components/show-good-data-modal/main.vue

@@ -16,6 +16,7 @@
   >
     <el-card style="margin-top: -20px" class="modal-form-style">
       <show-data-table
+        style="margin: 0; padding: 0"
         :newTime="newTime"
         v-if="newTime !== ''"
         :sitem="sitem"
@@ -56,15 +57,11 @@
             "
           />
         </template>
-        <!-- <template slot="exclusive">
-                  <el-tag
-                    :size="'mini'"
-                    v-text="
-                      (options2.find((item) => item.id == sitem.exclusive) || {})
-                        .name || '--'
-                    "
-                  />
-                </template> -->
+        <template slot="exclusive">
+          <span v-for="(si, sii) in sitem.exclusive" :key="si.id"
+            ><span v-if="sii !== 0">/</span><span>{{ si.name }}</span>
+          </span>
+        </template>
         <template slot="is_stock">
           <el-tag
             :size="'mini'"
@@ -128,23 +125,25 @@
             <el-table-column prop="delivery_fee" label="其中运费" />
           </el-table>
         </template>
-         <template slot="ladderlist">
-                  <el-table
-                    :data="ladderlist"
-                    :size="'mini'"
-                    border
-                    stripe
-                    style="width: 99%; margin: 10px 10px 10px 0"
-                  >
-                    <el-table-column prop="min_num" label="起订量(>=)" />
-                    <el-table-column prop="sale_price" label="售价" />
-                    <el-table-column prop="market_price" label="市场价" />
-                    <el-table-column prop="market_platform" label="对比平台" />
-                    <el-table-column prop="status" label="状态" >
-                       <template slot-scope="scope">{{scope.row.status==='1'?'启用':"禁用"}}</template>
-                    </el-table-column>
-                  </el-table>
-                </template>
+        <template slot="ladderlist">
+          <el-table
+            :data="sitem.ladderlist"
+            :size="'mini'"
+            border
+            stripe
+            style="width: 99%; margin: 10px 10px 10px 0"
+          >
+            <el-table-column prop="min_num" label="起订量(>=)" />
+            <el-table-column prop="sale_price" label="售价" />
+            <el-table-column prop="market_price" label="市场价" />
+            <el-table-column prop="market_platform" label="对比平台" />
+            <el-table-column prop="status" label="状态">
+              <template slot-scope="scope">{{
+                scope.row.status === "1" ? "启用" : "禁用"
+              }}</template>
+            </el-table-column>
+          </el-table>
+        </template>
       </show-data-table>
     </el-card>
   </el-dialog>

+ 26 - 32
src/views/goodStore/active/columns.js

@@ -32,60 +32,54 @@ const options6 = [
 ]
 const listCol = [
   {
-    prop: "cgdNo",
-    label: "采购单编号",
-    width: "160px",
+    prop: "activity_code",
+    label: "活动编码",
+    fixed: "left",
+    width: "155",
   },
   {
-    prop: "apply_name",
-    label: "申请人",
-    width: "65px",
+    prop: "activity_name",
+    label: "活动名称",
   },
   {
-    prop: "good_code",
-    label: "商品编码",
-    width: "150px",
-  },
-  {
-    prop: "good_name",
-    label: "商品名称",
-  },
-  {
-    prop: "class_cat",
-    label: "商品分类",
+    prop: "status",
+    label: "状态",
+    width: "105",
+    _slot_: "status",
   },
 
   {
-    prop: "good_weight",
-    label: "商品总重量(g)",
-    width: "110px",
+    prop: "atime",
+    label: "活动时间",
+    _slot_: "atime",
+    width: "270",
   },
+  // {
+  //   prop: "platform_code",
+  //   label: "平台编号",
+  // },
   {
-    prop: "diff_weight",
-    label: "工差总重量(g)",
-    width: "110px",
+    prop: "platform_name",
+    label: "平台名称",
   },
-
   {
-    prop: "status",
-    label: "状态",
-    _slot_: "status",
-    width: "120px",
+    prop: "creater",
+    label: "创建人",
+    width: "60",
   },
   {
     prop: "addtime",
     label: "创建时间",
-    width: "140px",
-    sortable: true,
+    width: "142",
   },
   {
     prop: "",
     label: "操作",
     fixed: "right",
     _noset_: true,
-    width: "52px",
     _slot_: "operation",
+    width: "50",
   },
 ]
 
-export  { options1, options2, options3, options4, options5, options6,listCol }
+export { options1, options2, options3, options4, options5, options6, listCol }

+ 33 - 2
src/views/goodStore/active/components/baseForm.vue

@@ -82,8 +82,10 @@
             <el-select
               v-model="ruleForm.is_stock"
               style="width: 100%"
+              :size="'mini'"
               :disabled="status !== ''"
               placeholder="库存类型"
+              @change="is_stock_change"
             >
               <el-option
                 v-for="item in is_stock"
@@ -143,6 +145,7 @@
                 show-overflow-tooltip
               />
               <el-table-column
+                v-if="!(status === '' || status === '0')"
                 prop="activity_stock"
                 label="活动库存"
                 width="100"
@@ -163,18 +166,25 @@
                 show-overflow-tooltip
               />
               <el-table-column
+                v-if="!(status === '' || status === '0')"
                 prop="sale_price"
                 label="非活动价(元)"
                 width="100"
                 show-overflow-tooltip
               />
               <el-table-column
+                v-if="!(status === '' || status === '0')"
                 prop="activity_price"
                 label="活动价(元)"
                 width="100"
                 show-overflow-tooltip
               />
-              <el-table-column prop="status" label="审核状态" width="100">
+              <el-table-column
+                prop="status"
+                label="审核状态"
+                width="100"
+                v-if="!(status === '' || status === '0')"
+              >
                 <template slot-scope="scope">
                   <el-tag
                     :size="'mini'"
@@ -196,6 +206,7 @@
                 </template>
               </el-table-column>
               <el-table-column
+                v-if="!(status === '' || status === '0')"
                 prop="remark"
                 label="审核备注"
                 width="100"
@@ -249,6 +260,8 @@
     </el-form>
     <search-good-online-modal
       :once="once"
+      :sitem="ruleForm"
+      :active="true"
       :show-model="showModel"
       @resultList="resultList"
       @cancel="showModel = false"
@@ -465,6 +478,20 @@ export default {
         this.ruleForm.good_list = [];
       }
     },
+    is_stock_change(e) {
+      const { is_stock } = this.ruleForm;
+      console.log(is_stock, e);
+      let hs_is_stock = "0";
+      if (this.ruleForm.good_list && this.ruleForm.good_list.length > 0) {
+        hs_is_stock = this.ruleForm.good_list[0].is_stock;
+      }
+      if (is_stock !== hs_is_stock) {
+        this.ruleForm.good_list = [];
+      }
+
+      console.log(this.ruleForm.good_list);
+      //
+    },
     platform_codesearchChange(e) {
       let old = JSON.parse(JSON.stringify(this.ruleForm.platform_code));
       console.log(e);
@@ -523,7 +550,7 @@ export default {
       console.log(row);
     },
     openEdit() {
-      const { company_id, platform_code } = this.ruleForm;
+      const { company_id, platform_code, is_stock } = this.ruleForm;
       if (platform_code.length === 0) {
         this.$message.warning("请选择平台!");
         return;
@@ -532,6 +559,10 @@ export default {
         this.$message.warning("请选择业务企业!");
         return;
       }
+      if (is_stock === "") {
+        this.$message.warning("请选择库存类型!");
+        return;
+      }
       this.showModel = true;
     },
     async submitForm() {

+ 2 - 7
src/views/goodStore/active/detail.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="activeDetail">
-    <div>{{ powers }},{{ status }}</div>
+    <!-- <div>{{ powers }},{{ status }}</div> -->
     <div
       class="activeDetail-main"
       v-if="powers && powers.length > 0 && powers.some((item) => item == '007')"
@@ -203,12 +203,7 @@ export default {
       console.log(row);
     },
     refresh(e) {
-      const { spuCode } = e;
-      let model = {
-        id: this.queryType === "add" ? spuCode : this.queryId,
-        type: "view",
-      };
-      this.routeReGoto("activeDetail", model);
+      this.routeReGoto("active", {});
     },
     async initData() {
       this.loading = true;

+ 21 - 60
src/views/goodStore/active/index.vue

@@ -101,6 +101,7 @@
                 :size="searchSize"
                 v-model="sinput"
                 :maxlength="40"
+                clearable
                 @blur="
                   pageInfo.curr = 1;
                   parmValue.page = 1;
@@ -140,7 +141,15 @@
       <template #status="{ scope }">
         <el-tag
           :size="tablebtnSize"
-          :type="scope.row.status == '0' ? 'warning' : ''"
+          :type="
+            scope.row.status == '4'
+              ? ''
+              : scope.row.status == '8'
+              ? 'danger'
+              : scope.row.status == '5' || scope.row.status == '7'
+              ? 'info'
+              : 'warning'
+          "
           v-text="
             (statusOptions.find((item) => item.id == scope.row.status) || {})
               .label || '--'
@@ -185,6 +194,7 @@ import asyncRequest from "@/apis/service/goodStore/active";
 import mixinPage from "@/mixins/elPaginationHandle";
 import { mapGetters } from "vuex";
 import resToken from "@/mixins/resToken";
+import { listCol } from "./columns";
 export default {
   name: "active",
   mixins: [mixinPage, resToken],
@@ -247,57 +257,7 @@ export default {
         total: 0,
       },
       // 表格 - 列参数
-      columns: [
-        {
-          prop: "activity_code",
-          label: "活动编码",
-          fixed: "left",
-          width: "155",
-        },
-        {
-          prop: "activity_name",
-          label: "活动名称",
-        },
-        {
-          prop: "status",
-          label: "状态",
-          width: "105",
-          _slot_: "status",
-        },
-
-        {
-          prop: "atime",
-          label: "活动时间",
-          _slot_: "atime",
-          width: "270",
-        },
-        {
-          prop: "platform_code",
-          label: "平台编号",
-        },
-        {
-          prop: "platform_name",
-          label: "平台名称",
-        },
-        {
-          prop: "creater",
-          label: "创建人",
-          width: "60",
-        },
-        {
-          prop: "addtime",
-          label: "创建时间",
-          width: "142",
-        },
-        {
-          prop: "",
-          label: "操作",
-          fixed: "right",
-          _noset_: true,
-          _slot_: "operation",
-          width: "50",
-        },
-      ],
+      columns: listCol,
     };
   },
   mounted() {
@@ -325,20 +285,21 @@ export default {
       };
       this.searchList();
     },
-    platform_codesearchChange(e) {
-      if (e) {
+   async platform_codesearchChange(e) {
         const { id, code, label } = e;
         this.parmValue.platform_code = id ? [id] : [];
-      }
+         this.pageInfo.curr = 1;
+        this.parmValue.page = 1;
+        await this.searchList();
     },
 
-    company_idsearchChange(e) {
-      console.log(e);
-      let old = this.parmValue.company_id;
-      if (e) {
+   async company_idsearchChange(e) {
+    
         const { id, code, label } = e;
         this.parmValue.company_id = code || "";
-      }
+         this.pageInfo.curr = 1;
+        this.parmValue.page = 1;
+        await this.searchList();
     },
     // 新建/编辑/详情
     openModal(row, type) {

+ 24 - 13
src/views/goodStore/activeGood/index.vue

@@ -41,10 +41,10 @@
                   "
                 >
                   <el-option
-                    v-for="item in statusList"
-                    :key="'status' + item.code"
-                    :label="item.name"
-                    :value="item.code"
+                    v-for="item in statusOptions"
+                    :key="'status' + item.id"
+                    :label="item.label"
+                    :value="item.id"
                   />
                 </el-select>
               </el-col>
@@ -52,6 +52,7 @@
                 <el-input
                   :size="searchSize"
                   v-model="parmValue.skuCode"
+                   clearable
                   :maxlength="40"
                   @blur="
                     pageInfo.curr = 1;
@@ -66,6 +67,7 @@
                   :size="searchSize"
                   v-model="parmValue.good_name"
                   :maxlength="40"
+                   clearable
                   @blur="
                     pageInfo.curr = 1;
                     parmValue.page = 1;
@@ -105,6 +107,7 @@
                   :size="searchSize"
                   v-model="parmValue.activity_code"
                   :maxlength="40"
+                  clearable
                   @blur="
                     pageInfo.curr = 1;
                     parmValue.page = 1;
@@ -118,6 +121,7 @@
                   :size="searchSize"
                   v-model="parmValue.activity_name"
                   :maxlength="40"
+                   clearable
                   @blur="
                     pageInfo.curr = 1;
                     parmValue.page = 1;
@@ -251,7 +255,8 @@ export default {
         {
           prop: "skuCode",
           label: "商品编号",
-          width: "170",
+            fixed: "left",
+          width: "160",
         },
         {
           prop: "good_name",
@@ -272,33 +277,39 @@ export default {
           label: "起订量",
         },
 
-        {
-          prop: "cost_price",
-          label: "成本单价",
-        },
+        // {
+        //   prop: "cost_price",
+        //   label: "成本单价",
+        //     width:"100px"
+        // },
         {
           prop: "sale_price",
           label: "非活动价",
+            width:"100px"
         },
         {
           prop: "activity_price",
           label: "活动价",
+          width:"100px"
         },
-        {
-          prop: "platform_code",
-          label: "平台编号",
-        },
+        // {
+        //   prop: "platform_code",
+        //   label: "平台编号",
+        // },
         {
           prop: "platform_name",
           label: "平台名称",
+           width:"100px"
         },
         {
           prop: "activity_code",
           label: "活动编号",
+          width:"160px"
         },
         {
           prop: "activity_name",
           label: "活动名称",
+          width:"120px"
         },
         {
           prop: "",

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

@@ -1129,6 +1129,7 @@ export default {
       this.resetFormData();
       this.rulesThis = this.rules;
       await this.resetForm();
+      this.sch_is_noble();
       this.good_type_change();
       this.loading = false;
     },
@@ -1567,7 +1568,7 @@ export default {
             });
           }
           this.is_noble = isok;
-          this.sch_is_noble();
+          
 
           let spec_list1 =
             speclist && speclist.length > 0

+ 97 - 79
src/views/goodStore/goodsOnline/ShowDataTableColumns.js

@@ -30,121 +30,109 @@ export default [
   {
     prop: "spuCode",
     label: "商品编号",
-    span: 8,
+    span: 6,
   },
 
 
   {
     prop: "creater",
     label: "申请人",
-    span: 8,
+    span: 6,
   },
   {
     prop: "platform_name",
     label: "上线平台",
-    span: 8,
+    span: 6,
   },
   {
     prop: "platform_code_en",
     label: "平台商品编码",
-    span: 8,
+    span: 6,
   },
   {
     prop: "online_time",
     label: "上线时间",
-    span: 8,
+    span: 6,
   },
   {
     prop: "cat",
     label: "分类",
-    span: 8,
+    span: 6,
   },
   {
     prop: "online_remark",
     label: "上线备注",
-    span: 24,
+    span: 12,
   },
   {
     prop: "brand_name",
     label: "品牌",
-    span: 8,
-  },
-  {
-    prop: "unit",
-    label: "单位",
-    span: 8,
+    span: 6,
   },
+ 
 
   {
     prop: "is_auth",
     label: "供应商权限",
     _slot_: "is_auth",
-    span: 8,
+    span: 6,
   },
   {
     prop: "exclusive",
     label: "专属类型",
-    // _slot_: "exclusive",
-    span: 8,
+    _slot_: "exclusive",
+    span: 6,
   },
   {
     prop: "weight",
     label: "商品总克重",
-    span: 8,
-  },
-  {
-    prop: "is_stock",
-    label: "是否库存品",
-    _slot_: "is_stock",
-    span: 8,
-  },
-  {
-    prop: "tax",
-    label: "税点",
-    span: 8,
-  },
-  {
-    prop: "good_type",
-    label: "是否定制",
-    _slot_: "good_type",
-    span: 8,
+    append: 'g',
+    span: 6,
   },
 
+
   {
     prop: "packing_list",
     label: "包装清单",
-    span: 8,
+    span: 6,
   },
   {
     prop: "packing_way",
     label: "包装方式",
-    span: 8,
+    span: 6,
   },
   {
     prop: "packing_spec",
     label: "装箱规格",
-    span: 8,
+    span: 6,
   },
   {
     prop: "packing_weight",
-    label: "装箱重量(g)",
-    span: 8,
+    label: "装箱重量",
+    append: 'g',
+    span: 6,
   },
   {
     prop: "packing_size",
     label: "装箱尺寸",
-    span: 8,
+    span: 6,
   },
   {
     prop: "good_bar",
     label: "商品条形码",
-    span: 8,
+    span: 6,
   },
   {
     prop: "supply_area",
     label: "供货区域",
     _slot_: "supply_area",
-    span: 8,
+    span: 6,
+  },
+  {
+    prop: "exam_status",
+    label: "状态",
+    _slot_: "exam_status",
+    span: 6,
   },
   {
     prop: "delivery_place_cn",
@@ -156,82 +144,112 @@ export default [
     label: "产地",
     span: 8,
   },
+  {
+    prop: "is_stock",
+    label: "是否库存品",
+    _slot_: "is_stock",
+    span: 4,
+  },
+  {
+    prop: "unit",
+    label: "单位",
+    span: 4,
+  },
+  {
+    prop: "tax",
+    label: "税点",
+    append: '%',
+    span: 4,
+  },
+  {
+    prop: "good_type",
+    label: "是否定制",
+    _slot_: "good_type",
+    span: 4,
+  },
   {
     prop: "delivery_day",
-    label: "物流时间(天)",
-    span: 8,
+    label: "物流时间",
+    append: '天',
+    span: 4,
   },
   {
     prop: "lead_time",
-    label: "供货周期(天)",
-    span: 8,
+    label: "供货周期",
+    append: '天',
+    span: 4
   },
   {
     prop: "sample_day",
-    label: "调样周期(天)",
-    span: 8,
+    label: "调样周期",
+    append: '天',
+    span: 4,
+  },
+  {
+    prop: "is_step",
+    label: "启用阶梯",
+    _slot_: "is_step",
+    span: 4,
   },
-
 
   {
     prop: "cert_fee",
-    label: "证书费(元)",
-    span: 8,
+    label: "证书费",
+    append: '元',
+    span: 6,
   },
   {
     prop: "packing_fee",
-    label: "包装费(元)",
-    span: 8,
+    label: "包装费",
+    append: '元',
+    span: 6,
   },
   {
     prop: "cost_fee",
-    label: "成本工艺费(元)",
-    span: 8,
+    label: "成本工艺费",
+    append: '元',
+    span: 6,
   },
 
   {
     prop: "mark_fee",
-    label: "加标费(元)",
-    span: 8,
+    label: "加标费",
+    append: '元',
+    span: 6,
   },
   {
     prop: "demo_fee",
-    label: "打样费(元)",
-    span: 8,
+    label: "打样费",
+    append: '元',
+    span: 6,
   },
   {
     prop: "open_fee",
-    label: "开模费(元)",
-    span: 8,
+    label: "开模费",
+    append: '元',
+    span: 6,
   },
 
   {
     prop: "sample_fee",
-    label: "调样费(元)",
-    span: 8,
+    label: "调样费",
+    append: '元',
+    span: 6,
   },
   {
     prop: "market_price",
-    label: "市场价(元)",
-    span: 8,
+    label: "市场价",
+    append: '元',
+    span: 6,
   },
   {
     prop: "nake_price",
-    label: "含税成本合计",
-    span: 8,
-  },
-  {
-    prop: "is_step",
-    label: "启用阶梯",
-    _slot_: "is_step",
-    span: 8,
-  },
-  {
-    prop: "exam_status",
-    label: "状态",
-    _slot_: "exam_status",
-    span: 8,
+    label: "裸价",
+    append: '元',
+    span: 6,
   },
+  
+ 
   {
     prop: "updatetime",
     label: "更新时间",

+ 10 - 22
src/views/goodStore/goodsOnline/columns.js

@@ -36,7 +36,7 @@ const options7 = [
   { id: "1", name: "是" },
 ]
 const options8 = [
-  { id: "0", name: "待提交" },
+  // { id: "0", name: "待提交" },
   { id: "1", name: "待完善成本" },
   { id: "2", name: "待产品审核" },
   { id: "3", name: "待财务定价" },
@@ -71,7 +71,7 @@ const listCol = [
   {
     prop: "platform_name",
     label: "平台名称",
-    width: "118px",
+    width: "100px",
   },
 
   {
@@ -91,37 +91,25 @@ const listCol = [
     _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: "业务公司编号",
-    width: "110px",
+    width: "160px",
   },
   {
     prop: "company",
     label: "业务公司名称",
-    width: "110px",
+    width: "150px",
+  },
+
+  {
+    prop: "plat_code",
+    label: "平台商品编号",
+    width: "150px",
   },
 
   {

+ 2 - 5
src/views/goodStore/goodsOnline/components/fixed-price-form.vue

@@ -335,7 +335,7 @@ export default {
     },
 
     openCostEditDelete(index) {
-      this.ladder_tableData.splice(index, 1);
+     this.ruleForm.good_ladder.splice(index, 1);
     },
     //阶梯成本修改
     costrefreshEdit(e) {
@@ -355,7 +355,7 @@ export default {
         this.ruleForm.good_ladder.push(item);
       } else {
         this.ruleForm.good_ladder.forEach((i, findex) => {
-          if (i.id === id && findex === parseInt(i.index)) {
+          if (findex === parseInt(index+"")) {
             this.ruleForm.good_ladder[findex].id = id;
             this.ruleForm.good_ladder[findex].sale_price = sale_price;
             this.ruleForm.good_ladder[findex].market_price = market_price;
@@ -365,9 +365,6 @@ export default {
             this.ruleForm.good_ladder[findex].id_del = is_del;
           }
         });
-        // this.ladder_tableData = this.ladder_tableData.sort(
-        //   this.dataSort("min_num")
-        // );
       }
       this.showModel = false;
     },

+ 8 - 7
src/views/goodStore/goodsOnline/detail.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="goodsOnlineDetail">
-    {{ status }}-{{ powers }}
+    <!-- {{ status }}-{{ powers }} -->
     <div
       class="goodsOnlineDetail-main"
       v-if="powers && powers.length > 0 && powers.some((item) => item == '007')"
@@ -85,6 +85,12 @@
                     }}天</span
                   >
                 </template>
+                <template slot="exclusive">
+                  <span v-for="(si, sii) in sitem.exclusive" :key="si.id">
+                    <span v-if="sii !== 0">/</span> <span>{{ si.name }}</span>
+                  </span>
+                </template>
+
                 <template slot="supply_area">
                   <el-tag
                     :size="'mini'"
@@ -387,7 +393,7 @@ export default {
         this.spuCode = spuCode;
         this.ladderlist = JSON.parse(JSON.stringify(ladderlist));
         this.nakelist = JSON.parse(JSON.stringify(nakelist));
-        console.log(this.ladderlist)
+        console.log(this.ladderlist);
         let cat = "";
         if (cat_info && cat_info.length > 0) {
           cat_info.forEach((e, i) => {
@@ -412,15 +418,10 @@ export default {
 </script>
    <style lang="scss" scoped>
 .goodsOnlineDetail {
-  position: relative;
-  height: 100%;
   width: 100%;
   box-sizing: border-box;
   .goodsOnlineDetail-main {
-    overflow-y: scroll;
-    position: relative;
     padding: 10px;
-    height: 100%;
     width: 100%;
   }
   .goodsOnlineDetail-title {

+ 38 - 36
src/views/goodStore/goodsOnline/index.vue

@@ -24,7 +24,29 @@
       <template #table-header="{}">
         <div style="width: 100%">
           <el-row style="padding: 0 0 10px 80px">
-            <el-col :span="6" style="width: 303px">
+             <el-col :span="4" style="width: 120px;">
+              <el-select
+                v-model="parmValue.good_type"
+                filterable
+                clearable
+                :size="searchSize"
+                placeholder="是否定制"
+                style="width: 100%"
+                @change="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+              >
+                <el-option
+                  v-for="item in options1"
+                  :key="'good_type' + item.id"
+                  :label="item.name"
+                  :value="item.id"
+                />
+              </el-select>
+            </el-col>
+            <el-col :span="6" style="width: 303px;padding:0 0 0 10px">
               <period-date-picker
                 :type="1"
                 :width="'135px'"
@@ -34,17 +56,7 @@
                 @timeReturned="handleTime"
               />
             </el-col>
-            <el-col :span="4" style="width: 130px">
-              <search-brand
-                :value="brandid"
-                :disabled="type === 'view' || type === 'editCoin'"
-                :size="'mini'"
-                :isDetail="type !== 'add'"
-                :names="brand_name"
-                :placeholder="'商品品牌'"
-                @searchChange="brandidsearchChange"
-              />
-            </el-col>
+           
             <el-col :span="6" style="width: 310px; padding: 0 0 0 10px">
               <good-class
                 :value="parmValue.cat_id"
@@ -77,7 +89,7 @@
           </el-row>
 
           <el-row>
-            <el-col :span="4" style="width: 215px">
+            <el-col :span="4" style="width: 200px">
               <el-select
                 v-model="parmValue.status"
                 filterable
@@ -99,29 +111,19 @@
                 />
               </el-select>
             </el-col>
-            <el-col :span="4" style="width: 158px; padding: 0 0 0 10px">
-              <el-select
-                v-model="parmValue.good_type"
-                filterable
-                clearable
-                :size="searchSize"
-                placeholder="是否定制"
-                style="width: 100%"
-                @change="
-                  pageInfo.curr = 1;
-                  parmValue.page = 1;
-                  searchList();
-                "
-              >
-                <el-option
-                  v-for="item in options1"
-                  :key="'good_type' + item.id"
-                  :label="item.name"
-                  :value="item.id"
-                />
-              </el-select>
+            <el-col :span="4" style="width: 240px;padding:0 0 0 10px">
+              <search-brand
+                :value="brandid"
+                :disabled="type === 'view' || type === 'editCoin'"
+                :size="'mini'"
+                :isDetail="type !== 'add'"
+                :names="brand_name"
+                :placeholder="'商品品牌'"
+                @searchChange="brandidsearchChange"
+              />
             </el-col>
-            <el-col :span="4" style="width: 513px; padding: 0 0 0 10px">
+
+            <el-col :span="4" style="width: 470px; padding: 0 0 0 10px">
               <el-input
                 :size="searchSize"
                 v-model="sinput"
@@ -183,7 +185,7 @@
       <template #status="{ scope }">
         <el-tag
           :size="tablebtnSize"
-          :type="scope.row.status == '0' ? '' : 'warning'"
+          :type="scope.row.status == '6' ? '' : scope.row.status == '7' ?'danger':'warning'"
           v-text="
             (options8.find((item) => item.id == scope.row.status) || {}).name ||
             '--'