chenrui 3 ay önce
ebeveyn
işleme
a8904123a5

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1742282984949
+  "version": 1742288577330
 }

+ 12 - 0
src/api/stock.js

@@ -77,3 +77,15 @@ export const stockByProductSn = (params) => {
     method: 'post'
   })
 }
+
+//连锁库存  列表   有分页
+export const stockQueryLinkPage = (params) => {
+  const url = `/stock/queryLinkPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 54 - 12
src/views/inventoryManagement/chainInventory/list.vue

@@ -7,7 +7,16 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="门店名称">
-                <a-input id="chainInventoryList-storeName" v-model.trim="queryParam.storeName" allowClear placeholder="请输入门店名称"/>
+                <a-select
+                  placeholder="请选择门店名称"
+                  id="chainInventoryList-storeName"
+                  allowClear
+                  v-model.trim="queryParam.tenantId"
+                  :showSearch="true"
+                  option-filter-prop="children"
+                  :filter-option="filterOption">
+                  <a-select-option v-for="item in linkageGroupData" :id="item.dealerSn" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
+                </a-select>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -63,7 +72,7 @@
         bordered>
         <!-- 产品分类 -->
         <template slot="productType" slot-scope="text, record">
-          <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
+          <span v-if="record.productEntity&&(record.productEntity.productTypeName2 || record.productEntity.productTypeName3)">{{ record.productEntity.productTypeName2 }} {{ record.productEntity.productTypeName3 ? '>' : '' }} {{ record.productEntity.productTypeName3 }}</span>
           <span v-else>--</span>
         </template>
       </s-table>
@@ -78,7 +87,8 @@ import { STable, VSelect } from '@/components'
 import ProductType from '@/views/common/productType.js'// 产品分类
 import ProductBrand from '@/views/common/productBrand.js'// 产品品牌
 // 接口
-import { stockWarnList } from '@/api/stockWarn'
+import { stockQueryLinkPage } from '@/api/stock'
+import { linkageGroupList } from '@/api/reportData'
 export default {
   name: 'ChainInventoryList',
   components: { STable, VSelect, ProductType, ProductBrand },
@@ -90,7 +100,8 @@ export default {
       tableHeight: 0, // 表格高度
       disabled: false, //  查询、重置按钮是否可操作
       queryParam: { //  查询条件
-        storeName: undefined, // 门店名称
+        tenantIdList: [],
+        tenantId: undefined, // 门店名称
         productCode: '', // 产品编码
         productName: '', // 产品名称
         productOrigCode: '', // 原厂编码
@@ -100,21 +111,29 @@ export default {
         productTypeSn3: undefined // 产品分类3
       },
       productType: [], // 产品分类默认值
+      linkageGroupData: [], // 门店列表
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '门店名称', dataIndex: 'storeName', align: 'left', width: '20%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '门店名称', dataIndex: 'dealerName', align: 'left', width: '20%', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', align: 'left', width: '20%', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '原厂编码', dataIndex: 'dealerProduct.origCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品品牌', dataIndex: 'brandName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', align: 'left', width: '20%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productEntity.origCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品品牌', dataIndex: 'productEntity.productBrandName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '15%', align: 'center' },
-        { title: '可用库存数量(个)', dataIndex: 'stockNum', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '可用库存数量(个)', dataIndex: 'currentStockQty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
+        if (this.queryParam.tenantId && this.queryParam.tenantId.length > 0) {
+          this.queryParam.tenantIdList[0] = this.queryParam.tenantId
+        } else {
+          this.queryParam.tenantIdList = []
+        }
         this.disabled = true
         this.spinning = true
-        return stockWarnList(Object.assign(parameter, this.queryParam)).then(res => {
+        const parames = Object.assign(parameter, this.queryParam)
+        delete parames.tenantId
+        return stockQueryLinkPage(parames).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -147,7 +166,8 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      this.queryParam.storeName = undefined
+      this.queryParam.tenantIdList = []
+      this.queryParam.tenantId = undefined
       this.queryParam.productCode = ''
       this.queryParam.productName = ''
       this.queryParam.productOrigCode = ''
@@ -159,6 +179,27 @@ export default {
       this.$refs.ruleForm.resetFields()
       this.$refs.table.clearTable()
     },
+    // 门店店筛选
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    // 门店列表
+    getLinkageGroup () {
+      linkageGroupList({}).then(res => {
+        if (res.status == 200) {
+          const data = res.data || []
+          if (data.length > 0) {
+            this.linkageGroupData = data
+          } else {
+            this.linkageGroupData = []
+          }
+        } else {
+          this.linkageGroupData = []
+        }
+      })
+    },
     //  产品分类  change
     changeProductType (val, opt) {
       this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
@@ -171,11 +212,12 @@ export default {
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
+      _this.getLinkageGroup()
     },
     // 表格高度计算
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 180
+      this.tableHeight = window.innerHeight - tableSearchH - 190
     }
   },
   watch: {

+ 2 - 2
vue.config.js

@@ -209,8 +209,8 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.2.113:8550/qpls-md',
-        target: 'https://p.iscm.360arrow.com/qpls-md',
+        target: 'http://192.168.2.113:8550/qpls-md',
+        // target: 'https://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,
         changeOrigin: true,