Forráskód Böngészése

feat:添加供应商

snow 1 éve
szülő
commit
233184e3c7

+ 23 - 0
src/apis/service/sellOut/combinedAdd/index.js

@@ -0,0 +1,23 @@
+// 物业管理员
+import http from "@/apis/axios";
+const api = "admin/";
+export default {
+  // 添加
+  add: (data, params) => http(api + "salezxcreate", data, "post", params),
+  // 删除
+  delete: (data, params) => http(api + "Consultdel", data, "post", params),
+  // 分页查询
+  list: (data, params) => http(api + "saledifflist", data, "post", params),
+  // 详情
+  detail: (data, params) => http(api + "salediffinfo", data, "post", params),
+  // 更新
+  update: (data, params) => http(api + "update", data, "post", params),
+  // 修改状态
+  status: (data, params) => http(api + "salediffcheck", data, "post", params),
+  // 通知业务部门
+  fstatus: (data, params) => http(api + "salediffstatus", data, "post", params),
+  stock: (data, params) => http(api + 'warelist', data, 'post', params),
+  stockinfo: (data, params) => http(api + 'wareinfo', data, 'post', params),
+  productinfo: (data, params) => http(api + 'goodupinfo', data, 'post', params),
+  addrquery: (data, params) => http(api + 'addrquery', data, 'post', params)
+};

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

@@ -584,7 +584,7 @@ const basicColumns = [
     span: 24
   },
   {
-    prop: 'company',
+    prop: 'companyName',
     label: '业务公司',
     span: 12
   },

+ 6 - 3
src/views/goodStore/goodsCost/components/baseForm.vue

@@ -51,7 +51,7 @@
             </el-col>
 
             <el-col :span="6">
-              <el-form-item prop="is_combind" label="是否组合商品" label-width="110px">
+              <el-form-item prop="is_combind" label="组合类型" label-width="110px">
                 <el-select
                   style="width:100%"
                   v-model="ruleForm.is_combind"
@@ -59,14 +59,14 @@
                   @change="groupGoodChange"
                 >
                   <el-option v-if="ruleForm.is_stock === '1'" value="1" label="是组合商品" />
-                  <el-option value="0" label="不是组合商品" />
+                  <el-option value="0" label="组合商品" />
                 </el-select>
               </el-form-item>
             </el-col>
           </el-row>
 
           <el-row>
-            <el-col :span="12" v-if="ruleForm. is_combind === '0'">
+            <el-col :span="12">
               <el-form-item label="供应商" prop="supplierNo">
                 <search-supplier
                   :value="ruleForm.supplierNo"
@@ -1198,6 +1198,9 @@ export default {
     this.initForm();
   },
   methods: {
+    onCompanyChange() {
+      this.supplierNosearchChange({ code: this.currentCompany });
+    },
     onChildProdChange(index = null, type = "view") {
       this.modalType = type;
       this.editItem = index === null ? null : { ...this.childTableData[index] };

+ 21 - 2
src/views/goodStore/goodsCost/index.vue

@@ -217,7 +217,24 @@
                 />
               </el-select>
             </el-col>-->
-            <el-col :span="4" style="width: 420px">
+            <el-col :span="4" style="margin-right:10px">
+              <el-select
+                v-model="parmValue.is_combind"
+                placeholder="是否组合商品"
+                style="width:100%"
+                size="mini"
+                @change="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+              >
+                <el-option label="是组合商品" value="1" />
+                <el-option label="不是组合商品" value="0" />
+              </el-select>
+            </el-col>
+
+            <el-col :span="4" style="width: 360px">
               <el-input
                 :size="searchSize"
                 v-model="sinput"
@@ -593,6 +610,7 @@ export default {
       parmValue: {
         page: 1, // 页码
         size: 15, // 每页显示条数
+        is_combind: "",
         is_stock: "",
         start: "",
         end: "",
@@ -733,7 +751,8 @@ export default {
         good_type: "",
         isonline: "",
         companyNo: "",
-        supplierNo: ""
+        supplierNo: "",
+        is_combind: ""
       };
       this.searchList();
     },

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

@@ -564,7 +564,7 @@ const basicColumns = [
     span: 24
   },
   {
-    prop: 'company',
+    prop: 'companyName',
     label: '业务公司',
     span: 12
   },

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 402 - 350
src/views/goodStore/supplierGoodsCost/components/baseForm.vue


+ 497 - 0
src/views/goodStore/supplierGoodsCost/components/productListModal.vue

@@ -0,0 +1,497 @@
+<template>
+  <el-dialog
+    center
+    title="选择子商品"
+    :visible="_visible"
+    @close="handleClose"
+    :close-on-click-modal="false"
+    :append-to-body="true"
+    width="1024px"
+    top="5vh"
+    class="child-product"
+  >
+    <ex-table
+      v-loading="loading"
+      :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();
+      "
+      @selection="selectionChange"
+    >
+      <template #table-header="{}">
+        <div style="width: 100%">
+          <el-row style="padding: 0 0 10px 0px">
+            <el-col :span="6" style="width: 303px">
+              <period-date-picker
+                :type="1"
+                :width="'135px'"
+                :size="searchSize"
+                :start="parmValue.start"
+                :end="parmValue.end"
+                @timeReturned="handleTime"
+              />
+            </el-col>
+            <el-col :span="4" style="width: 135px">
+              <search-brand
+                :value="brandid"
+                :disabled="false"
+                :size="'mini'"
+                :isDetail="true"
+                :names="parmValue.supplierName"
+                :placeholder="'商品品牌'"
+                @searchChange="brandidsearchChange"
+              />
+            </el-col>
+            <el-col :span="6" style="width: 310px; padding: 0 0 0 10px">
+              <good-class
+                :value="parmValue.cat_id"
+                @handleChange="goods_class_change"
+                :disabled="false"
+                :size="searchSize"
+                :isDetail="false"
+                :placeholder="'分类'"
+              />
+            </el-col>
+
+            <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-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: 226px">
+              <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="4" style="width: 145px; padding: 0 0 0 0px">
+              <el-select
+                v-model="parmValue.isonline"
+                filterable
+                clearable
+                :size="searchSize"
+                placeholder="是否上线"
+                style="width: 100%"
+                @change="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+              >
+                <el-option
+                  v-for="item in isonlineoptions"
+                  :key="'isonline' + item.id"
+                  :label="item.name"
+                  :value="item.id"
+                />
+              </el-select>
+            </el-col>
+
+            <!-- <el-col :span="4" style="width: 135px;margin-left:10px">
+              <el-select
+                v-model="parmValue.is_stock"
+                size="mini"
+                style="width: 100%"
+                placeholder="商品类型"
+                clearable
+                @change="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+              >
+                <el-option
+                  v-for="opt in isStockOptions"
+                  :key="opt.value"
+                  :value="opt.value"
+                  :label="opt.label"
+                />
+              </el-select>
+            </el-col>-->
+            <el-col :span="4" style="margin: 0 10px">
+              <search-supplier
+                :size="'mini'"
+                style="width: 165px"
+                :value="supplierNo"
+                :disabled="false"
+                :placeholder="'供应商名称'"
+                :isDetail="false"
+                :noDisabled="true"
+                :names="''"
+                @searchChange="supplierChange"
+              />
+            </el-col>
+
+            <el-col :span="4" style="width: 420px">
+              <el-input
+                :size="searchSize"
+                v-model="sinput"
+                :maxlength="40"
+                @blur="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+                placeholder="关键字"
+              >
+                <el-select
+                  v-model="select"
+                  slot="prepend"
+                  style="width: 135px"
+                  @change="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
+                  placeholder="关键字类型"
+                >
+                  <el-option label="商品编号" value="1" />
+                  <el-option label="商品名称" value="2" />
+                </el-select>
+              </el-input>
+            </el-col>
+          </el-row>
+        </div>
+      </template>
+
+      <template #spuCode="{ scope }">
+        <div style="display:flex;align-items:center">
+          <p>{{scope.row.spuCode}}</p>
+        </div>
+      </template>
+
+      <template #good_thumb_img="{ scope }">
+        <div
+          v-if="scope.row.good_thumb_img"
+          style="width: 20px; height: 20px"
+          class="hover"
+          v-viewer
+        >
+          <img
+            :src="scope.row.good_thumb_img"
+            style="display: inline-block; width: 100%; height: 100%"
+            alt
+          />
+        </div>
+      </template>
+      <template #status="{ scope }">
+        <el-tag
+          :size="tablebtnSize"
+          :type="
+            (statusList.find((item) => item.code == scope.row.status) || {}).type || '--'
+          "
+          v-text="
+            (statusList.find((item) => item.code == scope.row.status) || {}).name || '--'
+          "
+        ></el-tag>
+      </template>
+      <template #has_account="{ scope }">
+        <el-tag
+          :size="tablebtnSize"
+          :type="
+            (
+              has_account_list.find((item) => item.code == scope.row.has_account + '') ||
+              {}
+            ).type || '--'
+          "
+          v-text="
+            (
+              has_account_list.find((item) => item.code == scope.row.has_account + '') ||
+              {}
+            ).name || '--'
+          "
+        ></el-tag>
+      </template>
+      <template #isonline="{ scope }">
+        <el-tag
+          :size="tablebtnSize"
+          :type="scope.row.is_online == '0' ? 'warning' : ''"
+          v-text="
+            (isonlineoptions.find((item) => item.id == scope.row.is_online) || {}).name ||
+            '--'
+          "
+        ></el-tag>
+      </template>
+      <template #is_stock="{ scope }">
+        <el-tag
+          :size="tablebtnSize"
+          :type="scope.row.is_stock == '0' ? 'warning' : ''"
+          v-text="
+            (options4.find((item) => item.id == scope.row.is_stock) || {}).name || '--'
+          "
+        ></el-tag>
+      </template>
+    </ex-table>
+
+    <div style="display:flex;justify-content:flex-end">
+      <el-button size="mini" type="primary" @click="onSave">保 存</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import { listCol, options1, options4 } from "./../columns";
+import { has_account_list, isStockOptions } from "@/assets/js/statusList";
+import asyncRequest from "@/apis/service/goodStore/goodsCost";
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+
+export default {
+  name: "ProductListModal",
+  props: ["visible"],
+  mixins: [mixinPage, resToken],
+  computed: {
+    _visible: {
+      get() {
+        return this.visible;
+      },
+      set(nV) {
+        this.$emit("update:visible", nV);
+      }
+    }
+  },
+  watch: {
+    visible(v) {
+      if (!v) return;
+      this.searchList();
+    }
+  },
+  data() {
+    return {
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: []
+      },
+      loading: false,
+      columns: listCol.filter(({ label }) => {
+        return !["操作"].includes(label);
+      }),
+      selected: [],
+      options1,
+      options4,
+      size: "mini",
+      searchSize: "mini",
+      tablebtnSize: "mini",
+      sinput: "",
+      select: "1",
+      parmValue: {
+        page: 1, // 页码
+        size: 10, // 每页显示条数
+        is_stock: "",
+        start: "",
+        end: "",
+        status: "",
+        good_name: "",
+        spucode: "",
+        cat_id: [],
+        brandid: "",
+        good_type: "",
+        companyNo: "",
+        supplierNo: "",
+        isonline: "",
+        company_name: "" //创建人部门
+      },
+      has_account_list,
+      isStockOptions,
+      pageInfo: {
+        size: 10,
+        curr: 1,
+        total: 0
+      },
+      isonlineoptions: [
+        { id: "0", name: "未上线" },
+        { id: "1", name: "已上线" }
+      ],
+      statusList: [
+        {
+          code: "0",
+          name: "新建待审核",
+          type: ""
+        },
+        {
+          code: "1",
+          name: "审核通过",
+          type: "success"
+        },
+        {
+          code: "2",
+          name: "基础修改待审核",
+          type: ""
+        },
+        {
+          code: "3",
+          name: "成本修改待审核",
+          type: ""
+        },
+        {
+          code: "4",
+          name: "基础修改驳回",
+          type: "danger"
+        },
+        {
+          code: "5",
+          name: "成本修改驳回",
+          type: "danger"
+        },
+        {
+          code: "6",
+          name: "新建审核驳回",
+          type: "danger"
+        },
+        {
+          code: "7",
+          name: "复制商品待编辑",
+          type: "info"
+        },
+        {
+          code: "8",
+          name: "竞价商品待编辑",
+          type: "info"
+        }
+      ],
+      tableData: []
+    };
+  },
+  methods: {
+    selectionChange(evt) {
+      const { list } = evt;
+      this.selected = list;
+    },
+    restSearch() {
+      this.select = "2";
+      this.sinput = "";
+      this.supplierNo = [];
+      this.brandid = [];
+      // 表格 - 分页
+      this.pageInfo = {
+        size: 15,
+        curr: 1,
+        total: 0
+      };
+      this.parmValue = {
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+        start: "",
+        end: "",
+        status: "",
+        good_name: "",
+        company_name: "", //创建人部门
+        spucode: "",
+        cat_id: [],
+        brandid: "",
+        good_type: "",
+        isonline: "",
+        companyNo: "",
+        supplierNo: ""
+      };
+      this.searchList();
+    },
+    handleClose() {
+      this.selected = [];
+      this._visible = false;
+    },
+    proportionChange(proportion) {
+      this.ruleForm.proportion = proportion;
+    },
+    onSave() {
+      if (this.selected.length === 0 || this.selected.length > 1) {
+        const message =
+          this.selected.length === 0 ? "请选择一条商品" : "只能选择一条商品";
+        this.$message.warning(message);
+        return;
+      }
+
+      const { spuCode } = this.selected[0];
+      this.$emit("selected", spuCode);
+      this._visible = false;
+    },
+    async searchList() {
+      if (
+        (this.parmValue.start !== "" && this.parmValue.end === "") ||
+        (this.parmValue.start === "" && this.parmValue.end !== "")
+      ) {
+        this.$message.warning("时间区间不完整!");
+        return;
+      }
+      this.loading = true;
+      let item = JSON.parse(JSON.stringify(this.parmValue));
+      item.spucode = this.select === "1" ? this.sinput : "";
+      item.good_name = this.select === "2" ? this.sinput : "";
+      item.companyNo = this.select === "3" ? this.sinput : "";
+      item.supplierNo = this.select === "4" ? this.sinput : "";
+      item.company_name = this.select === "5" ? this.sinput : ""; // 部门
+      item.cat_id =
+        item.cat_id.length > 0 ? item.cat_id[item.cat_id.length - 1] : "";
+      const res = await asyncRequest.list({
+        ...item,
+        supplierNo: this.currentCompany,
+        noRelation: true,
+        is_stock: "1",
+        status: "1"
+      });
+
+      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.getresultlist();
+      this.loading = false;
+    }
+  }
+};
+</script>
+
+
+<style lang="scss" scoped>
+.child-product {
+  /deep/ .el-pagination {
+    float: left !important;
+  }
+}
+</style>

+ 303 - 0
src/views/goodStore/supplierGoodsCost/components/productModal.vue

@@ -0,0 +1,303 @@
+<template>
+  <el-dialog
+    center
+    :title="title"
+    :visible="_visible"
+    @close="handleClose"
+    :close-on-click-modal="false"
+    width="1024px"
+  >
+    <el-form ref="formRef" label-width="80px" size="mini" :model="ruleForm" :rules="rules">
+      <el-form-item label="子商品" prop="childCode">
+        <el-input
+          v-if="!ruleForm.childCode"
+          style="cursor: pointer"
+          placeholder="选择子商品"
+          v-model="ruleForm.childCode"
+          @focus="pVisible = true"
+        />
+
+        <div v-else style="display:flex">
+          <show-data-table :columns="basicColumns" :sitem="sitem">
+            <template slot="packing_spec">
+              <el-tag
+                size="mini"
+              >{{ ( options6.find(({id}) => id === sitem && sitem.supply_area) || {}).name || '--' }}</el-tag>
+            </template>
+
+            <template slot="is_auth">
+              <el-tag
+                size="mini"
+              >{{ ( options3.find(({id}) => id === sitem.is_auth) || {}).name || '--' }}</el-tag>
+            </template>
+
+            <template slot="good_info_img">
+              <div style="max-height: 24px; overflow: hidden">
+                <el-image
+                  style="height: 24px; width: 24px"
+                  :src="sitem.good_info_img"
+                  :preview-src-list="[sitem.good_info_img]"
+                />
+              </div>
+            </template>
+
+            <template slot="cat_info">
+              {{
+              sitem.cat_info
+              ? sitem.cat_info.map(({ name }) => name).join("_")
+              : "--"
+              }}
+            </template>
+
+            <template slot="good_name">
+              <img
+                v-if="sitem.good_thumb_img"
+                v-viewer
+                style="width: 23px; height: 23px; margin: 0 5px 0 0"
+                class="fl"
+                :src="sitem.good_thumb_img"
+                alt
+              />
+              <span>{{ sitem.good_name }}</span>
+              <span v-for="(si, i) in sitem.speclist" :key="si.spec_id + i">
+                <span v-if="i !== 0">-</span>
+                <span v-else>_</span>
+                <span>{{ si.spec_name }}[{{ si.spec_value }}]</span>
+              </span>
+              <el-popover placement="top" width="300" trigger="hover">
+                <ul>
+                  <li v-if="newTime !== '' && isDisplayPrivateField('1')">
+                    <span>商品成本编号:</span>
+                    <span>{{ sitem.spuCode }}</span>
+                  </li>
+                </ul>
+                <i slot="reference" class="el-icon-warning-outline fr" />
+              </el-popover>
+            </template>
+
+            <template slot="noble">
+              <span v-if="sitem.noble_metal">
+                {{ sitem.noble_weight ? sitem.noble_weight : "0" }}g-{{
+                sitem.noble_name
+                }}-{{ sitem.gold_price ? sitem.gold_price : "0" }}元/g-{{
+                sitem.is_gold_price + "" === "0" ? "不" : ""
+                }}启用实时金价-{{ sitem.is_diff + "" === "1" ? "有" : "无" }}工差-{{
+                sitem.config
+                }}-{{ sitem.other_config }}
+              </span>
+            </template>
+
+            <template slot="weight">{{ sitem.weight }}g</template>
+            <template slot="tax">{{ sitem.tax }}%</template>
+            <template slot="is_stock">{{ String(sitem.is_stock) === "0" ? "非库存品" : "库存品" }}</template>
+            <template slot="is_exclusive">{{ String(sitem.is_exclusive) === "0" ? "非泰康" : "泰康" }}</template>
+            <template slot="noble_weight">{{ sitem.noble_weight }}g</template>
+            <template slot="is_gold_price">
+              {{
+              String(sitem.is_gold_price) === "1" ? "是" : "否"
+              }}
+            </template>
+            <template slot="is_diff">
+              {{
+              String(sitem.is_diff) === "1" ? "有公差" : "无工差"
+              }}
+            </template>
+
+            <template slot="packing_weight">{{ sitem.packing_weight }}g</template>
+
+            <template slot="delivery_day">{{ sitem.delivery_day }}天</template>
+            <template slot="lead_time">{{ sitem.lead_time }}天</template>
+            <template slot="sample_day">{{ sitem.sample_day }}天</template>
+            <template slot="delivery_place">{{ delivery_place }}</template>
+            <template slot="origin_place">{{ origin_place }}</template>
+          </show-data-table>
+
+          <el-tooltip content="重新选择子商品" placement="top" v-if="type !== 'view'">
+            <i
+              class="el-icon-circle-close"
+              @click="resetProduct"
+              style="cursor:pointer;font-size:18px;margin-left:10px"
+            />
+          </el-tooltip>
+        </div>
+      </el-form-item>
+
+      <el-form-item label="组合比例" prop="child_num">
+        <digital-input
+          :disabled="this.type === 'view'"
+          :values="ruleForm.child_num"
+          :placeholder="'组合比例'"
+          :min="0"
+          :max="100"
+          :position="'right'"
+          :precision="0"
+          :controls="false"
+          size="mini"
+          :append="''"
+          @reschange="child_numChange"
+        />
+      </el-form-item>
+
+      <el-form-item v-if="type !== 'view'">
+        <div style="display:flex;justify-content:flex-end">
+          <el-button type="primary" @click="submit">保 存</el-button>
+        </div>
+      </el-form-item>
+    </el-form>
+
+    <product-list-modal :visible.sync="pVisible" @selected="handleProductChange" />
+  </el-dialog>
+</template>
+
+<script>
+import ProductListModal from "./productListModal.vue";
+import asyncRequest from "@/apis/service/goodStore/goodsCost";
+import privateField from "@/mixins/privateField";
+
+import {
+  basicColumns,
+  packingColumns,
+  sendColumns,
+  imageColumns,
+  ladderColumns,
+  options3,
+  options6
+} from "./../columns";
+
+export default {
+  name: "ProductModal",
+  props: ["visible", "editItem", "editIndex", "type"],
+  components: { ProductListModal },
+  mixins: [privateField],
+  computed: {
+    _visible: {
+      get() {
+        return this.visible;
+      },
+      set(nV) {
+        this.$emit("update:visible", nV);
+      }
+    },
+    title() {
+      const mapTitle = {
+        add: "添加子商品",
+        edit: "编辑子商品",
+        view: "查看子商品"
+      };
+      return mapTitle[this.type];
+    }
+  },
+  watch: {
+    editItem: {
+      handler(v) {
+        console.log(v);
+        if (!v) return;
+        const { childCode, goodType, child_name, child_num } = v;
+        this.handleProductChange(childCode);
+        this.ruleForm = {
+          childCode,
+          goodType,
+          child_name,
+          child_num
+        };
+      },
+      deep: true
+    }
+  },
+  data() {
+    return {
+      basicColumns,
+      packingColumns,
+      sendColumns,
+      imageColumns,
+      ladderColumns,
+      options3,
+      options6,
+      newTime: "",
+      loading: false,
+      pVisible: false,
+      ruleForm: {
+        childCode: "",
+        goodType: "",
+        child_name: "",
+        child_num: ""
+      },
+      sitem: null,
+      rules: {
+        childCode: [
+          {
+            required: true,
+            trigger: "change",
+            message: "请选择子商品"
+          }
+        ],
+        child_num: [
+          {
+            required: true,
+            trigger: "change",
+            message: "请输入组合比例"
+          }
+        ]
+      }
+    };
+  },
+  methods: {
+    handleClose() {
+      this.ruleForm = {
+        childCode: "",
+        goodType: "",
+        child_name: "",
+        child_num: ""
+      };
+      this._visible = false;
+    },
+    child_numChange(child_num) {
+      this.ruleForm.child_num = child_num;
+    },
+    resetProduct() {
+      this.ruleForm.childCode = "";
+      this.ruleForm.goodType = "";
+      this.ruleForm.child_name = "";
+      this.sitem = null;
+    },
+    getNewTime() {
+      this.newTime = new Date().valueOf();
+    },
+    async submit() {
+      try {
+        await this.$refs.formRef.validate();
+        console.log(this.editIndex);
+        this.$emit("save", this.ruleForm, this.editIndex);
+        this._visible = false;
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    async handleProductChange(spuCode) {
+      this.loading = true;
+
+      const { code, message, data } = await asyncRequest.detail({
+        spuCode
+      });
+
+      this.loading = false;
+      if (code === 0) {
+        this.sitem = JSON.parse(JSON.stringify(data));
+
+        const { good_name, good_type, spuCode } = this.sitem;
+        this.ruleForm.childCode = spuCode;
+        this.ruleForm.goodType = good_type;
+        this.ruleForm.child_name = good_name;
+
+        this.getNewTime();
+
+        this.$nextTick(() => this.$refs.formRef.validateField("childCode"));
+      } else if (code >= 100 && code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(message);
+      }
+    }
+  }
+};
+</script>

+ 245 - 142
src/views/goodStore/supplierGoodsCost/index.vue

@@ -25,7 +25,7 @@
       <template #table-header="{}">
         <div style="width: 100%">
           <el-row style="padding: 0 0 10px 80px">
-            <el-col :span="6" style="width: 301px">
+            <el-col :span="6" style="width: 303px">
               <period-date-picker
                 :type="1"
                 :width="'135px'"
@@ -35,8 +35,18 @@
                 @timeReturned="handleTime"
               />
             </el-col>
-
-            <el-col :span="6" style="width: 310px">
+            <el-col :span="4" style="width: 135px">
+              <search-brand
+                :value="brandid"
+                :disabled="false"
+                :size="'mini'"
+                :isDetail="true"
+                :names="parmValue.supplierName"
+                :placeholder="'商品品牌'"
+                @searchChange="brandidsearchChange"
+              />
+            </el-col>
+            <el-col :span="6" style="width: 310px; padding: 0 0 0 10px">
               <good-class
                 :value="parmValue.cat_id"
                 @handleChange="goods_class_change"
@@ -48,14 +58,11 @@
             </el-col>
 
             <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-button type="primary" :size="searchSize" @click="searchList">刷新</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-button type="warning" :size="searchSize" @click="restSearch">重置</el-button>
             </el-col>
           </el-row>
           <el-row>
@@ -104,12 +111,61 @@
               </el-select>
             </el-col>
 
-            <el-col :span="4" style="width: 320px; padding: 0 0 0 10px">
-              <search-work-company
-                :value="parmValue.companyNo"
-                :placeholder="'业务公司'"
+            <el-col :span="4" style="width: 135px;margin-left:10px">
+              <el-select
+                v-model="parmValue.is_stock"
+                size="mini"
+                style="width: 100%"
+                placeholder="商品类型"
+                clearable
+                @change="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+              >
+                <el-option
+                  v-for="opt in isStockOptions"
+                  :key="opt.value"
+                  :value="opt.value"
+                  :label="opt.label"
+                />
+              </el-select>
+            </el-col>
+
+            <!-- <el-col :span="4" style="width: 147px; padding: 0 0 0 10px">
+              <el-select
+                v-model="parmValue.has_account"
+                filterable
+                clearable
                 :size="searchSize"
-                @searchChange="companyNosearchChange"
+                placeholder="供应商账号"
+                style="width: 100%"
+                @change="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+              >
+                <el-option
+                  v-for="item in has_account_list"
+                  :key="'status' + item.code"
+                  :label="item.name"
+                  :value="item.code"
+                />
+              </el-select>
+            </el-col>-->
+            <el-col :span="3" style="margin: 0 10px">
+              <search-supplier
+                :size="'mini'"
+                style="width: 300px"
+                :value="supplierNo"
+                :disabled="false"
+                :placeholder="'供应商名称'"
+                :names="''"
+                :isDetail="false"
+                :noDisabled="true"
+                @searchChange="supplierChange"
               />
             </el-col>
 
@@ -117,47 +173,30 @@
               :span="3"
               class="fr"
               style="width: 66px; padding: 0 0 0 10px"
-              v-if="powers.some((i) => i == '003')"
+              v-if="powers.some((i) => i == '003') && !isSupertube"
             >
               <el-button
                 :size="searchSize"
                 type="success"
                 style="float: right"
                 @click="handleCreate"
-              >
-                添加
-              </el-button>
+              >添加</el-button>
             </el-col>
-            <!-- <el-col
+            <el-col
               :span="3"
               class="fr"
               style="width: 110px; padding: 0 0 0 10px"
-              v-if="powers.some((i) => i == '055')"
+              v-if="powers.some((i) => i == '055') && !isSupertube"
             >
-              <el-button
-                :size="searchSize"
-                type="warning"
-                style="float: right"
-                @click="add_online"
-              >
+              <el-button :size="searchSize" type="warning" style="float: right" @click="add_online">
                 <i class="el-icon-circle-plus-outline"></i>
                 <span>商品上线</span>
               </el-button>
-            </el-col> -->
+            </el-col>
           </el-row>
+
           <el-row style="margin-top: 10px">
-            <el-col :span="4" style="width: 225px">
-              <search-brand
-                :value="brandid"
-                :disabled="false"
-                :size="'mini'"
-                :isDetail="true"
-                :names="parmValue.supplierName"
-                :placeholder="'商品品牌'"
-                @searchChange="brandidsearchChange"
-              />
-            </el-col>
-            <el-col :span="4" style="width: 145px; padding: 0 0 0 10px">
+            <!-- <el-col :span="4" style="width: 225px">
               <el-select
                 v-model="parmValue.is_stock"
                 size="mini"
@@ -177,8 +216,25 @@
                   :label="opt.label"
                 />
               </el-select>
+            </el-col>-->
+            <el-col :span="4" style="margin-right:10px">
+              <el-select
+                v-model="parmValue.is_combind"
+                placeholder="是否组合商品"
+                style="width:100%"
+                size="mini"
+                @change="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+              >
+                <el-option label="是组合商品" value="1" />
+                <el-option label="不是组合商品" value="0" />
+              </el-select>
             </el-col>
-            <el-col :span="4" style="width: 420px; padding: 0 0 0 10px">
+
+            <el-col :span="4" style="width: 360px">
               <el-input
                 :size="searchSize"
                 v-model="sinput"
@@ -189,7 +245,8 @@
                   searchList();
                 "
                 placeholder="关键字"
-                ><el-select
+              >
+                <el-select
                   v-model="select"
                   slot="prepend"
                   style="width: 135px"
@@ -205,12 +262,18 @@
                   <!-- <el-option label="业务企业编号" value="3" /> -->
                   <!-- <el-option label="供应商编号" value="4" /> -->
                   <!-- <el-option label="创建人部门" value="5" /> -->
-                </el-select></el-input
-              >
+                </el-select>
+              </el-input>
             </el-col>
           </el-row>
-        </div></template
-      >
+        </div>
+      </template>
+
+      <template #spuCode="{ scope }">
+        <div style="display:flex;align-items:center">
+          <p>{{scope.row.spuCode}}</p>
+        </div>
+      </template>
 
       <template #good_thumb_img="{ scope }">
         <div
@@ -222,7 +285,7 @@
           <img
             :src="scope.row.good_thumb_img"
             style="display: inline-block; width: 100%; height: 100%"
-            alt=""
+            alt
           />
         </div>
       </template>
@@ -237,6 +300,29 @@
           "
         ></el-tag>
       </template>
+      <template #has_account="{ scope }">
+        <el-tag
+          :size="tablebtnSize"
+          :type="
+            (
+              has_account_list.find((item) => item.code == scope.row.has_account + '') ||
+              {}
+            ).type || '--'
+          "
+          v-text="
+            (
+              has_account_list.find((item) => item.code == scope.row.has_account + '') ||
+              {}
+            ).name || '--'
+          "
+        ></el-tag>
+      </template>
+      <template #is_combind="{ scope }">
+        <el-tag
+          size="mini"
+          :type="scope.row.is_combind === '1' ? '' : 'warning'"
+        >{{scope.row.is_combind === '1' ? '是组合商品' : '不是组合商品'}}</el-tag>
+      </template>
       <template #isonline="{ scope }">
         <el-tag
           :size="tablebtnSize"
@@ -269,23 +355,25 @@
             @click="getRouter('supplierGoodsCostDetail', scope.row.spuCode)"
           ></i>
         </el-tooltip>
-        <!-- <el-tooltip
-          v-if="powers.some((i) => i == '079') && scope.row.status !== '8'"
+        <el-tooltip
+          v-if="
+            powers.some((i) => i == '079') && scope.row.status !== '8' && !isSupertube
+          "
           effect="dark"
           content="下线商品"
           placement="top"
         >
-          <i
-            class="el-icon-download tb-icon"
-            @click="showDonlineDlg(scope.row.spuCode)"
-          ></i>
-        </el-tooltip> -->
-        <!-- (scope.row.is_stock + '' === '0') -->
+          <i class="el-icon-download tb-icon" @click="showDonlineDlg(scope.row.spuCode)"></i>
+        </el-tooltip>
+
+        <!-- scope.row.has_account + '' == '0' && -->
         <el-tooltip
           v-if="
-            (ppowers.some((i) => i == '7') && scope.row.status + '' === '7') ||
-            (ppowers.some((i) => i == '6') && scope.row.status + '' === '6') ||
-            (ppowers.some((i) => i == '8') && scope.row.status + '' === '8')
+            (((ppowers.some((i) => i == '7') && scope.row.status + '' === '7') ||
+              (ppowers.some((i) => i == '6') && scope.row.status + '' === '6') ||
+              (ppowers.some((i) => i == '8') && scope.row.status + '' === '8')) &&
+            (scope.row.is_stock + '' === '0' || scope.row.is_stock + '' === '1')) &&
+            !isSupertube && String(scope.row.has_account) === '0'
           "
           effect="dark"
           content="修改"
@@ -303,8 +391,10 @@
         </el-tooltip>
         <el-tooltip
           v-if="
-            ppowers.some((i) => i == '4') &&
-            (scope.row.status + '' === '4' || scope.row.status + '' === '1')
+            (ppowers.some((i) => i == '4') &&
+            (scope.row.status + '' === '4' || scope.row.status + '' === '1') &&
+            (scope.row.is_stock + '' === '0' || scope.row.is_stock + '' === '1')) &&
+            !isSupertube && String(scope.row.has_account) === '0'
           "
           effect="dark"
           content="修改基础信息"
@@ -315,10 +405,13 @@
             @click="wantto(scope.row.is_online, scope.row.spuCode, scope.row.status, '2')"
           ></i>
         </el-tooltip>
+        <!-- scope.row.has_account + '' == '0' &&  -->
         <el-tooltip
           v-if="
-            ppowers.some((i) => i == '5') &&
-            (scope.row.status + '' === '5' || scope.row.status + '' === '1')
+            (ppowers.some((i) => i == '5') &&
+            (scope.row.status + '' === '5' || scope.row.status + '' === '1') &&
+            (scope.row.is_stock + '' === '0' || scope.row.is_stock + '' === '1')) &&
+            !isSupertube && String(scope.row.has_account) === '0' 
           "
           effect="dark"
           content="修改成本信息"
@@ -333,26 +426,24 @@
           v-if="
             powers.some((i) => i == '010') &&
             !(scope.row.status + '' === '7' || scope.row.status + '' === '8') &&
+            !isSupertube &&
             String(scope.row.createrid) !== '0'
           "
           effect="dark"
           content="复制商品"
           placement="top"
         >
-          <i
-            class="el-icon-document-copy tb-icon"
-            @click="good_copy(scope.row.spuCode)"
-          ></i>
+          <i class="el-icon-document-copy tb-icon" @click="good_copy(scope.row.spuCode)"></i>
         </el-tooltip>
 
-        <!-- <el-tooltip
-          v-if="powers.some((i) => i == '006')"
+        <el-tooltip
+          v-if="powers.some((i) => i == '006') && !isSupertube"
           effect="dark"
           content="删除"
           placement="top"
         >
           <i class="el-icon-delete tb-icon" @click="deleteItem(scope.row.spuCode)"></i>
-        </el-tooltip> -->
+        </el-tooltip>
       </template>
     </ex-table>
     <no-auth v-else></no-auth>
@@ -404,36 +495,39 @@
 </template>
 <script>
 import asyncRequest from "@/apis/service/goodStore/goodsCost";
+import { listCol, options1, options4 } from "./columns";
+import { has_account_list, isStockOptions } from "@/assets/js/statusList";
 import mixinPage from "@/mixins/elPaginationHandle";
-import { mapGetters } from "vuex";
 import resToken from "@/mixins/resToken";
-import { listCol, options1, options4 } from "./columns";
-import { isStockOptions } from "@/assets/js/statusList";
-import addEdit from "./components/addEdit";
 import companyHelper from "@/mixins/companyHelper";
+import addEdit from "./components/addEdit";
+
+import { mapGetters } from "vuex";
 export default {
   name: "goodsCost",
   mixins: [mixinPage, resToken, companyHelper],
   components: {
-    addEdit,
+    addEdit
   },
   computed: {
     //组件SIZE设置
-    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    ...mapGetters(["tablebtnSize", "searchSize", "size", "isSupertube"]),
     powers() {
       const tran =
-        this.$store.getters.btnList.find((i) => i.menu_route == "supplierGoodsCost") ||
-        {};
+        this.$store.getters.btnList.find(
+          i => i.menu_route == "supplierGoodsCost"
+        ) || {};
       const { action } = tran ?? {};
       return action ?? [];
     },
     ppowers() {
       const tran =
-        this.$store.getters.roleProcess.find((i) => i.process_type === "SPCB") || {};
+        this.$store.getters.roleProcess.find(i => i.process_type === "SPCB") ||
+        {};
       const { action } = tran ?? {};
       console.log(action);
-      return action ?? [];
-    },
+      return action || [];
+    }
   },
   data() {
     var validate = (rule, value, callback) => {
@@ -444,68 +538,73 @@ export default {
       }
     };
     return {
-      isStockOptions,
       dialogFormVisible: false,
+      has_account_list,
       donline_formStOps: [],
+      isStockOptions,
       donline_form: {
         offline_reason: "",
         offline_remark: "",
-        spuCode: "",
+        spuCode: ""
       },
       donline_rules: {
-        offline_reason: [{ validator: validate, required: true, trigger: "blur" }],
-        offline_remark: [{ validator: validate, required: true, trigger: "blur" }],
+        offline_reason: [
+          { validator: validate, required: true, trigger: "blur" }
+        ],
+        offline_remark: [
+          { validator: validate, required: true, trigger: "blur" }
+        ]
       },
       statusList: [
         {
           code: "0",
           name: "新建待审核",
-          type: "",
+          type: ""
         },
         {
           code: "1",
           name: "审核通过",
-          type: "success",
+          type: "success"
         },
         {
           code: "2",
           name: "基础修改待审核",
-          type: "",
+          type: ""
         },
         {
           code: "3",
           name: "成本修改待审核",
-          type: "",
+          type: ""
         },
         {
           code: "4",
           name: "基础修改驳回",
-          type: "danger",
+          type: "danger"
         },
         {
           code: "5",
           name: "成本修改驳回",
-          type: "danger",
+          type: "danger"
         },
         {
           code: "6",
           name: "新建审核驳回",
-          type: "danger",
+          type: "danger"
         },
         {
           code: "7",
           name: "复制商品待编辑",
-          type: "info",
+          type: "info"
         },
         {
           code: "8",
           name: "竞价商品待编辑",
-          type: "info",
-        },
+          type: "info"
+        }
       ],
       isonlineoptions: [
         { id: "0", name: "未上线" },
-        { id: "1", name: "已上线" },
+        { id: "1", name: "已上线" }
       ],
       showModel: false,
       options1,
@@ -515,6 +614,8 @@ export default {
       parmValue: {
         page: 1, // 页码
         size: 15, // 每页显示条数
+        is_combind: "",
+        is_stock: "",
         start: "",
         end: "",
         status: "",
@@ -526,8 +627,7 @@ export default {
         companyNo: "",
         supplierNo: "",
         isonline: "",
-        company_name: "", //创建人部门
-        is_stock: "",
+        company_name: "" //创建人部门
         // creater: "",
       },
       sinput: "",
@@ -538,18 +638,18 @@ export default {
       table: {
         stripe: true,
         border: true,
-        _defaultHeader_: ["setcol"],
+        _defaultHeader_: ["setcol"]
       },
       // 表格 - 分页
       pageInfo: {
         size: 15,
         curr: 1,
-        total: 0,
+        total: 0
       },
       // 表格 - 列参数
       columns: listCol,
       supplierNo: [],
-      brandid: [],
+      brandid: []
     };
   },
   mounted() {
@@ -566,7 +666,7 @@ export default {
       this.pageInfo = {
         size: size,
         curr: page,
-        total: 0,
+        total: 0
       };
       //多选条件
       this.select = this.parmValue.select;
@@ -582,21 +682,22 @@ export default {
     this.searchList();
   },
   methods: {
-    companyNosearchChange({ code }) {
-      this.parmValue.companyNo = code;
-      this.searchList();
-    },
     handleCreate() {
-      // if(!this.currentIsBusinessCompany()) return
+      // if (!this.currentIsBusinessCompany()) return;
       this.routeGoto("supplierGoodsCostDetail", { id: "add", type: "add" });
     },
+    async supplierChange(e) {
+      const { code, label } = e;
+      this.supplierNo = code ? [code] : [];
+      this.searchList();
+    },
     // 获取异常原因下拉列表
     async getresultlist() {
       const res = await asyncRequest.resultlist({
         page: 1,
         size: 100,
         type: "8",
-        status: "3",
+        status: "3"
       });
       if (res && res.code === 0 && res.data) {
         const { list } = res.data;
@@ -611,18 +712,16 @@ export default {
       if (toRouter && queryId) {
         let model = {
           id: queryId,
-          type: "view",
+          type: "view"
         };
 
         //有多选框的条件
         this.parmValue.select = this.select;
-        // this.parmValue.sselect = this.sselect ;
         this.parmValue.sinput = this.sinput;
         //
-        console.log(this.parmValue);
         let routerModel = {
           options: JSON.parse(JSON.stringify(this.parmValue)),
-          router: this.$route.path,
+          router: this.$route.path
         };
         model.preModel = JSON.stringify(routerModel);
 
@@ -640,7 +739,7 @@ export default {
       this.pageInfo = {
         size: 15,
         curr: 1,
-        total: 0,
+        total: 0
       };
       this.parmValue = {
         page: 1, // 页码
@@ -657,18 +756,20 @@ export default {
         isonline: "",
         companyNo: "",
         supplierNo: "",
-        is_stock: "",
+        is_combind: ""
       };
       this.searchList();
     },
     async wantto(isonline, spuCode, ntype, wtype) {
-      const { code, data, message } = await asyncRequest.checkIsUpdate({ spuCode });
+      const { code, data, message } = await asyncRequest.checkIsUpdate({
+        spuCode
+      });
       if (code === 0) {
         const { is_allow_update } = data;
         if (is_allow_update + "" === "1") {
           this.routeGoto("supplierGoodsCostDetail", {
             id: spuCode,
-            type: wtype === "2" ? "editBase" : wtype === "3" ? "editCoin" : "",
+            type: wtype === "2" ? "editBase" : wtype === "3" ? "editCoin" : ""
           });
         } else {
           if (isonline + "" === "1") {
@@ -721,19 +822,19 @@ export default {
       await this.$confirm(`确定要复制该商品?`, {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        type: "warning"
       })
         .then(async () => {
           this.loading = true;
           const model = {
-            spuCode: spuCode,
+            spuCode: spuCode
           };
           const res = await asyncRequest.copy(model);
           if (res && res.code === 0) {
             this.loading = false;
             this.$notify.success({
               title: "复制商品成功!",
-              message: "",
+              message: ""
             });
             await this.searchList();
           } else if (res && res.code >= 100 && res.code <= 104) {
@@ -753,23 +854,26 @@ export default {
      * @param {String} status 0-禁用 1-启用
      */
     async changeStatus(id, status) {
-      await this.$confirm(`确定要改为${status + "" === "1" ? "禁用" : "启用"}?`, {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
+      await this.$confirm(
+        `确定要改为${status + "" === "1" ? "禁用" : "启用"}?`,
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }
+      )
         .then(async () => {
           this.loading = true;
           const model = {
             id: id,
-            status: status + "" === "1" ? "0" : "1",
+            status: status + "" === "1" ? "0" : "1"
           };
           const res = await asyncRequest.status(model);
           if (res && res.code === 0) {
             this.loading = false;
             this.$notify.success({
               title: "状态修改成功!",
-              message: "",
+              message: ""
             });
             await this.searchList();
           } else if (res && res.code >= 100 && res.code <= 104) {
@@ -787,17 +891,17 @@ export default {
       await this.$confirm("确定要删除?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        type: "warning"
       })
         .then(async () => {
           const model = {
-            codes: [code],
+            codes: [code]
           };
           const res = await asyncRequest.delete(model);
           if (res && res.code === 0) {
             this.$notify.success({
               title: "删除成功",
-              message: "",
+              message: ""
             });
             this.searchList();
           } else if (res && res.code >= 100 && res.code <= 104) {
@@ -823,21 +927,20 @@ export default {
       let item = JSON.parse(JSON.stringify(this.parmValue));
       item.spucode = this.select === "1" ? this.sinput : "";
       item.good_name = this.select === "2" ? this.sinput : "";
-      // item.companyNo = this.select === "3" ? this.sinput : "";
+      item.companyNo = this.select === "3" ? this.sinput : "";
+      item.supplierNo = this.select === "4" ? this.sinput : "";
       item.company_name = this.select === "5" ? this.sinput : ""; // 部门
-      item.cat_id = item.cat_id.length > 0 ? item.cat_id[item.cat_id.length - 1] : "";
-      // item.companyNo = this.currentCompany
-      item.noRelation = true;
-
-      const res = await asyncRequest.copy_list({
+      item.cat_id =
+        item.cat_id.length > 0 ? item.cat_id[item.cat_id.length - 1] : "";
+      const res = await asyncRequest.list({
         ...item,
-        noRelation: true,
         supplierNo: this.currentCompany,
+        noRelation: true
       });
 
       if (res && res.code === 0 && res.data) {
         this.tableData = res.data.list;
-        this.tableData.forEach((a) => {
+        this.tableData.forEach(a => {
           a.cat_name = "";
           let list = a.cat_info || [];
           list.forEach((b, i) => {
@@ -871,7 +974,7 @@ export default {
         return;
       }
       let isok = true;
-      this.changeList.forEach((e) => {
+      this.changeList.forEach(e => {
         if (String(e.status) !== "1") {
           isok = false;
         }
@@ -888,14 +991,14 @@ export default {
       this.donline_form = {
         offline_reason: "",
         offline_remark: "",
-        skuCode: "",
+        skuCode: ""
       };
       this.donline_form.spuCode = spuCode;
       // this.donlineDlg(spuCode)
     },
     //商品下线原因 确定
     async donlineDlg() {
-      await this.$refs.donline_Form.validate(async (valid) => {
+      await this.$refs.donline_Form.validate(async valid => {
         if (valid) {
           this.dialogFormVisible = false;
           this.get_donline(this.donline_form.spuCode);
@@ -912,7 +1015,7 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(async () => {
           this.loading = true;
@@ -922,7 +1025,7 @@ export default {
             this.loading = false;
             this.$notify.success({
               title: res.message,
-              message: "",
+              message: ""
             });
             await this.searchList();
           } else if (res && res.code >= 100 && res.code <= 104) {
@@ -935,8 +1038,8 @@ export default {
         .catch(async () => {
           console.log("取消");
         });
-    },
-  },
+    }
+  }
 };
 </script>
 

+ 1 - 1
src/views/sellOut/combinedAdd/components/stockModal.vue

@@ -137,7 +137,7 @@
 </template>
 
 <script>
-import asyncRequest from "@/apis/service/sellOut/zxDiffOrder";
+import asyncRequest from "@/apis/service/sellOut/combindAdd";
 import mixinPage from "@/mixins/elPaginationHandle";
 export default {
   name: "StockModal",

+ 6 - 2
src/views/sellOut/combinedAdd/detail.vue

@@ -27,7 +27,7 @@
 <script>
 import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
-import asyncRequest from "@/apis/service/sellOut/zxDiffOrder";
+import asyncRequest from "@/apis/service/sellOut/combinedAdd";
 import { showColumns } from "./columns";
 import { xs_order_type_options } from "@/assets/js/statusList";
 import WaitApproval from "./components/waitApproval";
@@ -96,7 +96,10 @@ export default {
   mounted() {
     this.status = "";
     this.queryId = this.$route.query.id;
-    this.initData();
+
+    if(this.queryId !== "add"){
+      this.initData();
+    }
   },
   methods: {
     getNewTime() {
@@ -112,6 +115,7 @@ export default {
           remark: "",
           status: ""
         };
+
         const res = await asyncRequest.fstatus(model);
         this.loading = false;
         if (res && res.code === 0) {

+ 1 - 2
src/views/sellOut/combinedAdd/index.vue

@@ -158,7 +158,7 @@
 <script>
 import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
-import asyncRequest from "@/apis/service/sellOut/zxDiffOrder";
+import asyncRequest from "@/apis/service/sellOut/combinedAdd";
 import companyHelper from "@/mixins/companyHelper";
 import { mapGetters } from "vuex";
 import { columns } from "./columns";
@@ -446,4 +446,3 @@ export default {
 .zxDiffOrder {
 }
 </style>
-   

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott