lilei пре 2 година
родитељ
комит
7e92d282fa

+ 8 - 10
src/views/financialManagement/financialCollection/detail.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="financialCollectionAddwrap">
     <a-spin :spinning="spinning" tip="Loading...">
-      <a-page-header :ghost="false" :backIcon="false" class="financialCollectionAddcont" >
+      <a-page-header :ghost="false" :backIcon="false" class="financialCollectionAddcont" v-if="!bookSn" >
         <!-- 自定义的二级文字标题 -->
         <template slot="subTitle">
           <a id="purchaseOrderEdit-back-btn" href="javascript:;" @click="handleBack(0)"><a-icon type="left" /> 返回列表</a>
@@ -25,7 +25,7 @@
         </a-collapse-panel>
       </a-collapse>
       <!-- 财务明细 -->
-      <a-card :bordered="false" size="small" class="financialCollectionAddcont" v-if="$route.params.sn">
+      <a-card :bordered="false" size="small" class="financialCollectionAddcont" v-if="$route.params.sn||bookSn">
         <div slot="title">
           <div style="display: flex;justify-content: space-between;align-items: center;">
             <div>财务明细</div>
@@ -91,8 +91,9 @@ export default {
       detailData: null,
       openDepartUserModal: false,
       total: 0,
+      bookSn: null,
       loadData: parameter => {
-        const params = Object.assign(parameter, { bookSn: this.$route.params.sn })
+        const params = Object.assign(parameter, { bookSn: this.$route.params.sn || this.bookSn })
         return financeBookDetailQueryList(params).then(res => {
           let data
           if (res.status == 200) {
@@ -149,7 +150,7 @@ export default {
     getDetail (type) {
       this.spinning = true
       this.disabled = true
-      financeBookFindBySn({ bookSn: this.$route.params.sn }).then(res => {
+      financeBookFindBySn({ bookSn: this.$route.params.sn || this.bookSn }).then(res => {
         if (res.status == 200) {
           this.detailData = res.data
           if (!type) {
@@ -166,8 +167,9 @@ export default {
     handleBack (data) {
       this.$router.push({ name: 'financialCollectionList' })
     },
-    pageInit () {
-      if (this.$route.params.sn) { //  编辑页
+    pageInit (bookSn) {
+      this.bookSn = bookSn
+      if (this.$route.params.sn || this.bookSn) { //  编辑页
         this.getDetail()
       }
     }
@@ -195,10 +197,6 @@ export default {
     height: 100%;
     padding-bottom: 51px;
     box-sizing: border-box;
-    >.ant-spin-nested-loading{
-      overflow-y: scroll;
-      height: 100%;
-    }
     .financialCollectionAddcont{
       margin-bottom: 10px;
     }

+ 22 - 3
src/views/salesManagement/salesCollection/voucherModal.vue

@@ -61,7 +61,8 @@
           <a-table :columns="columns" :pagination="false" :data-source="tableData" bordered>
             <!-- 收款单号 -->
             <template slot="bookNo" slot-scope="text, record">
-              <span class="link-bule">{{ record.bookNo }}</span>
+              <span v-if="$hasPermissions('B_fc_detail')" class="link-bule" @click="viewDetail(record)">{{ record.bookNo }}</span>
+              <span v-else>{{ record.bookNo }}</span>
             </template>
           </a-table>
         </div>
@@ -81,6 +82,16 @@
       @cancel="showTipModal=false">
       <printModel ref="printModel" @cancel="showTipModal=false"></printModel>
     </commonModal>
+    <!-- 查看财务收款详情 -->
+    <commonModal
+      modalTit="财务收款详情"
+      bodyPadding="10px"
+      width="70%"
+      :showFooter="false"
+      :openModal="showDetailModal"
+      @cancel="showDetailModal=false">
+      <detailModal ref="detailModal"></detailModal>
+    </commonModal>
   </a-modal>
 </template>
 
@@ -88,10 +99,11 @@
 import { STable, VSelect } from '@/components'
 import commonModal from '@/views/common/commonModal.vue'
 import printModel from '../receiptPrint/printModel.vue'
+import detailModal from '@/views/financialManagement/financialCollection/detail.vue'
 import { settleReceiptFindBySn } from '@/api/settleReceipt.js'
 export default {
   name: 'VoucherModal',
-  components: { STable, VSelect, commonModal, printModel },
+  components: { STable, VSelect, commonModal, printModel, detailModal },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -114,6 +126,7 @@ export default {
     return {
       isShow: this.openModal, //  是否打开弹框
       showTipModal: false,
+      showDetailModal: false,
       disabled: false,
       spinning: false,
       detail: null,
@@ -134,6 +147,13 @@ export default {
     }
   },
   methods: {
+    // 财务收款详情
+    viewDetail (row) {
+      this.showDetailModal = true
+      this.$nextTick(() => {
+        this.$refs.detailModal.pageInit(row.bookSn)
+      })
+    },
     getData (data) {
       this.spinning = true
       settleReceiptFindBySn({ sn: data.accountReceiptSn }).then(res => {
@@ -160,7 +180,6 @@ export default {
       this.$emit('cancel')
       this.detail = null
       this.tableData = []
-      this.$refs.printModel.handleCommonCancel()
     }
   },
   watch: {