Browse Source

Merge branch 'company' into v3.0

snow 1 năm trước cách đây
mục cha
commit
eccaf2e8bd
22 tập tin đã thay đổi với 1753 bổ sung408 xóa
  1. 8 5
      src/apis/user/axios.js
  2. 10 0
      src/layout/components/company-select/index.vue
  3. 75 0
      src/views/dataDashboard/stockCount/components/dataWeido/columns.js
  4. 364 0
      src/views/dataDashboard/stockCount/components/dataWeido/index.vue
  5. 0 0
      src/views/dataDashboard/stockCount/components/dataWeido/仓库维度
  6. 71 0
      src/views/dataDashboard/stockCount/components/productWeido/columns.js
  7. 309 0
      src/views/dataDashboard/stockCount/components/productWeido/index.vue
  8. 0 0
      src/views/dataDashboard/stockCount/components/productWeido/商品维度
  9. 90 0
      src/views/dataDashboard/stockCount/components/spaceCount/columns.js
  10. 269 0
      src/views/dataDashboard/stockCount/components/spaceCount/index.vue
  11. 0 0
      src/views/dataDashboard/stockCount/components/spaceCount/区间统计
  12. 66 0
      src/views/dataDashboard/stockCount/index.vue
  13. 0 0
      src/views/dataDashboard/stockCount/库存统计
  14. 243 240
      src/views/netOrderEntry/netOrderEnter/detail-modal.vue
  15. 1 9
      src/views/netOrderEntry/prestoreRecordingOrders/addEdit.vue
  16. 6 8
      src/views/sellOut/salesOrder/detail.vue
  17. 52 16
      src/views/sellOut/zixunOrder/components/buyGoodModal.vue
  18. 74 64
      src/views/stock/stockCount/components/dataWeido/columns.js
  19. 28 12
      src/views/stock/stockCount/components/dataWeido/index.vue
  20. 40 39
      src/views/stock/stockCount/components/productWeido/columns.js
  21. 36 5
      src/views/stock/stockCount/components/productWeido/index.vue
  22. 11 10
      src/views/stock/stockCount/index.vue

+ 8 - 5
src/apis/user/axios.js

@@ -65,16 +65,19 @@ axios.interceptors.request.use(
     if (!config.data.token) {
       config.data.token = getToken()
     }
-    const { noRelation, needRela, relaComNo } = config.data
+    const { noRelation, needRela, relaComNo, useSelfComNo } = config.data
     const innerRelaComNo = store.state.user.currentCompany
     // 决定传递关联公司:非超管用户且单独的请求中data中没有设置noRelation
     // needRela: 超管需要传递关联公司(默认超管不传递)
     // noRelation: 普通用户不传递关联公司(默认普通用户传递)
-    const isAllowRelaComNo = !store.state.user.isSupertube && !noRelation
-    config.data.relaComNo = isAllowRelaComNo ? innerRelaComNo : ''
-    if (needRela) config.data.relaComNo = relaComNo || innerRelaComNo
 
-    const deleteKeys = ['needRela', 'noRelation']
+    if (!useSelfComNo) {
+      const isAllowRelaComNo = !store.state.user.isSupertube && !noRelation
+      config.data.relaComNo = isAllowRelaComNo ? innerRelaComNo : ''
+      if (needRela) config.data.relaComNo = relaComNo || innerRelaComNo
+    }
+
+    const deleteKeys = ['needRela', 'noRelation', 'useSelfComNo']
     deleteKeys.forEach(key => key in config.data && delete config.data[key])
     return config
   },

+ 10 - 0
src/layout/components/company-select/index.vue

@@ -9,6 +9,7 @@
     :placeholder="placeholder"
     style="width:380px"
     :disabled="disabled"
+    :clearable="clearable"
     reserve-keyword
     :size="size"
     filterable
@@ -80,6 +81,14 @@ export default {
     isSupplier: {
       type: Boolean,
       default: false
+    },
+    noCompanyCode: {
+      type: String,
+      default: () => false
+    },
+    clearable: {
+      type: Boolean,
+      default: () => false
     }
   },
   computed: {
@@ -136,6 +145,7 @@ export default {
     getUserCompany,
     genCompanyLabel(company) {
       const { name, code } = company
+      if (this.noCompanyCode) return name
       return `${code}/${name}`
     },
     async initalData() {

+ 75 - 0
src/views/dataDashboard/stockCount/components/dataWeido/columns.js

@@ -0,0 +1,75 @@
+export default [
+  {
+    type: 'expand',
+    _slot_: 'expand',
+    label: ''
+  },
+  {
+    prop: 'company_no',
+    label: '仓库业务公司编码',
+    width: '150'
+  },
+  {
+    prop: 'company_name',
+    label: '仓库业务公司名称',
+    'min-width': '180'
+  },
+  {
+    prop: 'supplier_code',
+    label: '仓库所在公司编码',
+    width: '150'
+  },
+  {
+    prop: 'supplier_name',
+    label: '仓库所在公司名称',
+    'min-width': '180'
+  },
+  {
+    prop: 'contactor_name',
+    label: '供应商负责人',
+    'min-width': '100'
+  },
+  {
+    prop: 'wsm_code',
+    label: '仓库编码',
+    width: '180'
+  },
+  {
+    prop: 'wsm_name',
+    label: '仓库名称',
+    'min-width': '100'
+  },
+  {
+    prop: 'person',
+    label: '仓库负责人',
+    'min-width': '100'
+  },
+  {
+    prop: 'total_stock',
+    label: '当前库存'
+  },
+  {
+    prop: 'wait_in_stock',
+    label: '待入库'
+  },
+  {
+    prop: 'wait_out_stock',
+    label: '待出库',
+    width: '80px'
+  },
+  {
+    prop: 'usable_stock',
+    label: '可用库存'
+    // ,
+  },
+  {
+    prop: 'intra_stock',
+    label: '在途库存'
+    // ,
+  }
+  // {
+  //   prop: "warn_stock",
+  //   label: "预警库存",
+  // },
+
+]

+ 364 - 0
src/views/dataDashboard/stockCount/components/dataWeido/index.vue

@@ -0,0 +1,364 @@
+<template>
+  <div class="dataWeido pagePadding" style="padding: 0">
+    <div v-if="powers.some((i) => i == '001')">
+      <ex-table
+        ref="table"
+        v-loading="loading"
+        :table="table"
+        :data="tableData"
+        :columns="columns"
+        :page="pageInfo"
+        :size="size"
+        row-key="wsm_code"
+        :expand-row-keys="expandKeys"
+        @expand-change="handleExpandChange"
+        @page-curr-change="handlePageChange"
+        @page-size-change="handleSizeChange"
+        @screen-reset="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchChange();
+        "
+        @screen-submit="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+      >
+        <template #table-header="{}">
+          <div style="width: 100%">
+            <el-row style="padding: 0 0 0 80px">
+              <el-col :span="24">
+               <el-col :span="4" >
+                  <company-select 
+                    style="width:100%"
+                    :value="parmValue.companyNo" 
+                    @change="handleCompanyChange" 
+                    size="mini"
+                    clearable
+                    placeholder="请选择业务公司" 
+                    :noCompanyCode="true" 
+                  />  
+                </el-col>
+
+                <el-col :span="4" style="margin-left:10px">
+                  <search-stock
+                    :isDetail="true"
+                    style="width:100%"
+                    :size="searchSize"
+                    :value="parmValue.stock_code"
+                    :disabled="parmValue.companyNo === ''"
+                    :placeholder="'出库仓库'"
+                    :isRelation="true"
+                    :companyNo="parmValue.companyNo"
+                    :names="''"
+                    @searchChange="selectStock"
+                  />
+                </el-col>
+
+
+                <!-- 搜索 -->
+                <el-col :span="4" style="width: 54px">
+                  <el-button
+                    :size="searchSize"
+                    type="primary"
+                    class="fr"
+                    icon="el-icon-search"
+                    label=""
+                    @click="searchList"
+                  ></el-button>
+                </el-col>
+                <!-- 重置 -->
+                <el-col :span="4" style="width: 54px; margin-left: 10px" class="mr5">
+                  <el-button
+                    :size="searchSize"
+                    class="fr"
+                    type="warning"
+                    @click="restSearch"
+                    >重置</el-button>
+                </el-col>
+              </el-col>
+            </el-row>
+          </div>
+        </template>
+        <template #expand="{ scope }">
+          <el-table
+            v-loading="scope.row.loading"
+            :data="scope.row.child"
+            style="width: 100%; paddind: 20px"
+            border
+            size="small"
+          >
+            <el-table-column
+              label="商品编码"
+              prop="spuCode"
+              width="190"
+            >
+              <template slot-scope="scope">
+                <div style="display:flex; align-items:center">
+                <!-- <el-tooltip placement="top" content="查看商品详情" v-if="goodCostPremission.includes('007')">
+                     <i @click="linkToGoodDetail(scope.row)" class="el-icon-link" style="cursor:pointer;margin-right:5px;font-size:16px" />
+                  </el-tooltip> -->
+                  <p>{{scope.row.spuCode}}</p>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column
+              label="商品名称"
+              prop="good_name"
+              min-width="120"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              label="规格"
+              prop="attribute"
+              show-overflow-tooltip
+              min-width="120"
+            >
+              <template slot-scope="scope">
+                <span
+                  v-for="(si, sii) in scope.row.specinfo"
+                  :key="sii + si.spec_value_id"
+                  >{{ sii === 0 ? "" : "-" }}{{ si.spec_name }}[{{
+                    si.spec_value_name
+                  }}]</span
+                >
+              </template>
+            </el-table-column>
+            <el-table-column label="分类" min-width="120" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span v-for="(si, sii) in scope.row.can" :key="sii + si.spec_value_id">
+                  {{ sii === 0 ? "" : "_" }}{{ si.name }}
+                </span>
+              </template></el-table-column
+            >
+          <el-table-column
+              label="品牌"
+              prop="brand_name"
+              show-overflow-tooltip
+              width="100"
+            ></el-table-column>
+            <el-table-column
+              label="单位"
+              prop="unit"
+              show-overflow-tooltip
+              width="80"
+            ></el-table-column>
+            <el-table-column
+              label="当前库存"
+              show-overflow-tooltip
+              prop="total_stock"
+              width="80"
+            ></el-table-column>
+            <el-table-column
+              label="待入库存"
+              show-overflow-tooltip
+              prop="wait_in_stock"
+              width="80"
+            ></el-table-column>
+            <el-table-column
+              label="待出库存"
+              show-overflow-tooltip
+              prop="wait_out_stock"
+              width="80"
+            ></el-table-column>
+            <el-table-column
+              label="可用库存"
+              show-overflow-tooltip
+              prop="usable_stock"
+              width="80"
+            ></el-table-column>
+            <el-table-column
+              label="在途库存"
+              show-overflow-tooltip
+              prop="intra_stock"
+              width="80"
+            ></el-table-column>
+          </el-table>
+        </template>
+      </ex-table>
+      <add-edit
+        :id="modelId"
+        :sitem="sitem"
+        :show-model="showModel"
+        :is-detail="isDetail"
+        @refresh="searchList"
+        @cancel="showModel = false"
+      />
+    </div>
+    <div v-else>
+      <no-auth></no-auth>
+    </div>
+  </div>
+</template>
+<script>
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+import asyncRequest from "@/apis/service/stock/dataWeido";
+import columns from "./columns";
+import { mapGetters } from "vuex";
+import CompanySelect from "@/layout/components/company-select"
+
+export default {
+  name: "dataWeido",
+  mixins: [mixinPage, resToken],
+  components:{ CompanySelect },
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    powers() {
+      const tran = this.$store.getters.btnList.find((item) => item.menu_route == "stockCount") || {};
+      const { action } = tran ?? {};
+      return action ?? [];
+    },
+    goodCostPremission(){
+      const tran = this.$store.getters.btnList.find((item) => item.menu_route == "goodsCost") || {};
+      const { action } = tran ?? {};
+      return action ?? [];
+    }
+  },
+  data() {
+    return {
+      loading: false,
+      loadingRows: {},
+      stock_code: "",
+      supplier_code: "",
+      parmValue: {
+        companyNo: "",
+        supplier_code: [],
+        stock_code: [],
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      },
+      expandKeys: [],
+
+      // 表格 - 数据
+      tableData: [],
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"],
+      },
+      // 表格 - 分页
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0,
+      },
+      // 表格 - 列参数
+      columns: columns,
+    };
+  },
+  mounted() {
+    // this.onCompanyChange()
+    this.searchList();
+  },
+  methods: {
+    // onCompanyChange(){
+      // console.log(this.currentCompany)
+      // this.parmValue.companyNo = this.currentCompany
+    // },
+    //业务公司选择
+    async supplierChange(e) {
+      const { code } = e;
+      this.parmValue.companyNo = code || ""; //业务公司编码
+      this.parmValue.supplier_code = [];
+      this.supplier_code = "";
+      this.parmValue.stock_code = [];
+      this.stock_code = "";
+      this.parmValue.page = 1;
+      this.pageInfo.curr = 1;
+      await this.searchList();
+    },
+    // 选择供应商仓库
+    async selectStock(e) {
+      const { code } = e;
+      this.parmValue.stock_code = code ? [code] : [];
+      this.stock_code = code || "";
+      // this.parmValue.stock_code = [];
+      // this.stock_code = "";
+      this.parmValue.page = 1;
+      this.pageInfo.curr = 1;
+      await this.searchList();
+    },
+    // 选择供应商
+    async selectSupplier(e) {
+      const { code } = e;
+      this.parmValue.supplier_code = code ? [code] : [];
+      this.supplier_code = code || "";
+      this.parmValue.stock_code = [];
+      this.stock_code = "";
+      this.parmValue.page = 1;
+      this.pageInfo.curr = 1;
+      await this.searchList();
+    },
+    handleCompanyChange(code){
+      this.parmValue.companyNo = code
+      if(code === "") this.parmValue.stock_code = ""
+      this.searchList()
+    },
+    linkToGoodDetail(row){
+      // console.log(row)
+      // http://localhost:8081/#/goodStore/goodsCostDetail?id=SKU2305311527349138&type=view
+      this.$router.push(`/goodStore/goodsCostDetail?id=${row.spuCode}&type=view`)
+    },
+    restSearch() {
+      // 表格 - 分页
+      this.pageInfo = {
+        size: 15,
+        curr: 1,
+        total: 0,
+      };
+      this.parmValue = {
+        companyNo: "",
+        supplier_code: [],
+        stock_code: [], //仓库编码
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      };
+      this.searchList();
+    },
+    async handleExpandChange(row) {
+      if (!row.expand) {
+        row.loading = true;
+        const { data } = await asyncRequest.listChild({ wsm_code: row.wsm_code });
+        row.loading = false;
+        this.expandKeys.push(row.expand);
+        row.child = data;
+        row.expand = true;
+      }
+    },
+    async searchList() {
+      this.loading = true;
+      let model = JSON.parse(JSON.stringify(this.parmValue));
+      model.supplierNo = model.supplier_code.toString() || "";
+      model.wsm_code = model.stock_code.toString() || "";
+      delete model["supplier_code"];
+      delete model["stock_code"];
+
+      const res = await asyncRequest.list({
+        ...model,
+        relaComNo: this.parmValue.companyNo,
+        useSelfComNo: true
+      });
+
+      if (res && res.code === 0 && res.data) {
+        const _list = res.data.list;
+        this.tableData = _list.map((item) => ({
+          ...item,
+          child: [],
+          expand: false,
+          loading: false,
+        }));
+        this.pageInfo.total = Number(res.data.count);
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+        this.pageInfo.total = 0;
+      }
+      this.loading = false;
+    },
+  },
+};
+</script>

+ 0 - 0
src/views/dataDashboard/stockCount/components/dataWeido/仓库维度


+ 71 - 0
src/views/dataDashboard/stockCount/components/productWeido/columns.js

@@ -0,0 +1,71 @@
+export default [
+  {
+    type: 'expand',
+    _slot_: 'expand',
+    label: ''
+  },
+  {
+    prop: 'good_code',
+    label: '商品编码',
+    width: '185',
+    _slot_: 'good_code'
+  },
+  // {
+  //   prop: "type_code",
+  //   label: "属性编码",
+  //   width: "150",
+  // },
+  {
+    prop: 'good_name',
+    label: '商品名称',
+    'min-width': '150'
+  },
+  {
+    prop: 'specinfo',
+    label: '规格',
+    'min-width': '150',
+    _slot_: 'specinfo'
+  },
+  {
+    prop: 'sort_f',
+    label: '分类',
+    width: '155'
+  },
+  {
+    prop: 'brand_name',
+    label: '品牌',
+    width: '85'
+  },
+
+  {
+    prop: 'unit',
+    label: '单位',
+    width: '50'
+  },
+  {
+    prop: 'total_stock',
+    label: '当前库存',
+    width: '80'
+  },
+  {
+    prop: 'wait_in_stock',
+    label: '待入库',
+    width: '80'
+  },
+  {
+    prop: 'wait_out_stock',
+    label: '待出库',
+    width: '80'
+  },
+  {
+    prop: 'usable_stock',
+    label: '可用库存',
+    width: '80'
+  },
+  {
+    prop: 'intra_stock',
+    label: '在途库存',
+    width: '80'
+  }
+
+]

+ 309 - 0
src/views/dataDashboard/stockCount/components/productWeido/index.vue

@@ -0,0 +1,309 @@
+<template>
+  <div class="productWeido pagePadding" style="padding: 0">
+    <div v-if="powers.some((i) => i == '001')">
+      <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();
+        "
+      >
+        <template #table-header="{}">
+          <div style="width: 100%">
+            <el-row style="padding: 0 0 0 80px" gutter="10">
+              <el-col :span="24">
+                <el-col :span="5">
+                  <el-input
+                    v-model="parmValue.type_code"
+                    :size="searchSize"
+                    maxlength="40"
+                    placeholder="sku编码"
+                  />
+                </el-col>
+                <el-col :span="5">
+                  <el-input
+                    v-model="parmValue.good_name"
+                    :size="searchSize"
+                    maxlength="40"
+                    placeholder="商品名称"
+                  />
+                </el-col>
+
+                <el-col :span="4">
+                  <company-select 
+                    :value="parmValue.companyNo" 
+                    @change="handleCompanyChange" 
+                    size="mini"
+                    clearable
+                    placeholder="请选择业务公司" 
+                    :noCompanyCode="true" 
+                  />  
+                </el-col>
+
+                <!-- 搜索 -->
+                <el-col :span="4" style="width: 54px">
+                  <el-button
+                    :size="searchSize"
+                    type="primary"
+                    class="fr"
+                    icon="el-icon-search"
+                    label=""
+                    @click="searchList"
+                  />
+                </el-col>
+                <!-- 重置 -->
+                <el-col :span="4" style="width: 56px; margin-left: 10px" class="mr5">
+                  <el-button
+                    :size="searchSize"
+                    class="fr"
+                    type="warning"
+                    @click="restSearch"
+                    >重置</el-button>
+                </el-col>
+              </el-col>
+            </el-row>
+          </div>
+        </template>
+
+        <template #good_code="{ scope }">
+          <div style="display:flex;align-items:center">
+            <!-- <el-tooltip placement="top" content="查看商品详情" v-if="goodCostPremission.includes('007')">
+               <i @click="linkToGoodDetail(scope.row)" class="el-icon-link" style="cursor:pointer;margin-right:5px;font-size:16px" />
+            </el-tooltip> -->
+            <p>{{scope.row.good_code}}</p>
+          </div>
+        </template>
+        
+        <template #expand="{ scope }">
+          <el-table
+            :data="scope.row.child"
+            style="width: 100%; paddind: 20px"
+            border
+            size="small"
+          >
+            <el-table-column
+              label="仓库名称"
+              prop="wsm_name"
+              show-overflow-tooltip
+              width="150"
+            />
+            <el-table-column 
+              label="仓库负责人"
+              prop="contactor_name"
+              show-overflow-tooltip
+              width="120"
+            />
+            <el-table-column
+              label="仓库编码"
+              prop="wsm_code"
+              show-overflow-tooltip
+              width="170"
+            ></el-table-column>
+            <el-table-column
+              label="仓库所在公司名称"
+              prop="supplierName"
+              show-overflow-tooltip
+              width="150"
+            />
+            <el-table-column
+              label="供应商负责人"
+              prop="person"
+              show-overflow-tooltip
+              width="120"
+            />
+            <el-table-column
+              label="仓库所在公司编码"
+              prop="supplierNo"
+              show-overflow-tooltip
+              width="160"
+            ></el-table-column>
+            <el-table-column
+              label="仓库业务公司名称"
+              prop="company"
+              show-overflow-tooltip
+              width="150"
+            ></el-table-column>
+            <el-table-column
+              label="仓库业务公司编码"
+              prop="companyNo"
+              show-overflow-tooltip
+              width="160"
+            ></el-table-column>
+            <el-table-column
+              label="当前库存"
+              width="100"
+              show-overflow-tooltip
+              prop="total_stock"
+            ></el-table-column>
+            <el-table-column
+              label="待入库"
+              width="100"
+              show-overflow-tooltip
+              prop="wait_in_stock"
+            ></el-table-column>
+            <el-table-column
+              label="待出库"
+              width="100"
+              show-overflow-tooltip
+              prop="wait_out_stock"
+            ></el-table-column>
+            <el-table-column
+              label="可用库存"
+              width="100"
+              show-overflow-tooltip
+              prop="usable_stock"
+            ></el-table-column>
+            <el-table-column
+              label="在途库存"
+              width="100"
+              show-overflow-tooltip
+              prop="intra_stock"
+            ></el-table-column>
+          </el-table>
+        </template>
+        <template #specinfo="{ scope }">
+          <span v-for="(si, sii) in scope.row.specinfo" :key="sii + si.spec_value_id"
+            >{{ sii === 0 ? "" : "-" }}{{ si.spec_name }}[{{ si.spec_value_name }}]</span
+          >
+        </template>
+      </ex-table>
+      <add-edit
+        :id="modelId"
+        :sitem="sitem"
+        :show-model="showModel"
+        :is-detail="isDetail"
+        @refresh="searchList"
+        @cancel="showModel = false"
+      />
+    </div>
+    <div v-else>
+      <no-auth></no-auth>
+    </div>
+  </div>
+</template>
+<script>
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+import { statusList } from "@/assets/js/statusList";
+import asyncRequest from "@/apis/service/stock/productWeido";
+import { mapGetters } from "vuex";
+import columns from "./columns";
+import CompanySelect from "@/layout/components/company-select"
+
+export default {
+  name: "productWeido",
+  mixins: [mixinPage, resToken],
+  components: { CompanySelect },
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    powers() {
+      const tran =
+        this.$store.getters.btnList.find((item) => item.menu_route == "stockCount") || {};
+      const { action } = tran ?? {};
+      return action ?? [];
+    },
+    goodCostPremission(){
+      const tran = this.$store.getters.btnList.find((item) => item.menu_route == "goodsCost") || {};
+      const { action } = tran ?? {};
+      return action ?? [];
+    }
+  },
+  data() {
+    return {
+      statusList: statusList,
+      loading: true,
+      showModel: false,
+      isDetail: false,
+      modelId: 0,
+      //入参参数
+      parmValue: {
+        companyNo:"",
+        type_code: "", //商品属性编码
+        good_name: "", //商品名称
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      },
+      tableData: [], //渲染表格数据
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"],
+      },
+      // 表格 - 分页
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0,
+      },
+      // 表格 - 列参数
+      columns: columns,
+    };
+  },
+  mounted() {
+    this.searchList();
+  },
+
+  methods: {
+    handleCompanyChange(code){
+      this.parmValue.companyNo = code
+      this.searchList()
+    },
+    linkToGoodDetail(row){
+      // console.log(row)
+      // http://localhost:8081/#/goodStore/goodsCostDetail?id=SKU2305311527349138&type=view
+      this.$router.push(`/goodStore/goodsCostDetail?id=${row.good_code}&type=view`)
+    },
+    //重置参数
+    restSearch() {
+      // 表格 - 分页
+      this.pageInfo = {
+        size: 15,
+        curr: 1,
+        total: 0,
+      };
+      this.parmValue = {
+        companyNo:"",
+        type_code: "",
+        good_name: "", //商品名称
+        size: 15,
+        curr: 1,
+      };
+      this.searchList();
+    },
+    //获取列表功能
+    async searchList() {
+      this.loading = true;
+      const res = await asyncRequest.list({
+        ...this.parmValue,
+        relaComNo: this.parmValue.companyNo,
+        useSelfComNo: true
+      });
+
+      if (res && res.code === 0 && res.data) {
+        this.tableData = res.data.list;
+        this.pageInfo.total = Number(res.data.count);
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+        this.pageInfo.total = 0;
+      }
+      this.loading = false;
+    },
+  },
+};
+</script>

+ 0 - 0
src/views/dataDashboard/stockCount/components/productWeido/商品维度


+ 90 - 0
src/views/dataDashboard/stockCount/components/spaceCount/columns.js

@@ -0,0 +1,90 @@
+export default [
+  {
+    prop: 'company_no',
+    label: '仓库业务公司编码',
+    width: '150'
+  },
+  {
+    prop: 'company_name',
+    label: '仓库业务公司名称',
+    'min-width': '180'
+  },
+  {
+    prop: 'supplier_code',
+    label: '仓库所在公司编码',
+    width: '150'
+  },
+  {
+    prop: 'supplier_name',
+    label: '仓库所在公司名称',
+    'min-width': '180'
+  },
+  {
+    prop: 'wsm_code',
+    label: '仓库编码',
+    width: '180'
+  },
+  {
+    prop: 'wsm_name',
+    label: '仓库名称',
+    'min-width': '100'
+  },
+  {
+    prop: 'good_code',
+    label: '商品编码',
+    width: '160'
+  },
+  // {
+  //   prop: "type_code",
+  //   label: "属性编码",
+  //   width: "150",
+  // },
+  {
+    prop: 'good_name',
+    label: '商品名称',
+    'min-width': '150'
+  },
+  {
+    prop: 'specinfo',
+    label: '规格',
+    'min-width': '150',
+    _slot_: 'specinfo'
+  },
+  {
+    prop: 'can',
+    label: '分类',
+    _slot_: 'can',
+    width: '155'
+  },
+  {
+    prop: 'brand_name',
+    label: '品牌',
+    width: '85'
+  },
+
+  {
+    prop: 'unit',
+    label: '单位',
+    width: '50'
+  },
+  {
+    prop: 'usable_stock',
+    label: '当前库存',
+    width: '80'
+  },
+  {
+    prop: 'wait_in_stock',
+    label: '待入库',
+    width: '80'
+  },
+  {
+    prop: 'wait_out_stock',
+    label: '待出库',
+    width: '80'
+  },
+  {
+    prop: 'intra_stock',
+    label: '在途库存',
+    width: '80'
+  }
+]

+ 269 - 0
src/views/dataDashboard/stockCount/components/spaceCount/index.vue

@@ -0,0 +1,269 @@
+<template>
+  <div class="spaceCount pagePadding" style="padding: 0">
+    <div v-if="powers.some((i) => i == '001')">
+      <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();
+        "
+      >
+        <template #table-header="{}">
+          <div style="width: 100%" class="min">
+            <el-row style="padding: 0 0 0 80px">
+              <!-- <el-col :span="12" style="width: 300px">
+                <search-work-company
+                  :value="parmValue.companyNo"
+                  :names="''"
+                  :size="searchSize"
+                  :is-detail="id !== 'add'"
+                  :placeholder="'业务公司'"
+                  @searchChange="supplierChange"
+                />
+              </el-col> -->
+              <el-col :span="10" style="width: 330px; padding: 0 0 0 10px">
+                <el-input
+                  v-model="parmValue.type_code"
+                  :size="searchSize"
+                  maxlength="40"
+                  placeholder="商品属性编码"
+                />
+              </el-col>
+
+              <el-col :span="12" style="width: 330px; padding: 0 0 0 10px">
+                <search-stock
+                  :isDetail="true"
+                  :size="searchSize"
+                  :value="parmValue.stock_code"
+                  :disabled="parmValue.companyNo === ''"
+                  :placeholder="'出库仓库'"
+                  :isRelation="true"
+                  :companyNo="parmValue.companyNo"
+                  :names="''"
+                  @searchChange="selectStock"
+                />
+              </el-col>
+
+              <!-- 重置 -->
+              <el-col :span="4" style="width: 66px" class="fr">
+                <el-button
+                  :size="searchSize"
+                  class="fl"
+                  type="warning"
+                  @click="restSearch"
+                  >重置</el-button
+                >
+              </el-col>
+
+              <el-col :span="4" style="width: 66px" class="fr">
+                <el-button :size="searchSize" type="primary" label="" @click="searchList"
+                  >刷新</el-button
+                >
+              </el-col>
+            </el-row>
+            <el-row style="padding: 10px 0 0 0">
+              <!-- <el-col :span="12" style="width: 380px">
+                <search-supplier
+                  :size="searchSize"
+                  :placeholder="'供应商公司'"
+                  :disabled="parmValue.companyNo === ''"
+                  :value="parmValue.supplier_code"
+                  @searchChange="selectSupplier"
+                />
+              </el-col> -->
+
+              <!-- 刷新 -->
+            </el-row>
+          </div>
+        </template>
+        <template #specinfo="{ scope }">
+          <span v-for="(si, sii) in scope.row.specinfo" :key="sii + si.spec_value_id"
+            >{{ sii === 0 ? "" : "-" }}{{ si.spec_name }}[{{ si.spec_value_name }}]</span
+          >
+        </template>
+        <template #can="{ scope }">
+          <span v-for="(si, sii) in scope.row.cat_info" :key="sii + si.id"
+            >{{ sii === 0 ? "" : "-" }}{{ si.name }}</span
+          >
+        </template>
+      </ex-table>
+    </div>
+    <div v-else>
+      <no-auth></no-auth>
+    </div>
+  </div>
+</template>
+<script>
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+import asyncRequest from "@/apis/service/stock/spaceCount";
+import companyHelper from "@/mixins/companyHelper";
+import columns from "./columns";
+import { mapGetters } from "vuex";
+export default {
+  name: "spaceCount",
+  mixins: [mixinPage, resToken, companyHelper],
+  components: {},
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    powers() {
+      const tran =
+        this.$store.getters.btnList.find((item) => item.menu_route == "stockCount") || {};
+      const { action } = tran ?? {};
+      return action ?? [];
+    },
+  },
+  data() {
+    return {
+      stock_code: "",
+      supplier_code: "",
+      parmValue: {
+        supplier_code: [], //供应商编码
+        stock_code: [], //仓库编码
+        companyNo: "",
+        start: "",
+        end: "",
+        type_code: "", //商品编码
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      },
+      loading: true,
+      // 表格 - 数据
+      tableData: [],
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"],
+      },
+      // 表格 - 分页
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0,
+      },
+      // 表格 - 列参数
+      columns: columns,
+    };
+  },
+  mounted() {
+    // this.onCompanyChange() MARK
+    this.searchList();
+  },
+  watch: {
+    currentCompany: {
+      handler(newVal) {
+        this.parmValue.companyNo = newVal;
+      },
+      immediate: true,
+    },
+  },
+  methods: {
+    //业务公司选择
+    async supplierChange(e) {
+      const { code } = e;
+      this.parmValue.companyNo = code || ""; //业务公司编码
+      this.parmValue.supplier_code = [];
+      this.supplier_code = "";
+      this.parmValue.stock_code = [];
+      this.stock_code = "";
+      this.parmValue.page = 1;
+      this.pageInfo.curr = 1;
+      await this.searchList();
+    },
+    // 选择时间操作
+    async handleTime(e) {
+      this.parmValue.start = e.startTime || "";
+      this.parmValue.end = e.endTime || "";
+      this.parmValue.page = 1;
+      this.pageInfo.curr = 1;
+      await this.searchList();
+    },
+    // 选择供应商仓库
+    async selectStock(e) {
+      const { code } = e;
+      this.parmValue.stock_code = code ? [code] : [];
+      this.stock_code = code || "";
+      // this.parmValue.stock_code = [];
+      // this.stock_code = "";
+      this.parmValue.page = 1;
+      this.pageInfo.curr = 1;
+      await this.searchList();
+    },
+    // 选择供应商
+    async selectSupplier(e) {
+      const { code } = e;
+      this.parmValue.supplier_code = code ? [code] : [];
+      this.supplier_code = code || "";
+      this.parmValue.stock_code = [];
+      this.stock_code = "";
+      this.parmValue.page = 1;
+      this.pageInfo.curr = 1;
+      await this.searchList();
+    },
+    restSearch() {
+      // 表格 - 分页
+      this.pageInfo = {
+        size: 15,
+        curr: 1,
+        total: 0,
+      };
+      this.parmValue = {
+        start: "",
+        end: "",
+        companyNo: this.currentCompany,
+        type_code: "", //商品编码
+        supplier_code: [],
+        stock_code: [], //仓库编码
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      };
+      this.searchList();
+    },
+
+    async searchList() {
+      this.loading = true;
+      let model = JSON.parse(JSON.stringify(this.parmValue));
+      model.supplierNo = model.supplier_code.toString() || "";
+      model.wsm_code = model.stock_code.toString() || "";
+      delete model["supplier_code"];
+      delete model["stock_code"];
+      const res = await asyncRequest.list({
+        ...model,
+        needRela: true,
+        companyNo: this.currentCompany,
+      });
+      if (res && res.code === 0 && res.data) {
+        this.tableData = res.data.list;
+        this.tableData.forEach((e) => {
+          e.supplier_wsm_name =
+            e.supplier_name === e.wsm_name
+              ? e.supplier_name
+              : e.supplier_name + "/" + e.wsm_name;
+        });
+
+        this.pageInfo.total = Number(res.data.count);
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+        this.pageInfo.total = 0;
+      }
+      this.loading = false;
+    },
+  },
+};
+</script>

+ 0 - 0
src/views/dataDashboard/stockCount/components/spaceCount/区间统计


+ 66 - 0
src/views/dataDashboard/stockCount/index.vue

@@ -0,0 +1,66 @@
+<template>
+  <div class="nowCount pagePadding">
+    <div
+      v-if=" powers.some((i) => i == '001')"
+    >
+      <div style="width: 100%">
+        <el-row>
+          <el-col>
+            <el-tabs v-model="activeName">
+              <el-tab-pane label="商品维度" name="productWeido">
+                <product-weido/>
+              </el-tab-pane>
+              <el-tab-pane label="仓库维度" name="dataWeido">
+                <data-weido />
+              </el-tab-pane>
+               <!-- <el-tab-pane label="区间统计" name="count">
+                <space-count
+              /></el-tab-pane> -->
+            </el-tabs>
+          </el-col>
+        </el-row>
+      </div>
+    </div>
+
+    <div v-else>
+      <no-auth />
+    </div>
+  </div>
+</template>
+<script>
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+import DataWeido from "./components/dataWeido";
+import ProductWeido from "./components/productWeido";
+import SpaceCount from "./components/spaceCount";
+
+import { mapGetters } from "vuex";
+
+export default {
+  name: "stockCount",
+  mixins: [mixinPage, resToken],
+  components: {
+    DataWeido,
+    ProductWeido,
+    SpaceCount,
+  },
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    powers() {
+      const tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "stockCount"
+        ) || {};
+      const { action } = tran ?? {};
+      return action ?? [];
+    },
+  },
+  data() {
+    return {
+      activeName: "productWeido", //默认选中的区间统计选项
+    };
+  },
+  methods: {},
+};
+</script>
+   

+ 0 - 0
src/views/dataDashboard/stockCount/库存统计


+ 243 - 240
src/views/netOrderEntry/netOrderEnter/detail-modal.vue

@@ -33,7 +33,9 @@
             <el-row>
               <el-col :span="12">
                 <el-form-item label="销售方公司:" label-width="100px" prop="companyNo">
-                  <p style="font-size:14px;color:#606266;font-weight:700">{{ getCompanyWithCode(ruleForm.companyNo).name }}</p>
+                  <p style="font-size: 14px; color: #606266; font-weight: 700">
+                    {{ getCompanyWithCode(ruleForm.companyNo).name }}
+                  </p>
                   <!-- <search-work-company
                     disabled
                     :value="ruleForm.companyNo"
@@ -115,7 +117,7 @@
               <el-col :span="12">
                 <el-form-item label="其他单号" prop="workCode">
                   <template #label>
-                    <p style="margin-left:10px">其他单号</p>
+                    <p style="margin-left: 10px">其他单号</p>
                   </template>
                   <el-input
                     v-model="ruleForm.workCode"
@@ -349,11 +351,9 @@
           </el-form>
         </el-col>
         <el-col :span="24" style="text-align: right">
-          <el-button
-            v-if="id !== '007'"
-            type="primary"
-            @click="submitForm"
-          >保 存</el-button>
+          <el-button v-if="id !== '007'" type="primary" @click="submitForm"
+            >保 存</el-button
+          >
           <el-button @click="showModelThis = false">
             {{ id == "007" ? "关 闭" : "取 消" }}
           </el-button>
@@ -363,77 +363,77 @@
   </el-dialog>
 </template>
 <script>
-import asyncRequest from '@/apis/service/netOrderEntry/netOrderEnter'
-import companyHelper from '@/mixins/companyHelper'
-import { accMul, accDiv, accSub, isPhone, isMobile } from '@/utils/validate'
-import resToken from '@/mixins/resToken'
+import asyncRequest from "@/apis/service/netOrderEntry/netOrderEnter";
+import companyHelper from "@/mixins/companyHelper";
+import { accMul, accDiv, accSub, isPhone, isMobile } from "@/utils/validate";
+import resToken from "@/mixins/resToken";
 
 const defaultData = {
   addr_code: [],
-  cgd_total: '',
-  cgdPrice: '',
+  cgd_total: "",
+  cgdPrice: "",
   // buyerid: "",
   // buyer_name: "",
-  platform_id: '',
-  cgd_tax: '',
-  workCode: '',
-  poCode: '',
-  khNo: '',
-  companyNo: '',
-  contactor: '',
-  mobile: '',
-  addr: '',
-  sendtime: '',
-  supplierNo: '',
-  cat_id: '',
-  goodName: '',
-  goodNum: '',
-  goodPrice: '',
-  sale_total: '',
-  goodUnit: '',
-  tax: ''
-}
+  platform_id: "",
+  cgd_tax: "",
+  workCode: "",
+  poCode: "",
+  khNo: "",
+  companyNo: "",
+  contactor: "",
+  mobile: "",
+  addr: "",
+  sendtime: "",
+  supplierNo: "",
+  cat_id: "",
+  goodName: "",
+  goodNum: "",
+  goodPrice: "",
+  sale_total: "",
+  goodUnit: "",
+  tax: "",
+};
 
 export default {
-  name: 'Terrace',
+  name: "Terrace",
   mixins: [resToken, companyHelper],
-  props: ['showModel', 'id', 'sitem'],
+  props: ["showModel", "id", "sitem"],
   data() {
     const validatemobile = (rule, value, callback) => {
-      if (value !== '') {
+      if (value !== "") {
         if (isPhone(value) || isMobile(value)) {
-          callback()
+          callback();
         } else {
-          callback(new Error('联系电话格式不正确!'))
+          callback(new Error("联系电话格式不正确!"));
         }
       } else {
-        callback(new Error('请输入联系电话!'))
+        callback(new Error("请输入联系电话!"));
       }
-    }
+    };
 
     return {
       loading: false,
       detailLoading: false,
-      title: '添加销售订单信息',
-      khName: '',
+      title: "添加销售订单信息",
+      khName: "",
       accounts: [],
-      cat_id_name: '',
+      cat_id_name: "",
       showModelThis: this.showModel,
       pickerOptions: {
-        disabledDate: (time) => time.getTime() > new Date()
+        disabledDate: (time) => time.getTime() > new Date(),
       },
       names: [],
-      unit_name: '',
-      companyName: '',
+      unit_name: "",
+      companyName: "",
       ruleForm: { ...defaultData },
       rulesThis: this.rules,
       rules: {
         goodUnit: [
           {
             required: true,
-            message: '请选择单位',
-            trigger: 'blur'
-          }
+            message: "请选择单位",
+            trigger: "blur",
+          },
         ],
         // addr_code: [
         //   {
@@ -446,46 +446,46 @@ export default {
         platform_id: [
           {
             required: true,
-            message: '请输入所属平台',
-            trigger: 'blur'
-          }
+            message: "请输入所属平台",
+            trigger: "blur",
+          },
         ],
 
         cgd_tax: [
           {
             required: true,
-            message: '请输入采购毛利率',
-            trigger: 'blur'
-          }
+            message: "请输入采购毛利率",
+            trigger: "blur",
+          },
         ],
         cat_id: [
           {
             required: true,
-            message: '请选择商品分类',
-            trigger: 'change'
-          }
+            message: "请选择商品分类",
+            trigger: "change",
+          },
         ],
         supplierNo: [
           {
-            type: 'array',
+            type: "array",
             required: true,
-            message: '请选择供应商公司',
-            trigger: 'change'
-          }
+            message: "请选择供应商公司",
+            trigger: "change",
+          },
         ],
         qrdType: [
           {
             required: true,
-            message: '请输入订单来源',
-            trigger: 'blur'
-          }
+            message: "请输入订单来源",
+            trigger: "blur",
+          },
         ],
         sale_total: [
           {
             required: true,
-            message: '请输入销售总额',
-            trigger: 'blur'
-          }
+            message: "请输入销售总额",
+            trigger: "blur",
+          },
         ],
         // workCode: [
         //   {
@@ -497,176 +497,176 @@ export default {
         poCode: [
           {
             required: true,
-            message: '请输入PO编号',
-            trigger: 'blur'
-          }
+            message: "请输入PO编号",
+            trigger: "blur",
+          },
         ],
         khNo: [
           {
-            type: 'array',
+            type: "array",
             required: true,
-            message: '请选择购买方公司',
-            trigger: 'change'
-          }
+            message: "请选择购买方公司",
+            trigger: "change",
+          },
         ],
         tax: [
           {
             required: true,
-            message: '请选择税率',
-            trigger: 'change'
-          }
+            message: "请选择税率",
+            trigger: "change",
+          },
         ],
         companyNo: [
           {
             required: true,
-            message: '请选择销售方公司',
-            trigger: 'change'
-          }
+            message: "请选择销售方公司",
+            trigger: "change",
+          },
         ],
         contactor: [
           {
             required: true,
-            message: '请输入收货人',
-            trigger: 'blur'
-          }
+            message: "请输入收货人",
+            trigger: "blur",
+          },
         ],
         mobile: [
           {
             required: true,
             validator: validatemobile,
-            trigger: 'blur'
-          }
+            trigger: "blur",
+          },
         ],
         addr: [
           {
             required: true,
-            message: '请输入联系地址',
-            trigger: 'blur'
-          }
+            message: "请输入联系地址",
+            trigger: "blur",
+          },
         ],
 
         sendtime: [
           {
             required: true,
-            message: '请输入发货时间',
-            trigger: 'change'
-          }
+            message: "请输入发货时间",
+            trigger: "change",
+          },
         ],
 
         goodName: [
           {
             required: true,
-            message: '请输入商品名称',
-            trigger: 'blur'
-          }
+            message: "请输入商品名称",
+            trigger: "blur",
+          },
         ],
         goodPrice: [
           {
             required: true,
-            message: '请输入销售单价',
-            trigger: 'blur'
-          }
+            message: "请输入销售单价",
+            trigger: "blur",
+          },
         ],
         cgdPrice: [
           {
             required: true,
-            message: '请选择采购单价',
-            trigger: 'blur'
-          }
+            message: "请选择采购单价",
+            trigger: "blur",
+          },
         ],
         goodNum: [
           {
             required: true,
-            message: '请输入数量',
-            trigger: 'blur'
-          }
+            message: "请输入数量",
+            trigger: "blur",
+          },
         ],
         cgd_total: [
           {
             required: true,
-            message: '请输入采购总额',
-            trigger: 'blur'
-          }
-        ]
-      }
-    }
+            message: "请输入采购总额",
+            trigger: "blur",
+          },
+        ],
+      },
+    };
   },
   computed: {
     disabledField() {
-      const { goodNum } = this.ruleForm
-      return !goodNum || Number(goodNum) <= 0
+      const { goodNum } = this.ruleForm;
+      return !goodNum || Number(goodNum) <= 0;
     },
     totalWatchSource() {
-      const { goodNum, goodPrice } = this.ruleForm
-      return { goodNum, goodPrice }
+      const { goodNum, goodPrice } = this.ruleForm;
+      return { goodNum, goodPrice };
     },
     cgdTotalWatchSource() {
-      const { goodNum, cgdPrice } = this.ruleForm
-      return { goodNum, cgdPrice }
-    }
+      const { goodNum, cgdPrice } = this.ruleForm;
+      return { goodNum, cgdPrice };
+    },
   },
   watch: {
-    showModel: function(val) {
-      this.showModelThis = val
+    showModel: function (val) {
+      this.showModelThis = val;
       if (val) {
-        this.initForm()
+        this.initForm();
       }
     },
     showModelThis(val) {
       if (!val) {
-        this.$emit('cancel')
+        this.$emit("cancel");
       }
     },
     totalWatchSource: {
       handler({ goodPrice, goodNum }) {
         if (goodPrice === 0 || goodNum === 0) {
-          this.ruleForm.sale_total = 0
-          return
+          this.ruleForm.sale_total = 0;
+          return;
         }
 
-        this.ruleForm.sale_total = accMul(goodPrice, goodNum)
+        this.ruleForm.sale_total = accMul(goodPrice, goodNum);
       },
-      deep: true
+      deep: true,
     },
     cgdTotalWatchSource: {
       handler({ cgdPrice, goodNum }) {
         if (cgdPrice === 0 || goodNum === 0) {
-          this.ruleForm.cgd_total = 0
-          return
+          this.ruleForm.cgd_total = 0;
+          return;
         }
 
-        this.ruleForm.cgd_total = accMul(cgdPrice, goodNum)
+        this.ruleForm.cgd_total = accMul(cgdPrice, goodNum);
       },
-      deep: true
-    }
+      deep: true,
+    },
   },
   methods: {
     async handleHandoverName(e) {
-      this.ruleForm.buyerid = e && e.id ? [e.id] : ''
-      this.ruleForm.buyer_name = e && e.label ? e.label : ''
-      this.$refs.ruleForm.validateField('buyerid')
+      this.ruleForm.buyerid = e && e.id ? [e.id] : "";
+      this.ruleForm.buyer_name = e && e.label ? e.label : "";
+      this.$refs.ruleForm.validateField("buyerid");
     },
     async select_area_change(e) {
-      this.ruleForm.addr_code = e
-      this.$refs.ruleForm.validateField('addr_code')
+      this.ruleForm.addr_code = e;
+      this.$refs.ruleForm.validateField("addr_code");
     },
     number_change(e, type) {
-      this.ruleForm.cgd_tax = e
-      const { cgdPrice, goodPrice, cgd_tax } = this.ruleForm
-      let tax = 0
-      let cgd_price = 0
+      this.ruleForm.cgd_tax = e;
+      const { cgdPrice, goodPrice, cgd_tax } = this.ruleForm;
+      let tax = 0;
+      let cgd_price = 0;
 
       if (type === 1) {
         // tax = (1 - cgdPrice / goodPrice)*100
-        tax = accMul(accSub(1, accDiv(cgdPrice, goodPrice)), 100)
-        this.ruleForm.cgd_tax = tax
-        this.$refs.ruleForm.validateField('cgd_tax')
+        tax = accMul(accSub(1, accDiv(cgdPrice, goodPrice)), 100);
+        this.ruleForm.cgd_tax = tax;
+        this.$refs.ruleForm.validateField("cgd_tax");
       }
       if (type === 2) {
         // cgd_price = ((100 - cgd_tax) / 100) * goodPrice;
-        cgd_price = accMul(accDiv(accSub(100, cgd_tax), 100), goodPrice) || 0
-        this.ruleForm.cgdPrice = cgd_price
-        this.$refs.ruleForm.validateField('cgdPrice')
+        cgd_price = accMul(accDiv(accSub(100, cgd_tax), 100), goodPrice) || 0;
+        this.ruleForm.cgdPrice = cgd_price;
+        this.$refs.ruleForm.validateField("cgdPrice");
       }
 
       // if (this.ruleForm.cgdPrice && this.ruleForm.goodPrice) {
@@ -674,88 +674,91 @@ export default {
       // }
     },
     handleClose() {
-      this.showModelThis = false
-      this.companyName = ''
-      this.khName = ''
-      this.supplierName = ''
-      this.ruleForm = { ...defaultData }
+      this.showModelThis = false;
+      this.companyName = "";
+      this.khName = "";
+      this.supplierName = "";
+      this.ruleForm = { ...defaultData };
     },
     async initForm() {
-      this.loading = true
+      this.loading = true;
       // await this.getAccounts();
 
-      if (this.id === '003') {
-        this.title = '添加销售订单信息'
-        this.rulesThis = this.rules
-      } else if (this.id === '005') {
-        this.title = '修改销售订单信息'
-        this.rulesThis = this.rules
+      if (this.id === "003") {
+        this.title = "添加销售订单信息";
+        this.rulesThis = this.rules;
+      } else if (this.id === "005") {
+        this.title = "修改销售订单信息";
+        this.rulesThis = this.rules;
       } else {
-        this.title = '销售订单信息详情'
-        this.rulesThis = {}
+        this.title = "销售订单信息详情";
+        this.rulesThis = {};
       }
-      await this.resetForm()
-      this.loading = false
+      await this.resetForm();
+      this.loading = false;
     },
 
     handleCompanyChange(e) {
-      this.ruleForm.companyNo = e.code || ''
-      this.$refs.ruleForm.validateField('companyNo')
+      this.ruleForm.companyNo = e.code || "";
+      this.$refs.ruleForm.validateField("companyNo");
     },
     handleCustomerChange(e) {
-      this.ruleForm.khNo = e.code ? [e.code] : ''
-      this.$refs.ruleForm.validateField('khNo')
+      this.ruleForm.khNo = e.code ? [e.code] : "";
+      this.$refs.ruleForm.validateField("khNo");
     },
     handleSupplierChange(e) {
-      this.ruleForm.supplierNo = e.code ? [e.code] : ''
-      this.$refs.ruleForm.validateField('supplierNo')
+      this.ruleForm.supplierNo = e.code ? [e.code] : "";
+      this.$refs.ruleForm.validateField("supplierNo");
     },
     handleGoodClassChange(e) {
-      this.ruleForm.cat_id = e
-      this.$refs.ruleForm.validateField('cat_id')
+      this.ruleForm.cat_id = e;
+      this.$refs.ruleForm.validateField("cat_id");
     },
     handleTaxChange(e) {
-      this.ruleForm.tax = e
-      this.$refs.ruleForm.validateField('tax')
+      this.ruleForm.tax = e;
+      this.$refs.ruleForm.validateField("tax");
     },
     unitsearchChange(e) {
-      const { id, code, label } = e
-      this.ruleForm.goodUnit = code ? [code] : []
-      this.$refs.ruleForm.validateField('goodUnit')
+      const { id, code, label } = e;
+      this.ruleForm.goodUnit = code ? [code] : [];
+      this.$refs.ruleForm.validateField("goodUnit");
     },
     async resetForm() {
       // 重置
       await this.$nextTick(() => {
         if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields()
-          this.$refs.ruleForm.clearValidate()
+          this.$refs.ruleForm.resetFields();
+          this.$refs.ruleForm.clearValidate();
         }
-      })
+      });
 
-      if (this.id === '003') {
-        this.ruleForm.companyNo = this.currentCompany
-        return
+      if (this.id === "003") {
+        this.ruleForm.companyNo = this.currentCompany;
+        return;
       }
 
-      if (this.id !== '003') this.getDetail()
+      if (this.id !== "003") this.getDetail();
     },
     number_change_total(current, prop) {
-      const isCgdTotal = prop === 'cgd_total'
-      const { goodNum } = this.ruleForm
-      this.ruleForm[isCgdTotal ? 'cgdPrice' : 'goodPrice'] = accDiv(current, goodNum)
-      this.ruleForm[prop] = current
-
-      let tax = 0
-      tax = accMul(accSub(1, accDiv(this.ruleForm.cgd_total, this.ruleForm.sale_total)), 100)
-      this.ruleForm.cgd_tax = tax
+      const isCgdTotal = prop === "cgd_total";
+      const { goodNum } = this.ruleForm;
+      this.ruleForm[isCgdTotal ? "cgdPrice" : "goodPrice"] = accDiv(current, goodNum);
+      this.ruleForm[prop] = current;
+
+      let tax = 0;
+      tax = accMul(
+        accSub(1, accDiv(this.ruleForm.cgd_total, this.ruleForm.sale_total)),
+        100
+      );
+      this.ruleForm.cgd_tax = tax;
       // if (this.ruleForm.cgd_total && this.ruleForm.sale_total) {
       //   this.ruleForm['cgd_tax'] = accMul(accDiv(this.ruleForm.cgd_total, this.ruleForm.sale_total), 100) || 0
       // }
     },
     async getDetail() {
-      this.detailLoading = true
-      const { orderCode } = this.sitem
-      const { data } = await asyncRequest.detail({ orderCode })
+      this.detailLoading = true;
+      const { orderCode } = this.sitem;
+      const { data } = await asyncRequest.detail({ orderCode });
 
       const {
         cat_id,
@@ -769,32 +772,32 @@ export default {
         addr_code,
         unitName,
         ...rest
-      } = data
+      } = data;
 
       this.ruleForm = {
         ...rest,
         buyerid: buyerid ? [buyerid] : [],
-        addr_code: addr_code ? addr_code.split(',') : [],
+        addr_code: addr_code ? addr_code.split(",") : [],
         cat_id: cat_id ? [cat_id[cat_id.length - 1]] : [],
         supplierNo: supplierNo ? [supplierNo] : [],
         khNo: khNo ? [khNo] : [],
-        tax: tax ? tax + '%' : '',
-        goodUnit: goodUnit ? [goodUnit] : ''
-      }
+        tax: tax ? tax + "%" : "",
+        goodUnit: goodUnit ? [goodUnit] : "",
+      };
 
-      this.cat_id_name = cat_id.map(({ name }) => name).join('_')
-      console.log(this.cat_id_name)
-      this.unit_name = unitName
+      this.cat_id_name = cat_id.map(({ name }) => name).join("_");
+      console.log(this.cat_id_name);
+      this.unit_name = unitName;
 
-      this.khName = khName
-      this.supplierName = supplierNanme
-      this.detailLoading = false
+      this.khName = khName;
+      this.supplierName = supplierNanme;
+      this.detailLoading = false;
     },
     platform_codesearchChange(e) {
-      const { id, label, pay_name } = e
-      this.ruleForm.platform_id = id || ''
-      this.pay_name = pay_name || ''
-      this.$refs.ruleForm.validateField('platform_id')
+      const { id, label, pay_name } = e;
+      this.ruleForm.platform_id = id || "";
+      this.pay_name = pay_name || "";
+      this.$refs.ruleForm.validateField("platform_id");
     },
     // async getAccounts() {
     //   const res = await asyncRequest.accountall(this.dataForm);
@@ -807,60 +810,60 @@ export default {
     //   }
     // },
     async goods_class_change(e) {
-      const { id } = e
-      this.ruleForm.cat_id = id ? [id] : []
-      this.$refs.ruleForm.validateField('cat_id')
+      const { id } = e;
+      this.ruleForm.cat_id = id ? [id] : [];
+      this.$refs.ruleForm.validateField("cat_id");
     },
     async submitForm() {
-      await this.$refs.ruleForm.validate(async(valid) => {
+      await this.$refs.ruleForm.validate(async (valid) => {
         if (valid) {
           if (this.loading) {
-            return
+            return;
           }
 
-          this.loading = true
-          const model = JSON.parse(JSON.stringify(this.ruleForm))
-          model.supplierNo = model.supplierNo[0]
-          model.khNo = model.khNo[0]
-          model.buyerid = Array.isArray(model.buyerid) ? model.buyerid[0] : model.buyerid
-          model.cat_id = model.cat_id ? model.cat_id[model.cat_id.length - 1] : ''
-          model.addr_code = model.addr_code.join(',')
-          model.tax = model.tax.split('%')[0]
-          model.pay_name = this.pay_name
+          this.loading = true;
+          const model = JSON.parse(JSON.stringify(this.ruleForm));
+          model.supplierNo = model.supplierNo[0];
+          model.khNo = model.khNo[0];
+          model.buyerid = Array.isArray(model.buyerid) ? model.buyerid[0] : model.buyerid;
+          model.cat_id = model.cat_id ? model.cat_id[model.cat_id.length - 1] : "";
+          model.addr_code = model.addr_code.join(",");
+          model.tax = model.tax.split("%")[0];
+          model.pay_name = this.pay_name;
           model.goodUnit = Array.isArray(model.goodUnit)
             ? model.goodUnit[0]
-            : model.goodUnit
+            : model.goodUnit;
 
-          let res = {}
-          if (this.id === '003') {
-            delete model['id']
-            res = await asyncRequest.add(model)
+          let res = {};
+          if (this.id === "003") {
+            delete model["id"];
+            res = await asyncRequest.add(model);
           } else {
-            res = await asyncRequest.update(model)
+            res = await asyncRequest.update(model);
           }
-          this.loading = false
+          this.loading = false;
           if (res && res.code === 0) {
-            const title = this.id === '003' ? '添加成功!' : '修改成功!'
+            const title = this.id === "003" ? "添加成功!" : "修改成功!";
             this.$notify.success({
               title,
-              message: ''
-            })
-            this.showModelThis = false
+              message: "",
+            });
+            this.showModelThis = false;
             // 刷新
-            this.$emit('refresh')
+            this.$emit("refresh");
           } else if (res && res.code >= 100 && res.code <= 104) {
-            await this.logout()
+            await this.logout();
           } else {
-            this.$message.warning(res.message)
+            this.$message.warning(res.message);
           }
         } else {
-          console.log('error submit!!')
-          return false
+          console.log("error submit!!");
+          return false;
         }
-      })
-    }
-  }
-}
+      });
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>

+ 1 - 9
src/views/netOrderEntry/prestoreRecordingOrders/addEdit.vue

@@ -34,15 +34,7 @@
               <el-col :span="12">
                 <el-form-item label="销售方公司:" label-width="100px" prop="companyNo">
                   <p style="font-size:14px;color:#606266;font-weight:700">{{ getCompanyWithCode(ruleForm.companyNo).name }}</p>
-                  <!-- <search-work-company
-                    disabled
-                    :value="ruleForm.companyNo"
-                    :names="''"
-                    :size="'mini'"
-                    :placeholder="'销售方公司'"
-                    @searchChange="handleCompanyChange"
-                  /> -->
-                </el-form-item>
+ </el-form-item>
               </el-col>
 
               <el-col :span="12">

+ 6 - 8
src/views/sellOut/salesOrder/detail.vue

@@ -90,19 +90,17 @@
                   </el-popover>
                 </template>
                 <template slot="is_active">
-                  <span
-                    v-if="sitem.order_type + '' === '1' || sitem.order_type + '' === '2'"
-                    ><span
-                      >{{ sitem.is_activity + "" === "1" ? "参与活动" : "不参与活动" }}/{{
+                    <span >{{ sitem.is_activity + "" === "1" ? "参与活动" : "不参与活动" }}
+                    </span>
+                    <span v-if="sitem.is_activity + '' === '0'">
+                      /{{
                         (
                           goodtype_options.find(
                             (item) => item.value == sitem.good_type
                           ) || {}
                         ).label || "--"
-                      }}</span
-                    ></span
-                  >
-                  <span v-else>--</span>
+                      }}
+                    </span>
                 </template>
                 <template slot="proof_id">
                   <el-popover

+ 52 - 16
src/views/sellOut/zixunOrder/components/buyGoodModal.vue

@@ -144,25 +144,44 @@
                   />
                 </el-form-item>
               </el-col>
+
               <el-col :span="12">
                 <el-row>
-                  <el-col
-                    :span="12"
-                  ><el-form-item label="凭证类型" prop="proof_type" label-width="85px">
-                    <el-select
-                      v-model="ruleForm.proof_type"
-                      placeholder="凭证类型"
-                      style="width: 100%"
-                      @change="set_proof_url()"
-                    >
+                  <el-form-item
+                    label-width="85px"
+                    label="商品类型"
+                    prop="goodtype"
+                  >
+                    <el-select v-model="ruleForm.goodtype" style="width:100%" placeholder="商品类型">
                       <el-option
-                        v-for="item in proof_options"
-                        :key="item.value"
-                        :label="item.label"
-                        :value="item.value"
+                        v-for="goodType in goodTypes"
+                        :key="goodType.value"
+                        :disabled="(goodType.value === '1' && Number(ruleForm.sale_price) === 0)
+                          ||(goodType.value !== '1' && Number(ruleForm.sale_price) !== 0)"
+                        :value="goodType.value"
+                        :label="goodType.label"
                       />
                     </el-select>
                   </el-form-item>
+
+                  <el-col
+                    :span="12"
+                  >
+                    <el-form-item label="凭证类型" prop="proof_type" label-width="85px">
+                      <el-select
+                        v-model="ruleForm.proof_type"
+                        placeholder="凭证类型"
+                        style="width: 100%"
+                        @change="set_proof_url()"
+                      >
+                        <el-option
+                          v-for="item in proof_options"
+                          :key="item.value"
+                          :label="item.label"
+                          :value="item.value"
+                        />
+                      </el-select>
+                    </el-form-item>
                   </el-col>
                   <el-col :span="12">
                     <el-form-item label="到货时间" prop="arrtime" label-width="85px">
@@ -609,7 +628,8 @@ export default {
           value === '0.00' ||
           value === '0.000')
       ) {
-        callback(new Error('不能为零!'))
+        // new Error('不能为零!')
+        callback()
       } else {
         callback()
       }
@@ -656,6 +676,11 @@ export default {
       video_url: '',
       img_url: '',
       other_url: '',
+      goodTypes: [
+        { value: '1', label: '常规商品' },
+        { value: '2', label: '赠品' },
+        { value: '3', label: '样品' }
+      ],
       proof_options: [
         {
           value: '1',
@@ -701,6 +726,13 @@ export default {
       },
       rulesThis: this.rules,
       rules: {
+        goodtype: [
+          {
+            required: true,
+            trigger: 'change',
+            message: '请选择商品类型'
+          }
+        ],
         good_num: [
           {
             required: true,
@@ -816,6 +848,10 @@ export default {
       if (!val) {
         this.$emit('cancel')
       }
+    },
+    'ruleForm.sale_price'(val) {
+      // console.log(val)
+      this.ruleForm.goodtype = Number(val) === 0 ? '2' : '1'
     }
   },
   created() {
@@ -859,7 +895,6 @@ export default {
     async initForm() {
       this.loading = true
       this.rulesThis = this.rules
-      console.log(this.sitem)
       const { can } = this.sitem
       this.sitem.can_name = ''
       this.sitem.is_noble = false
@@ -910,7 +945,8 @@ export default {
             remark: '',
             proof_type: '1', // 通过or驳回
             proof_url: '', // 驳回至
-            companyNo: in_companyNo || ''
+            companyNo: in_companyNo || '',
+            goodtype: Number(sale_price) === 0 ? '2' : '1'
           }
         }
 

+ 74 - 64
src/views/stock/stockCount/components/dataWeido/columns.js

@@ -1,65 +1,75 @@
 export default [
-    {
-          type: "expand",
-          _slot_: "expand",
-          label: "",
-        },
-        {
-          prop: "company_no",
-          label: "仓库业务公司编码",
-          width: "150",
-        },
-        {
-          prop: "company_name",
-          label: "仓库业务公司名称",
-          'min-width':"180"
-        },
-        {
-          prop: "supplier_code",
-          label: "仓库所在公司编码",
-          width: "150",
-        },
-        {
-          prop: "supplier_name",
-          label: "仓库所在公司名称",
-          'min-width':"180"
-        },
-        {
-          prop: "wsm_code",
-          label: "仓库编码",
-          width:'180'
-        },
-        {
-          prop: "wsm_name",
-          label: "仓库名称",
-          'min-width':"100"
-        },
-        {
-          prop: "total_stock",
-          label: "当前库存",
-        },
-        {
-          prop: "wait_in_stock",
-          label: "待入库",
-        },
-        {
-          prop: "wait_out_stock",
-          label: "待出库",
-          width: "80px",
-        },
-        {
-          prop: "usable_stock",
-          label: "可用库存",
-          // ,
-        },
-        {
-          prop: "intra_stock",
-          label: "在途库存",
-          // ,
-        },
-        // {
-        //   prop: "warn_stock",
-        //   label: "预警库存",
-        // },
-      
-]
+  {
+    type: 'expand',
+    _slot_: 'expand',
+    label: ''
+  },
+  {
+    prop: 'company_no',
+    label: '仓库业务公司编码',
+    width: '150'
+  },
+  {
+    prop: 'company_name',
+    label: '仓库业务公司名称',
+    'min-width': '180'
+  },
+  {
+    prop: 'supplier_code',
+    label: '仓库所在公司编码',
+    width: '150'
+  },
+  {
+    prop: 'supplier_name',
+    label: '仓库所在公司名称',
+    'min-width': '180'
+  },
+  {
+    prop: 'contactor_name',
+    label: '供应商负责人',
+    'min-width': '100'
+  },
+  {
+    prop: 'wsm_code',
+    label: '仓库编码',
+    width: '180'
+  },
+  {
+    prop: 'wsm_name',
+    label: '仓库名称',
+    'min-width': '100'
+  },
+  {
+    prop: 'person',
+    label: '仓库负责人',
+    'min-width': '100'
+  },
+  {
+    prop: 'total_stock',
+    label: '当前库存'
+  },
+  {
+    prop: 'wait_in_stock',
+    label: '待入库'
+  },
+  {
+    prop: 'wait_out_stock',
+    label: '待出库',
+    width: '80px'
+  },
+  {
+    prop: 'usable_stock',
+    label: '可用库存'
+    // ,
+  },
+  {
+    prop: 'intra_stock',
+    label: '在途库存'
+    // ,
+  }
+  // {
+  //   prop: "warn_stock",
+  //   label: "预警库存",
+  // },
+
+]

+ 28 - 12
src/views/stock/stockCount/components/dataWeido/index.vue

@@ -17,7 +17,7 @@
         @screen-reset="
           pageInfo.curr = 1;
           parmValue.page = 1;
-          searchList();
+          searchChange();
         "
         @screen-submit="
           pageInfo.curr = 1;
@@ -60,8 +60,7 @@
                     class="fr"
                     type="warning"
                     @click="restSearch"
-                    >重置</el-button
-                  >
+                    >重置</el-button>
                 </el-col>
               </el-col>
             </el-row>
@@ -78,9 +77,17 @@
             <el-table-column
               label="商品编码"
               prop="spuCode"
-              width="170"
-            ></el-table-column>
-
+              width="190"
+            >
+              <template slot-scope="scope">
+                <div style="display:flex; align-items:center">
+                  <el-tooltip placement="top" content="查看商品详情" v-if="goodCostPremission.includes('007')">
+                     <i @click="linkToGoodDetail(scope.row)" class="el-icon-link" style="cursor:pointer;margin-right:5px;font-size:16px" />
+                  </el-tooltip>
+                  <p>{{scope.row.spuCode}}</p>
+                </div>
+              </template>
+            </el-table-column>
             <el-table-column
               label="商品名称"
               prop="good_name"
@@ -105,12 +112,12 @@
             </el-table-column>
             <el-table-column label="分类" min-width="120" show-overflow-tooltip>
               <template slot-scope="scope">
-                <span v-for="(si, sii) in scope.row.can" :key="sii + si.spec_value_id"
-                  >{{ sii === 0 ? "" : "_" }}{{ si.name }}</span
-                >
+                <span v-for="(si, sii) in scope.row.can" :key="sii + si.spec_value_id">
+                  {{ sii === 0 ? "" : "_" }}{{ si.name }}
+                </span>
               </template></el-table-column
             >
-            <el-table-column
+          <el-table-column
               label="品牌"
               prop="brand_name"
               show-overflow-tooltip
@@ -183,11 +190,15 @@ export default {
   computed: {
     ...mapGetters(["tablebtnSize", "searchSize", "size"]),
     powers() {
-      const tran =
-        this.$store.getters.btnList.find((item) => item.menu_route == "stockCount") || {};
+      const tran = this.$store.getters.btnList.find((item) => item.menu_route == "stockCount") || {};
       const { action } = tran ?? {};
       return action ?? [];
     },
+    goodCostPremission(){
+      const tran = this.$store.getters.btnList.find((item) => item.menu_route == "goodsCost") || {};
+      const { action } = tran ?? {};
+      return action ?? [];
+    }
   },
   data() {
     return {
@@ -265,6 +276,11 @@ export default {
       this.pageInfo.curr = 1;
       await this.searchList();
     },
+    linkToGoodDetail(row){
+      // console.log(row)
+      // http://localhost:8081/#/goodStore/goodsCostDetail?id=SKU2305311527349138&type=view
+      this.$router.push(`/goodStore/goodsCostDetail?id=${row.spuCode}&type=view`)
+    },
     restSearch() {
       // 表格 - 分页
       this.pageInfo = {

+ 40 - 39
src/views/stock/stockCount/components/productWeido/columns.js

@@ -1,13 +1,14 @@
 export default [
   {
-    type: "expand",
-    _slot_: "expand",
-    label: "",
+    type: 'expand',
+    _slot_: 'expand',
+    label: ''
   },
   {
-    prop: "good_code",
-    label: "商品编码",
-    width: "160",
+    prop: 'good_code',
+    label: '商品编码',
+    width: '185',
+    _slot_: 'good_code'
   },
   // {
   //   prop: "type_code",
@@ -15,56 +16,56 @@ export default [
   //   width: "150",
   // },
   {
-    prop: "good_name",
-    label: "商品名称",
-    "min-width": "150",
+    prop: 'good_name',
+    label: '商品名称',
+    'min-width': '150'
   },
   {
-    prop: "specinfo",
-    label: "规格",
-    "min-width": "150",
+    prop: 'specinfo',
+    label: '规格',
+    'min-width': '150',
     _slot_: 'specinfo'
   },
   {
-    prop: "sort_f",
-    label: "分类",
-    width: "155",
+    prop: 'sort_f',
+    label: '分类',
+    width: '155'
   },
   {
-    prop: "brand_name",
-    label: "品牌",
-    width: "85",
+    prop: 'brand_name',
+    label: '品牌',
+    width: '85'
   },
-  
+
   {
-    prop: "unit",
-    label: "单位",
-    width: "50",
+    prop: 'unit',
+    label: '单位',
+    width: '50'
   },
   {
-    prop: "total_stock",
-    label: "当前库存",
-    width: "80",
+    prop: 'total_stock',
+    label: '当前库存',
+    width: '80'
   },
   {
-    prop: "wait_in_stock",
-    label: "待入库",
-    width: "80",
+    prop: 'wait_in_stock',
+    label: '待入库',
+    width: '80'
   },
   {
-    prop: "wait_out_stock",
-    label: "待出库",
-    width: "80",
+    prop: 'wait_out_stock',
+    label: '待出库',
+    width: '80'
   },
   {
-    prop: "usable_stock",
-    label: "可用库存",
-    width: "80",
+    prop: 'usable_stock',
+    label: '可用库存',
+    width: '80'
   },
   {
-    prop: "intra_stock",
-    label: "在途库存",
-    width: "80",
-  },
+    prop: 'intra_stock',
+    label: '在途库存',
+    width: '80'
+  }
 
-]
+]

+ 36 - 5
src/views/stock/stockCount/components/productWeido/index.vue

@@ -50,7 +50,7 @@
                     icon="el-icon-search"
                     label=""
                     @click="searchList"
-                  ></el-button>
+                  />
                 </el-col>
                 <!-- 重置 -->
                 <el-col :span="4" style="width: 56px; margin-left: 10px" class="mr5">
@@ -59,13 +59,22 @@
                     class="fr"
                     type="warning"
                     @click="restSearch"
-                    >重置</el-button
-                  >
+                    >重置</el-button>
                 </el-col>
               </el-col>
             </el-row>
           </div>
         </template>
+
+        <template #good_code="{ scope }">
+          <div style="display:flex;align-items:center">
+            <el-tooltip placement="top" content="查看商品详情" v-if="goodCostPremission.includes('007')">
+               <i @click="linkToGoodDetail(scope.row)" class="el-icon-link" style="cursor:pointer;margin-right:5px;font-size:16px" />
+            </el-tooltip>
+            <p>{{scope.row.good_code}}</p>
+          </div>
+        </template>
+        
         <template #expand="{ scope }">
           <el-table
             :data="scope.row.child"
@@ -78,7 +87,13 @@
               prop="wsm_name"
               show-overflow-tooltip
               width="150"
-            ></el-table-column>
+            />
+            <el-table-column 
+              label="仓库负责人"
+              prop="contactor_name"
+              show-overflow-tooltip
+              width="120"
+            />
             <el-table-column
               label="仓库编码"
               prop="wsm_code"
@@ -90,7 +105,13 @@
               prop="supplierName"
               show-overflow-tooltip
               width="150"
-            ></el-table-column>
+            />
+            <el-table-column
+              label="供应商负责人"
+              prop="person"
+              show-overflow-tooltip
+              width="120"
+            />
             <el-table-column
               label="仓库所在公司编码"
               prop="supplierNo"
@@ -182,6 +203,11 @@ export default {
       const { action } = tran ?? {};
       return action ?? [];
     },
+    goodCostPremission(){
+      const tran = this.$store.getters.btnList.find((item) => item.menu_route == "goodsCost") || {};
+      const { action } = tran ?? {};
+      return action ?? [];
+    }
   },
   data() {
     return {
@@ -219,6 +245,11 @@ export default {
   },
 
   methods: {
+    linkToGoodDetail(row){
+      // console.log(row)
+      // http://localhost:8081/#/goodStore/goodsCostDetail?id=SKU2305311527349138&type=view
+      this.$router.push(`/goodStore/goodsCostDetail?id=${row.good_code}&type=view`)
+    },
     //重置参数
     restSearch() {
       // 表格 - 分页

+ 11 - 10
src/views/stock/stockCount/index.vue

@@ -7,26 +7,27 @@
         <el-row>
           <el-col>
             <el-tabs v-model="activeName">
-               <el-tab-pane label="商品维度" name="productWeido"
-                ><product-weido
-              /></el-tab-pane>
-             <el-tab-pane label="仓库维度" name="dataWeido">
-                <data-weido
-              /></el-tab-pane>
-               <el-tab-pane label="区间统计" name="count">
+              <el-tab-pane label="商品维度" name="productWeido">
+                <product-weido/>
+              </el-tab-pane>
+              <el-tab-pane label="仓库维度" name="dataWeido">
+                <data-weido />
+              </el-tab-pane>
+               <!-- <el-tab-pane label="区间统计" name="count">
                 <space-count
-              /></el-tab-pane>
+              /></el-tab-pane> -->
             </el-tabs>
           </el-col>
         </el-row>
       </div>
     </div>
+
     <div v-else>
-      <no-auth></no-auth>
+      <no-auth />
     </div>
   </div>
 </template>
-   <script>
+<script>
 import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
 import DataWeido from "./components/dataWeido";