소스 검색

Merge branch 'develop_szhj' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into develop_szhj

chenrui 3 년 전
부모
커밋
58822e9da8

+ 27 - 19
src/views/numsGoodsShelves/recallManagement/list.vue

@@ -23,17 +23,17 @@
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-item label="产品编码">
-                  <a-input allowClear placeholder="请输入产品编码" v-model.tirm="queryParam.code"/>
+                  <a-input allowClear placeholder="请输入产品编码" v-model.tirm="queryParam.productCode"/>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="产品名称">
-                  <a-input allowClear placeholder="请输入产品名称" v-model.tirm="queryParam.name"/>
+                  <a-input allowClear placeholder="请输入产品名称" v-model.tirm="queryParam.productName"/>
                 </a-form-item>
               </a-col>
             </template>
             <a-col :md="6" :sm="24">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="outboundOrderList-refresh" >查询</a-button>
+              <a-button type="primary" @click="getSumByType" :disabled="disabled" id="outboundOrderList-refresh" >查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="outboundOrderList-reset">重置</a-button>
               <a @click="advanced=!advanced" style="margin-left: 5px" v-if="activeKey==0">
                 {{ advanced ? '收起' : '展开' }}
@@ -43,7 +43,7 @@
           </a-row>
         </a-form>
       </div>
-      <a-tabs type="card" v-model="queryParam.billState" @change="tabChange" class="replenishmentManagementList-tabs ">
+      <a-tabs type="card" v-model="queryParam.billState" @change="tabChange" class="replenishmentManagementList-tabs">
         <a-tab-pane v-for="item in tabsList" :key="item.code">
           <p slot="tab">{{ item.name }}<span v-if="item.countNum&&item.code=='WAIT_CONFIRM'" style="color:red">({{ item.countNum }})</span></p>
         </a-tab-pane>
@@ -57,10 +57,10 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ y:tableHeight }"
-        @expand="expand"
-        :defaultLoadData="true"
+        :expandedRowKeys="expandedRowKeys"
+        @expand="expandFun"
         :expandRowByClick="true"
-        :defaultExpandAllRows="true"
+        :defaultLoadData="false"
         bordered>
         <template slot="action" slot-scope="text, record">
           <a-button
@@ -82,7 +82,7 @@
           class="inner-table"
           slot-scope="record,index"
           slot="expandedRowRender"
-          :rowKey="(rec) => rec.id"
+          :rowKey="(record) => record.id"
           :columns="innerColumns"
           :data-source="innerData[index].innerData"
           :pagination="false"
@@ -117,6 +117,7 @@ export default {
       currentData: null,
       activeKey: 0, // 默认的tab
       tabsList: [],
+      expandedRowKeys: [],
       time: [
         getDate.getCurrMonthDays().starttime,
         getDate.getCurrMonthDays().endtime
@@ -133,7 +134,7 @@ export default {
         { title: '创建时间', dataIndex: 'createDate', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调回单号', dataIndex: 'recallBillNo', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '货架名称', dataIndex: 'shelfInfo.shelfName', width: '25%', align: 'left', customRender: function (text) { return text || '--' } },
-        { title: '状态', dataIndex: 'state', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '状态', dataIndex: 'billStateDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调回总量', dataIndex: 'totalQty', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '实退总量', dataIndex: 'totalConfirmQty', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', width: '10%', align: 'left', scopedSlots: { customRender: 'action' } }
@@ -151,10 +152,9 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
+        this.expandedRowKeys = []
         const params = this.queryParam
-        if (params.billState == 'ALL') {
-          params.billState = ''
-        }
+        params.billState = this.queryParam.billState == 'ALL' ? '' : this.queryParam.billState
         return shelfRecallList(Object.assign(parameter, params)).then(res => {
           let data
           if (res.status == 200) {
@@ -190,13 +190,17 @@ export default {
     // 切换tab
     tabChange (key) {
       console.log(key)
-      this.activeKey = key
-      this.queryParam.billState = key
-      this.$refs.table.refresh(true)
+      this.expandedRowKeys = []
+      setTimeout(() => {
+        this.queryParam.billState = key
+        this.$refs.table.refresh(true)
+      }, 100)
     },
     // 获取各类型下的数量
     getSumByType () {
-      shelfRecallStateCount({}).then(res => {
+      const params = JSON.parse(JSON.stringify(this.queryParam))
+      params.billState = this.queryParam.billState == 'ALL' ? '' : this.queryParam.billState
+      shelfRecallStateCount(params).then(res => {
         if (res.status == 200) {
           this.tabsList = [
             { code: 'ALL', name: '全部', countNum: 0 }, { code: 'WAIT_CONFIRM', name: '待退库', countNum: 0 }, { code: 'FINISH', name: '已完成', countNum: 0 }, { code: 'CANCEL', name: '已取消', countNum: 0 }
@@ -205,14 +209,18 @@ export default {
           this.tabsList[1].countNum = res.data.WAIT_CONFIRM || 0
           this.tabsList[2].countNum = res.data.FINISH || 0
           this.tabsList[3].countNum = res.data.CANCEL || 0
-          this.$refs.table.refresh()
+          this.$refs.table.refresh(true)
         }
       })
     },
     // 点击行或图标触发接口
-    expand (expanded, record) {
+    expandFun (expanded, record) {
       if (expanded) {
+        this.expandedRowKeys.push(record.id)
         this.getinnerData(record) // 获取表格内部数据
+      } else {
+        const i = this.expandedRowKeys.findIndex(item => item == record.id)
+        this.expandedRowKeys.splice(i, 1)
       }
     },
     // 获取子表格数据
@@ -244,7 +252,7 @@ export default {
         billState: 'ALL'
       }
       this.$refs.shelfList.resetForm()
-      this.$refs.table.refresh(true)
+      this.getSumByType()
     },
     // 退库
     handleRecall (row) {

+ 1 - 1
src/views/numsGoodsShelves/recallManagement/recallModal.vue

@@ -111,7 +111,7 @@ export default {
           })
           const params = {
             shelfSn: _this.list[0].shelfSn,
-            recallBillSn: _this.list.recallBillSn,
+            recallBillSn: _this.list[0].recallBillSn,
             recallBillNo: _this.list[0].recallBillNo,
             detailList: arr
           }

+ 1 - 1
src/views/numsGoodsShelves/replenishmentManagement/replenishmentDetail.vue

@@ -6,7 +6,7 @@
         <a-collapse-panel key="1" header="基础信息">
           <a-descriptions size="small" :column="3">
             <a-descriptions-item label="关联客户">
-              {{ detailData&&detailData.shelfInfo.storeName || '--' }}
+              {{ detailData&&detailData.customerName || '--' }}
             </a-descriptions-item>
             <a-descriptions-item label="货架名称" :span="2">
               {{ detailData&&detailData.shelfInfo.shelfName || '--' }}

+ 2 - 2
src/views/salesManagement/urgentItemsOffset/detail.vue

@@ -33,8 +33,8 @@
         <a-collapse :activeKey="['1']" v-else>
           <a-collapse-panel key="1" header="基础信息">
             <a-descriptions :column="3">
-              <a-descriptions-item label="关联客户">{{ (detailData&&detailData.buyerName) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="货架名称">{{ detailData&&detailData.shelf.name || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="关联客户">{{ (detailData&&detailData.customerName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="货架名称">{{ detailData&&detailData.buyerName || '--' }}</a-descriptions-item>
               <a-descriptions-item label="急件单号">{{ (detailData&&detailData.urgentBillNo) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="状态">{{ (detailData&&detailData.statusDictValue) || '--' }}</a-descriptions-item>
             </a-descriptions>

+ 2 - 2
vue.config.js

@@ -109,8 +109,8 @@ const vueConfig = {
     proxy: {
       '/api': {
         // target: 'http://192.168.16.188:8503/qpls-md',
-        target: 'http://frps.chelingzhu.com:7800/qpls-md',
-        // target: 'http://p.iscm.360arrow.com/qpls-md',
+        // target: 'http://frps.chelingzhu.com:7800/qpls-md',
+        target: 'http://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,
         changeOrigin: true,