Pārlūkot izejas kodu

Merge branch 'develop_yh28' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_yh28

lilei 1 gadu atpakaļ
vecāks
revīzija
b5bc089310

+ 72 - 51
src/views/allocationManagement/transferOut/detail.vue

@@ -56,57 +56,59 @@
         </template>
       </a-page-header>
       <!-- 基础信息 -->
-      <a-card size="small" :bordered="false" class="allocateBillDetail-cont" v-show="showDetail">
-        <div style="padding: 0;" ref="basicInformation">
-          <a-descriptions :column="4">
-            <a-descriptions-item label="调往对象">{{ (basicInfoData&&basicInfoData.targetName) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="调出仓库">{{ (basicInfoData&&basicInfoData.warehouseName) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="发货编号">{{ (basicInfoData&&basicInfoData.sendNo) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="收货客户名称">{{ (basicInfoData&&basicInfoData.receiverName) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="调拨单号">{{ (basicInfoData&&basicInfoData.allocateNo) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="打印状态">{{ (basicInfoData&&basicInfoData.printStateDictValue) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="费用类型">
-              {{ (basicInfoData&&basicInfoData.costTypeName) || '--' }}
-            </a-descriptions-item>
-            <a-descriptions-item label="调拨类型">
-              <div>
-                <span v-if="basicInfoData&&basicInfoData.allocateSortName">{{ basicInfoData.allocateSortName || '--' }}</span>
-                <span v-if="basicInfoData&&basicInfoData.allocateTypeName">/{{ basicInfoData.allocateTypeName || '--' }}</span>
-              </div>
-            </a-descriptions-item>
-            <a-descriptions-item label="费用归属品牌">
-              {{ (basicInfoData&&basicInfoData.productBrandName) || '--' }}
-            </a-descriptions-item>
-            <a-descriptions-item label="费用归属品类">
-              <div>
-                <span v-if="basicInfoData&&basicInfoData.productTypeName1">{{ basicInfoData.productTypeName1 || '--' }}</span>
+      <div ref="tableSearch">
+        <a-card size="small" :bordered="false" class="allocateBillDetail-cont" v-show="showDetail">
+          <div style="padding: 0;" ref="basicInformation">
+            <a-descriptions :column="4">
+              <a-descriptions-item label="调往对象">{{ (basicInfoData&&basicInfoData.targetName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="调出仓库">{{ (basicInfoData&&basicInfoData.warehouseName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="发货编号">{{ (basicInfoData&&basicInfoData.sendNo) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="收货客户名称">{{ (basicInfoData&&basicInfoData.receiverName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="调拨单号">{{ (basicInfoData&&basicInfoData.allocateNo) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="打印状态">{{ (basicInfoData&&basicInfoData.printStateDictValue) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="费用类型">
+                {{ (basicInfoData&&basicInfoData.costTypeName) || '--' }}
+              </a-descriptions-item>
+              <a-descriptions-item label="调拨类型">
+                <div>
+                  <span v-if="basicInfoData&&basicInfoData.allocateSortName">{{ basicInfoData.allocateSortName || '--' }}</span>
+                  <span v-if="basicInfoData&&basicInfoData.allocateTypeName">/{{ basicInfoData.allocateTypeName || '--' }}</span>
+                </div>
+              </a-descriptions-item>
+              <a-descriptions-item label="费用归属品牌">
+                {{ (basicInfoData&&basicInfoData.productBrandName) || '--' }}
+              </a-descriptions-item>
+              <a-descriptions-item label="费用归属品类">
+                <div>
+                  <span v-if="basicInfoData&&basicInfoData.productTypeName1">{{ basicInfoData.productTypeName1 || '--' }}</span>
+                  <span v-else>--</span>
+                  <span v-if="basicInfoData&&basicInfoData.productTypeName2">/{{ basicInfoData.productTypeName2 || '--' }}</span>
+                  <span v-if="basicInfoData&&basicInfoData.productTypeName3">/{{ basicInfoData.productTypeName3 || '--' }}</span>
+                </div>
+              </a-descriptions-item>
+              <a-descriptions-item label="起止时间">
+                <span v-if="basicInfoData&&(basicInfoData.promoStartDate || basicInfoData.promoEndDate)">{{ (basicInfoData&&basicInfoData.promoStartDate) || '--' }} ~ {{ (basicInfoData&&basicInfoData.promoEndDate) || '--' }}</span>
                 <span v-else>--</span>
-                <span v-if="basicInfoData&&basicInfoData.productTypeName2">/{{ basicInfoData.productTypeName2 || '--' }}</span>
-                <span v-if="basicInfoData&&basicInfoData.productTypeName3">/{{ basicInfoData.productTypeName3 || '--' }}</span>
-              </div>
-            </a-descriptions-item>
-            <a-descriptions-item label="起止时间">
-              <span v-if="basicInfoData&&(basicInfoData.promoStartDate || basicInfoData.promoEndDate)">{{ (basicInfoData&&basicInfoData.promoStartDate) || '--' }} ~ {{ (basicInfoData&&basicInfoData.promoEndDate) || '--' }}</span>
-              <span v-else>--</span>
-            </a-descriptions-item>
-            <a-descriptions-item label="备注" :span="4">{{ (basicInfoData&&basicInfoData.remark) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="附件" :span="4">
-              <div v-if="basicInfoData&&basicInfoData.attachmentList&&basicInfoData.attachmentList.length">
-                <a
-                  target="_blank"
-                  style="color: #00aaff;text-decoration: underline;margin-right: 15px;"
-                  :href="item.filePath"
-                  v-for="item in basicInfoData.attachmentList"
-                  :key="item.id">
-                  {{ item.fileName }}
-                </a>
-              </div>
-              <span v-else>--</span>
-            </a-descriptions-item>
-          </a-descriptions>
-        </div>
-      </a-card>
+              </a-descriptions-item>
+              <a-descriptions-item label="备注" :span="4">{{ (basicInfoData&&basicInfoData.remark) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="附件" :span="4">
+                <div v-if="basicInfoData&&basicInfoData.attachmentList&&basicInfoData.attachmentList.length">
+                  <a
+                    target="_blank"
+                    style="color: #00aaff;text-decoration: underline;margin-right: 15px;"
+                    :href="item.filePath"
+                    v-for="item in basicInfoData.attachmentList"
+                    :key="item.id">
+                    {{ item.fileName }}
+                  </a>
+                </div>
+                <span v-else>--</span>
+              </a-descriptions-item>
+            </a-descriptions>
+          </div>
+        </a-card>
+      </div>
       <a-card size="small" :bordered="false" class="allocateBillDetail-cont">
         <!-- 总计 -->
         <div ref="countInfo">
@@ -126,6 +128,8 @@
           :rowKey="(record) => record.id"
           :columns="columns"
           :data="loadData"
+          :style="{ height:outBizSn? '380px': tableHeight+70+'px' }"
+          :scroll="{ y:outBizSn?380: tableHeight }"
           :defaultLoadData="false"
           bordered>
         </s-table>
@@ -183,7 +187,8 @@ export default {
       localDataSource: [],
       openModal: false,
       nowType: null,
-      showDetail: false
+      showDetail: false,
+      tableHeight: 0
     }
   },
   computed: {
@@ -213,6 +218,17 @@ export default {
       return arr
     }
   },
+  watch: {
+    showDetail (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
   methods: {
     //  返回列表
     handleBack () {
@@ -285,6 +301,11 @@ export default {
       this.$refs.table.refresh(true)
       this.getDetail()
       this.getDetailCount()
+      this.setTableH()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 280
     }
   },
   mounted () {

+ 69 - 50
src/views/allocationManagement/transferReturn/detail.vue

@@ -22,48 +22,50 @@
           <print :params="{allocateReturnSn: $route.params.sn || outBizSn}" :basicInfoData="basicInfoData" :disabled="localDataSource.length==0" @loading="spinning=true" @unloading="spinning=false"></print>
         </template>
       </a-page-header>
-      <a-card size="small" :bordered="false" :class="pageType=='pages'?'allocateBillDetail-cont':''" v-show="showDetail">
-        <a-descriptions :column="3" v-if="pageType=='pages'">
-          <a-descriptions-item label="调拨退货单号">{{ (basicInfoData&&basicInfoData.allocateReturnNo) || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="调拨退货对象">{{ (basicInfoData&&basicInfoData.targetTypeDictValue) || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="调拨退货对象名称">{{ (basicInfoData&&basicInfoData.targetName) || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="调入仓库">{{ (basicInfoData&&basicInfoData.warehouseName) || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="费用类型">
-            {{ (basicInfoData&&basicInfoData.costTypeName) || '--' }}
-          </a-descriptions-item>
-          <a-descriptions-item label="调拨退货类型">
-            <div>
-              <span v-if="basicInfoData&&basicInfoData.allocateSortName">{{ basicInfoData.allocateSortName || '--' }}</span>
-              <span v-if="basicInfoData&&basicInfoData.allocateReturnTypeName">/{{ basicInfoData.allocateReturnTypeName || '--' }}</span>
-            </div>
-          </a-descriptions-item>
-          <a-descriptions-item label="是否抓单">{{ basicInfoData&&basicInfoData.grabFlagDictValue || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remarks) || '--' }}</a-descriptions-item>
-        </a-descriptions>
-        <a-collapse :activeKey="['1']" v-else>
-          <a-collapse-panel key="1" header="基础信息">
-            <a-descriptions :column="3">
-              <a-descriptions-item label="调拨退货单号">{{ (basicInfoData&&basicInfoData.allocateReturnNo) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="调拨退货对象">{{ (basicInfoData&&basicInfoData.targetTypeDictValue) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="调拨退货对象名称">{{ (basicInfoData&&basicInfoData.targetName) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="调入仓库">{{ (basicInfoData&&basicInfoData.warehouseName) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="费用类型">
-                {{ (basicInfoData&&basicInfoData.costTypeName) || '--' }}
-              </a-descriptions-item>
-              <a-descriptions-item label="调拨退货类型">
-                <div>
-                  <span v-if="basicInfoData&&basicInfoData.allocateSortName">{{ basicInfoData.allocateSortName || '--' }}</span>
-                  <span v-if="basicInfoData&&basicInfoData.allocateReturnTypeName">/{{ basicInfoData.allocateReturnTypeName || '--' }}</span>
-                </div>
-              </a-descriptions-item>
-              <a-descriptions-item label="是否抓单">{{ basicInfoData&&basicInfoData.grabFlagDictValue || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remarks) || '--' }}</a-descriptions-item>
-            </a-descriptions>
-          </a-collapse-panel>
-        </a-collapse>
-      </a-card>
+      <div ref="tableSearch">
+        <a-card size="small" :bordered="false" :class="pageType=='pages'?'allocateBillDetail-cont':''" v-show="showDetail">
+          <a-descriptions :column="3" v-if="pageType=='pages'">
+            <a-descriptions-item label="调拨退货单号">{{ (basicInfoData&&basicInfoData.allocateReturnNo) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="调拨退货对象">{{ (basicInfoData&&basicInfoData.targetTypeDictValue) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="调拨退货对象名称">{{ (basicInfoData&&basicInfoData.targetName) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="调入仓库">{{ (basicInfoData&&basicInfoData.warehouseName) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="费用类型">
+              {{ (basicInfoData&&basicInfoData.costTypeName) || '--' }}
+            </a-descriptions-item>
+            <a-descriptions-item label="调拨退货类型">
+              <div>
+                <span v-if="basicInfoData&&basicInfoData.allocateSortName">{{ basicInfoData.allocateSortName || '--' }}</span>
+                <span v-if="basicInfoData&&basicInfoData.allocateReturnTypeName">/{{ basicInfoData.allocateReturnTypeName || '--' }}</span>
+              </div>
+            </a-descriptions-item>
+            <a-descriptions-item label="是否抓单">{{ basicInfoData&&basicInfoData.grabFlagDictValue || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remarks) || '--' }}</a-descriptions-item>
+          </a-descriptions>
+          <a-collapse :activeKey="['1']" v-else>
+            <a-collapse-panel key="1" header="基础信息">
+              <a-descriptions :column="3">
+                <a-descriptions-item label="调拨退货单号">{{ (basicInfoData&&basicInfoData.allocateReturnNo) || '--' }}</a-descriptions-item>
+                <a-descriptions-item label="调拨退货对象">{{ (basicInfoData&&basicInfoData.targetTypeDictValue) || '--' }}</a-descriptions-item>
+                <a-descriptions-item label="调拨退货对象名称">{{ (basicInfoData&&basicInfoData.targetName) || '--' }}</a-descriptions-item>
+                <a-descriptions-item label="调入仓库">{{ (basicInfoData&&basicInfoData.warehouseName) || '--' }}</a-descriptions-item>
+                <a-descriptions-item label="费用类型">
+                  {{ (basicInfoData&&basicInfoData.costTypeName) || '--' }}
+                </a-descriptions-item>
+                <a-descriptions-item label="调拨退货类型">
+                  <div>
+                    <span v-if="basicInfoData&&basicInfoData.allocateSortName">{{ basicInfoData.allocateSortName || '--' }}</span>
+                    <span v-if="basicInfoData&&basicInfoData.allocateReturnTypeName">/{{ basicInfoData.allocateReturnTypeName || '--' }}</span>
+                  </div>
+                </a-descriptions-item>
+                <a-descriptions-item label="是否抓单">{{ basicInfoData&&basicInfoData.grabFlagDictValue || '--' }}</a-descriptions-item>
+                <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
+                <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remarks) || '--' }}</a-descriptions-item>
+              </a-descriptions>
+            </a-collapse-panel>
+          </a-collapse>
+        </a-card>
+      </div>
       <a-card size="small" :bordered="false">
         <!-- 总计 -->
         <a-alert type="info" style="margin-bottom:10px">
@@ -82,6 +84,8 @@
           :rowKey="(record) => record.id"
           :columns="columns"
           :data="loadData"
+          :style="{ height:outBizSn? '260px': tableHeight+70+'px' }"
+          :scroll="{ y:outBizSn?260: tableHeight }"
           :defaultLoadData="false"
           bordered>
         </s-table>
@@ -137,7 +141,8 @@ export default {
       localDataSource: [],
       openModal: false,
       nowType: null,
-      showDetail: true
+      showDetail: true,
+      tableHeight: 0
     }
   },
   computed: {
@@ -167,6 +172,22 @@ export default {
       return arr
     }
   },
+  watch: {
+    showDetail (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    },
+    outBizSn (newValue, oldValue) {
+      if (newValue) {
+        this.pageInit()
+      }
+    }
+  },
   methods: {
     //  返回列表
     handleBack () {
@@ -191,7 +212,12 @@ export default {
       if (this.outBizSn || this.$route.params.sn) {
         this.$refs.table.refresh(true)
         this.getDetail()
+        this.setTableH()
       }
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 290
     }
   },
   mounted () {
@@ -205,13 +231,6 @@ export default {
       this.pageInit()
     }
   },
-  watch: {
-    outBizSn (newValue, oldValue) {
-      if (newValue) {
-        this.pageInit()
-      }
-    }
-  },
   beforeRouteEnter (to, from, next) {
     next(vm => {})
   }