lilei 2 years ago
parent
commit
15bd4a4012
1 changed files with 14 additions and 15 deletions
  1. 14 15
      src/views/salesManagement/salesCollection/voucherModal.vue

+ 14 - 15
src/views/salesManagement/salesCollection/voucherModal.vue

@@ -52,7 +52,7 @@
             <a-descriptions-item label="收款类型">
               <span>{{ detail.keepTypeDictValue || '--' }}</span>
               <span v-if="detail.keepTypeDictValue =='仅标记收款'" @click="handleAssociated"><a-button type="link" :loading="associatedLoading" style="margin-left:10px;" class="link-bule">
-                    关联收款单
+                关联收款单
               </a-button></span>
             </a-descriptions-item>
             <a-descriptions-item label="收款时间">
@@ -109,7 +109,7 @@ 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,settleReceiptBookBatch } from '@/api/settleReceipt.js'
+import { settleReceiptFindBySn, settleReceiptBookBatch } from '@/api/settleReceipt.js'
 export default {
   name: 'VoucherModal',
   components: { STable, VSelect, commonModal, printModel, detailModal },
@@ -153,7 +153,7 @@ export default {
         { title: '状态', dataIndex: 'statusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       tableData: [],
-      associatedLoading:false
+      associatedLoading: false
     }
   },
   methods: {
@@ -169,7 +169,7 @@ export default {
       settleReceiptFindBySn({ sn: data.accountReceiptSn }).then(res => {
         this.detail = res.data || null
         if (res.data.keepType !== 'LABEL_RECEIPT') {
-          this.tableData = res.data ? res.data.financeBookList : []
+          this.tableData = res.data && res.data.financeBookList || []
           const no = 1
           for (var i = 0; i < this.tableData.length; i++) {
             this.tableData[i].no = no + i
@@ -195,23 +195,22 @@ export default {
       this.detail = null
       this.tableData = []
     },
-    //关联收款单
-    handleAssociated(){
-      let snList=[],bookSnList=[];
+    // 关联收款单
+    handleAssociated () {
+      const snList = []; const bookSnList = []
       snList.push(this.detail.accountReceiptSn)
       bookSnList.push(this.detail.bookSn)
-      let ajax_data={
-        snList:snList,
-        bookSnList:bookSnList
+      const ajax_data = {
+        snList: snList,
+        bookSnList: bookSnList
       }
       this.associatedLoading = true
       settleReceiptBookBatch(ajax_data).then(res => {
         if (res.status == 200) {
-        this.$message.success(res.message)
-        setTimeout(()=>{
-          this.handleCommonCancel();
-        },800)
-         
+          this.$message.success(res.message)
+          setTimeout(() => {
+            this.handleCommonCancel()
+          }, 800)
         }
         this.associatedLoading = false
       })