✨ 客户余额页增加只读账单弹窗
This commit is contained in:
+23
-9
@@ -13,8 +13,8 @@
|
||||
<el-tag type="success" size="small">本位币账户 CNY</el-tag>
|
||||
<el-button
|
||||
icon="Document"
|
||||
@click="goBillView"
|
||||
v-hasPermi="['ar:bill:list']"
|
||||
@click="openBillDialog"
|
||||
v-hasPermi="['customersupplier:customerinfo:list']"
|
||||
>查看账单</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@@ -26,6 +26,14 @@
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<customer-bill-list-dialog
|
||||
v-if="billDialogVisible"
|
||||
:key="currentCustomerId"
|
||||
v-model="billDialogVisible"
|
||||
:customer-id="currentCustomerId"
|
||||
:customer-name="customer.customerName || route.query.customerName || ''"
|
||||
/>
|
||||
|
||||
<!-- 余额概览(数据来源 customer_account) -->
|
||||
<el-row :gutter="12" class="balance-row">
|
||||
<el-col :xs="12" :sm="8" :md="4">
|
||||
@@ -478,8 +486,6 @@
|
||||
<span>未核销总额:<b class="money-out">CNY {{ unsettledTotal }}</b></span>
|
||||
<span>账户余额:<b class="money-in">CNY {{ formatMoney(currentAccount.balance) }}</b></span>
|
||||
<el-button type="primary" link size="small" icon="Refresh" @click="loadBillWriteoffData">刷新</el-button>
|
||||
<el-button type="primary" plain size="small" @click="goBillView"
|
||||
v-hasPermi="['ar:bill:list']">查看全部账单</el-button>
|
||||
</div>
|
||||
</el-alert>
|
||||
|
||||
@@ -1110,6 +1116,7 @@
|
||||
<script setup name="CustomerMoney">
|
||||
import axios from 'axios'
|
||||
import { saveAs } from 'file-saver'
|
||||
import CustomerBillListDialog from './CustomerBillListDialog.vue'
|
||||
import { getCustomer } from "@/api/customersuppliermanagement/customerinfo/customer.js"
|
||||
import { listAccount, listReceipt, getReceipt, addReceipt, confirmReceipt, cancelReceipt, listFlow, listCreditFlow, applyCreditAdjust, listCreditApply, approveCreditApply, rejectCreditApply, cancelCreditApply, listMyCreditPools } from "@/api/customersuppliermanagement/customermoney/customermoney.js"
|
||||
import { listUnsettledBill, listBalanceWriteoff, balanceWriteoff, cancelBalanceWriteoff } from "@/api/customersuppliermanagement/customermoney/customerbill.js"
|
||||
@@ -2028,11 +2035,18 @@ function formatDate(val) {
|
||||
if (!val) return '-'
|
||||
return String(val).substring(0, 10)
|
||||
}
|
||||
function goBillView() {
|
||||
router.push({
|
||||
path: '/ar/bill',
|
||||
query: { customerId: route.query.customerId || '' }
|
||||
})
|
||||
const billDialogVisible = ref(false)
|
||||
const currentCustomerId = computed(() => {
|
||||
const id = Number(route.query.customerId)
|
||||
return Number.isSafeInteger(id) && id > 0 ? id : null
|
||||
})
|
||||
|
||||
function openBillDialog() {
|
||||
if (!currentCustomerId.value) {
|
||||
proxy.$modal.msgWarning('缺少客户ID,请从客户列表进入客户余额页')
|
||||
return
|
||||
}
|
||||
billDialogVisible.value = true
|
||||
}
|
||||
|
||||
const unsettledList = ref([])
|
||||
|
||||
Reference in New Issue
Block a user