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

+ 2 - 23
src/apis/service/goodStore/dealGoodsPool/index.js

@@ -2,29 +2,8 @@
 import http from "@/apis/axios";
 const api = "admin/";
 export default {
-  // 添加
-  add: (data, params) => http(api + "goodadd", data, "post", params),
-  // 删除
-  delete: (data, params) => http(api + "gooddel", data, "post", params),
   // 分页查询
-  list: (data, params) => http(api + "goodlist", data, "post", params),
-  // 详情
-  detail: (data, params) => http(api + "goodinfo", data, "post", params),
-  // 更改
-  update: (data, params) => http(api + "goodsave", data, "post", params),
-  // 更新状态
-  status: (data, params) => http(api + "goodstatus", data, "post", params),
-  // 复制
-  copy: (data, params) => http(api + "goodcopy", data, "post", params),
-  // 获取全部分类
-  catAll: (data, params) => http(api + "catAll", data, "post", params),
-  // 获取全部品牌
-  brandAll: (data, params) => http(api + "brandall", data, "post", params),
-  // 获取全部供应商账号
-  supplierAll: (data, params) => http(api + "supplierall", data, "post", params),
-  // 商品种类ID换取规格值
-  specByCat: (data, params) => http(api + "SpecByCat", data, "post", params),
-  // 规格属性值新建
-  specinfoadd: (data, params) => http(api + "specinfoadd", data, "post", params),
+  list: (data, params) => http(api + "zixunlist", data, "post", params),
+
 
 };

+ 6 - 0
src/mixins/resToken.js

@@ -12,6 +12,12 @@ export default {
         query: query,
       });
     },
+    async routeReGoto(path, query) {
+      window.vm.$router.replace({
+        path: path,
+        query: query,
+      });
+    },
     setNum(s) {
       return s ? parseFloat(s + "").toFixed(2) : "-";
     },

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

@@ -152,13 +152,11 @@ export default {
     },
     refresh(e) {
       const { spuCode } = e;
-      window.vm.$router.replace({
-        path: "activeDetail",
-        query: {
-          id: this.queryType === "add" ? spuCode : this.queryId,
-          type: "view",
-        },
-      });
+      let model = {
+        id: this.queryType === "add" ? spuCode : this.queryId,
+        type: "view",
+      };
+      this.routeReGoto("activeDetail", model);
     },
     async initData() {
       this.loading = true;

+ 431 - 0
src/views/goodStore/dealGoodsPool/columns.js

@@ -0,0 +1,431 @@
+
+//是否定制
+const options1 = [
+  { id: "0", name: "否" },
+  { id: "1", name: "是" },
+]
+//专属类型
+const options2 = [
+  { id: "0", name: "非泰康" },
+  { id: "1", name: "泰康" },
+]
+//销售权限
+const options3 = [
+  { id: "0", name: "无销售权限" },
+  { id: "1", name: "有销售权限" },
+]
+
+//是否库存品
+const options4 = [
+  { id: "0", name: "非库存品" },
+  { id: "1", name: "库存品" },
+]
+//是否启用实时金价
+const options5 = [
+  { id: "0", name: "否" },
+  { id: "1", name: "是" },
+]
+//供货区域
+const options6 = [
+  { id: "1", name: "全国" },
+  { id: "2", name: "全国除偏远" },
+]
+//是否启用阶梯
+const options7 = [
+  { id: "0", name: "否" },
+  { id: "1", name: "是" },
+]
+const listCol = [
+  {
+    prop: "spuCode",
+    label: "编号",
+    width: "160px",
+  },
+  {
+    prop: "good_thumb_img",
+    label: "图片",
+    _slot_: "good_thumb_img",
+    width: "45px",
+  },
+  {
+    prop: "good_name",
+    label: "名称",
+    "min-width": "160px",
+  },
+  {
+    prop: "cat_name",
+    label: "分类",
+  },
+  {
+    prop: "brand_name",
+    label: "品牌",
+  },
+  {
+    prop: "good_type",
+    label: "是否定制",
+    _slot_: "good_type",
+    width: "70px",
+  },
+  {
+    prop: "status",
+    label: "状态",
+    _slot_: "status",
+    width: "118px",
+  },
+  {
+    prop: "supplierNo",
+    label: "供应商编号",
+    width: "110px",
+  },
+  {
+    prop: "supplier_name",
+    label: "供应商名称",
+    width: "110px",
+  },
+  {
+    prop: "companyNo",
+    label: "业务公司编号",
+    width: "110px",
+  },
+  {
+    prop: "company",
+    label: "业务公司名称",
+    width: "110px",
+  },
+
+
+  {
+    prop: "addtime",
+    label: "创建时间",
+    width: "140px",
+  },
+  {
+    prop: "",
+    label: "操作",
+    fixed: "right",
+    _noset_: true,
+    width: "150px",
+    _slot_: "operation",
+  },
+]
+const rules = {
+  cat_id: [
+    {
+      type: "array",
+      required: true,
+      message: "商品分类",
+      trigger: "change",
+    },
+  ],
+  brandid: [
+    {
+      type: "array",
+      required: false,
+      message: "商品品牌",
+      trigger: "change",
+    },
+  ],
+  noble_weight: [
+    {
+      required: true,
+      message: "贵金属重量为合法数字",
+      trigger: "blur",
+    },
+  ],
+  weight: [
+    {
+      required: true,
+      message: "商品总重量为合法数字",
+      trigger: "blur",
+    },
+  ],
+  good_type: [
+    {
+      required: true,
+      message: "请选择是否定制",
+      trigger: "change",
+    },
+  ],
+  is_stock: [
+    {
+      required: true,
+      message: "请选择是否库存品",
+      trigger: "change",
+    },
+  ],
+  company_id: [
+    {
+      required: true,
+      message: "请选择业务公司",
+      trigger: "change",
+    },
+  ],
+  supplierNo: [
+    {
+      type: "array",
+      required: true,
+      message: "请选择供应商",
+      trigger: "change",
+    },
+  ],
+  is_auth: [
+    {
+      required: true,
+      message: "商品主图",
+      trigger: "change",
+    },
+  ],
+  tax: [
+    {
+      required: true,
+      message: "请选择税率",
+      trigger: "change",
+    },
+  ],
+  good_name: [
+    {
+      required: true,
+      message: "请输入商品名称",
+      trigger: "blur",
+    },
+  ],
+  unit: [
+    {
+      type: "array",
+      required: true,
+      message: "请输入商品单位",
+      trigger: "blur",
+    },
+  ],
+  is_exclusive: [
+    {
+      required: true,
+      message: "请选择专属类型",
+      trigger: "change",
+    },
+  ],
+  noble_metal: [
+    {
+      required: true,
+      message: "请选择贵金属种类",
+      trigger: "change",
+    },
+  ],
+  is_gold_price: [
+    {
+      required: true,
+      message: "请选择是否启用实时金价",
+      trigger: "change",
+    },
+  ],
+  moq: [
+    {
+      required: true,
+      message: "定制起订量应为合法数字",
+      trigger: "blur",
+    },
+  ],
+  customized: [
+    {
+      required: true,
+      message: "定制工期为合法数字",
+      trigger: "blur",
+    },
+  ],
+  after_sales: [
+    {
+      required: true,
+      message: "售后说明不能为空",
+      trigger: "blur",
+    },
+  ],
+  good_remark: [
+    {
+      required: true,
+      message: "商品备注不能为空",
+      trigger: "blur",
+    },
+  ],
+  //包装/发货/图片
+  packing_list: [
+    {
+      required: true,
+      message: "请输入包装清单",
+      trigger: "blur",
+    },
+  ],
+  packing_way: [
+    {
+      required: true,
+      message: "请输入包装方式",
+      trigger: "blur",
+    },
+  ],
+
+  packing_spec: [
+    {
+      required: true,
+      message: "请输入装箱规格",
+      trigger: "blur",
+    },
+  ],
+  packing_weight: [
+    {
+      required: true,
+      message: "请输入装箱重量",
+      trigger: "blur",
+    },
+  ],
+  packing_szie: [
+    {
+      required: true,
+      message: "请输入装箱尺寸",
+      trigger: "blur",
+    },
+  ],
+  supply_area: [
+    {
+      required: true,
+      message: "请选择供货区域",
+      trigger: "change",
+    },
+  ],
+  delivery_place: [
+    {
+      type: "array",
+      required: true,
+      message: "请选择发货地",
+      trigger: "change",
+    },
+  ],
+  origin_place: [
+    {
+      type: "array",
+      required: true,
+      message: "请选择产地",
+      trigger: "change",
+    },
+  ],
+  delivery_day: [
+    {
+      required: true,
+      message: "请输入物流时间",
+      trigger: "blur",
+    },
+  ],
+  lead_time: [
+    {
+      required: true,
+      message: "请输入供货周期",
+      trigger: "blur",
+    },
+  ],
+  sample_day: [
+    {
+      required: true,
+      message: "请输入调样周期",
+      trigger: "blur",
+    },
+  ],
+  packing_size: [
+    {
+      required: true,
+      message: "请输入装箱尺寸",
+      trigger: "blur",
+    },
+  ],
+  good_thumb_img: [
+    {
+      required: true,
+      message: "商品缩略图",
+      trigger: "change",
+    },
+  ],
+  // good_img: [
+  //   {
+  //     required: true,
+  //     message: "商品详情主图",
+  //     trigger: "change",
+  //   },
+  // ],
+  good_info_img: [
+    {
+      type: "array",
+      required: true,
+      message: "商品详情介绍图",
+      trigger: "change",
+    },
+  ],
+
+  //固定成本
+  cert_fee: [
+    {
+      required: true,
+      message: "证书费应为合法数字",
+      trigger: "blur",
+    },
+  ],
+  packing_fee: [
+    {
+      required: true,
+      message: "包装费应为合法数字",
+      trigger: "blur",
+    },
+  ],
+  cost_fee: [
+    {
+      required: true,
+      message: "成本工艺费应为合法数字",
+      trigger: "blur",
+    },
+  ],
+  mark_fee: [
+    {
+      required: true,
+      message: "加标费应为合法数字",
+      trigger: "blur",
+    },
+  ],
+  demo_fee: [
+    {
+      required: true,
+      message: "打样应为合法数字",
+      trigger: "blur",
+    },
+  ],
+  open_fee: [
+    {
+      required: true,
+      message: "开模费应为合法数字",
+      trigger: "blur",
+    },
+  ],
+  sample_fee: [
+    {
+      required: true,
+      message: "调样费应为合法数字",
+      trigger: "blur",
+    },
+  ],
+  market_price: [
+    {
+      required: true,
+      message: "市场价应为合法数字",
+      trigger: "blur",
+    },
+  ],
+  nake_price: [
+    {
+      required: true,
+      message: "含税成本合计应为合法数字",
+      trigger: "blur",
+    },
+  ],
+  is_step: {
+    required: true,
+    message: "请选择是否启用阶梯",
+    trigger: "change",
+  },
+}
+
+export { options1, options2, options3, options4, options5, options6, options7, listCol, rules }

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

@@ -307,13 +307,13 @@
           :total="count"
         ></el-pagination>
       </div>
-      <ladder-price
+      <!-- <ladder-price
         :showModel="showLadderPrice"
         :left="left"
         :right="right"
         :lang="lang"
         @cancel="showLadderPrice = false"
-      ></ladder-price>
+      ></ladder-price> -->
     
     </div>
     <div v-else>
@@ -324,7 +324,7 @@
    <script>
 import mixinPage from "@/mixins/elPaginationHandle";
 import asyncRequest from "@/apis/service/goodStore/goodsCost";
-import ladderPrice from "./ladderPrice";
+// import ladderPrice from "./ladderPrice";
 // import PeriodDatePicker from "@/components/PeriodDatePicker";
 import statusList from "@/assets/js/statusList";
 import { timestampToTime } from "@/utils/validate";
@@ -333,7 +333,7 @@ export default {
   name: "goodsCost",
   components: {
     // PeriodDatePicker,
-    ladderPrice,
+    // ladderPrice,
   },
   data() {
     return {

+ 0 - 92
src/views/goodStore/dealGoodsPool/imgShow.vue

@@ -1,92 +0,0 @@
-<template>
-  <el-dialog
-    :title="title"
-    :center="true"
-    align="left"
-    top="8vh"
-    width="600px"
-    @close="closeModel"
-    :close-on-click-modal="false"
-    :visible.sync="showModelThis"
-  >
-    <el-card>
-      <el-row :gutter="10" >
-        <el-col :span="24">
-          <img class="activeImg" :src="activeImg" alt="" />
-        </el-col>
-        <el-col :span="24" style="text-align: right;padding-top:10px"  v-if="imgList&&imgList.length>0">
-          <div class="img-box">
-            <img
-              @click="initForm(i)"
-              :class="{ active: activeIndex === i }"
-              v-for="(img, i) in imgList"
-              :key="'imgboxitem' + i"
-              :src="img"
-              alt=""
-            />
-          </div>
-        </el-col>
-      </el-row>
-    </el-card>
-  </el-dialog>
-</template>
-   <script>
-export default {
-  name: "dealGoodsPool",
-  props: ["showModel", "imgList", "index"],
-  data() {
-    return {
-      activeImg: "",
-      activeIndex: this.index,
-      showModelThis: this.showModel,
-    };
-  },
-  methods: {
-    closeModel() {
-      this.showModelThis = false;
-    },
-    initForm(index) {
-      this.activeIndex = index;
-      this.activeImg = this.imgList[index];
-    },
-  },
-  watch: {
-    showModel: function (val) {
-      this.showModelThis = val;
-      if (val) {
-        this.initForm(this.index);
-      }
-    },
-    showModelThis(val) {
-      if (!val) {
-        this.$emit("cancel");
-      }
-    },
-  },
-};
-</script>
-
-   <style lang="scss" scoped>
-.dealGoodsPool {
-  .activeImg {
-    display: inline-block;
-    width: 100%;
-  }
-  .img-box {
-    img {
-      width: 40px;
-      height: 40px;
-      display: inline-block;
-      margin: 0 3px;
-      border:1px solid transparent;
-      &.active {
-        border: 1px solid red;
-      }
-      &:hover {
-        cursor: pointer;
-      }
-    }
-  }
-}
-</style>
-   

+ 357 - 673
src/views/goodStore/dealGoodsPool/index.vue

@@ -1,61 +1,49 @@
 <template>
   <div class="dealGoodsPool pagePadding">
-    <div
+    <ex-table
+      v-loading="loading"
       v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
+      :table="table"
+      :data="tableData"
+      :columns="columns"
+      :page="pageInfo"
+      :size="size"
+      @page-curr-change="handlePageChange"
+      @page-size-change="handleSizeChange"
+      @screen-reset="
+        pageInfo.curr = 1;
+        parmValue.page = 1;
+        searchList();
+      "
+      @screen-submit="
+        pageInfo.curr = 1;
+        parmValue.page = 1;
+        searchList();
+      "
     >
-      <el-row style="margin-bottom: 10px">
-        <el-col :span="6" style="width: 316px">
-          <period-date-picker
-            :start="parmValue.start"
-            :end="parmValue.end"
-            :type="1"
-            :size="searchSize"
-            @timeReturned="timeReturned($event)"
-          ></period-date-picker>
-        </el-col>
-        <el-col :span="18" id="el-cor-full-style">
-          <el-row :gutter="10">
-            <el-col :span="6">
-              <el-cascader
-                v-model="parmValue.catid"
-                style="width: 100%"
-                filterable
+      <template #table-header="{}">
+        <div style="width: 100%">
+          <el-row style="padding: 0 0 10px 80px">
+            <el-col :span="6" style="width: 293px">
+              <period-date-picker
+                :type="1"
+                :width="'135px'"
                 :size="searchSize"
-                clearable
-                placeholder="商品分类"
-                :options="catOptions"
-                :props="{ expandTrigger: 'hover', checkStrictly: true }"
-                @change="handleChange"
-              ></el-cascader>
-            </el-col>
-            <el-col :span="6">
-              <el-select
-                v-model="parmValue.status"
-                filterable
-                clearable
-                :size="searchSize"
-                placeholder="请选择状态"
-                style="width: 100%"
-              >
-                <el-option
-                  v-for="item in statusList"
-                  :key="'status' + item.code"
-                  :label="item.name"
-                  :value="item.code"
-                />
-              </el-select>
+                :start="parmValue.start"
+                :end="parmValue.end"
+                @timeReturned="handleTime"
+              />
             </el-col>
-
-            <el-col :span="6">
+            <el-col :span="6" style="width: 270px; padding: 0 0 0 10px">
               <el-input
                 :size="searchSize"
                 style="100%"
                 v-model="parmValue.supplier_name"
                 :maxlength="40"
-                placeholder="供货商名称"
+                placeholder="商品名称"
               ></el-input>
             </el-col>
-            <el-col :span="6">
+            <el-col :span="6" style="width: 250px; padding: 0 0 0 10px">
               <el-input
                 :size="searchSize"
                 style="100%"
@@ -64,330 +52,162 @@
                 placeholder="商品编码"
               ></el-input>
             </el-col>
-          </el-row>
-        </el-col>
-      </el-row>
-      <el-row style="margin-bottom: 18px">
-        <el-col :span="6" style="width: 316px">
-          <el-input
-            :size="searchSize"
-            :maxlength="10"
-            placeholder="最低售价"
-            v-model="parmValue.sale_price_start"
-            style="width: 150px"
-          ></el-input>
-          <samp>至</samp>
-          <el-input
-            :size="searchSize"
-            :maxlength="10"
-            placeholder="最高售价"
-            v-model="parmValue.sale_price_end"
-            style="width: 150px"
-          ></el-input>
-        </el-col>
 
-        <el-col :span="18" id="el-cor-full-style">
-          <el-row :gutter="10">
-            <el-col :span="12">
+            <el-col
+              :span="3"
+              class="fr"
+              style="width: 66px; padding: 0 0 0 10px"
+            >
+              <el-button type="primary" :size="searchSize" @click="searchList">
+                刷新
+              </el-button>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="4" style="width: 518px">
               <el-input
                 :size="searchSize"
-                v-model="parmValue.goods_name"
+                v-model="sinput"
                 :maxlength="40"
-                placeholder="商品名称"
+                placeholder="关键字"
               >
-                <el-button
-                  slot="append"
-                  icon="el-icon-search"
-                  @click="searchList"
-                ></el-button>
+                <el-select
+                  v-model="select"
+                  slot="prepend"
+                  style="width: 130px"
+                  placeholder="关键词类型"
+                >
+                  <el-option label="业务公司编码" value="1" />
+                  <el-option label="业务公司名称" value="2" />
+                  <el-option label="供应商编码" value="3" />
+                  <el-option label="供应商名称" value="4" />
+                </el-select>
               </el-input>
             </el-col>
-            <el-col :span="12">
-              <el-button
-               v-if="powers.some((item) => item == '024')"
-                type="warning"
-                class="fl"
-                :size="searchSize"
-                @click="restSearch"
-              >
+            <el-col
+              :span="3"
+              class="fr"
+              style="width: 66px; padding: 0 0 0 10px"
+            >
+              <el-button type="warning" :size="searchSize" @click="restSearch">
                 重置
               </el-button>
-              <el-button
-               v-if="powers.some((item) => item == '002')"
-                type="primary"
-                :size="searchSize"
-                class="fr"
-                style="margin-left: 5px"
-                @click="searchList"
-              >
-                刷新
-              </el-button>
-              <el-button
-               v-if="powers.some((item) => item == '003')"
-                type="success"
-                :size="searchSize"
-                style="float: right"
-                @click="openModal('add', false)"
-              >
-                添加
-              </el-button>
             </el-col>
-          </el-row></el-col
-        >
-      </el-row>
-      <el-table
-        :data="tableData"
-        stripe
-        v-loading="loading"
-        border
-        :size="size"
-        style="width: 100%"
+          </el-row>
+        </div></template
       >
-        <el-table-column label="商品信息" align="left" min-width="165">
-          <template slot-scope="item">
-            <div class="good_name_title">
-              {{ item.row.good_name }}
-            </div>
-            <div
-              class="good_name_img"
-              v-if="item.row.galleyList && item.row.galleyList.length > 0"
-            >
-              <img
-                v-for="(img, i) in item.row.galleyList"
-                :key="item.row.id + 'goodimg' + i"
-                :src="img"
-                @click="showGalley(item.row.galleyList, i)"
-                alt=""
-              />
-            </div> </template
-        ></el-table-column>
-        <el-table-column label="供应商信息" show-overflow-tooltip align="left">
-          <template slot-scope="item">
-            <div v-if="item.row.supplier_info">
-              <div class="good_name_title">
-                企业:{{ item.row.supplier_info.company }}
-              </div>
-              <div class="good_name_title">
-                联系人:{{ item.row.supplier_info.name }}
-              </div>
-            </div>
-          </template></el-table-column
+
+      <template #good_thumb_img="{ scope }">
+        <div
+          v-if="scope.row.good_thumb_img"
+          style="width: 20px; height: 20px"
+          class="hover"
+          v-viewer
         >
-        <el-table-column
-          prop="good_code"
-          label="商品编码"
-          show-overflow-tooltip
-          align="center"
-        ></el-table-column>
-        <el-table-column
-          prop="catName"
-          label="商品分类"
-          show-overflow-tooltip
-          align="center"
-        ></el-table-column>
+          <img
+            :src="scope.row.good_thumb_img"
+            style="display: inline-block; width: 100%; height: 100%"
+            alt=""
+          />
+        </div>
+      </template>
+      <template #status="{ scope }">
+        <el-tag
+          :size="tablebtnSize"
+          :type="scope.row.status == '1' ? '' : 'warning'"
+          v-text="
+            (statusList.find((item) => item.code == scope.row.status) || {})
+              .name || '--'
+          "
+        ></el-tag>
+      </template>
+      <template #good_type="{ scope }">
+        <el-tag
+          :size="tablebtnSize"
+          :type="scope.row.good_type == '0' ? 'warning' : ''"
+          v-text="
+            (options1.find((item) => item.id == scope.row.good_type) || {})
+              .name || '--'
+          "
+        ></el-tag>
+      </template>
 
-        <el-table-column label="状态" show-overflow-tooltip align="center">
-          <template slot-scope="scope">
-            <el-tag
-              v-if="scope.row.status === '1'"
-              type="success"
-              :class="{ 'hover-tag': powers.some((item) => item == '004') }"
-              :size="tablebtnSize"
-              @click="
-                statusConfirm(
-                  scope.row.id,
-                  scope.row.status,
-                  powers.some((item) => item == '026')
-                )
-              "
-            >
-              <i
-                class="el-icon-thumb"
-                v-if="powers.some((item) => item == '026')"
-                style="margin-right: 1px"
-              ></i>
-              销售中</el-tag
-            >
-            <el-tag
-              v-else
-              :class="{ 'hover-tag': powers.some((item) => item == '026') }"
-              :size="tablebtnSize"
-              type="warning"
-              @click="
-                statusConfirm(
-                  scope.row.id,
-                  scope.row.status,
-                  powers.some((item) => item == '026')
-                )
-              "
-            >
-              <i
-                class="el-icon-thumb"
-                v-if="powers.some((item) => item == '026')"
-                style="margin-right: 1px"
-              ></i>
-              已下架</el-tag
-            >
-          </template>
-        </el-table-column>
-        <el-table-column
-          prop="addtime"
-          label="创建时间"
-          show-overflow-tooltip
-          align="center"
-        ></el-table-column>
-        <el-table-column fixed="right" label="操作" align="center">
-          <template slot-scope="scope">
-            <el-link
-              v-if="powers.some((item) => item == '011')"
-              type="primary"
-              style="margin: 0 4px"
-              :underline="false"
-              :size="tablebtnSize"
-              @click="
-                showPrice(
-                  scope.row.LimitPrice,
-                  scope.row.left,
-                  scope.row.right,
-                  scope.row.lang
-                )
-              "
-            >
-              价格
-            </el-link>
-            <el-link
-              v-if="powers.some((item) => item == '012')"
-              type="primary"
-              style="margin: 0 4px"
-              :underline="false"
-              :size="tablebtnSize"
-              @click="copy(scope.row.id)"
-            >
-              复制
-            </el-link>
-            <el-link
-              v-if="
-                scope.row.status === '0' && powers.some((item) => item == '005')
-              "
-              type="primary"
-              style="margin: 0 4px"
-              :underline="false"
-              :size="tablebtnSize"
-              @click="openModal(scope.row.id, false)"
-            >
-              修改
-            </el-link>
-            <el-link
-              v-if="powers.some((item) => item == '006')"
-              type="primary"
-              style="margin: 0 4px"
-              :underline="false"
-              :size="tablebtnSize"
-              @click="deleteById(scope.row.id, scope.row.status)"
-            >
-              删除
-            </el-link>
-          </template>
-        </el-table-column>
-      </el-table>
-      <div
-        class="Pagination"
-        style="text-align: right; margin-top: 10px"
-        v-show="count > 0"
-      >
-        <el-pagination
-          :size="searchSize"
-          @size-change="handleSizeChange"
-          @current-change="handlePageChange"
-          :current-page="parmValue.page"
-          :page-sizes="[10, 15, 20, 30, 40]"
-          :page-size="parmValue.size"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="count"
-        ></el-pagination>
-      </div>
-      <add-edit
-        :showModel="showModel"
-        :id="modelId"
-        :isDetail="isDetail"
-        @refresh="searchList"
-        @cancel="showModel = false"
-      ></add-edit>
-      <ladder-price
-        :showModel="showLadderPrice"
-        :left="left"
-        :right="right"
-        :lang="lang"
-        @cancel="showLadderPrice = false"
-      ></ladder-price>
-      <imgShow
-        :showModel="showImgModel"
-        :imgList="imgList"
-        :index="index"
-        @cancel="showImgModel = false"
-      ></imgShow>
-    </div>
-    <div v-else>
-      <no-auth></no-auth>
-    </div>
+      <template #operation="{ scope }">
+        <el-tooltip
+          v-if="powers.some((item) => item == '007')"
+          effect="dark"
+          content="详情"
+          placement="top"
+        >
+          <i
+            class="el-icon-view tb-icon"
+            @click="
+              routeGoto('dealGoodsPoolDetail', {
+                id: scope.row.spuCode,
+                type: 'view',
+              })
+            "
+          ></i>
+        </el-tooltip>
+        <el-tooltip
+          v-if="powers.some((item) => item == '054')"
+          effect="dark"
+          content="修改基础信息"
+          placement="top"
+        >
+          <i
+            class="el-icon-c-scale-to-original tb-icon"
+            @click="
+              routeGoto('dealGoodsPoolDetail', {
+                id: scope.row.spuCode,
+                type: 'editBase',
+              })
+            "
+          ></i>
+        </el-tooltip>
+        <el-tooltip
+          v-if="powers.some((item) => item == '053')"
+          effect="dark"
+          content="修改成本信息"
+          placement="top"
+        >
+          <i
+            class="el-icon-coin tb-icon"
+            @click="
+              routeGoto('dealGoodsPoolDetail', {
+                id: scope.row.spuCode,
+                type: 'editCoin',
+              })
+            "
+          ></i>
+        </el-tooltip>
+        <el-tooltip
+          v-if="powers.some((item) => item == '006')"
+          effect="dark"
+          content="删除"
+          placement="top"
+        >
+          <i
+            class="el-icon-delete tb-icon"
+            @click="deleteItem(scope.row.spuCode)"
+          ></i>
+        </el-tooltip>
+      </template>
+    </ex-table>
+    <no-auth v-else></no-auth>
   </div>
 </template>
-   <script>
-import mixinPage from "@/mixins/elPaginationHandle";
+<script>
 import asyncRequest from "@/apis/service/goodStore/dealGoodsPool";
-import addEdit from "./addEdit";
-import ladderPrice from "./ladderPrice";
-import imgShow from "./imgShow";
-// import PeriodDatePicker from "@/components/PeriodDatePicker";
-import statusList from "@/assets/js/statusList";
-import { timestampToTime } from "@/utils/validate";
+import mixinPage from "@/mixins/elPaginationHandle";
 import { mapGetters } from "vuex";
+import resToken from "@/mixins/resToken";
+import { listCol, options1 } from "./columns";
 export default {
   name: "dealGoodsPool",
-  components: {
-    addEdit,
-    // PeriodDatePicker,
-    ladderPrice,
-    imgShow,
-  },
-  data() {
-    return {
-      imgList: [],
-      index: 0,
-      showImgModel: false,
-      statusList: statusList,
-      catOptions: [],
-      showLadderPrice: false,
-      loading: false,
-      showModel: false,
-      isDetail: false,
-      modelId: 0,
-      left: {},
-      right: {},
-      lang: "0px",
-      parmValue: {
-        catid: "", //种类id
-        start: "", //起始时间,
-        end: "", //结束时间
-        sale_price_start: "", //最低售价
-        sale_price_end: "", //最高售价
-        status: "",
-        goods_name: "", //商品名称
-        good_code: "", //商品code
-        supplier_name: "", //供货商
-        page: 1, // 页码
-        size: 10, // 每页显示条数
-      },
-      count: 0, // 总条数
-      tableData: [],
-      headLadder: {
-        num: "起订量≥",
-        price: "成本价",
-      },
-    };
-  },
-  mixins: [mixinPage],
+  mixins: [mixinPage, resToken],
   computed: {
+    //组件SIZE设置
     ...mapGetters(["tablebtnSize", "searchSize", "size"]),
     powers() {
       let tran =
@@ -401,374 +221,238 @@ export default {
       }
     },
   },
+  data() {
+    return {
+      select: "1",
+      sinput: "",
+      statusList: [
+        {
+          code: "0",
+          name: "新建待审核",
+        },
+        {
+          code: "1",
+          name: "审核通过",
+        },
+        {
+          code: "2",
+          name: "基础修改待审核",
+        },
+        {
+          code: "3",
+          name: "成本修改待审核",
+        },
+      ],
+
+      options1: options1,
+      loading: false,
+      parmValue: {
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+        start: "",
+        end: "",
+        status: "",
+        creater: "",
+      },
+
+      // 表格 - 数据
+      tableData: [],
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"],
+      },
+      // 表格 - 分页
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0,
+      },
+      // 表格 - 列参数
+      columns: listCol,
+      supplierNo: [],
+      cat_id: [],
+      brandid: [],
+    };
+  },
   mounted() {
+    this.supplierNo = [];
+    this.cat_id = [];
+    this.brandid = [];
     this.searchList();
-    this.getAllCat();
   },
-
   methods: {
     restSearch() {
+      this.supplierNo = [];
+      this.cat_id = [];
+      this.brandid = [];
+      // 表格 - 分页
+      this.pageInfo = {
+        size: 15,
+        curr: 1,
+        total: 0,
+      };
       this.parmValue = {
-        catid: "", //种类id
-        start: "", //起始时间,
-        end: "", //结束时间
-        sale_price_start: "", //最低售价
-        sale_price_end: "", //最高售价
-        status: "",
-        goods_name: "", //商品名称
-        good_code: "", //商品code
-        supplier_name: "", //供货商
         page: 1, // 页码
-        size: 10, // 每页显示条数
+        size: 15, // 每页显示条数
+        start: "",
+        end: "",
+        status: "",
+        creater: "",
       };
       this.searchList();
     },
-    async handleChange() {
-      this.parmValue.page = 1;
-      await this.searchList();
-    },
-    async timeReturned(e) {
-      if (e.startTime !== "") {
-        this.parmValue.start = timestampToTime(e.startTime);
-      } else {
-        this.parmValue.start = "";
-      }
 
-      if (e.endTime !== "") {
-        this.parmValue.end = timestampToTime(e.endTime);
-      } else {
-        this.parmValue.end = "";
-      }
-      if (this.parmValue.start !== "" && this.parmValue.end !== "") {
-        this.parmValue.page = 1;
-        await this.searchList();
-      }
-    },
-    openModal(id, isDetail) {
-      if (id !== "add") {
-        this.$message.warning("正在开发中!");
-      } else {
-        this.showModel = true;
-        this.modelId = id;
-        this.isDetail = isDetail;
-      }
-    },
-    showGalley(list, i) {
-      this.imgList = list;
-      this.index = i;
-      this.showImgModel = true;
-    },
-    async copy(id) {
-      let res = await asyncRequest.copy({ id: id });
-      if (res.code === 0) {
-        this.$notify.success({
-          title: "商品复制成功!",
-          message: "",
-        });
-        this.searchList();
-      }
-    },
-    async deleteById(id, status) {
-      if (status === "0") {
-        await this.$confirm("确定要删除该商品?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        })
-          .then(async () => {
-            let res = await asyncRequest.delete({ goodids: id });
-            if (res.code === 0) {
-              this.$notify.success({
-                title: "删除成功",
-                message: "",
-              });
-              this.searchList();
-            }
-          })
-          .catch(() => {
-            console.log("取消");
-          });
+    //供应商选择
+    async supplierNosearchChange(e) {
+      console.log(e);
+      const { id, code, label } = e;
+      if (id) {
+        this.supplierNo = [code];
       } else {
-        this.$message.warning("只有已下架的商品才能被删除!");
+        this.supplierNo = [code];
       }
+      this.parmValue.supplierNo = this.supplierNo.toString();
+      this.pageInfo.curr = 1;
+      this.parmValue.page = 1;
+      await this.searchList();
     },
-    showPrice(attr, left, right, lang) {
-      if (attr && attr.length > 0) {
-        this.left = left;
-        this.right = right;
-        this.lang = lang;
-        this.showLadderPrice = true;
+    //业务企业选择
+    async company_idsearchChange(e) {
+      const { id, code, label } = e;
+      if (id) {
+        this.parmValue.company_id = code;
       } else {
-        this.$message.warning("该商品暂无阶梯价格信息!");
+        this.parmValue.company_id = "";
       }
+      this.pageInfo.curr = 1;
+      this.parmValue.page = 1;
+      await this.searchList();
     },
-    async searchList() {
-      let obj = JSON.parse(JSON.stringify(this.parmValue));
-
-      if (obj.catid === "") {
-        obj.catid = "0";
-      }
-      this.loading = true;
-      let res = await asyncRequest.list(obj);
-      if (res.code === 0 && res.data) {
-        let list = res.data.list;
-
-        list = list.map((v1) => {
-          v1.catName = "";
-          v1.galleyList = v1.galley.split(",");
-          v1.addtime = v1.addtime.replaceAll(".000", "");
-          if (v1 && v1.cat && v1.cat.length > 0) {
-            v1.cat.forEach((v2, index) => {
-              v1.catName += index !== 0 ? "/" + v2.cat_name : v2.cat_name;
-            });
-          } else {
-            v1.catName = "";
-          }
-          if (v1 && v1.LimitPrice && v1.LimitPrice.length > 0) {
-            v1.left = {
-              header: [],
-              spec: [],
-            };
-            v1.right = {
-              header: [],
-              spec: [],
-            };
-            v1.left.header = v1.LimitPrice[0].spec;
-            v1.lang = v1.left.header.length * 100 + "px";
-            let ladderNum = 0;
-            v1.LimitPrice.forEach((a) => {
-              if (a.limit && a.limit.length > ladderNum) {
-                ladderNum = a.limit.length;
-              }
-              if (a.spec && a.spec.length > 0) {
-                v1.left.spec.push(a.spec);
-              }
-            });
-            for (let i = 0; i < ladderNum; i++) {
-              v1.right.header.push(this.headLadder);
-            }
-
-            v1.right.spec = v1.LimitPrice;
-            v1.right.spec.map((v1) => {
-              if (v1.limit && v1.limit.length > 0) {
-                for (let j = 0; j < ladderNum; j++) {
-                  if (!v1.limit[j]) {
-                    v1.limit.push({
-                      begin_num: "",
-                      shop_price: "",
-                    });
-                  }
-                }
-              }
-            });
-          }
-          return v1;
-        });
-        this.tableData = list;
-        this.count = Number(res.data.count);
+    //商品品牌选择
+    async brandidsearchChange(e) {
+      const { id, code, label } = e;
+      if (id) {
+        this.brandid = [id];
       } else {
-        this.tableData = [];
-        this.count = 0;
+        this.brandid = [];
       }
-      this.loading = false;
+      this.ruleForm.brandid = this.this.brandid.toString();
+      this.pageInfo.curr = 1;
+      this.parmValue.page = 1;
+      await this.searchList();
     },
-    async getAllCat() {
-      const res = await asyncRequest.catAll({});
-      if (res.code === 0 && res.data) {
-        let list = res.data;
-        list.map((v1) => {
-          v1.value = v1.id;
-          v1.label = v1.cat_name;
-          if (v1.child && v1.child.length > 0) {
-            v1.child.map((v2) => {
-              v2.value = v2.id;
-              v2.label = v2.cat_name;
-              if (v2.child && v2.child.length > 0) {
-                v2.child.map((v3) => {
-                  v3.value = v3.id;
-                  v3.label = v3.cat_name;
-                  return v3;
-                });
-                v2.children = v2.child;
-              }
-              return v2;
-            });
-            v1.children = v1.child;
-          }
-          return v1;
-        });
-        this.catOptions = list;
+    // 时间
+    async handleTime(e) {
+      this.parmValue.start = e.startTime || "";
+      this.parmValue.end = e.endTime || "";
+      if (
+        (this.parmValue.start !== "" && this.parmValue.end !== "") ||
+        (this.parmValue.start === "" && this.parmValue.end === "")
+      ) {
+        this.pageInfo.curr = 1;
+        this.parmValue.page = 1;
+        await this.searchList();
       }
     },
-    async statusConfirm(id, status, type) {
-      if (!type) {
-        return;
-      }
-      await this.$confirm(
-        `确定要改为${status === "1" ? "已下架" : "销售中"}?`,
-        {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        }
-      )
+    /**
+     * 启用/禁用
+     * @param {String} id id
+     * @param {String} status 0-禁用 1-启用
+     */
+    async changeStatus(id, status) {
+      await this.$confirm(`确定要改为${status === "0" ? "禁用" : "启用"}?`, {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
         .then(async () => {
           this.loading = true;
           const model = {
-            goodids: id,
+            id: id,
             status: status === "1" ? "0" : "1",
           };
           const res = await asyncRequest.status(model);
-          if (res.code === 0) {
+          if (res && res.code === 0) {
             this.loading = false;
             this.$notify.success({
               title: "状态修改成功!",
               message: "",
             });
             await this.searchList();
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
           } else {
             this.loading = false;
+            this.$message.warning(res.message);
+          }
+        })
+        .catch(() => {
+          console.log("取消");
+        });
+    },
+    async deleteItem(code) {
+      await this.$confirm("确定要删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          const model = {
+            codes: [code],
+          };
+          const res = await asyncRequest.delete(model);
+          if (res && res.code === 0) {
+            this.$notify.success({
+              title: "删除成功",
+              message: "",
+            });
+            this.searchList();
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
+          } else {
+            this.$message.warning(res.message);
           }
         })
         .catch(() => {
           console.log("取消");
         });
     },
+    // 刷新表格
+    async searchList() {
+      this.loading = true;
+      const res = await asyncRequest.list(this.parmValue);
+      if (res && res.code === 0 && res.data) {
+        this.tableData = res.data.list;
+        this.tableData.forEach((a) => {
+          a.cat_name = "";
+          let list = a.cat_info || [];
+          list.forEach((b, i) => {
+            a.cat_name += i == 0 ? b.name : "/" + b.name;
+          });
+        });
+        this.pageInfo.total = Number(res.data.count);
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+        this.pageInfo.total = 0;
+      }
+      this.loading = false;
+    },
+    //商品分类选择
+    async goods_class_change(e) {
+      const { value } = e;
+      this.cat_id = value || [];
+      this.pageInfo.cat_id = this.cat_id.toString();
+      this.pageInfo.curr = 1;
+      this.parmValue.page = 1;
+      await this.searchList();
+    },
   },
 };
 </script>
-   <style lang="scss" scoped>
-.dealGoodsPool {
-  $gBC: #dfe6ec;
-  .list-table {
-    position: relative;
-    width: 100%;
-    border-top: 1px solid $gBC;
-    border-left: 1px solid $gBC;
-    .left {
-      position: absolute;
-      top: 0;
-      left: 0;
-      z-index: 2;
-      background: #fff;
-      .header {
-        width: 100%;
-        display: flex;
-        .header-item {
-          width: 100px;
-          flex: 1;
-          padding: 0 10px;
-          height: 50px;
-          line-height: 50px;
-          border-right: 1px solid $gBC;
-          border-bottom: 1px solid $gBC;
-        }
-      }
-      .header-body {
-        width: 100%;
-        position: relative;
-        .header-body-row {
-          width: 100%;
-          display: flex;
-          .heder-body-col {
-            flex: 1;
-            padding: 0 10px;
-            height: 30px;
-            border-right: 1px solid $gBC;
-            border-bottom: 1px solid $gBC;
-            line-height: 30px;
-          }
-        }
-      }
-    }
-    .right {
-      position: relative;
-      width: 100%;
-      display: block;
-      overflow-x: scroll;
-      .header {
-        width: 100%;
-        display: flex;
-        .header-col {
-          min-width: 240px;
-          flex: 1;
-          height: 50px;
-          line-height: 50px;
-
-          // position: relative;
-          .header-col-jieti {
-            height: 50px;
-            line-height: 50px;
-            // position: relative;
-            width: 100%;
-            .header-col-jieti-title {
-              // position: relative;
-              width: 100%;
-              line-height: 25px;
-              border-right: 1px solid $gBC;
-              border-bottom: 1px solid $gBC;
-              height: 25px;
-            }
-            .header-col-jieti-main {
-              // position: relative;
-              width: 100%;
-              .header-col-item {
-                // position: relative;
-                height: 25px;
-                line-height: 25px;
-                width: 50%;
-                border-right: 1px solid $gBC;
-                border-bottom: 1px solid $gBC;
-              }
-            }
-          }
-        }
-      }
-      .right-body {
-        position: relative;
-        .right-body-col {
-          position: relative;
-          width: 100%;
-          display: flex;
-          .right-body-col-item {
-            min-width: 240px;
-            flex: 1;
 
-            position: relative;
-            overflow: hidden;
-            .right-body-col-item-div {
-              position: relative;
-              height: 30px;
-              line-height: 30px;
-              width: 50%;
-              padding: 0 10px;
-              border-right: 1px solid $gBC;
-              border-bottom: 1px solid $gBC;
-            }
-          }
-        }
-      }
-    }
-  }
-  .good_name_img {
-    position: relative;
-    width: 156px;
-    img {
-      position: relative;
-      width: 30px;
-      height: 30px;
-      display: inline-block;
-      border-top: 1px solid #dfe6ec;
-      border-right: 1px solid #dfe6ec;
-      border-bottom: 1px solid #dfe6ec;
-      &:hover {
-        cursor: pointer;
-      }
-      &:first-child {
-        border-left: 1px solid #dfe6ec;
-      }
-    }
-  }
-}
+<style lang="scss" scoped>
 </style>
-   

+ 0 - 258
src/views/goodStore/dealGoodsPool/ladderPrice.vue

@@ -1,258 +0,0 @@
-<template>
-  <el-dialog
-    :title="title"
-    :center="true"
-    align="left"
-    top="12vh"
-    width="1040px"
-    @close="closeModel"
-    :close-on-click-modal="false"
-    :visible.sync="showModelThis"
-  >
-  <el-card>
-      <el-row :gutter="10">
-        <el-col :span="24">
-          <div
-            v-if="
-              left &&
-              left.header &&
-              left.header.length > 0 &&
-              right &&
-              right.header &&
-              right.header.length > 0
-            "
-          >
-            <div class="list-table clearfix">
-              <div class="left" :style="{ width: lang }">
-                <div class="header">
-                  <div
-                    class="header-item"
-                    v-for="(lhead, lhi) in left.header"
-                    :key="'lhead' + lhi"
-                  >
-                    {{ lhead.spec_name }}
-                  </div>
-                </div>
-                <div
-                  class="header-body"
-                  v-if="left.spec && left.spec.length > 0"
-                >
-                  <div
-                    class="header-body-row"
-                    v-for="(lhr, lhri) in left.spec"
-                    :key="'lheadrow' + lhri"
-                  >
-                    <div
-                      class="heder-body-col"
-                      v-for="(lhc, lhci) in lhr"
-                      :key="'lheadcol' + lhci"
-                    >
-                      {{ lhc.spec_value }}
-                    </div>
-                  </div>
-                </div>
-              </div>
-              <div class="right" :style="{ paddingLeft: lang }">
-                <div class="header">
-                  <div
-                    class="header-col clearfix"
-                    v-for="(lhr, lhri) in right.header"
-                    :key="'lheadr' + lhri"
-                  >
-                    <div class="header-col-jieti clearfix">
-                      <div class="header-col-jieti-title tc clearfix">
-                        阶梯{{ lhri + 1 }}
-                      </div>
-                      <div class="header-col-jieti-main clearfix">
-                        <div class="header-col-item fl tc">{{ lhr.num }}</div>
-                        <div class="header-col-item fl tc">{{ lhr.price }}</div>
-                      </div>
-                    </div>
-                  </div>
-                </div>
-                <div
-                  class="right-body"
-                  v-if="right.spec && right.spec.length > 0"
-                >
-                  <div
-                    class="right-body-col"
-                    v-for="(lbr, lbri) in right.spec"
-                    :key="'lbodyr' + lbri"
-                  >
-                    <div
-                      class="right-body-col-item clearfix"
-                      v-for="(lbritem, lbritemi) in lbr.limit"
-                      :key="'lbritem' + lbritemi"
-                    >
-                      <div class="right-body-col-item-div fl tc">
-                        {{ lbritem.begin_num }}
-                      </div>
-                      <div class="right-body-col-item-div fl tc">
-                        {{ lbritem.shop_price }}
-                      </div>
-                    </div>
-                  </div>
-                </div>
-              </div>
-            </div>
-          </div>
-          <div v-else class="tc">
-            <el-tag type="warning">暂无阶梯价!</el-tag>
-          </div>
-        </el-col>
-      </el-row>
-    </el-card>
-  </el-dialog>
-</template>
-   <script>
-export default {
-  name: "dealGoodsPool",
-  props: ["showModel", "left", "right", "lang"],
-  data() {
-    return {
-      loading: true,
-      title: "商品阶梯价格",
-       showModelThis: this.showModel,
-    };
-  },
-  methods: {
-    closeModel(e) {
-      console.log(e);
-      this.showModelThis = false;
-    },
-    async initForm() {
-      this.loading = false;
-    },
-  },
-  watch: {
-    showModel: function (val) {
-      this.showModelThis = val;
-      if (val) {
-        this.initForm();
-      }
-    },
-    showModelThis(val) {
-      if (!val) {
-        this.$emit("cancel");
-      }
-    },
-  },
-};
-</script>
-
-   <style lang="scss" scoped>
-.dealGoodsPool {
-  $gBC: #dfe6ec;
-  .list-table {
-    position: relative;
-    width: 100%;
-    border-top: 1px solid $gBC;
-    border-left: 1px solid $gBC;
-    .left {
-      position: absolute;
-      top: 0;
-      left: 0;
-      z-index: 2;
-      background: #fff;
-      .header {
-        width: 100%;
-        display: flex;
-        .header-item {
-          width: 100px;
-          flex: 1;
-          padding: 0 10px;
-          height: 64px;
-          line-height: 64px;
-          border-right: 1px solid $gBC;
-          border-bottom: 1px solid $gBC;
-        }
-      }
-      .header-body {
-        width: 100%;
-        position: relative;
-        .header-body-row {
-          width: 100%;
-          display: flex;
-          .heder-body-col {
-            flex: 1;
-            padding: 0 10px;
-            height: 38px;
-            border-right: 1px solid $gBC;
-            border-bottom: 1px solid $gBC;
-            line-height: 38px;
-          }
-        }
-      }
-    }
-    .right {
-      position: relative;
-      width: 100%;
-      display: block;
-      overflow-x: scroll;
-      .header {
-        width: 100%;
-        display: flex;
-        .header-col {
-          min-width: 220px;
-          flex: 1;
-          height: 64px;
-          line-height: 64px;
-
-          // position: relative;
-          .header-col-jieti {
-            height: 64px;
-            line-height: 64px;
-            // position: relative;
-            width: 100%;
-            .header-col-jieti-title {
-              // position: relative;
-              width: 100%;
-              line-height: 32px;
-              border-right: 1px solid $gBC;
-              border-bottom: 1px solid $gBC;
-              height: 32px;
-            }
-            .header-col-jieti-main {
-              // position: relative;
-              width: 100%;
-              .header-col-item {
-                // position: relative;
-                height: 32px;
-                line-height: 32px;
-                width: 50%;
-                border-right: 1px solid $gBC;
-                border-bottom: 1px solid $gBC;
-              }
-            }
-          }
-        }
-      }
-      .right-body {
-        position: relative;
-        .right-body-col {
-          position: relative;
-          width: 100%;
-          display: flex;
-          .right-body-col-item {
-            min-width: 220px;
-            flex: 1;
-
-            position: relative;
-            overflow: hidden;
-            .right-body-col-item-div {
-              position: relative;
-              height: 38px;
-              line-height: 38px;
-              width: 50%;
-              padding: 0 10px;
-              border-right: 1px solid $gBC;
-              border-bottom: 1px solid $gBC;
-            }
-          }
-        }
-      }
-    }
-  }
-}
-</style>
-   

+ 19 - 20
src/views/goodStore/goodsCost/detail.vue

@@ -27,17 +27,17 @@
                 @refresh="refresh"
               />
             </el-collapse-item>
-            <el-collapse-item title="采购部门审批" name="1"> 
-                 <exam-form
+            <el-collapse-item title="采购部门审批" name="1">
+              <exam-form
                 :statusList="statusList"
                 :newTime="newTime"
                 :disabled="false"
                 :isMust="false"
                 @searchChange="examForm"
               />
-              
-              123 </el-collapse-item>
-           
+
+              123
+            </el-collapse-item>
           </el-collapse>
         </el-tab-pane>
         <el-tab-pane label="审批记录" name="2" v-if="queryType !== 'add'">
@@ -78,10 +78,10 @@ export default {
 
   data() {
     return {
-      statusList:[],
+      statusList: [],
       size: "small",
       activeTabs: "1",
-      activeNames: ["0",'1'],
+      activeNames: ["0", "1"],
       newTime: "",
       loading: false,
       queryType: "",
@@ -109,16 +109,16 @@ export default {
 
       this.loading = false;
     },
-       // 点击业务审核的保存按钮
-       
+    // 点击业务审核的保存按钮
+
     async examForm(e) {
-      console.log(e)
+      console.log(e);
       if (!this.loading) {
         let type = e.state === "1" ? "1" : e.rebut;
         await this.setstatus(type, "提交采购部门审核", e.remark);
       }
     },
-     async setstatus(type, detail, remark) {
+    async setstatus(type, detail, remark) {
       await this.$confirm(`确定要${detail}?`, {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
@@ -136,7 +136,7 @@ export default {
               title: "提交成功!",
               message: "",
             });
-            await this.initForm();;
+            await this.initForm();
           } else if (res && res.code >= 100 && res.code <= 104) {
             await this.logout();
           } else {
@@ -151,14 +151,13 @@ export default {
       console.log(row);
     },
     refresh(e) {
-        const { spuCode } = e;
-        window.vm.$router.replace({
-          path: "goodsCostDetail",
-          query: {
-            id: this.queryType==='add'?spuCode:this.queryId,
-            type: "view",
-          },
-        });
+      const { spuCode } = e;
+
+      let model = {
+        id: this.queryType === "add" ? spuCode : this.queryId,
+        type: "view",
+      };
+      this.routeReGoto("goodsCostDetail", model);
     },
     async initData() {
       this.loading = true;

+ 90 - 0
src/views/goodStore/goodsOnline/ShowDataTableColumns.js

@@ -0,0 +1,90 @@
+export default [
+  {
+    prop: "spuCode",
+    label: "商品编号",
+  },
+  {
+    prop: "creater",
+    label: "申请人"
+  },
+  {
+    prop: "supplierName",
+    label: "供应商名称",
+  },
+  {
+    prop: "company",
+    label: "业务企业名称",
+  },
+  {
+    prop: "good_name",
+    label: "商品名称",
+  },
+  {
+    prop: "platform_name",
+    label: "上线平台"
+  },
+  {
+    prop: "platform_name",
+    label: "上线平台商品编码"
+  },
+  {
+    prop: "online_time",
+    label: "上线时间"
+  },
+  {
+    prop: "online_reason",
+    label: "上线原因"
+  },
+  {
+    prop: "online_remark",
+    label: "上线备注",
+  },
+
+  {
+    prop: "cat",
+    label: "分类",
+  },
+  {
+    prop: "brand_name",
+    label: "品牌",
+  },
+  {
+    prop: "unit",
+    label: "单位",
+  },
+
+  {
+    prop: "diff_weight",
+    label: "供应商权限",
+  },
+  {
+    prop: "diff_price",
+    label: "金额差价",
+  },
+  {
+    prop: "gold_price",
+    label: "实时金价",
+  },
+
+  // {
+  //   prop: "good_price",
+  //   label: "商品单价",
+  // },
+
+  {
+    prop: "status",
+    label: "状态",
+    _slot_: "status",
+  },
+  {
+    prop: "updatetime",
+    label: "更新时间",
+  },
+  {
+    prop: "addtime",
+    label: "创建时间",
+  },
+
+
+]
+

+ 19 - 81
src/views/goodStore/goodsOnline/add.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="goodsOnlineAdd pagePadding">
+  <div class="goodsOnlineAdd">
     <div
       class="goodsOnlineAdd-main"
       v-if="powers && powers.length > 0 && powers.some((item) => item == '007')"
@@ -28,7 +28,7 @@
             </el-form-item>
             <el-form-item label="上线原因" prop="online_reason">
               <el-input
-                :disabled="type === 'view' || type === 'editCoin'"
+                :disabled="false"
                 placeholder="上线原因"
                 v-model="ruleForm.online_reason"
                 maxlength="200"
@@ -40,14 +40,14 @@
               <el-input
                 type="textarea"
                 :rows="3"
-                :disabled="type === 'view' || type === 'editCoin'"
+                :disabled="false"
                 placeholder="商品备注"
                 maxlength="2000"
                 v-model="ruleForm.online_remark"
               />
             </el-form-item>
           </el-col>
-          <el-col>
+          <el-col :span="24">
             <el-table
               :data="tableData"
               stripe
@@ -149,27 +149,21 @@
                   <el-tooltip
                     class="item"
                     effect="dark"
-                    content="添加规格类型"
+                    content="添加上线商品"
                     placement="top"
                   >
                     <i
                       class="el-icon-circle-plus-outline fr"
                       style="font-size: 18px; margin-top: 2px"
-                      @click="openEdit('-1', {})"
+                      @click="showModel = true"
                     />
                   </el-tooltip>
                 </template>
                 <template slot-scope="scope">
-                  <el-tooltip effect="dark" content="修改" placement="top">
-                    <i
-                      class="el-icon-edit tb-icon"
-                      @click="openEdit(scope.$index, scope.row)"
-                    ></i>
-                  </el-tooltip>
                   <el-tooltip effect="dark" content="删除" placement="top">
                     <i
                       class="el-icon-delete tb-icon"
-                      @click="openCostEditDelete(scope.$index)"
+                      @click="openDel(scope.$index)"
                     ></i>
                   </el-tooltip>
                 </template>
@@ -180,6 +174,7 @@
               :showModel="showModel"
               :once="false"
               @resultList="resultList"
+              @cancel="showModel = false"
             />
           </el-col>
           <el-col :span="24" style="text-align: right; padding: 15px 0 15px 0">
@@ -257,23 +252,12 @@ export default {
       await this.resetForm();
       this.loading = false;
     },
-    handleClick(row) {
-      console.log(row);
-    },
-    openEdit(index, sitem) {
-      this.modelIndex = index;
-      this.sitem = sitem;
-      this.showModel = true;
-    },
-    openCostEdit(index, sitem) {
-      this.costmodelIndex = index;
-      this.costsitem = sitem;
-      this.costshowModel = true;
-    },
-    openCostEditDelete(index) {
+
+    openDel(index) {
       this.tableData.splice(index, 1);
     },
     resultList(e) {
+      this.showModel = false;
       let list = JSON.parse(JSON.stringify(e));
       let oldList = JSON.parse(JSON.stringify(this.tableData));
       list.forEach((e, ei) => {
@@ -295,14 +279,16 @@ export default {
           });
           model.platform = model.platform.toString();
           let res = await asyncRequest.add(model);
-          console.log(res);
           this.loading = false;
           if (res && res.code === 0) {
+            const { spuCode } = res.data;
             this.$notify.success({
               title: "新建成功",
               message: "",
             });
-            this.routeGoto("goodsOnline", {});
+            this.showModelThis = false;
+            // 刷新
+            this.routeReGoto("goodsOnline", {});
           }
         } else {
           console.log("error submit!!");
@@ -312,13 +298,13 @@ export default {
     },
 
     resetFormData() {
-      this.tableData = [];
       this.ruleForm = {
         platform: [], //string	平台id
         codes: [], //string	无
         online_reason: "", //string	上线原因
         online_remark: "", //string	上线备注
       };
+      this.tableData = [];
     },
     async resetForm() {
       // 重置
@@ -341,57 +327,9 @@ export default {
 };
 </script>
    <style lang="scss" scoped>
-.goodsOnlineDetail {
-  // position: relative;
-  .good_info_img_div {
-    ul {
-      width: 100%;
-      li {
-        float: left;
-        width: 107px;
-        height: 107px;
-        padding: 0 5px 0 0;
-        .img-show-li-div {
-          width: 102px;
-          height: 102px;
-          border: 1px solid #dfe4ed;
-          background: #dfe4ed;
-          position: relative;
-          img.img-show {
-            width: 100%;
-            height: 100%;
-            position: relative;
-            display: inline-block;
-          }
-          i.el-icon-close {
-            position: absolute;
-            z-index: 2;
-            top: 0;
-            right: 0;
-            color: #dfe4ed;
-          }
-          &:hover {
-            i.el-icon-close {
-              cursor: pointer;
-              color: #63cbe7;
-            }
-          }
-        }
-      }
-    }
-  }
-
-  .goodsOnlineAdd-title {
-    border-top: 1px solid #ebeef5;
-    span {
-      height: 50px;
-      line-height: 50px;
-      font-family: "微软雅黑", sans-serif;
-      font-weight: 400;
-      font-style: normal;
-      font-size: 16fpx;
-      text-align: left;
-    }
+.goodsOnlineAdd {
+  .goodsOnlineAdd-main {
+    padding: 30px 20px 0 20px;
   }
 }
 </style>

+ 1 - 1
src/views/goodStore/goodsOnline/columns.js

@@ -104,7 +104,7 @@ const listCol = [
     label: "操作",
     fixed: "right",
     _noset_: true,
-    width: "150px",
+    width: "50px",
     _slot_: "operation",
   },
 ]

+ 0 - 413
src/views/goodStore/goodsOnline/components/baseForm.vue

@@ -1,413 +0,0 @@
-<template>
-  <el-form
-    :model="ruleForm"
-    status-icon
-    :rules="rulesThis"
-    ref="ruleForm"
-    :size="'mini'"
-    v-loading="loading"
-    label-width="110px"
-    class="demo-ruleForm"
-  >
-    <el-row>
-      <el-col :span="8">
-        <el-form-item label="所属平台" prop="platform">
-          <search-terrace
-            :value="ruleForm.platform"
-            :disabled="false"
-            :size="'mini'"
-            :isDetail="false"
-            :placeholder="'所属平台'"
-            @searchChange="platform_codesearchChange"
-          />
-        </el-form-item>
-        <el-form-item label="上线原因" prop="online_reason">
-          <el-input
-            :disabled="type === 'view' || type === 'editCoin'"
-            placeholder="上线原因"
-            v-model="ruleForm.online_reason"
-            maxlength="200"
-          />
-        </el-form-item>
-      </el-col>
-      <el-col :span="16">
-        <el-form-item label="上线备注" prop="online_remark">
-          <el-input
-            type="textarea"
-            :rows="3"
-            :disabled="type === 'view' || type === 'editCoin'"
-            placeholder="商品备注"
-            maxlength="2000"
-            v-model="ruleForm.online_remark"
-          />
-        </el-form-item>
-      </el-col>
-      <el-col v-if="type === 'add'">
-        <el-table
-          :data="tableData"
-          stripe
-          border
-          :size="'mini'"
-          style="width: 100%"
-        >
-          <el-table-column
-            prop="spuCode"
-            label="商品编号"
-            width="180"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            prop="good_thumb_img"
-            label="图片"
-            width="45"
-            show-overflow-tooltip
-          >
-            <template slot-scope="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>
-          </el-table-column>
-          <el-table-column
-            prop="good_name"
-            label="商品名称"
-            min-width="160"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            prop="cat_name"
-            label="分类"
-            min-width="110"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            prop="good_name"
-            label="品牌"
-            min-width="brand_name"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            prop="good_type"
-            label="是否定制"
-            min-width="70"
-            show-overflow-tooltip
-          >
-            <template slot-scope="scope">
-              <el-tag
-                :size="'mini'"
-                :type="scope.row.good_type == '1' ? '' : 'warning'"
-                v-text="
-                  (options1.find((item) => item.id == scope.row.status) || {})
-                    .name || '--'
-                "
-              ></el-tag>
-            </template>
-          </el-table-column>
-          <el-table-column
-            prop="supplierNo"
-            label="供应商编号"
-            width="110"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            prop="supplier_name"
-            label="供应商名称"
-            width="110"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            prop="companyNo"
-            label="业务公司编号"
-            width="110"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            prop="company"
-            label="业务公司名称"
-            width="110"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            fixed="right"
-            v-if="type === 'add' || type === 'editBase'"
-          >
-            <template slot="header" slot-scope="scope">
-              <span>操作</span>
-              <el-tooltip
-                class="item"
-                effect="dark"
-                content="添加规格类型"
-                placement="top"
-              >
-                <i
-                  class="el-icon-circle-plus-outline fr"
-                  style="font-size: 18px; margin-top: 2px"
-                  @click="openEdit('-1', {})"
-                />
-              </el-tooltip>
-            </template>
-            <template slot-scope="scope">
-              <el-tooltip effect="dark" content="修改" placement="top">
-                <i
-                  class="el-icon-edit tb-icon"
-                  @click="openEdit(scope.$index, scope.row)"
-                ></i>
-              </el-tooltip>
-              <el-tooltip effect="dark" content="删除" placement="top">
-                <i
-                  class="el-icon-delete tb-icon"
-                  @click="openEdit('0', {})"
-                ></i>
-              </el-tooltip>
-            </template>
-          </el-table-column>
-        </el-table>
-        <!--添加商品-->
-        <search-good-modal
-          :showModel="showModel"
-          :once="false"
-          @resultList="resultList"
-        />
-      </el-col>
-      <el-col
-        :span="24"
-        v-if="type === 'editBase' || type === 'add' || type === 'editCoin'"
-        style="text-align: right; padding: 15px 0 15px 0"
-      >
-        <el-button :size="'mini'" type="primary" @click="submitForm"
-          >保 存
-        </el-button>
-      </el-col>
-    </el-row>
-  </el-form>
-</template>
-   <script>
-import asyncRequest from "@/apis/service/goodStore/goodsOnline";
-import resToken from "@/mixins/resToken";
-import { mapGetters } from "vuex";
-import searchGoodModal from "@/components/search-good-modal";
-import { rules, options1 } from "../columns";
-export default {
-  name: "goodsOnlineAdd",
-  mixins: [resToken],
-  props: ["showModel", "id", "type", "sitem"],
-  components: {
-    searchGoodModal,
-  },
-  computed: {
-    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
-    powers() {
-      let tran =
-        this.$store.getters.btnList.find(
-          (item) => item.menu_route == "goodsCostAdd"
-        ) || {};
-      if (tran && tran.action && tran.action.length > 0) {
-        return tran.action;
-      } else {
-        return [];
-      }
-    },
-  },
-  watch: {
-    newTime: function (val) {
-      if (val) {
-        this.initForm();
-      }
-    },
-  },
-  data() {
-    return {
-      tableData: [],
-      costshowModel: false,
-      costmodelIndex: "",
-      costsitem: {},
-      showModel: false,
-      status: "",
-      rulesThis: this.rules,
-      activeName: "1",
-      loading: true,
-      //是否定制
-      options1: options1,
-      ruleForm: {},
-      rules: rules,
-    };
-  },
-  mounted() {
-    this.initForm();
-  },
-  methods: {
-    async initForm() {
-      this.loading = true;
-      this.resetFormData();
-      this.rulesThis = this.rules;
-      await this.resetForm();
-      this.loading = false;
-    },
-    handleClick(row) {
-      console.log(row);
-    },
-    openEdit(index, sitem) {
-      this.modelIndex = index;
-      this.sitem = sitem;
-      this.showModel = true;
-    },
-    openCostEdit(index, sitem) {
-      this.costmodelIndex = index;
-      this.costsitem = sitem;
-      this.costshowModel = true;
-    },
-    resultList(e) {
-      let list = JSON.parse(JSON.stringify(e));
-      let oldList = JSON.parse(JSON.stringify(this.tableData));
-      list.forEach((e, ei) => {
-        let index = oldList.findIndex((a) => e.spucode === a.spucode);
-        if (index === -1) {
-          let item = JSON.parse(JSON.stringify(list[ei]));
-          this.tableData.push(item);
-        }
-      });
-    },
-    async submitForm() {
-      await this.$refs.ruleForm.validate(async (valid) => {
-        if (valid) {
-          this.loading = true;
-          let model = JSON.parse(JSON.stringify(this.ruleForm));
-          let list = JSON.parse(JSON.stringify(this.tableData));
-          list.forEach((e) => {
-            model.codes.push(e.spuCode);
-          });
-          model.platform=model.platform.toString()
-          let res = await asyncRequest.add(model);
-          console.log(res);
-          this.loading = false;
-          if (res && res.code === 0) {
-            const { spuCode } = res.data;
-            this.$notify.success({
-              title: "新建成功",
-              message: "",
-            });
-            this.showModelThis = false;
-            // 刷新
-            this.$emit("refresh", { spuCode: spuCode });
-          }
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
-
-    resetFormData() {
-      if (this.type === "add" || this.type === "") {
-        this.ruleForm = {
-          platform: [], //string	平台id
-          codes: [], //string	无
-          online_reason: "", //string	上线原因
-          online_remark: "", //string	上线备注
-        };
-        this.tableData = [];
-      } else {
-        // const {
-        //   id,
-        //   platform, //string	平台id
-        //   // good_code, //string	无
-        //   online_reason, //string	上线原因
-        //   online_remark, //string	上线备注
-        //   platform, //	string	企业公司id
-        //   status,
-        // } = this.sitem;
-        // // this.status = status;
-        // this.ruleForm = {
-        //   platform: platform || "", //string	平台id
-        //   // good_code, //string	无
-        //   online_reason: online_reason || "", //string	上线原因
-        //   online_remark: online_remark || "", //string	上线备注
-        //   platform: platform || "", //	string	企业公司id
-        // };
-      }
-    },
-    async resetForm() {
-      // 重置
-      await this.$nextTick(async () => {
-        if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields();
-          this.$refs.ruleForm.clearValidate();
-          this.resetFormData();
-        }
-      });
-    },
-   
-    platform_codesearchChange(e) {
-      console.log(e)
-      const { id, code, label } = e;
-      this.ruleForm.platform = id ? [id] : [];
-      this.$refs.ruleForm.validateField("platform");
-    },
-  },
-};
-</script>
-   <style lang="scss" scoped>
-.goodsCostDetail {
-  // position: relative;
-  .good_info_img_div {
-    ul {
-      width: 100%;
-      li {
-        float: left;
-        width: 107px;
-        height: 107px;
-        padding: 0 5px 0 0;
-        .img-show-li-div {
-          width: 102px;
-          height: 102px;
-          border: 1px solid #dfe4ed;
-          background: #dfe4ed;
-          position: relative;
-          img.img-show {
-            width: 100%;
-            height: 100%;
-            position: relative;
-            display: inline-block;
-          }
-          i.el-icon-close {
-            position: absolute;
-            z-index: 2;
-            top: 0;
-            right: 0;
-            color: #dfe4ed;
-          }
-          &:hover {
-            i.el-icon-close {
-              cursor: pointer;
-              color: #63cbe7;
-            }
-          }
-        }
-      }
-    }
-  }
-
-  .goodsCostAdd-title {
-    border-top: 1px solid #ebeef5;
-    span {
-      height: 50px;
-      line-height: 50px;
-      font-family: "微软雅黑", sans-serif;
-      font-weight: 400;
-      font-style: normal;
-      font-size: 16fpx;
-      text-align: left;
-    }
-  }
-}
-</style>
-   

+ 0 - 254
src/views/goodStore/goodsOnline/components/baseFormAddEdit.vue

@@ -1,254 +0,0 @@
-<template>
-  <el-dialog
-    v-loading="loading"
-    :title="title"
-    :center="true"
-    align="left"
-    top="18vh"
-    width="600px"
-    :close-on-click-modal="false"
-    :visible.sync="showModelThis"
-    element-loading-text="拼命加载中"
-    element-loading-spinner="el-icon-loading"
-    element-loading-background="rgba(0, 0, 0, 0.8)"
-    @close="showModelThis = false"
-  >
-    <el-card style="margin: -20px 0 0 0">
-      <el-row :gutter="10">
-        <el-col :span="24">
-          <el-form
-            ref="ruleForm"
-            :model="ruleForm"
-            status-icon
-            :size="'small'"
-            :rules="rulesThis"
-            label-width="80px"
-            class="demo-ruleForm"
-          >
-            <el-form-item label="规格类型" prop="spec_id">
-              <search-spec
-                :value="ruleForm.spec_id"
-                :disabled="false"
-                :size="'mini'"
-                :isDetail="false"
-                :placeholder="'规格类型'"
-                @searchChange="spec_idsearchChange"
-              />
-            </el-form-item>
-            <el-form-item label="规格值" prop="spec_value_id">
-              <div v-if="specVlist.length > 0">
-                <el-radio-group
-                  v-model="ruleForm.spec_value_id"
-                  @change="spec_value_id_change"
-                >
-                  <el-radio
-                    v-for="item in specVlist"
-                    :key="item.id + item.spec_value"
-                    :label="item.id"
-                    >{{ item.spec_value }}</el-radio
-                  >
-                </el-radio-group>
-              </div>
-              <div class="no-data" v-else>暂无规格值,请添加!</div>
-            </el-form-item>
-          </el-form>
-        </el-col>
-        <el-col :span="24" style="text-align: right; padding-top: 18px">
-          <el-input
-            style="width: 209px"
-            v-model="sinput"
-            class="fl"
-            :disabled="id == 'edit'"
-            :size="'small'"
-            placeholder="规格值名称,如红色"
-            maxlength="20"
-          />
-          <el-button
-            style="margin: 0 0 0 10px"
-            icon="el-icon-plus"
-            :size="'small'"
-            @click="add_spec"
-            class="fl"
-            >新增规格值</el-button
-          >
-          <el-button
-            v-if="id !== 'edit'"
-            :size="'small'"
-            type="primary"
-            @click="submitForm"
-            >保 存
-          </el-button>
-          <el-button @click="showModelThis = false" :size="'small'">{{
-            id == "edit" ? "关 闭" : "取 消"
-          }}</el-button>
-        </el-col>
-      </el-row>
-    </el-card>
-  </el-dialog>
-</template>
-<script>
-import asyncRequest from "@/apis/service/goodStore/goodsCost";
-import resToken from "@/mixins/resToken";
-export default {
-  name: "brand",
-  props: ["showModel", "index", "sitem"],
-  mixins: [resToken],
-  data() {
-    return {
-      loading: false,
-      title: "商品规格",
-      sinput: "",
-      showModelThis: this.showModel,
-      specVlist: [],
-      ruleForm: {},
-      rulesThis: this.rules,
-
-      rules: {
-        spec_id: [
-          {
-            required: true,
-            message: "规格类型不能为空",
-            trigger: "change",
-          },
-        ],
-        spec_value_id: [
-          { required: true, message: "请选择规格值", trigger: "change" },
-        ],
-      },
-    };
-  },
-  watch: {
-    showModel: function (val) {
-      this.showModelThis = val;
-      if (val) {
-        this.initForm();
-      }
-    },
-    showModelThis(val) {
-      if (!val) {
-        this.$emit("cancel");
-      }
-    },
-  },
-  methods: {
-    async initForm() {
-      this.loading = true;
-      this.resetFormData();
-      this.rulesThis = this.rules;
-      if (this.index === "0") {
-        this.title = "添加商品规格值";
-      } else {
-        this.title = "修改商品规格值";
-      }
-      await this.resetForm();
-      this.loading = false;
-    },
-    async resetForm() {
-      // 重置
-      await this.$nextTick(() => {
-        if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields();
-          this.$refs.ruleForm.clearValidate();
-          console.log(this.index);
-          console.log(this.sitem);
-          this.resetFormData();
-        }
-      });
-    },
-    resetFormData() {
-      const { id, spec_id, spec_value, spec_value_id, spec_value_value } =
-        this.sitem;
-      this.ruleForm = {
-        index: this.index,
-        id: id || "",
-        spec_id: spec_id || "",
-        spec_value: spec_value || "",
-        spec_value_id: spec_value_id || "",
-        spec_value_value: spec_value_value || "",
-      };
-    },
-    async add_spec() {
-      const { spec_id } = this.ruleForm;
-      if (spec_id) {
-        if (this.sinput) {
-          const { code, data, message } = await asyncRequest.valueadd({
-            spec_id: spec_id,
-            spec_value: this.sinput,
-          });
-          if (code === 0) {
-            await this.getlist();
-          } else if (code >= 100 && code <= 104) {
-            await this.logout();
-          } else {
-            this.$message.warning(message);
-          }
-        } else {
-          this.$message.warning("请输入规格值!");
-        }
-      } else {
-        this.$message.warning("请选择规格类型!");
-      }
-    },
-    async spec_idsearchChange(e) {
-      const { id, spec_name } = e;
-      this.ruleForm.spec_id = id || "";
-      this.ruleForm.spec_value = spec_name || "";
-      this.$refs.ruleForm.validateField("spec_id");
-      await this.getlist();
-    },
-    spec_value_id_change(e) {
-      if (e) {
-        const { id, spec_value } = this.specVlist.find((i) => i.id === e);
-        this.ruleForm.spec_value_id = id || "";
-        this.ruleForm.spec_value_value = spec_value || "";
-      } else {
-        this.ruleForm.spec_value_id = "";
-        this.ruleForm.spec_value_value = "";
-      }
-      this.$refs.ruleForm.validateField("spec_value_id");
-    },
-    async getlist() {
-      const { spec_id } = this.ruleForm;
-      if (spec_id) {
-        const { code, data, message } = await asyncRequest.valueall({
-          spec_id: spec_id,
-        });
-        if (code === 0) {
-          this.specVlist = data;
-        } else if (code >= 100 && code <= 104) {
-          await this.logout();
-        } else {
-          this.$message.warning(message);
-        }
-      } else {
-        this.specVlist = [];
-      }
-    },
-
-    async submitForm() {
-      await this.$refs.ruleForm.validate(async (valid) => {
-        if (valid) {
-          this.loading = true;
-          this.$emit("refresh", this.ruleForm);
-          this.loading = false;
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
-  },
-};
-</script>
-
-   <style lang="scss" scoped>
-.goodsCostAdd {
-  .no-data {
-    text-align: center;
-    line-height: 32px;
-    color: #8492a6;
-    // border: 1px solid #ccc;
-    border-radius: 6px;
-  }
-}
-</style>

+ 0 - 186
src/views/goodStore/goodsOnline/components/costFormAddEdit.vue

@@ -1,186 +0,0 @@
-<template>
-  <el-dialog
-    v-loading="loading"
-    :title="title"
-    :center="true"
-    align="left"
-    top="18vh"
-    width="500px"
-    :close-on-click-modal="false"
-    :visible.sync="showModelThis"
-    element-loading-text="拼命加载中"
-    element-loading-spinner="el-icon-loading"
-    element-loading-background="rgba(0, 0, 0, 0.8)"
-    @close="showModelThis = false"
-  >
-    <el-card style="margin: -20px 0 0 0">
-      <el-row :gutter="10">
-        <el-col :span="24">
-          <el-form
-            ref="ruleForm"
-            :model="ruleForm"
-            status-icon
-            :size="'small'"
-            :rules="rulesThis"
-            label-width="80px"
-            class="demo-ruleForm"
-          >
-            <el-form-item label="起订量" prop="min_num">
-              <el-input
-                placeholder="起订量"
-                v-model="ruleForm.min_num"
-                type="number"
-                :min="0"
-                :max="9999999999"
-                :step="0"
-              />
-            </el-form-item>
-            <el-form-item label="成本合计" prop="nake_fee">
-              <el-input
-                placeholder="成本合计"
-                v-model="ruleForm.nake_fee"
-                type="number"
-                :min="0"
-                :max="9999999999.99"
-                :step="2"
-              >
-                <template slot="append">元</template>
-              </el-input>
-            </el-form-item>
-            <el-form-item label="工艺费" prop="cost_fee">
-              <el-input
-                placeholder="工艺费"
-                v-model="ruleForm.cost_fee"
-                type="number"
-                :min="0"
-                :max="9999999999.99"
-                :step="2"
-              >
-                <template slot="append">元</template>
-              </el-input>
-            </el-form-item>
-
-            <el-form-item label="其中运费" prop="delivery_fee">
-              <el-input
-                placeholder="其中运费"
-                v-model="ruleForm.delivery_fee"
-                type="number"
-                :min="0"
-                :max="9999999999.99"
-                :step="2"
-              >
-                <template slot="append">元</template>
-              </el-input>
-            </el-form-item>
-          </el-form>
-        </el-col>
-        <el-col :span="24" style="text-align: right">
-          <el-button :size="'small'" type="primary" @click="submitForm"
-            >保 存
-          </el-button>
-          <el-button @click="showModelThis = false" :size="'small'">{{
-            "取 消"
-          }}</el-button>
-        </el-col>
-      </el-row>
-    </el-card>
-  </el-dialog>
-</template>
-<script>
-import resToken from "@/mixins/resToken";
-export default {
-  name: "brand",
-  props: ["showModel", "index", "sitem"],
-  mixins: [resToken],
-  data() {
-    return {
-      loading: false,
-      title: "",
-      showModelThis: this.showModel,
-      ruleForm: {},
-      rulesThis: this.rules,
-      rules: {
-        min_num: [
-          { required: true, message: "起订量应为合法数字", trigger: "blur" },
-        ],
-        cost_fee: [
-          { required: true, message: "工艺费应为合法数字", trigger: "blur" },
-        ],
-        nake_fee: [
-          { required: true, message: "成本合计应为合法数字", trigger: "blur" },
-        ],
-        delivery_fee: [
-          { required: true, message: "其中运费应为合法数字", trigger: "blur" },
-        ],
-      },
-    };
-  },
-  watch: {
-    showModel: function (val) {
-      this.showModelThis = val;
-      if (val) {
-        this.initForm();
-      }
-    },
-    showModelThis(val) {
-      if (!val) {
-        this.$emit("cancel");
-      }
-    },
-  },
-  methods: {
-    async initForm() {
-      this.loading = true;
-      await this.resetFormData();
-      console.log(this.index);
-      if (this.index + "" === "-1") {
-        this.title = "添加成本阶梯";
-      } else {
-        this.title = "修改成本阶梯";
-      }
-
-      await this.resetForm();
-      this.loading = false;
-    },
-    async resetForm() {
-      // 重置
-      await this.$nextTick(async () => {
-        if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields();
-          this.$refs.ruleForm.clearValidate();
-          await this.resetFormData();
-        }
-      });
-    },
-    async resetFormData() {
-      const { id, min_num, cost_fee, nake_fee, delivery_fee } = this.sitem;
-      this.ruleForm = {
-        id: id || "",
-        index: this.index,
-        min_num: min_num || "",
-        cost_fee: cost_fee || "",
-        nake_fee: nake_fee || "",
-        delivery_fee: delivery_fee || "",
-      };
-    },
-
-    async submitForm() {
-      await this.$refs.ruleForm.validate(async (valid) => {
-        if (valid) {
-          this.showModelThis = false;
-          // 刷新
-          this.$emit("refresh", this.ruleForm);
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
-  },
-};
-</script>
-
-   <style lang="scss" scoped>
-.brand {
-}
-</style>

+ 50 - 48
src/views/goodStore/goodsOnline/detail.vue

@@ -5,44 +5,43 @@
       v-if="powers && powers.length > 0 && powers.some((item) => item == '007')"
     >
       <el-tabs v-model="activeTabs">
-        <el-tab-pane label="新建商品上线" name="0" v-if="queryType === 'add'">
-          <base-form
-            v-if="newTime !== ''"
-            :type="queryType"
-            :id="queryId"
-            :newTime="newTime"
-            :sitem="sitem"
-            @refresh="refresh"
-          />
-        </el-tab-pane>
         <el-tab-pane label="商品上线详情" name="1" v-if="queryType !== 'add'">
           <el-collapse v-model="activeNames" style="margin: -18px 0 0 0">
             <el-collapse-item title="上线详情" name="0">
-              <!-- <base-form
-                v-if="newTime !== ''"
-                :type="queryType"
-                :id="queryId"
+              <show-data-table
                 :newTime="newTime"
+                v-if="newTime !== ''"
                 :sitem="sitem"
-                @refresh="refresh"
-              /> -->
+                :columns="ShowDataTableColumns"
+              >
+                <template slot="status">
+                  <el-tag
+                    :size="'mini'"
+                    :type="sitem.status == '0' ? 'warning' : ''"
+                    v-text="
+                      (
+                        statusList.find((item) => item.value == sitem.status) ||
+                        {}
+                      ).label || '--'
+                    "
+                  ></el-tag>
+                </template>
+              </show-data-table>
             </el-collapse-item>
-            <el-collapse-item title="采购部门审批" name="1"> 
-                 <exam-form
+            <el-collapse-item title="采购部门审批" name="1">
+              <exam-form
                 :statusList="statusList"
                 :newTime="newTime"
                 :disabled="false"
                 :isMust="false"
                 @searchChange="examForm"
               />
-              
-              123 </el-collapse-item>
-           
+
+              123
+            </el-collapse-item>
           </el-collapse>
         </el-tab-pane>
-        <el-tab-pane label="审批记录" name="2" v-if="queryType !== 'add'">
-          111
-        </el-tab-pane>
+        <el-tab-pane label="审批记录" name="2"> 111 </el-tab-pane>
       </el-tabs>
     </div>
     <div v-else>
@@ -54,13 +53,11 @@
 import asyncRequest from "@/apis/service/goodStore/goodsOnline";
 import resToken from "@/mixins/resToken";
 import { mapGetters } from "vuex";
-import baseForm from "./components/baseForm";
+import ShowDataTableColumns from "./ShowDataTableColumns";
 export default {
   name: "goodsOnlineDetail",
   mixins: [resToken],
-  components: {
-    baseForm,
-  },
+
   computed: {
     ...mapGetters(["tablebtnSize", "searchSize", "size"]),
     powers() {
@@ -78,10 +75,11 @@ export default {
 
   data() {
     return {
-      statusList:[],
+      ShowDataTableColumns: ShowDataTableColumns,
+      statusList: [],
       size: "small",
       activeTabs: "1",
-      activeNames: ["0",'1'],
+      activeNames: ["0", "1"],
       newTime: "",
       loading: false,
       queryType: "",
@@ -109,16 +107,16 @@ export default {
 
       this.loading = false;
     },
-       // 点击业务审核的保存按钮
-       
+    // 点击业务审核的保存按钮
+
     async examForm(e) {
-      console.log(e)
+      console.log(e);
       if (!this.loading) {
         let type = e.state === "1" ? "1" : e.rebut;
         await this.setstatus(type, "提交采购部门审核", e.remark);
       }
     },
-     async setstatus(type, detail, remark) {
+    async setstatus(type, detail, remark) {
       await this.$confirm(`确定要${detail}?`, {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
@@ -136,7 +134,7 @@ export default {
               title: "提交成功!",
               message: "",
             });
-            await this.initForm();;
+            await this.initForm();
           } else if (res && res.code >= 100 && res.code <= 104) {
             await this.logout();
           } else {
@@ -147,28 +145,32 @@ export default {
           console.log("取消");
         });
     },
-    handleClick(row) {
-      console.log(row);
-    },
+
     refresh(e) {
-        const { spuCode } = e;
-        window.vm.$router.replace({
-          path: "goodsOnlineDetail",
-          query: {
-            id: this.queryType==='add'?spuCode:this.queryId,
-            type: "view",
-          },
-        });
+      const { spuCode } = e;
+
+      let model = {
+        id: this.queryType === "add" ? spuCode : this.queryId,
+        type: "view",
+      };
+      this.routeReGoto("goodsOnlineDetail", model);
     },
     async initData() {
       this.loading = true;
       const { code, message, data } = await asyncRequest.detail({
-        spuCode: this.queryId,
+        skuCode: this.queryId,
       });
       this.loading = false;
       if (code === 0) {
         this.sitem = JSON.parse(JSON.stringify(data));
-        const { status } = this.sitem;
+        const { status, cat_info } = this.sitem;
+        let cat = "";
+        if (cat_info && cat_info.length > 0) {
+          cat_info.forEach((e, i) => {
+            cat += i === 0 ? e.name : "/" + e.name;
+          });
+        }
+        this.sitem.cat = cat;
         this.status = status;
         this.getNewTime();
       } else if (code >= 100 && code <= 104) {

+ 0 - 92
src/views/goodStore/goodsOnline/imgShow.vue

@@ -1,92 +0,0 @@
-<template>
-  <el-dialog
-    :title="title"
-    :center="true"
-    align="left"
-    top="8vh"
-    width="600px"
-    @close="closeModel"
-    :close-on-click-modal="false"
-    :visible.sync="showModelThis"
-  >
-    <el-card>
-      <el-row :gutter="10" >
-        <el-col :span="24">
-          <img class="activeImg" :src="activeImg" alt="" />
-        </el-col>
-        <el-col :span="24" style="text-align: right;padding-top:10px"  v-if="imgList&&imgList.length>0">
-          <div class="img-box">
-            <img
-              @click="initForm(i)"
-              :class="{ active: activeIndex === i }"
-              v-for="(img, i) in imgList"
-              :key="'imgboxitem' + i"
-              :src="img"
-              alt=""
-            />
-          </div>
-        </el-col>
-      </el-row>
-    </el-card>
-  </el-dialog>
-</template>
-   <script>
-export default {
-  name: "goodsOnline",
-  props: ["showModel", "imgList", "index"],
-  data() {
-    return {
-      activeImg: "",
-      activeIndex: this.index,
-      showModelThis: this.showModel,
-    };
-  },
-  methods: {
-    closeModel() {
-      this.showModelThis = false;
-    },
-    initForm(index) {
-      this.activeIndex = index;
-      this.activeImg = this.imgList[index];
-    },
-  },
-  watch: {
-    showModel: function (val) {
-      this.showModelThis = val;
-      if (val) {
-        this.initForm(this.index);
-      }
-    },
-    showModelThis(val) {
-      if (!val) {
-        this.$emit("cancel");
-      }
-    },
-  },
-};
-</script>
-
-   <style lang="scss" scoped>
-.goodsOnline {
-  .activeImg {
-    display: inline-block;
-    width: 100%;
-  }
-  .img-box {
-    img {
-      width: 40px;
-      height: 40px;
-      display: inline-block;
-      margin: 0 3px;
-      border:1px solid transparent;
-      &.active {
-        border: 1px solid red;
-      }
-      &:hover {
-        cursor: pointer;
-      }
-    }
-  }
-}
-</style>
-   

+ 45 - 126
src/views/goodStore/goodsOnline/index.vue

@@ -34,7 +34,7 @@
                 @timeReturned="handleTime"
               />
             </el-col>
-            <el-col :span="4" style="width: 135px">
+            <el-col :span="4" style="width: 130px">
               <search-brand
                 :value="brandid"
                 :disabled="type === 'view' || type === 'editCoin'"
@@ -45,7 +45,7 @@
                 @searchChange="brandidsearchChange"
               />
             </el-col>
-            <el-col :span="6" style="width: 373px; padding: 0 0 0 10px">
+            <el-col :span="6" style="width: 310px; padding: 0 0 0 10px">
               <good-class
                 :value="parmValue.cat_id"
                 @handleChange="goods_class_change"
@@ -65,19 +65,41 @@
                 刷新
               </el-button>
             </el-col>
+            <el-col
+              :span="3"
+              class="fr"
+              style="width: 66px; padding: 0 0 0 10px"
+            >
+              <el-button type="warning" :size="searchSize" @click="restSearch">
+                重置
+              </el-button>
+            </el-col>
           </el-row>
+
           <el-row>
-            <el-col :span="4" style="width: 373px">
-              <search-supplier
-                :value="supplierNo"
-                :placeholder="'供应商'"
-                :disabled="false"
+            <el-col :span="4" style="width: 215px">
+              <el-select
+                v-model="parmValue.status"
+                filterable
+                clearable
                 :size="searchSize"
-                :isDetail="false"
-                @searchChange="supplierNosearchChange"
-              />
+                placeholder="状态"
+                style="width: 100%"
+                @change="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+              >
+                <el-option
+                  v-for="item in statusList"
+                  :key="'status' + item.code"
+                  :label="item.name"
+                  :value="item.code"
+                />
+              </el-select>
             </el-col>
-            <el-col :span="4" style="width: 145px; padding: 0 0 0 10px">
+            <el-col :span="4" style="width: 158px; padding: 0 0 0 10px">
               <el-select
                 v-model="parmValue.good_type"
                 filterable
@@ -99,28 +121,7 @@
                 />
               </el-select>
             </el-col>
-            <el-col :span="4" style="width: 373px; padding: 0 0 0 10px">
-              <search-work-company
-                :value="parmValue.company_id"
-                :placeholder="'业务公司'"
-                :disabled="false"
-                :size="searchSize"
-                :isDetail="false"
-                @searchChange="company_idsearchChange"
-              />
-            </el-col>
-            <el-col
-              :span="3"
-              class="fr"
-              style="width: 66px; padding: 0 0 0 10px"
-            >
-              <el-button type="warning" :size="searchSize" @click="restSearch">
-                重置
-              </el-button>
-            </el-col>
-          </el-row>
-          <el-row style="padding: 10px 0 0 0">
-            <el-col :span="4" style="width: 518px">
+            <el-col :span="4" style="width: 513px; padding: 0 0 0 10px">
               <el-input
                 :size="searchSize"
                 v-model="parmValue.name"
@@ -134,35 +135,14 @@
                 ><el-select
                   v-model="select"
                   slot="prepend"
-                  style="width: 135px"
+                  :size="searchSize"
+                  style="width: 140px"
                   placeholder="关键字类型"
                 >
                   <el-option label="商品编号" value="1" />
                   <el-option label="商品名称" value="2" /> </el-select
               ></el-input>
             </el-col>
-            <el-col :span="4" style="width: 210px; padding: 0 0 0 10px">
-              <el-select
-                v-model="parmValue.status"
-                filterable
-                clearable
-                :size="searchSize"
-                placeholder="状态"
-                style="width: 100%"
-                @change="
-                  pageInfo.curr = 1;
-                  parmValue.page = 1;
-                  searchList();
-                "
-              >
-                <el-option
-                  v-for="item in statusList"
-                  :key="'status' + item.code"
-                  :label="item.name"
-                  :value="item.code"
-                />
-              </el-select>
-            </el-col>
             <el-col
               :span="3"
               class="fr"
@@ -173,32 +153,14 @@
                 :size="searchSize"
                 type="success"
                 style="float: right"
-                @click="
-                  routeGoto('goodsOnlineAdd', {  })
-                "
+                @click="routeGoto('goodsOnlineAdd', {})"
               >
                 添加
               </el-button>
             </el-col>
-                 <el-col
-              :span="3"
-              class="fr"
-              style="width: 66px; padding: 0 0 0 10px"
-              v-if="powers.some((item) => item == '055')"
-            >
-              <el-button
-                :size="searchSize"
-                type="success"
-                style="float: right"
-                @click="openModal(selection)"
-              >
-               添加上线商品
-              </el-button>
-                 </el-col>
           </el-row>
         </div></template
       >
-
       <template #good_thumb_img="{ scope }">
         <div
           v-if="scope.row.good_thumb_img"
@@ -245,55 +207,12 @@
             class="el-icon-view tb-icon"
             @click="
               routeGoto('goodsOnlineDetail', {
-                id: scope.row.spuCode,
+                id: scope.row.skuCode,
                 type: 'view',
               })
             "
           ></i>
         </el-tooltip>
-        <el-tooltip
-          v-if="powers.some((item) => item == '054')"
-          effect="dark"
-          content="修改基础信息"
-          placement="top"
-        >
-          <i
-            class="el-icon-c-scale-to-original tb-icon"
-            @click="
-              routeGoto('goodsOnlineDetail', {
-                id: scope.row.spuCode,
-                type: 'editBase',
-              })
-            "
-          ></i>
-        </el-tooltip>
-        <el-tooltip
-          v-if="powers.some((item) => item == '053')"
-          effect="dark"
-          content="修改成本信息"
-          placement="top"
-        >
-          <i
-            class="el-icon-coin tb-icon"
-            @click="
-              routeGoto('goodsOnlineDetail', {
-                id: scope.row.spuCode,
-                type: 'editCoin',
-              })
-            "
-          ></i>
-        </el-tooltip>
-        <el-tooltip
-          v-if="powers.some((item) => item == '006')"
-          effect="dark"
-          content="删除"
-          placement="top"
-        >
-          <i
-            class="el-icon-delete tb-icon"
-            @click="deleteItem(scope.row.spuCode)"
-          ></i>
-        </el-tooltip>
       </template>
     </ex-table>
     <no-auth v-else></no-auth>
@@ -533,13 +452,13 @@ export default {
       const res = await asyncRequest.list(this.parmValue);
       if (res && res.code === 0 && res.data) {
         this.tableData = res.data.list;
-        this.tableData.forEach((a)=>{
-          a.cat_name=""
-          let list=a.cat_info||[]
-          list.forEach((b,i)=>{
-            a.cat_name+=i==0?b.name:'/'+b.name
-          })
-        })
+        this.tableData.forEach((a) => {
+          a.cat_name = "";
+          let list = a.cat_info || [];
+          list.forEach((b, i) => {
+            a.cat_name += i == 0 ? b.name : "/" + b.name;
+          });
+        });
         this.pageInfo.total = Number(res.data.count);
       } else if (res && res.code >= 100 && res.code <= 104) {
         await this.logout();

+ 0 - 258
src/views/goodStore/goodsOnline/ladderPrice.vue

@@ -1,258 +0,0 @@
-<template>
-  <el-dialog
-    :title="title"
-    :center="true"
-    align="left"
-    top="12vh"
-    width="1040px"
-    @close="closeModel"
-    :close-on-click-modal="false"
-    :visible.sync="showModelThis"
-  >
-  <el-card>
-      <el-row :gutter="10">
-        <el-col :span="24">
-          <div
-            v-if="
-              left &&
-              left.header &&
-              left.header.length > 0 &&
-              right &&
-              right.header &&
-              right.header.length > 0
-            "
-          >
-            <div class="list-table clearfix">
-              <div class="left" :style="{ width: lang }">
-                <div class="header">
-                  <div
-                    class="header-item"
-                    v-for="(lhead, lhi) in left.header"
-                    :key="'lhead' + lhi"
-                  >
-                    {{ lhead.spec_name }}
-                  </div>
-                </div>
-                <div
-                  class="header-body"
-                  v-if="left.spec && left.spec.length > 0"
-                >
-                  <div
-                    class="header-body-row"
-                    v-for="(lhr, lhri) in left.spec"
-                    :key="'lheadrow' + lhri"
-                  >
-                    <div
-                      class="heder-body-col"
-                      v-for="(lhc, lhci) in lhr"
-                      :key="'lheadcol' + lhci"
-                    >
-                      {{ lhc.spec_value }}
-                    </div>
-                  </div>
-                </div>
-              </div>
-              <div class="right" :style="{ paddingLeft: lang }">
-                <div class="header">
-                  <div
-                    class="header-col clearfix"
-                    v-for="(lhr, lhri) in right.header"
-                    :key="'lheadr' + lhri"
-                  >
-                    <div class="header-col-jieti clearfix">
-                      <div class="header-col-jieti-title tc clearfix">
-                        阶梯{{ lhri + 1 }}
-                      </div>
-                      <div class="header-col-jieti-main clearfix">
-                        <div class="header-col-item fl tc">{{ lhr.num }}</div>
-                        <div class="header-col-item fl tc">{{ lhr.price }}</div>
-                      </div>
-                    </div>
-                  </div>
-                </div>
-                <div
-                  class="right-body"
-                  v-if="right.spec && right.spec.length > 0"
-                >
-                  <div
-                    class="right-body-col"
-                    v-for="(lbr, lbri) in right.spec"
-                    :key="'lbodyr' + lbri"
-                  >
-                    <div
-                      class="right-body-col-item clearfix"
-                      v-for="(lbritem, lbritemi) in lbr.limit"
-                      :key="'lbritem' + lbritemi"
-                    >
-                      <div class="right-body-col-item-div fl tc">
-                        {{ lbritem.begin_num }}
-                      </div>
-                      <div class="right-body-col-item-div fl tc">
-                        {{ lbritem.shop_price }}
-                      </div>
-                    </div>
-                  </div>
-                </div>
-              </div>
-            </div>
-          </div>
-          <div v-else class="tc">
-            <el-tag type="warning">暂无阶梯价!</el-tag>
-          </div>
-        </el-col>
-      </el-row>
-    </el-card>
-  </el-dialog>
-</template>
-   <script>
-export default {
-  name: "goodsOnline",
-  props: ["showModel", "left", "right", "lang"],
-  data() {
-    return {
-      loading: true,
-      title: "商品阶梯价格",
-       showModelThis: this.showModel,
-    };
-  },
-  methods: {
-    closeModel(e) {
-      console.log(e);
-      this.showModelThis = false;
-    },
-    async initForm() {
-      this.loading = false;
-    },
-  },
-  watch: {
-    showModel: function (val) {
-      this.showModelThis = val;
-      if (val) {
-        this.initForm();
-      }
-    },
-    showModelThis(val) {
-      if (!val) {
-        this.$emit("cancel");
-      }
-    },
-  },
-};
-</script>
-
-   <style lang="scss" scoped>
-.goodsOnline {
-  $gBC: #dfe6ec;
-  .list-table {
-    position: relative;
-    width: 100%;
-    border-top: 1px solid $gBC;
-    border-left: 1px solid $gBC;
-    .left {
-      position: absolute;
-      top: 0;
-      left: 0;
-      z-index: 2;
-      background: #fff;
-      .header {
-        width: 100%;
-        display: flex;
-        .header-item {
-          width: 100px;
-          flex: 1;
-          padding: 0 10px;
-          height: 64px;
-          line-height: 64px;
-          border-right: 1px solid $gBC;
-          border-bottom: 1px solid $gBC;
-        }
-      }
-      .header-body {
-        width: 100%;
-        position: relative;
-        .header-body-row {
-          width: 100%;
-          display: flex;
-          .heder-body-col {
-            flex: 1;
-            padding: 0 10px;
-            height: 38px;
-            border-right: 1px solid $gBC;
-            border-bottom: 1px solid $gBC;
-            line-height: 38px;
-          }
-        }
-      }
-    }
-    .right {
-      position: relative;
-      width: 100%;
-      display: block;
-      overflow-x: scroll;
-      .header {
-        width: 100%;
-        display: flex;
-        .header-col {
-          min-width: 220px;
-          flex: 1;
-          height: 64px;
-          line-height: 64px;
-
-          // position: relative;
-          .header-col-jieti {
-            height: 64px;
-            line-height: 64px;
-            // position: relative;
-            width: 100%;
-            .header-col-jieti-title {
-              // position: relative;
-              width: 100%;
-              line-height: 32px;
-              border-right: 1px solid $gBC;
-              border-bottom: 1px solid $gBC;
-              height: 32px;
-            }
-            .header-col-jieti-main {
-              // position: relative;
-              width: 100%;
-              .header-col-item {
-                // position: relative;
-                height: 32px;
-                line-height: 32px;
-                width: 50%;
-                border-right: 1px solid $gBC;
-                border-bottom: 1px solid $gBC;
-              }
-            }
-          }
-        }
-      }
-      .right-body {
-        position: relative;
-        .right-body-col {
-          position: relative;
-          width: 100%;
-          display: flex;
-          .right-body-col-item {
-            min-width: 220px;
-            flex: 1;
-
-            position: relative;
-            overflow: hidden;
-            .right-body-col-item-div {
-              position: relative;
-              height: 38px;
-              line-height: 38px;
-              width: 50%;
-              padding: 0 10px;
-              border-right: 1px solid $gBC;
-              border-bottom: 1px solid $gBC;
-            }
-          }
-        }
-      }
-    }
-  }
-}
-</style>
-   

+ 24 - 26
src/views/serviceParam/supplier/detail.vue

@@ -18,16 +18,16 @@
         <el-tab-pane label="商品详情" name="1" v-if="queryType !== 'add'">
           <!-- <el-collapse v-model="activeNames" style="margin: -18px 0 0 0">
             <el-collapse-item title="商品详情" name="0"> -->
-              <base-form
-                v-if="newTime !== ''"
-                :type="queryType"
-                :id="queryId"
-                :newTime="newTime"
-                :sitem="sitem"
-                @refresh="refresh"
-              />
-            <!-- </el-collapse-item> -->
-            <!-- <el-collapse-item title="采购部门审批" name="1"> 
+          <base-form
+            v-if="newTime !== ''"
+            :type="queryType"
+            :id="queryId"
+            :newTime="newTime"
+            :sitem="sitem"
+            @refresh="refresh"
+          />
+          <!-- </el-collapse-item> -->
+          <!-- <el-collapse-item title="采购部门审批" name="1"> 
                  <exam-form
                 :statusList="statusList"
                 :newTime="newTime"
@@ -37,7 +37,7 @@
               />
               
               123 </el-collapse-item> -->
-           
+
           <!-- </el-collapse> -->
         </el-tab-pane>
         <!-- <el-tab-pane label="审批记录" name="2" v-if="queryType !== 'add'">
@@ -78,10 +78,10 @@ export default {
 
   data() {
     return {
-      statusList:[],
+      statusList: [],
       size: "small",
       activeTabs: "1",
-      activeNames: ["0",'1'],
+      activeNames: ["0", "1"],
       newTime: "",
       loading: false,
       queryType: "",
@@ -109,16 +109,16 @@ export default {
 
       this.loading = false;
     },
-       // 点击业务审核的保存按钮
-       
+    // 点击业务审核的保存按钮
+
     async examForm(e) {
-      console.log(e)
+      console.log(e);
       if (!this.loading) {
         let type = e.state === "1" ? "1" : e.rebut;
         await this.setstatus(type, "提交采购部门审核", e.remark);
       }
     },
-     async setstatus(type, detail, remark) {
+    async setstatus(type, detail, remark) {
       await this.$confirm(`确定要${detail}?`, {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
@@ -136,7 +136,7 @@ export default {
               title: "提交成功!",
               message: "",
             });
-            await this.initForm();;
+            await this.initForm();
           } else if (res && res.code >= 100 && res.code <= 104) {
             await this.logout();
           } else {
@@ -151,14 +151,12 @@ export default {
       console.log(row);
     },
     refresh(e) {
-        const { spuCode } = e;
-        window.vm.$router.replace({
-          path: "supplierDetail",
-          query: {
-            id: this.queryType==='add'?spuCode:this.queryId,
-            type: "view",
-          },
-        });
+      const { spuCode } = e;
+      let model = {
+        id: this.queryType === "add" ? spuCode : this.queryId,
+        type: "view",
+      };
+      this.routeReGoto("supplierDetail", model);
     },
     async initData() {
       this.loading = true;