lilei 2 年之前
父节点
当前提交
5dd593a9c4

+ 3 - 1
src/views/salesManagement/salesCollection/detailModal.vue

@@ -268,7 +268,9 @@ export default {
         status: 'AUDIT_PASS'
       }
       this.orginData = []
-      this.$refs.table.refresh(true)
+      this.$nextTick(()=>{
+        this.$refs.table.refresh(true)
+      })
     }
   },
   watch: {

+ 17 - 38
src/views/salesManagement/salesCollection/list.vue

@@ -181,14 +181,6 @@
         </template>
       </s-table>
 
-      <!-- 关联收款单 -->
-      <detailModal
-        v-drag
-        ref="detailModal"
-        modalTit="关联收款单"
-        @ok="relationSuccess"
-        :openModal="showDetail"
-        @cancel="showDetail=false"></detailModal>
       <!-- 销售收款凭证 -->
       <voucherModal v-drag ref="voucherModal" modalTit="销售收款凭证" :openModal="showVoucher" @cancel="showVoucher=false"></voucherModal>
 
@@ -239,7 +231,6 @@ import Area from '@/views/common/area.js'
 import commonModal from '@/views/common/commonModal.vue'
 import salesDetail from '@/views/salesManagement/salesQuery/detail.vue'
 import dispatchDetail from '@/views/salesManagement/pushOrderManagement/detail.vue'
-import detailModal from './detailModal.vue'
 import voucherModal from './voucherModal.vue'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import { settleReceiptList, settleReceiptBatch } from '@/api/settleReceipt'
@@ -247,7 +238,7 @@ import { settleReceiptList, settleReceiptBatch } from '@/api/settleReceipt'
 export default {
   name: 'SalesCollectionList',
   mixins: [commonMixin],
-  components: { STable, VSelect, subarea, rangeDate, commonModal, detailModal, Area, voucherModal, dealerSubareaScopeList, salesDetail, dispatchDetail },
+  components: { STable, VSelect, subarea, rangeDate, commonModal, Area, voucherModal, dealerSubareaScopeList, salesDetail, dispatchDetail },
   data () {
     return {
       spinning: false,
@@ -441,7 +432,9 @@ export default {
     // 凭证
     handleVoucher (row) {
       this.showVoucher = true
-      this.$refs.voucherModal.getData(row)
+      this.$nextTick(()=>{
+        this.$refs.voucherModal.getData(row)
+      })
     },
     // 点击收款
     handleColle (row) {
@@ -455,33 +448,19 @@ export default {
       this.handlePlData.map(item => {
         snList.push(item.accountReceiptSn)
       })
-      // 关联收款
-      if (this.collectionType == 1) {
-        this.showDetail = true
-        this.$refs.detailModal.setData(this.handlePlData, snList)
-        this.showSkModal = false
-        _this.collectionType = 0
-      } else {
-        // 仅标记收款
-        _this.spinning = true
-        _this.showSkModal = false
-        settleReceiptBatch({ snList: snList }).then(res => {
-          if (res.status == 200) {
-            _this.$message.success(res.message)
-            _this.$refs.table.refresh()
-            _this.spinning = false
-            _this.collectionType = 0
-          } else {
-            _this.spinning = false
-          }
-        })
-      }
-    },
-    // 关联收款成功
-    relationSuccess () {
-      this.$refs.table.refresh()
-      this.showDetail = false
-      this.$refs.table.clearSelected()
+      // 仅标记收款
+      _this.spinning = true
+      _this.showSkModal = false
+      settleReceiptBatch({ snList: snList }).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.$refs.table.refresh()
+          _this.spinning = false
+          _this.collectionType = 0
+        } else {
+          _this.spinning = false
+        }
+      })
     },
     pageInit () {
       const _this = this

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

@@ -211,8 +211,10 @@ export default {
     handleAssociated () {
       const snList = []
       snList.push(this.handlePlData.accountReceiptSn)
-      this.$refs.collectDetailModal.setData(this.handlePlData, snList)
       this.showCollectDetail = true
+      this.$nextTick(()=>{
+        this.$refs.collectDetailModal.setData([this.handlePlData], snList)
+      })
     },
     // 关联收款成功
     relationSuccess () {