|
@@ -68,7 +68,7 @@
|
|
</div>
|
|
</div>
|
|
</a-alert>
|
|
</a-alert>
|
|
<div v-if="$hasPermissions('B_financialCollectionPl')" style="margin-bottom: 10px">
|
|
<div v-if="$hasPermissions('B_financialCollectionPl')" style="margin-bottom: 10px">
|
|
- <a-button type="primary" id="financialCollectionList-export" :loading="loading" @click="handleCollection">批量收款</a-button>
|
|
|
|
|
|
+ <a-button type="primary" id="financialCollectionList-export" :loading="loading" @click="enableFundAccount ? handleSettleAcountPay(null,1) : handleCollection()">批量收款</a-button>
|
|
<span style="margin-left: 8px" v-if="$hasPermissions('B_financialCollectionPl')">
|
|
<span style="margin-left: 8px" v-if="$hasPermissions('B_financialCollectionPl')">
|
|
<template v-if="rowSelectionInfo&&rowSelectionInfo.selectedRowKeys.length>0">{{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }}</template>
|
|
<template v-if="rowSelectionInfo&&rowSelectionInfo.selectedRowKeys.length>0">{{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }}</template>
|
|
<template v-if="selectTotalAmount">,合计¥{{ selectTotalAmount }}</template>
|
|
<template v-if="selectTotalAmount">,合计¥{{ selectTotalAmount }}</template>
|
|
@@ -108,7 +108,7 @@
|
|
:loading="loading"
|
|
:loading="loading"
|
|
class="button-error"
|
|
class="button-error"
|
|
v-if="(record.settleState == 'UNSETTLE' || record.settleState == 'PART_SETTLED')&&record.satelliteFlag!=1 && $hasPermissions('B_financialCollectionSing')"
|
|
v-if="(record.settleState == 'UNSETTLE' || record.settleState == 'PART_SETTLED')&&record.satelliteFlag!=1 && $hasPermissions('B_financialCollectionSing')"
|
|
- @click="handleCollectionSing(record)"
|
|
|
|
|
|
+ @click="enableFundAccount ? handleSettleAcountPay(record,0) : handleCollectionSing(record)"
|
|
id="financialCollectionList-pay-btn">收款</a-button>
|
|
id="financialCollectionList-pay-btn">收款</a-button>
|
|
<span v-if="!(record.settleState == 'SETTLED' && $hasPermissions('B_financialCollectionDetail')) && !((record.settleState == 'UNSETTLE' || record.settleState == 'PART_SETTLED')&&record.satelliteFlag!=1 && $hasPermissions('B_financialCollectionSing'))">--</span>
|
|
<span v-if="!(record.settleState == 'SETTLED' && $hasPermissions('B_financialCollectionDetail')) && !((record.settleState == 'UNSETTLE' || record.settleState == 'PART_SETTLED')&&record.satelliteFlag!=1 && $hasPermissions('B_financialCollectionSing'))">--</span>
|
|
<!-- satelliteFlag为1,是卫星仓 -->
|
|
<!-- satelliteFlag为1,是卫星仓 -->
|
|
@@ -143,13 +143,17 @@
|
|
</a-modal>
|
|
</a-modal>
|
|
<!-- 散件退货 -->
|
|
<!-- 散件退货 -->
|
|
<bulkReturnGoods-detail-modal :openModal="openBulkReturnDetailModal" :itemSn="orderSn" @close="handleDetailClose" />
|
|
<bulkReturnGoods-detail-modal :openModal="openBulkReturnDetailModal" :itemSn="orderSn" @close="handleDetailClose" />
|
|
|
|
+ <!-- 收付款弹框 -->
|
|
|
|
+ <settleModal ref="settleModal" @ok="settleAcountPay" :openModal="openSettleModal" @close="openSettleModal=false"></settleModal>
|
|
</a-card>
|
|
</a-card>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
|
+import { mapActions } from 'vuex'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import detailModal from './detailModal.vue'
|
|
import detailModal from './detailModal.vue'
|
|
|
|
+import settleModal from '../settleModal/settleModal.vue'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import salesDetailModal from '@/views/salesManagement/salesQuery/detail.vue'
|
|
import salesDetailModal from '@/views/salesManagement/salesQuery/detail.vue'
|
|
// 同步采购退货单详情
|
|
// 同步采购退货单详情
|
|
@@ -162,7 +166,7 @@ import bulkReturnGoodsDetailModal from '@/views/bulkManagement/bulkReturnGoods/d
|
|
import { settleReceiptQuery, queryByTypeSum, settleReceiptMoney, settleReceiptQuerySum } from '@/api/settleReceipt'
|
|
import { settleReceiptQuery, queryByTypeSum, settleReceiptMoney, settleReceiptQuerySum } from '@/api/settleReceipt'
|
|
export default {
|
|
export default {
|
|
name: 'FinancialCollectionList',
|
|
name: 'FinancialCollectionList',
|
|
- components: { STable, VSelect, detailModal, rangeDate, pushOrderDetailModal, pushOrderOutSyncDetailModal, salesDetailModal, chainTransferOutDetailModal, bulkReturnGoodsDetailModal, storeTransferOutDetailModal },
|
|
|
|
|
|
+ components: { STable, VSelect, detailModal, rangeDate, settleModal, pushOrderDetailModal, pushOrderOutSyncDetailModal, salesDetailModal, chainTransferOutDetailModal, bulkReturnGoodsDetailModal, storeTransferOutDetailModal },
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
@@ -171,7 +175,9 @@ export default {
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
openModal: false, // 详情弹框
|
|
openModal: false, // 详情弹框
|
|
openDetailModal: false,
|
|
openDetailModal: false,
|
|
|
|
+ openSettleModal: false, // 打开收款弹框
|
|
openBulkReturnDetailModal: false,
|
|
openBulkReturnDetailModal: false,
|
|
|
|
+ enableFundAccount: false, // 是否开启资金账户管理
|
|
tableHeight: 0,
|
|
tableHeight: 0,
|
|
curBizType: 'ALL',
|
|
curBizType: 'ALL',
|
|
curBizTitle: '',
|
|
curBizTitle: '',
|
|
@@ -247,6 +253,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ ...mapActions(['GetSettleAccountState']),
|
|
handleDetailClose () {
|
|
handleDetailClose () {
|
|
this.openDetailModal = false
|
|
this.openDetailModal = false
|
|
this.openBulkReturnDetailModal = false
|
|
this.openBulkReturnDetailModal = false
|
|
@@ -300,6 +307,46 @@ export default {
|
|
this.$refs.detailModal.getDetail(row.id)
|
|
this.$refs.detailModal.getDetail(row.id)
|
|
this.openModal = true
|
|
this.openModal = true
|
|
},
|
|
},
|
|
|
|
+ // 开启结算账户功能收款, type:0 单条收款,1 批量收款
|
|
|
|
+ handleSettleAcountPay (row, type) {
|
|
|
|
+ this.openSettleModal = true
|
|
|
|
+ const data = {
|
|
|
|
+ totalAmount: type ? this.selectTotalAmount : row && row.unsettleAmount || 0,
|
|
|
|
+ settleClientName: type ? '' : row && row.settleClientName || '',
|
|
|
|
+ title: '收款',
|
|
|
|
+ type,
|
|
|
|
+ row
|
|
|
|
+ }
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.$refs.settleModal.setData(data)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 去收款
|
|
|
|
+ settleAcountPay (form, data) {
|
|
|
|
+ const _this = this
|
|
|
|
+ const params =
|
|
|
|
+ {
|
|
|
|
+ 'settleIds': data.type ? _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys : [data.row.id]
|
|
|
|
+ }
|
|
|
|
+ // 资金管理开启
|
|
|
|
+ if (this.enableFundAccount) {
|
|
|
|
+ params.settleStyleSn = form.settleStyleSn
|
|
|
|
+ params.settleAccountSn = form.settleAccountSn
|
|
|
|
+ }
|
|
|
|
+ _this.loading = true
|
|
|
|
+ _this.spinning = true
|
|
|
|
+ settleReceiptMoney(params).then(res => {
|
|
|
|
+ _this.loading = false
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ _this.$message.success(res.message)
|
|
|
|
+ _this.$refs.table.refresh()
|
|
|
|
+ _this.$refs.table.clearSelected() // 清空表格选中项
|
|
|
|
+ _this.spinning = false
|
|
|
|
+ } else {
|
|
|
|
+ _this.spinning = false
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 收款
|
|
// 收款
|
|
handleCollectionSing (row) {
|
|
handleCollectionSing (row) {
|
|
const _this = this
|
|
const _this = this
|
|
@@ -309,19 +356,7 @@ export default {
|
|
centered: true,
|
|
centered: true,
|
|
closable: true,
|
|
closable: true,
|
|
onOk () {
|
|
onOk () {
|
|
- _this.loading = true
|
|
|
|
- _this.spinning = true
|
|
|
|
- settleReceiptMoney([row.id]).then(res => {
|
|
|
|
- _this.loading = false
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- _this.$message.success(res.message)
|
|
|
|
- _this.$refs.table.refresh()
|
|
|
|
- _this.$refs.table.clearSelected() // 清空表格选中项
|
|
|
|
- _this.spinning = false
|
|
|
|
- } else {
|
|
|
|
- _this.spinning = false
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ _this.settleAcountPay(null, { type: 0, row: row })
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -344,19 +379,7 @@ export default {
|
|
centered: true,
|
|
centered: true,
|
|
closable: true,
|
|
closable: true,
|
|
onOk () {
|
|
onOk () {
|
|
- _this.loading = true
|
|
|
|
- _this.spinning = true
|
|
|
|
- settleReceiptMoney(_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys).then(res => {
|
|
|
|
- this.loading = false
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- _this.$message.success(res.message)
|
|
|
|
- _this.$refs.table.refresh()
|
|
|
|
- _this.$refs.table.clearSelected() // 清空表格选中项
|
|
|
|
- _this.spinning = false
|
|
|
|
- } else {
|
|
|
|
- _this.spinning = false
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ _this.settleAcountPay(null, { type: 1, row: null })
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -419,6 +442,12 @@ export default {
|
|
}
|
|
}
|
|
this.pageInit()
|
|
this.pageInit()
|
|
}
|
|
}
|
|
|
|
+ // 结算账户状态查询
|
|
|
|
+ this.GetSettleAccountState().then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.enableFundAccount = res.data.functionEnableFlag == 1
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
beforeRouteEnter (to, from, next) {
|
|
beforeRouteEnter (to, from, next) {
|
|
next(vm => {})
|
|
next(vm => {})
|