Browse Source

Merge branch 'sit'

xiaodai2022 2 years ago
parent
commit
5f5b026e79

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-710179f3.cb019e78.css


BIN
dist/static/css/chunk-710179f3.cb019e78.css.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-76b85e80.27ebce60.css


BIN
dist/static/css/chunk-76b85e80.27ebce60.css.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.22a2ff21.js


BIN
dist/static/js/app.22a2ff21.js.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.fa0cb070.js


BIN
dist/static/js/app.fa0cb070.js.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-0aefa08a.5b7bd649.js


+ 0 - 0
dist/static/js/chunk-1d0a69b6.5575b933.js → dist/static/js/chunk-1d0a69b6.b45f9426.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-62a340ba.8e1117c1.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-710179f3.23f4465b.js


BIN
dist/static/js/chunk-710179f3.23f4465b.js.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-76b85e80.62376c53.js


BIN
dist/static/js/chunk-76b85e80.62376c53.js.gz


+ 0 - 0
dist/static/js/chunk-77ff69ab.dc190969.js → dist/static/js/chunk-77ff69ab.b2d659d0.js


+ 0 - 0
dist/static/js/chunk-77ff69ab.dc190969.js.gz → dist/static/js/chunk-77ff69ab.b2d659d0.js.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-8b2ab33c.8ff2ec2a.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-b7f101b0.e23be33d.js


+ 0 - 1182
src/views/goodStore/dealGoodsPool/addEdit.vue

@@ -1,1182 +0,0 @@
-<template>
-  <el-dialog
-    :title="title"
-    :center="true"
-    align="left"
-    top="8vh"
-    width="1040px"
-    @close="closeModel"
-    :close-on-click-modal="false"
-    :visible.sync="showModelThis"
-    v-loading="loading"
-    element-loading-text="拼命加载中"
-    element-loading-spinner="el-icon-loading"
-    element-loading-background="rgba(0, 0, 0, 0.8)"
-  >
-    <el-card>
-      <el-row :gutter="10">
-        <el-col :span="24">
-          <el-col :span="10" :offset="7">
-            <div style="margin: -5px 0 10px 0">
-              <el-steps
-                :active="step"
-                simple
-                process-status="finish"
-                finish-status="success"
-              >
-                <el-step
-                  v-for="(item, index) in stepList"
-                  :key="index"
-                  :title="item"
-                />
-              </el-steps>
-            </div>
-          </el-col>
-          <el-row :gutter="10" v-if="step === 0">
-            <el-form
-              :model="baseForm"
-              status-icon
-              :rules="baseRules"
-              ref="baseForm"
-              label-width="110px"
-              class="demo-ruleForm"
-            >
-              <el-col :span="24">
-                <el-form-item label="商品名称" prop="good_name">
-                  <el-input
-                    placeholder="请输入商品名称"
-                    v-model="baseForm.good_name"
-                    maxlength="100"
-                  ></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item label="供应商联系人" prop="supplier">
-                  <el-select
-                    v-model="baseForm.supplier"
-                    filterable
-                    clearable
-                    style="width: 100%"
-                    placeholder="请选择供应商联系人"
-                  >
-                    <el-option
-                      v-for="group in supplierOptions"
-                      :key="group.id"
-                      :label="group.name"
-                      :value="group.id"
-                    >
-                      <span>{{ group.name }}</span
-                      ><span class="fr">{{ group.company }}</span>
-                    </el-option>
-                  </el-select>
-                </el-form-item>
-                <el-form-item label="商品单位" prop="unit">
-                  <el-input
-                    placeholder="请输入单位"
-                    v-model="baseForm.unit"
-                    maxlength="10"
-                    :disabled="isDetail"
-                  ></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item label="商品分类" prop="catid">
-                  <el-cascader
-                    v-model="baseForm.catid"
-                    style="width: 100%"
-                    filterable
-                    placeholder="请选择商品分类"
-                    clearable
-                    :options="catOptions"
-                    :props="{ expandTrigger: 'hover', checkStrictly: true }"
-                  ></el-cascader>
-                </el-form-item>
-                <el-form-item label="商品品牌" prop="brandid">
-                  <el-select
-                    style="width: 100%"
-                    v-model="baseForm.brandid"
-                    clearable
-                    placeholder="请选择商品品牌"
-                  >
-                    <el-option
-                      v-for="item in brandidOptions"
-                      :key="item.id"
-                      :label="item.brand_name"
-                      :value="item.id"
-                    >
-                    </el-option>
-                  </el-select>
-                </el-form-item>
-              </el-col>
-              <el-col :span="24">
-                <el-form-item
-                  label="商品主图"
-                  prop="image"
-                  class="activity-upload"
-                >
-                  <div class="img-list-main clearfix">
-                    <div
-                      class="img-item"
-                      v-for="(item, index) in baseForm.image"
-                      :key="item + index"
-                    >
-                      <img :src="item" class="avatar" />
-                      <i class="el-icon-close" @click="closeImg(index)"></i>
-                    </div>
-                    <div
-                      class="btnupload"
-                      v-if="baseForm.image.length < 5"
-                      style="position: relative"
-                    >
-                      <i class="el-icon-plus avatar-uploader-icon"></i>
-                      <file-upload
-                        class="Upload"
-                        :accept="'.jpg,.png,.jpeg'"
-                        :multiple="true"
-                        :uploadcondition="beforeAvatarUpload"
-                        @UploadErrorEvent="UploadErrorEvent"
-                        @UploadSuccessEvent="UploadSuccessEvent"
-                      ></file-upload>
-                    </div>
-                  </div>
-                  <div class="txt-tips fl">
-                    <p>
-                      <span sty>大小:小于1M;</span><span>尺寸:100*100;</span
-                      ><span>类型:jpg.png.jpeg</span>
-                    </p>
-                  </div>
-                </el-form-item>
-              </el-col>
-            </el-form>
-
-            <el-col :span="24" style="text-align: right">
-              <el-tag type="warning" class="fl" style="margin-left: 100px"
-                >更换商品分类,会影响规格与价格,请慎重修改</el-tag
-              >
-              <el-button type="primary" @click="baseSubmitForm"
-                >下一步
-              </el-button>
-              <el-button @click="showModelThis = false">{{
-                isDetail ? "关 闭" : "取 消"
-              }}</el-button>
-            </el-col>
-          </el-row>
-          <el-row :gutter="10" v-else>
-            <el-col :span="24" style="max-height: 560px; overflow-y: scroll">
-              <el-form
-                :model="ruleForm"
-                status-icon
-                ref="ruleForm"
-                label-width="60px"
-                class="demo-dealGoodsPool-ruleForm"
-              >
-                <el-form-item label="规格" required>
-                  <div class="mack-mian clearfix">
-                    <div
-                      class="mock-item-div clearfix"
-                      v-for="(item, index) in mock"
-                      :key="'specItem' + index"
-                    >
-                      <div class="mock-title clearfix">
-                        <el-input
-                          :size="size"
-                          class="fr"
-                          style="width: 250px"
-                          maxlength="40"
-                          placeholder="新增规格值,如红色"
-                          v-model="item.value"
-                        >
-                          <el-button
-                            slot="append"
-                            @click="specinfoadd(item.spec_id, item.value)"
-                            >提交</el-button
-                          >
-                        </el-input>
-                        <span class="fl">{{ item.spec_name }}</span>
-                      </div>
-                      <div v-if="item.child && item.child.length > 0">
-                        <el-checkbox-group
-                          v-model="item.change"
-                          @change="groupChange($event, index, item)"
-                        >
-                          <el-checkbox
-                            v-for="(sub, i) in item.child"
-                            :key="'sub' + i"
-                            :label="sub.id"
-                            >{{ sub.spec_value }}</el-checkbox
-                          >
-                        </el-checkbox-group>
-                      </div>
-                      <div v-else style="padding: 0 0 12px 0">
-                        <el-tag type="info">暂无规格值</el-tag>
-                      </div>
-                    </div>
-                  </div>
-                </el-form-item>
-                <div class="tips-error">{{ ruleForm.spec }}</div>
-                <el-form-item label="价格" required style="padding: 0 0 12px 0">
-                  <div
-                    class="ladder-table clearfix"
-                    v-if="left && left.header && left && left.header.length > 0"
-                  >
-                    <div class="left" :style="{ width: leftS }">
-                      <div class="ladder-header" v-if="left && left.header">
-                        <ul class="header-spec clearfix">
-                          <li
-                            v-for="(h, hi) in left.header"
-                            :key="'leftHeader' + hi"
-                          >
-                            <span>{{ h.spec_name }}</span>
-                          </li>
-                        </ul>
-                      </div>
-                      <div class="ladder-body" v-if="left.specList">
-                        <ul
-                          v-for="(item, index) in left.specList"
-                          :key="'item' + index"
-                        >
-                          <li
-                            class="clearfix"
-                            v-for="(sub, subi) in item"
-                            :key="'sub' + subi"
-                          >
-                            <span>
-                              {{ sub.spec_value }}
-                            </span>
-                          </li>
-                        </ul>
-                      </div>
-                    </div>
-                    <div class="right" :style="{ paddingLeft: leftS }">
-                      <div class="ladder-header" v-if="right && right.header">
-                        <ul class="header-spec clearfix">
-                          <li
-                            v-for="(h, hi) in right.header"
-                            :key="'rightHeader' + hi"
-                          >
-                            <div class="all">
-                              <div class="title">
-                                <span> 阶梯{{ hi + 1 }}</span>
-                                <i
-                                  class="el-icon-close"
-                                  @click="closeImg(index)"
-                                ></i>
-                              </div>
-                              <div class="main">
-                                <span>{{ h.num }}</span>
-                                <span>{{ h.price }}</span>
-                              </div>
-                            </div>
-                          </li>
-                        </ul>
-                      </div>
-                      <div class="ladder-body" v-if="right && right.specList">
-                        <ul
-                          v-for="(h, hi) in right.specList"
-                          :key="'rightspec' + hi"
-                        >
-                          <li v-for="(s, si) in h" :key="'rightspecsi' + si">
-                            <div
-                              class="input-main"
-                              v-for="(n, ni) in s.limit"
-                              :key="'rightni' + ni"
-                            >
-                              <el-input-number
-                                style="width: 50%"
-                                v-model="n.num"
-                                :step="1"
-                                :min="0"
-                                :max="99999999"
-                                :precision="0"
-                                placeholder="起订量"
-                                step-strictly
-                                :controls="false"
-                              ></el-input-number>
-                              <el-input-number
-                                style="width: 50%"
-                                v-model="n.price"
-                                :step="0.01"
-                                :min="0"
-                                :max="99999999"
-                                :precision="2"
-                                step-strictly
-                                placeholder="成本价"
-                                :controls="false"
-                              ></el-input-number>
-                            </div>
-                          </li>
-                        </ul>
-                      </div>
-                    </div>
-                  </div>
-                  <div v-else>
-                    <el-tag type="warning">请选择规格值</el-tag>
-                  </div>
-                </el-form-item>
-                <div class="tips-error">{{ ruleForm.table }}</div>
-              </el-form>
-            </el-col>
-            <el-col :span="24" style="text-align: right">
-              <el-button type="primary" @click="step--" v-if="!isDetail"
-                >上一步
-              </el-button>
-              <el-button type="primary" @click="submitForm" v-if="!isDetail"
-                >保 存
-              </el-button>
-              <el-button @click="showModelThis = false">{{
-                isDetail ? "关 闭" : "取 消"
-              }}</el-button>
-            </el-col>
-          </el-row>
-        </el-col>
-      </el-row>
-    </el-card>
-  </el-dialog>
-</template>
-   <script>
-import asyncRequest from "@/apis/service/goodStore/dealGoodsPool";
-
-export default {
-  name: "dealGoodsPool",
-  props: ["showModel", "id", "isDetail"],
-  data() {
-    return {
-      leftS: "0px",
-      size: "small",
-      mock: [],
-      ladderNum: 5, //阶梯数
-      left: {
-        header: [],
-        middle: [],
-        specList: [],
-      },
-      right: {
-        header: [],
-        specList: [],
-      },
-      headLadder: {
-        num: "起订量≥",
-        price: "成本价",
-      },
-
-      catOptions: [],
-      brandidOptions: [],
-      supplierOptions: [],
-      oldcatid: [],
-      stepList: ["基础信息", "规格与价格"],
-      step: 0,
-      loading: false,
-      title: "添加商品",
-      showModelThis: this.showModel,
-      baseForm: {
-        id: this.id,
-        catid: [],
-        good_name: "",
-        unit: "",
-        supplier: "",
-        brandid: "",
-        image: [],
-      },
-
-      baseRules: {
-        supplier: [
-          {
-            required: true,
-            message: "请选择供应商联系人",
-            trigger: "change",
-          },
-        ],
-        image: [
-          {
-            required: true,
-            message: "请选择商品主图",
-            trigger: "change",
-          },
-        ],
-        catid: [
-          {
-            required: true,
-            message: "请选择商品分类",
-            trigger: "change",
-          },
-        ],
-        brandid: [
-          {
-            required: true,
-            message: "请选择商品品牌",
-            trigger: "change",
-          },
-        ],
-        good_name: [
-          {
-            required: true,
-            message: "请输入商品名称",
-            trigger: "blur",
-          },
-          {
-            min: 2,
-            max: 50,
-            message: "长度在 2 到 50 个字符",
-            trigger: "blur",
-          },
-        ],
-        unit: [
-          {
-            required: true,
-            message: "请输入商品单位",
-            trigger: "blur",
-          },
-          {
-            min: 1,
-            max: 10,
-            message: "长度在 1 到 10 个字符",
-            trigger: "blur",
-          },
-        ],
-      },
-      ruleForm: {
-        spec: "",
-        table: "",
-      },
-    };
-  },
-  methods: {
-    closeModel() {
-      this.showModelThis = false;
-    },
-    async initForm() {
-      this.mock = [];
-      this.left = {
-        header: [],
-        middle: [],
-        specList: [],
-      };
-      this.right = {
-        header: [],
-        specList: [],
-      };
-      this.step = 0;
-      this.loading = true;
-      // brandidOptions
-      await this.getAllbrandid();
-      await this.getAllCat();
-      await this.getAllSupplier();
-
-      if (this.id === "add") {
-        this.title = "添加商品";
-        // this.ruleForm.isAdmin = 0;
-
-        await this.resetForm();
-      } else {
-        if (this.isDetail) {
-          this.title = "商品详情";
-        } else {
-          this.title = "修改商品";
-        }
-        await this.resetForm();
-        await this.initData();
-      }
-      this.loading = false;
-    },
-    async initData() {
-      this.loading = true;
-      let res = await asyncRequest.detail({ id: this.id });
-      this.loading = false;
-      if (res.code === 0) {
-        await this.resetForm(res.data);
-      }
-    },
-    async resetForm(data) {
-      // 重置
-      await this.$nextTick(async () => {
-        if (this.$refs.baseForm) {
-          this.$refs.baseForm.resetFields();
-          this.$refs.baseForm.clearValidate();
-          if (data) {
-            this.baseForm = {
-              id: this.id,
-              catid: data.good_cat.split(","),
-              good_name: data.good_name,
-              unit: data.good_unit,
-              supplier: data.supplier,
-              brandid: data.brand_id,
-              image: data.galley.split(","),
-            };
-            this.oldcatid = this.baseForm.catid;
-            await this.specByCat(false);
-            this.dealWithEditMock(data.attr);
-          } else {
-            this.baseForm = {
-              id: this.id,
-              catid: ["1", "2", "3"],
-              good_name:
-                "2018春秋新款V领修身丝绒西装女 双排扣复古极简中长款工装外套",
-              unit: "件",
-              supplier: "8",
-              brandid: "3",
-              image: [
-                "http://cum.sit.wanyuhengtong.com/20210425/1edfa0da4eee9b24d1f35d52b6a0ec0a.jpg",
-                "http://cum.sit.wanyuhengtong.com/20210425/cc70a4c06c83d9d8ac27ae35b118a23f.jpg",
-                "http://cum.sit.wanyuhengtong.com/20210425/a5e05dc1c5c75030bcc95f1da1d2d9cb.jpg",
-                "http://cum.sit.wanyuhengtong.com/20210425/9d505e7632891459a29f2fafe28d6705.jpg",
-                "http://cum.sit.wanyuhengtong.com/20210425/714914d7545184e99e240b3affeada07.jpg",
-              ],
-            };
-          }
-
-          this.ruleForm = {
-            spec: "",
-            table: "",
-          };
-        }
-      });
-    },
-    dealWithEditMock(attr) {
-      console.log(this.mock);
-      attr.forEach((v1) => {
-        if (v1 && v1.spec && v1.spec.length > 0) {
-          v1.spec.forEach((v2) => {
-            this.mock.forEach((v3, i) => {
-              if (v2.spec_id === v3.spec_id) {
-                console.log(v2.spec_info_id);
-                console.log(v3);
-                let index = v3.change.findIndex((v4) => {
-                  v4 === v2.spec_info_id;
-                });
-                if (index === -1) {
-                  v3.change.push(v2.spec_info_id);
-                }
-              }
-              this.$set(this.mock, i, v3);
-            });
-          });
-        }
-      });
-      // console.log(attr);
-      console.log(this.mock);
-      this.groupChange();
-      this.resume(attr);
-    },
-    resume(attr) {
-      this.right.specList.forEach((v1) => {
-        v1.forEach((v2) => {
-          attr.forEach((v3) => {
-            let is = true;
-            v3.spec.forEach((v4) => {
-              let index = v2.specid.findIndex((v5) => v5 === v4.spec_info_id);
-              if (index === -1) {
-                is = false;
-              }
-            });
-            if (is) {
-              v2.limit.forEach((v6, i) => {
-                if (v3.limit[i]) {
-                  v6.num = v3.limit[i].begin_num;
-                  v6.price = v3.limit[i].shop_price;
-                }
-              });
-            }
-          });
-        });
-      });
-      console.log(attr);
-      console.log(this.right.specList);
-    },
-    async submitForm() {
-      await this.$refs.ruleForm.validate(async (valid) => {
-        if (valid) {
-          let change = false;
-          this.mock.forEach((v1) => {
-            if (v1.change && v1.change.length > 0) {
-              change = true;
-            }
-          });
-          if (!change) {
-            this.ruleForm.spec = "请选择规格!";
-            return;
-          } else {
-            this.ruleForm.spec = "";
-            let table = false;
-            let hasnot = false;
-            let stock = [];
-            this.right.specList.forEach((v1) => {
-              if (v1) {
-                v1.forEach((v2) => {
-                  if (v2 && v2.limit && v2.limit.length > 0) {
-                    let list = [];
-                    v2.limit.forEach((v3) => {
-                      if (v3.num != 0 && v3.price != 0) {
-                        table = true;
-                        list.push(v3);
-                      }
-                      if (
-                        (v3.num != 0 && v3.price == 0) ||
-                        (v3.num == 0 && v3.price !== 0)
-                      ) {
-                        hasnot = true;
-                      }
-                    });
-                    if (list.length > 0) {
-                      let model = Object.assign({}, v2);
-                      model.limit = list;
-                      stock.push(model);
-                    }
-                  }
-                });
-              }
-            });
-
-            if (hasnot) {
-              this.ruleForm.table =
-                "请选择起订量与成本价需成对填写,未成对请设为零!";
-            } else {
-              if (!table) {
-                this.ruleForm.table = "至少填写一堆起订量与成本价!";
-              } else {
-                this.ruleForm.table = "";
-                this.loading = true;
-                let obj = JSON.parse(JSON.stringify(this.baseForm));
-                obj.stock = stock;
-                obj.catid = obj.catid[obj.catid.length - 1];
-                obj.image = obj.image.join();
-                //split(",");
-                console.log(obj);
-                let res = {};
-                if (this.id === "add") {
-                  delete obj["id"];
-                  res = await asyncRequest.add(obj);
-                } else {
-                  res = await asyncRequest.update(obj);
-                }
-                this.loading = false;
-                if (res.code === 0) {
-                  let title = this.id === "add" ? "添加成功" : "修改成功";
-                  this.$notify.success({
-                    title,
-                    message: "",
-                  });
-                  this.showModelThis = false;
-                  // 刷新
-                  this.$emit("refresh");
-                }
-              }
-            }
-          }
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
-    async baseSubmitForm() {
-      await this.$refs.baseForm.validate(async (valid) => {
-        if (valid) {
-          await this.handleChange();
-        }
-      });
-    },
-    groupChange($event, index, item) {
-      this.$set(this.mock, index, item);
-      this.actionSpecList();
-    },
-    actionSpecList() {
-      // this.leftS = "0px";
-      this.left.header = [];
-      this.left.middle = [];
-      this.left.specList = [];
-      console.log(this.mock);
-      console.log(this.right.specList);
-      this.mock.forEach((v1) => {
-        if (
-          v1.change &&
-          v1.change.length > 0 &&
-          v1.child &&
-          v1.child.length > 0
-        ) {
-          this.left.header.push({
-            spec_id: v1.spec_id,
-            spec_name: v1.spec_name,
-          });
-          let arr = [];
-          let changeList = v1.change;
-          changeList.forEach((v2) => {
-            let index = v1.child.findIndex((v3) => v2 === v3.id);
-            if (index !== -1) {
-              let x = {
-                spec_id: v1.spec_id,
-                spec_name: v1.spec_name,
-                id: v1.child[index].id,
-                spec_value: v1.child[index].spec_value,
-              };
-              arr.push(x);
-            }
-          });
-          this.left.middle.push(arr);
-        }
-      });
-      let lang = this.left.header.length;
-      this.leftS = lang * 70 + "px";
-      if (this.left.middle.length > 1) {
-        this.left.specList = this.doExchange(this.left.middle);
-      } else if (this.left.middle.length === 0) {
-        this.left.specList = [];
-      } else {
-        let list1 = [];
-        this.left.middle.forEach((v1) => {
-          if (v1) {
-            v1.forEach((v2) => {
-              let list2 = [];
-              list2.push(v2);
-              list1.push(list2);
-            });
-          }
-        });
-        this.left.specList = list1;
-      }
-      this.right.header = [];
-      for (let i = 0; i < this.ladderNum; i++) {
-        this.right.header.push(this.headLadder);
-      }
-      this.right.specList = [];
-      this.left.specList.forEach((v1) => {
-        let arr = [];
-        let model = {
-          specid: [],
-          limit: [],
-        };
-        v1.forEach((v2) => {
-          model.specid.push(v2.id);
-        });
-        for (let i = 0; i < this.ladderNum; i++) {
-          let bodyLadder = {
-            num: 0,
-            price: 0,
-          };
-          model.limit.push(bodyLadder);
-        }
-        arr.push(model);
-        this.right.specList.push(arr);
-      });
-      console.log(this.right.specList);
-    },
-
-    closeLadder(index) {
-      console.log(index);
-    },
-    async handleChange(type) {
-      if (this.baseForm.catid !== this.oldcatid && this.oldcatid.length === 0) {
-        await this.specByCat();
-
-        if (this.step === 0 && !type) {
-          this.step = 1;
-        }
-      } else if (
-        this.baseForm.catid !== this.oldcatid &&
-        this.oldcatid.length > 0
-      ) {
-        await this.$confirm(
-          "分类修改会影响该商品规格与价格!",
-          "确定要修改?",
-          {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning",
-          }
-        )
-          .then(async () => {
-            await this.specByCat();
-            if (this.step === 0) {
-              this.step = 1;
-            }
-          })
-          .catch(() => {
-            this.baseForm.catid = this.oldcatid;
-          });
-      } else {
-        if (this.step === 0 && !type) {
-          this.step = 1;
-        }
-      }
-    },
-    //  商品种类ID换取规格值
-    async specByCat(type) {
-      console.log("准备拉取!");
-      this.mock = [];
-      this.$set(this.mock);
-      let list = this.baseForm.catid;
-      let res = await asyncRequest.specByCat({ catid: list[list.length - 1] });
-      if (res.code === 0) {
-        this.dealWitHInitMock(res.data, type);
-        this.oldcatid = list;
-      } else if (res.code !== 101 && res.code !== 102) {
-        this.baseForm.catid = this.oldcatid;
-      }
-    },
-    //  规格属性值新建
-    async specinfoadd(id, value) {
-      console.log(id, value);
-      let list = this.baseForm.catid;
-      let model = {
-        catid: list[list.length - 1],
-        specid: id,
-        spec_value: value,
-      };
-      let res = await asyncRequest.specinfoadd(model);
-      if (res.code === 0) {
-        await this.specByCat(true);
-      }
-    },
-    dealWitHInitMock(list, type) {
-      console.log(list, type);
-      if (!type) {
-        this.mock = [];
-        console.log("12345678");
-        console.log(this.mock);
-
-        this.left.header = [];
-        this.left.specList = [];
-        this.right.header = [];
-        this.right.specList = [];
-        list.map((v1) => {
-          v1.value = "";
-          v1.change = [];
-          return v1;
-        });
-        this.mock = list;
-        console.log(this.mock);
-        this.mock.forEach((v3, i) => {
-          this.$set(this.mock, i, v3);
-        });
-      } else {
-        let arr = JSON.parse(JSON.stringify(this.mock));
-        list.map((v1) => {
-          v1.value = "";
-          let index = arr.findIndex((v2) => v2.spec_id === v1.spec_id);
-          if (index !== -1) {
-            v1.change = arr[index].change;
-          }
-          return v1;
-        });
-        this.mock = list;
-        this.mock.forEach((v3, i) => {
-          this.$set(this.mock, i, v3);
-        });
-      }
-    },
-    async getAllbrandid() {
-      const res = await asyncRequest.brandAll({});
-      if (res.code === 0 && res.data) {
-        this.brandidOptions = res.data;
-      }
-    },
-    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 getAllSupplier() {
-      const res = await asyncRequest.supplierAll({});
-      if (res.code === 0 && res.data) {
-        let list = res.data;
-        this.supplierOptions = list;
-      }
-    },
-    //图片上传失败
-    UploadErrorEvent(res) {
-      if (res !== "break") {
-        this.$message.error("图片上传失败!");
-        this.$refs.ruleForm.validateField("image");
-      }
-    },
-    closeImg(index) {
-      this.baseForm.image.splice(index, 1);
-      this.$refs.baseForm.validateField("image");
-    },
-    //图片上传成功
-    async UploadSuccessEvent(data) {
-      const { url } = data;
-      if (url === "noToken") {
-        await this.logout();
-      } else {
-        this.baseForm.image.push(url);
-        this.$message.success("图片上传成功!");
-        this.$refs.baseForm.validateField("image");
-      }
-    },
-    //判断图片规格
-    beforeAvatarUpload(file) {
-      console.log(file);
-      let isJPG = false;
-      if (
-        file.type === "image/jpg" ||
-        file.type === "image/png" ||
-        file.type === "image/jpeg"
-      ) {
-        isJPG = true;
-      }
-      const isLt2M = file.size / 1024 / 1024 < 1;
-      if (!isJPG) {
-        this.$message.error("图片格式不正确!");
-      }
-      if (!isLt2M) {
-        this.$message.error("图片大小不能超过 1MB!");
-      }
-      return isJPG && isLt2M;
-    },
-    doExchange(arr) {
-      let len = arr.length;
-      // 当数组大于等于2个的时候
-      if (len >= 2) {
-        // 第一个数组的长度
-        let len1 = arr[0].length;
-        // 第二个数组的长度
-        let len2 = arr[1].length;
-        // 2个数组产生的组合数
-        let lenBoth = len1 * len2;
-        //  申明一个新数组
-        let items = new Array(lenBoth);
-        // 申明新数组的索引
-        let index = 0;
-        for (let i = 0; i < len1; i++) {
-          for (let j = 0; j < len2; j++) {
-            if (arr[0][i] instanceof Array) {
-              items[index] = arr[0][i].concat(arr[1][j]);
-            } else {
-              items[index] = [arr[0][i]].concat(arr[1][j]);
-            }
-            index++;
-          }
-        }
-        let newArr = new Array(len - 1);
-        for (let i = 2; i < arr.length; i++) {
-          newArr[i - 1] = arr[i];
-        }
-        newArr[0] = items;
-        return this.doExchange(newArr);
-      } else {
-        return arr[0];
-      }
-    },
-  },
-  watch: {
-    showModel: function (val) {
-      this.showModelThis = val;
-      if (val) {
-        this.initForm();
-      }
-    },
-    showModelThis(val) {
-      if (!val) {
-        this.$emit("cancel");
-      }
-    },
-  },
-};
-</script>
-
-   <style lang="scss" scoped>
-.dealGoodsPool {
-  $dealGoodsPoolBoderColor: #dfe6ec;
-  .tips-error {
-    color: #ff8888;
-    font-size: 12px;
-    height: 22px;
-    line-height: 20px;
-    padding-left: 60px;
-  }
-  .ladder-table {
-    position: relative;
-
-    width: 100%;
-    border: 1px solid $dealGoodsPoolBoderColor;
-
-    .left {
-      position: absolute;
-      top: 0;
-      left: 0;
-      z-index: 3;
-      background: #fff;
-      // width: 140px;
-      .ladder-header {
-        position: relative;
-        width: 100%;
-        .header-spec {
-          position: relative;
-          // border-bottom: 1px solid $dealGoodsPoolBoderColor;
-          li {
-            float: left;
-            width: 70px;
-            height: 50px;
-            line-height: 50px;
-            overflow: hidden;
-            padding: 0 10px;
-            font-size: 12px;
-            color: #909399;
-            border-right: 1px solid $dealGoodsPoolBoderColor;
-            span {
-              height: 25px;
-              line-height: 25px;
-              min-height: 50px;
-              overflow: hidden;
-            }
-          }
-        }
-      }
-      .ladder-body {
-        position: relative;
-        width: 100%;
-        ul {
-          width: 100%;
-          display: flex;
-          li {
-            flex: 1;
-            height: 40px;
-            line-height: 40px;
-            padding: 0 10px;
-            // border-top: 1px solid $dealGoodsPoolBoderColor;
-            // border-right: 1px solid $goodsBoderColor;
-            span {
-              display: block;
-              height: 40px;
-              width: 49px;
-              overflow: hidden;
-              line-height: 40px;
-              color: #606266;
-              font-size: 12px;
-              text-overflow: ellipsis;
-              white-space: normal;
-              word-break: break-all;
-              //               overflow: hidden;
-              // text-overflow:ellipsis;
-              // white-space: nowrap;
-            }
-          }
-        }
-      }
-    }
-    .right {
-      position: relative;
-      // padding-left: 140px;
-      width: 100%;
-      overflow-x: scroll;
-      background: #fff;
-      .ladder-header {
-        position: relative;
-        width: 100%;
-        .header-spec {
-          display: flex;
-          li {
-            min-width: 240px;
-            flex: 1;
-            .all {
-              width: 100%;
-              .title {
-                width: 100%;
-                height: 25px;
-                padding: 0 10px;
-                font-size: 12px;
-                color: #909399;
-                line-height: 25px;
-                text-align: center;
-                position: relative;
-                // border-right: 1px solid $goodsBoderColor;
-                // border-bottom: 1px solid $goodsBoderColor;
-                i {
-                  position: absolute;
-                  top: 2px;
-                  right: 2px;
-                  z-index: 2;
-                  &:hover {
-                    cursor: pointer;
-                  }
-                }
-              }
-              .main {
-                width: 100%;
-                height: 25px;
-                span {
-                  vertical-align: top;
-                  width: 50%;
-                  height: 25px;
-                  line-height: 25px;
-                  text-align: center;
-                  padding: 0 10px;
-                  font-size: 12px;
-                  color: #909399;
-                  line-height: 25px;
-                  display: inline-block;
-                  // border-right: 1px solid $goodsBoderColor;
-                  // border-bottom: 1px solid $goodsBoderColor;
-                }
-              }
-            }
-          }
-        }
-      }
-      .ladder-body {
-        position: relative;
-        width: 100%;
-        ul {
-          width: 100%;
-          position: relative;
-          li {
-            width: 100%;
-            display: flex;
-            .input-main {
-              flex: 1;
-              min-width: 240px;
-              .el-input-number {
-                .el-input {
-                  input.el-input_inner {
-                    border-radius: 0;
-                  }
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-  .mack-mian {
-    position: relative;
-    width: 100%;
-    .mock-item-div {
-      width: 100%;
-      background: rgba(246, 247, 248, 1);
-      padding: 12px 12px 0 12px;
-      margin: 0 0 10px 0;
-      .mock-title {
-        width: 100%;
-        padding: 0 0 5px 0;
-        border-bottom: 1px solid rgba(226, 226, 226, 1);
-      }
-    }
-  }
-}
-</style>
-   

+ 9 - 9
src/views/goodStore/dealGoodsPool/columns.js

@@ -42,9 +42,9 @@ const listCol = [
     width: "160px",
   },
   {
-    prop: "good_thumb_img",
+    prop: "good_img",
     label: "图片",
-    _slot_: "good_thumb_img",
+    _slot_: "good_img",
     width: "45px",
   },
   {
@@ -66,12 +66,12 @@ const listCol = [
     _slot_: "good_type",
     width: "70px",
   },
-  {
-    prop: "status",
-    label: "状态",
-    _slot_: "status",
-    width: "118px",
-  },
+  // {
+  //   prop: "status",
+  //   label: "状态",
+  //   _slot_: "status",
+  //   width: "118px",
+  // },
   {
     prop: "supplierNo",
     label: "供应商编号",
@@ -104,7 +104,7 @@ const listCol = [
     label: "操作",
     fixed: "right",
     _noset_: true,
-    width: "150px",
+    width: "50px",
     _slot_: "operation",
   },
 ]

+ 0 - 765
src/views/goodStore/dealGoodsPool/detail.vue

@@ -1,765 +0,0 @@
-<template>
-  <div class="goodsCost pagePadding">
-    <div
-      v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
-    >
-      <el-row style="margin-bottom: 10px">
-        <el-col :span="6" style="width: 316px">
-          <period-date-picker
-            :start="parmValue.start"
-            :end="parmValue.end"
-            :type="1"
-            :width="'147px'"
-            :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
-                :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>
-            </el-col>
-
-            <el-col :span="6">
-              <el-input
-                :size="searchSize"
-                style="100%"
-                v-model="parmValue.supplier_name"
-                :maxlength="40"
-                placeholder="供货商名称"
-              ></el-input>
-            </el-col>
-            <el-col :span="6">
-              <el-input
-                :size="searchSize"
-                style="100%"
-                v-model="parmValue.good_code"
-                :maxlength="40"
-                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-input
-                :size="searchSize"
-                v-model="parmValue.goods_name"
-                :maxlength="40"
-                placeholder="商品名称"
-              >
-                <el-button
-                  slot="append"
-                  icon="el-icon-search"
-                  @click="searchList"
-                ></el-button>
-              </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-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-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
-        >
-        <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>
-
-        <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>
-      <!-- <ladder-price
-        :showModel="showLadderPrice"
-        :left="left"
-        :right="right"
-        :lang="lang"
-        @cancel="showLadderPrice = false"
-      ></ladder-price> -->
-    </div>
-    <div v-else>
-      <no-auth></no-auth>
-    </div>
-  </div>
-</template>
-   <script>
-import mixinPage from "@/mixins/elPaginationHandle";
-import asyncRequest from "@/apis/service/goodStore/goodsCost";
-// import ladderPrice from "./ladderPrice";
-// import PeriodDatePicker from "@/components/PeriodDatePicker";
-import { statusList } from "@/assets/js/statusList";
-import { timestampToTime } from "@/utils/validate";
-import { mapGetters } from "vuex";
-export default {
-  name: "goodsCost",
-  components: {
-    // PeriodDatePicker,
-    // ladderPrice,
-  },
-  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],
-  computed: {
-    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
-    powers() {
-      let tran =
-        this.$store.getters.btnList.find(
-          (item) => item.menu_route == "goodsCost"
-        ) || {};
-      if (tran && tran.action && tran.action.length > 0) {
-        return tran.action;
-      } else {
-        return [];
-      }
-    },
-  },
-  mounted() {
-    // this.searchList();
-    // this.getAllCat();
-  },
-
-  methods: {
-    restSearch() {
-      this.parmValue = {
-        catid: "", //种类id
-        start: "", //起始时间,
-        end: "", //结束时间
-        sale_price_start: "", //最低售价
-        sale_price_end: "", //最高售价
-        status: "",
-        goods_name: "", //商品名称
-        good_code: "", //商品code
-        supplier_name: "", //供货商
-        page: 1, // 页码
-        size: 10, // 每页显示条数
-      };
-      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("取消");
-          });
-      } else {
-        this.$message.warning("只有已下架的商品才能被删除!");
-      }
-    },
-    showPrice(attr, left, right, lang) {
-      if (attr && attr.length > 0) {
-        this.left = left;
-        this.right = right;
-        this.lang = lang;
-        this.showLadderPrice = true;
-      } else {
-        this.$message.warning("该商品暂无阶梯价格信息!");
-      }
-    },
-    async searchList() {
-      if (
-        (this.parmValue.start !== "" && this.parmValue.end === "") ||
-        (this.parmValue.start === "" && this.parmValue.end !== "")
-      ) {
-        this.$message.warning("时间区间不完整!");
-        return;
-      }
-      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);
-      } else {
-        this.tableData = [];
-        this.count = 0;
-      }
-      this.loading = false;
-    },
-    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 statusConfirm(id, status, type) {
-      if (!type) {
-        return;
-      }
-      await this.$confirm(
-        `确定要改为${status === "1" ? "已下架" : "销售中"}?`,
-        {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        }
-      )
-        .then(async () => {
-          this.loading = true;
-          const model = {
-            goodids: id,
-            status: status === "1" ? "0" : "1",
-          };
-          const res = await asyncRequest.status(model);
-          if (res.code === 0) {
-            this.loading = false;
-            this.$notify.success({
-              title: "状态修改成功!",
-              message: "",
-            });
-            await this.searchList();
-          } else {
-            this.loading = false;
-          }
-        })
-        .catch(() => {
-          console.log("取消");
-        });
-    },
-  },
-};
-</script>
-   <style lang="scss" scoped>
-.goodsCost {
-  $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>
-   

+ 26 - 57
src/views/goodStore/dealGoodsPool/index.vue

@@ -102,21 +102,21 @@
         </div></template
       >
 
-      <template #good_thumb_img="{ scope }">
+      <template #good_img="{ scope }">
         <div
-          v-if="scope.row.good_thumb_img"
+          v-if="scope.row.good_img"
           style="width: 20px; height: 20px"
           class="hover"
           v-viewer
         >
           <img
-            :src="scope.row.good_thumb_img"
+            :src="scope.row.good_img"
             style="display: inline-block; width: 100%; height: 100%"
             alt=""
           />
         </div>
       </template>
-      <template #status="{ scope }">
+      <!-- <template #status="{ scope }">
         <el-tag
           :size="tablebtnSize"
           :type="scope.row.status == '0' ? '' : 'warning'"
@@ -125,7 +125,7 @@
               .name || '--'
           "
         ></el-tag>
-      </template>
+      </template> -->
       <template #good_type="{ scope }">
         <el-tag
           :size="tablebtnSize"
@@ -144,62 +144,20 @@
           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>
+          <i class="el-icon-view tb-icon" @click="show_view(scope.row)"></i>
         </el-tooltip>
       </template>
     </ex-table>
     <no-auth v-else></no-auth>
+    <show-goods-data-table-modal
+      :showModel="visible"
+      :type="'3'"
+      :title="row.dtitle"
+      :skuCode="row.skuCode"
+      :spuCode="row.spuCode"
+      :iscgd="false"
+      @cancel="visible = false"
+    />
   </div>
 </template>
 <script>
@@ -208,9 +166,13 @@ import mixinPage from "@/mixins/elPaginationHandle";
 import { mapGetters } from "vuex";
 import resToken from "@/mixins/resToken";
 import { listCol, options1 } from "./columns";
+import showGoodsDataTableModal from "@/components/show-goods-data-table-modal";
 export default {
   name: "dealGoodsPool",
   mixins: [mixinPage, resToken],
+  components: {
+    showGoodsDataTableModal,
+  },
   computed: {
     //组件SIZE设置
     ...mapGetters(["tablebtnSize", "searchSize", "size"]),
@@ -228,6 +190,8 @@ export default {
   },
   data() {
     return {
+      row: {},
+      visible: false,
       select: "1",
       sinput: "",
       statusList: [
@@ -288,6 +252,11 @@ export default {
     this.searchList();
   },
   methods: {
+    show_view(keyRow) {
+      this.row = keyRow;
+      this.row.dtitle = "咨询成交商品详情";
+      this.visible = true;
+    },
     restSearch() {
       this.supplierNo = [];
       this.cat_id = [];

Some files were not shown because too many files changed in this diff