From 8194a67f3b9248cc80137c78bd3e005949ec38dc Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期二, 23 十二月 2025 17:48:44 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/cwxt_master' into cwxt_master
---
ui/admin-ui3/src/api/cwgl/receivableBillManagement.ts | 8
ui/admin-ui3/src/components/bankCardCate/index.vue | 140 +
ui/admin-ui3/src/views/cwgl/bankAccountConfig/index.vue | 3
ui/admin-ui3/src/components/FeeDetailModal/index.vue | 52
ui/admin-ui3/src/components/OperationLogModal/index.vue | 89 -
ui/admin-ui3/src/components/DetailModal/index.vue | 131 +
ui/admin-ui3/src/main.ts | 2
ui/admin-ui3/src/views/cwgl/bankConfig/index.vue | 318 ++---
ui/admin-ui3/src/components/NestedDetailDialog/index.vue | 216 ++++
ui/admin-ui3/src/components/SettlementDialog/index.vue | 367 ++++++
ui/admin-ui3/src/components/GenerateBillDialog/index.vue | 70
ui/admin-ui3/src/components/Pagination/index.vue | 104 +
ui/admin-ui3/src/views/cwgl/interiorBankAccountConfig/index.vue | 306 +++++
ui/admin-ui3/src/components/bankCardData/index.vue | 220 ++++
ui/admin-ui3/src/components/BillSettlementHistory/index.vue | 199 +++
ui/admin-ui3/src/views/cwgl/receivableFeeManagement/index.vue | 46
ui/admin-ui3/src/api/cwgl/twoBankAccountConfig.ts | 67 +
ui/admin-ui3/src/components/subjectPeration/index.vue | 284 +++++
ui/admin-ui3/src/views/cwgl/receivableBillManagement/index.vue | 599 ++++++----
19 files changed, 2,645 insertions(+), 576 deletions(-)
diff --git a/ui/admin-ui3/src/api/cwgl/receivableBillManagement.ts b/ui/admin-ui3/src/api/cwgl/receivableBillManagement.ts
index b85b6d1..3817cfa 100644
--- a/ui/admin-ui3/src/api/cwgl/receivableBillManagement.ts
+++ b/ui/admin-ui3/src/api/cwgl/receivableBillManagement.ts
@@ -45,7 +45,13 @@
data
})
}
-
+/* 浣滃簾 */
+export const receivableBillManagementVoid:requestType = (id) => {
+ return request({
+ url: '/cwgl/receivableBillManagement/void/'+id,
+ method: 'put',
+ })
+}
/**
* 鍒犻櫎搴旀敹璐﹀崟绠$悊
*/
diff --git a/ui/admin-ui3/src/api/cwgl/twoBankAccountConfig.ts b/ui/admin-ui3/src/api/cwgl/twoBankAccountConfig.ts
new file mode 100644
index 0000000..a906d34
--- /dev/null
+++ b/ui/admin-ui3/src/api/cwgl/twoBankAccountConfig.ts
@@ -0,0 +1,67 @@
+import request,{download,requestType} from "@/utils/request";
+import {BaseEntityInterface} from "@/utils/globalInterface";
+export interface BankAccountConfigI extends BaseEntityInterface{
+ id ?: number , customerId ?: number , customerName ?: string , accountNo ?: string , accountName ?: string , bankName ?: string , branchName ?: string , accountType ?: string , currency ?: string , status ?: string , accountNumber ?: string , openingDate ?: string , bankCode ?: string , remark ?: string , isDefault ?: number , createBy ?: string , updateBy ?: string , createTime ?: string , updateTime ?: string , deleted ?: number }
+
+
+/**
+ * 鏌ヨ閾惰璐﹀彿閰嶇疆鍒楄〃
+ */
+export const listBankAccountConfig:requestType = (query) => {
+ return request({
+ url: '/cwgl/bankAccountConfig/list2',
+ method:'get',
+ params:query
+ })
+}
+/**
+ * 鏌ヨ閾惰璐﹀彿閰嶇疆璇︾粏
+ */
+export const getBankAccountConfig:requestType = (id) => {
+ return request({
+ url: '/cwgl/bankAccountConfig2/' + id,
+ method:'get'
+ })
+}
+
+/**
+ * 鏂板閾惰璐﹀彿閰嶇疆
+ */
+export const addBankAccountConfig:requestType = (data) => {
+ return request({
+ url: '/cwgl/bankAccountConfig2',
+ method: 'post',
+ data
+ })
+}
+
+/**
+ * 淇敼閾惰璐﹀彿閰嶇疆
+ */
+export const updateBankAccountConfig:requestType = (data) => {
+ return request({
+ url: '/cwgl/bankAccountConfig2',
+ method: 'put',
+ data
+ })
+}
+
+/**
+ * 鍒犻櫎閾惰璐﹀彿閰嶇疆
+ */
+export const delBankAccountConfig:requestType = (id) => {
+ return request({
+ url: '/cwgl/bankAccountConfig2/' + id,
+ method: 'delete'
+ })
+}
+
+
+/**
+ * 瀵煎嚭閾惰璐﹀彿閰嶇疆
+ */
+export const exportBankAccountConfig:requestType = (query) => {
+ return new Promise<any>(()=>{
+ download('/cwgl/bankAccountConfig/export2',query);
+ })
+}
diff --git a/ui/admin-ui3/src/components/BillSettlementHistory/index.vue b/ui/admin-ui3/src/components/BillSettlementHistory/index.vue
new file mode 100644
index 0000000..1855e4d
--- /dev/null
+++ b/ui/admin-ui3/src/components/BillSettlementHistory/index.vue
@@ -0,0 +1,199 @@
+<template>
+ <el-dialog v-model="visible" :title="type === 'receivable' ? '搴旀敹璐﹀崟缁撶畻璁板綍' : '搴斾粯璐﹀崟缁撶畻璁板綍'" width="1200px"
+ destroy-on-close>
+
+ <el-descriptions title="璐﹀崟淇℃伅" :column="3" border class="mb-5">
+ <el-descriptions-item label="绯荤粺缂栧彿">{{ billInfo.systemNo }}</el-descriptions-item>
+ <el-descriptions-item label="璐﹀崟鍚嶇О">{{ billInfo.billName }}</el-descriptions-item>
+ <el-descriptions-item :label="type === 'receivable' ? '瀹㈡埛鍚嶇О' : '渚涘簲鍟嗗悕绉�'">
+ {{ billInfo.customerName }}
+ </el-descriptions-item>
+
+ <el-descriptions-item label="鍗曟嵁鏁伴噺">{{ billInfo.documentCount }}</el-descriptions-item>
+ <el-descriptions-item label="搴旂粨绠楅噾棰�">
+ <span class="text-bold">{{ billInfo.totalAmount }}</span>
+ </el-descriptions-item>
+ <el-descriptions-item label="甯佸埗">{{ billInfo.currency }}</el-descriptions-item>
+
+ <el-descriptions-item :label="type === 'receivable' ? '宸叉敹閲戦' : '宸蹭粯閲戦'">
+ {{ billInfo.receivedAmount }}
+ </el-descriptions-item>
+ <el-descriptions-item :label="type === 'receivable' ? '寰呮敹閲戦' : '寰呬粯閲戦'">
+ <span class="text-danger">{{ billInfo.pendingAmount }}</span>
+ </el-descriptions-item>
+ <el-descriptions-item label="鍑忓厤閲戦">{{ billInfo.discountAmount }}</el-descriptions-item>
+
+ <el-descriptions-item label="鍛ㄦ湡绫诲瀷">{{ billInfo.periodType }}</el-descriptions-item>
+ <el-descriptions-item label="涓氬姟鏈熼棿">
+ {{ billInfo.businessStartDate }} {{ billInfo.businessEndDate ? '-' + billInfo.businessEndDate : '' }}
+ </el-descriptions-item>
+ <el-descriptions-item label="璐﹀崟鍛ㄦ湡">
+ {{ billInfo.billingStartDate }} {{ billInfo.billingEndDate ? '-' + billInfo.billingEndDate : '' }}
+ </el-descriptions-item>
+
+ <el-descriptions-item label="璐﹀崟鐢熸垚鏃ユ湡">{{ billInfo.billGenerateDate }}</el-descriptions-item>
+ <el-descriptions-item label="璐﹀崟鍙戦�佹棩鏈�">{{ billInfo.billSendDate }}</el-descriptions-item>
+ <el-descriptions-item label="璐﹀崟鍒版湡鏃ユ湡">{{ billInfo.billDueDate }}</el-descriptions-item>
+ </el-descriptions>
+
+ <h3 class="section-title">缁撶畻鏄庣粏</h3>
+ <el-table v-loading="loading" :data="dataList" border stripe style="width: 100%">
+ <el-table-column prop="settlementMethod" label="缁撶畻鏂瑰紡" align="center" width="100">
+ <template #default="{ row }">
+ {{ dictFormat(sys_clearing_form, row.settlementMethod) }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="customerBank" :label="type === 'receivable' ? '瀹㈡埛寮�鎴疯' : '渚涘簲鍟嗗紑鎴疯'" align="center"
+ min-width="150" />
+ <el-table-column prop="customerBankAccount" :label="type === 'receivable' ? '瀹㈡埛閾惰璐﹀彿' : '渚涘簲鍟嗛摱琛岃处鍙�'"
+ align="center" min-width="180" />
+ <el-table-column prop="receivingBank" label="鏀舵璐︽埛寮�鎴疯" align="center" min-width="150" />
+ <el-table-column prop="receivingBankAccount" label="鏀舵閾惰璐︽埛" align="center" min-width="180" />
+
+ <el-table-column prop="settleDate" :label="type === 'receivable' ? '鏀舵鏃ユ湡' : '浠樻鏃ユ湡'" align="center"
+ width="110" />
+ <el-table-column prop="settleAmount" :label="type === 'receivable' ? '鏀舵閲戦' : '浠樻閲戦'" align="center"
+ width="110">
+ <template #default="{ row }">
+ <span class="text-bold">{{ row.settleAmount }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="remainingAmount" :label="type === 'receivable' ? '鏀舵鍚庡緟鏀堕噾棰�' : '浠樻鍚庡緟浠橀噾棰�'"
+ align="center" width="140" />
+
+ <el-table-column prop="createTime" label="鍒涘缓鏃堕棿" align="center" width="160" />
+ <el-table-column prop="createBy" label="鍒涘缓浜�" align="center" width="100" />
+ </el-table>
+
+ <div class="pagination-container">
+ <pagination v-show="pageF.total > 0" :total="pageF.total" v-model:page="queryParams.pageNum"
+ v-model:limit="queryParams.pageSize" @pagination="getDataList" />
+ </div>
+
+ <template #footer>
+ <el-button @click="visible = false">鍏抽棴</el-button>
+ </template>
+ </el-dialog>
+</template>
+
+<script setup lang="ts">
+import { ref, reactive } from 'vue'
+import { getReceivableBillManagement } from "@/api/cwgl/receivableBillManagement";
+import { listReceivableBillSettlementDetail } from "@/api/cwgl/receivableBillSettlementDetail";
+import useCurrentInstance from "@/utils/useCurrentInstance";
+const { proxy } = useCurrentInstance();
+const { sys_clearing_form
+ } = proxy.useDict('sys_clearing_form');
+ const dictFormat = (dict: any, value: any) => {
+ return proxy.selectDictLabel(dict, value);
+}
+const props = defineProps<{
+ type: 'receivable' | 'payable'
+}>()
+
+const visible = ref(false)
+const loading = ref(false)
+const billInfo = ref<any>({})
+const dataList = ref([])
+
+// 鍒嗛〉涓庢煡璇㈠弬鏁�
+const pageF = reactive({
+ total: 0
+})
+
+const queryParams = reactive({
+ pageNum: 1,
+ pageSize: 10,
+ billId: undefined
+})
+
+/** 鏌ヨ缁撶畻鍘嗗彶鍒楄〃 */
+const getDataList = async () => {
+ loading.value = true
+ try {
+ console.log(props.type);
+ if (props.type === 'receivable') {
+ getReceivableBillManagement(queryParams.billId).then(response => {
+ if (response.code === 200) {
+ billInfo.value = response.data
+ }
+ })
+ listReceivableBillSettlementDetail(queryParams).then(res => {
+ if (res.code == 200) {
+ dataList.value = res.rows
+ pageF.total = res.total
+ }
+ })
+ }
+ // getReceivableBillManagement(queryParams).then(response => {
+ // billInfo.value = response.data
+ // dataList.value = response.data.settlementHistoryList
+ // pageF.total = response.data.total
+ // })
+ // 姝ゅ鏇挎崲涓轰綘鐨勫疄闄呮帴鍙h皟鐢� listReceivableBillSettlementDetail
+ // const response = await getReceivableBillManagement(queryParams)
+ // dataList.value = response.rows
+ // pageF.total = response.total
+ } finally {
+ loading.value = false
+ }
+}
+
+/** 鎵撳紑寮圭獥 */
+const open = (row: any) => {
+ visible.value = true
+ // console.log(row);
+ console.log(props.type);
+
+ // billInfo.value = { ...row }
+ queryParams.billId = row.id
+ queryParams.pageNum = 1
+ getDataList()
+}
+
+defineExpose({ open })
+</script>
+
+<style scoped>
+.mb-5 {
+ margin-bottom: 20px;
+}
+
+.section-title {
+ font-size: 16px;
+ font-weight: bold;
+ margin: 20px 0 15px 0;
+ padding-left: 10px;
+ border-left: 4px solid #409eff;
+}
+
+.text-bold {
+ font-weight: bold;
+}
+
+.text-danger {
+ color: #f56c6c;
+ font-weight: bold;
+}
+
+.pagination-container {
+ margin-top: 15px;
+ display: flex;
+ justify-content: flex-end;
+}
+
+:deep(.el-descriptions__label) {
+ width: 120px;
+ background-color: #f5f7fa !important;
+}
+
+/* 鍏煎浣犱箣鍓嶄唬鐮佺殑鍗曞厓鏍兼牱寮� */
+::v-deep .el-descriptions__body .el-descriptions__table.is-bordered .el-descriptions__cell {
+ padding: 8px 11px;
+}
+
+::v-deep .el-descriptions__body .el-descriptions__table.is-bordered .el-descriptions__cell {
+ padding: 8px 11px;
+ width: 200px;
+}
+</style>
\ No newline at end of file
diff --git a/ui/admin-ui3/src/components/DetailModal/index.vue b/ui/admin-ui3/src/components/DetailModal/index.vue
index bdd8a9e..3d34566 100644
--- a/ui/admin-ui3/src/components/DetailModal/index.vue
+++ b/ui/admin-ui3/src/components/DetailModal/index.vue
@@ -1,27 +1,21 @@
<template>
- <el-dialog
- v-model="visible"
- title="璐圭敤璇︽儏"
- width="1000px"
- destroy-on-close
- @closed="handleClosed"
- >
+ <el-dialog v-model="visible" title="璐圭敤璇︽儏" width="1000px" destroy-on-close @closed="handleClosed">
<div class="modal-content">
<section class="detail-section">
<h3 class="section-title">搴旀敹璐圭敤鏄庣粏</h3>
<el-descriptions :column="3" border class="margin-top">
<el-descriptions-item label="绯荤粺缂栧彿">{{ detailData.systemNo }}</el-descriptions-item>
<el-descriptions-item label="鍏宠仈璐﹀崟缂栧彿">{{ detailData.relatedBillNo }}</el-descriptions-item>
- <el-descriptions-item label="鏉ユ簮绯荤粺">{{ detailData.sourceSystem }}</el-descriptions-item>
-
- <el-descriptions-item label="涓氬姟鏉垮潡">{{ detailData.businessSector }}</el-descriptions-item>
- <el-descriptions-item label="鍗曟嵁绫诲瀷">{{ detailData.documentType }}</el-descriptions-item>
+ <el-descriptions-item label="鏉ユ簮绯荤粺">{{ dictFormat(sys_system, detailData.sourceSystem) }}</el-descriptions-item>
+
+ <el-descriptions-item label="涓氬姟鏉垮潡">{{ dictFormat(sys_business, detailData.businessSector) }}</el-descriptions-item>
+ <el-descriptions-item label="鍗曟嵁绫诲瀷">{{ dictFormat(sys_receipts, detailData.documentType) }}</el-descriptions-item>
<el-descriptions-item label="鍗曟嵁缂栧彿">{{ detailData.documentNo }}</el-descriptions-item>
-
+
<el-descriptions-item label="瀹㈡埛鍚嶇О">{{ detailData.customerName }}</el-descriptions-item>
<el-descriptions-item label="椤圭洰鍚嶇О">{{ detailData.projectName }}</el-descriptions-item>
<el-descriptions-item label="涓氬姟鍙戠敓鏃堕棿">{{ detailData.businessTime }}</el-descriptions-item>
-
+
<el-descriptions-item label="搴旀敹纭鏃堕棿">{{ detailData.receivableConfirmTime }}</el-descriptions-item>
<el-descriptions-item label="搴旀敹閲戦" :span="2">
<span class="amount-text">{{ detailData.receivableAmount }}</span>
@@ -30,12 +24,40 @@
</section>
<section class="table-section">
- <h3 class="section-title" style="margin-top: 10px;" >璐圭敤鏄庣粏</h3>
- <avue-crud
- :option="tableOption"
- :data="detailData.feeList || []"
+ <h3 class="section-title" style="margin-top: 20px;">璐圭敤鏄庣粏</h3>
+ <el-table
+ :data="detailData.feeList || []"
+ border
+ stripe
+ style="width: 100%"
+ :header-cell-style="{ backgroundColor: '#f5f7fa', color: '#606266' }"
>
- </avue-crud>
+ <el-table-column label="璐圭敤绫诲瀷" align="center" prop="feeType"/>
+ <!-- <template #default="scope">
+ {{ dictFormat(fee_type, scope.row.feeType) }}
+ </template>
+ </el-table-column> -->
+
+ <el-table-column label="璐圭敤鍚嶇О" prop="feeName" align="center" />
+
+ <el-table-column label="璁¤垂鍗曚綅" align="center" prop="billingUnit"/>
+ <!-- <template #default="scope">
+ {{ dictFormat(sys_unit, scope.row.billingUnit) }}
+ </template>
+ </el-table-column> -->
+
+ <el-table-column label="璁¤垂鍗曚环" prop="unitPrice" align="center" />
+ <el-table-column label="璁¤垂閲戦" prop="billingAmount" align="center" />
+ <el-table-column label="瀹炴敹閲戦" prop="actualAmount" align="center" />
+
+ <el-table-column label="甯佸埗" align="center" prop="currency" >
+ <template #default="scope">
+ {{ dictFormat(sys_currency, scope.row.currency) }}
+ </template>
+ </el-table-column>
+
+ <el-table-column label="璐圭敤鐧昏鏃堕棿" prop="createTime" width="160" align="center" />
+ </el-table>
</section>
</div>
@@ -48,43 +70,49 @@
</template>
<script setup lang="ts">
-import { ref, reactive } from 'vue';
+import { ref } from 'vue';
+import useCurrentInstance from "@/utils/useCurrentInstance";
+
+const { proxy } = useCurrentInstance();
+
+// 鍔犺浇鎵�闇�鐨勫瓧鍏�
+const {
+ sys_system,
+ sys_business,
+ sys_receipts,
+ sys_currency,
+ fee_type, // 瀵瑰簲涔嬪墠鐨� dicUrl fee_type
+ sys_unit // 瀵瑰簲涔嬪墠鐨� dicUrl sys_unit
+} = proxy.useDict(
+ 'sys_system',
+ 'sys_business',
+ 'sys_receipts',
+ 'sys_currency',
+ 'fee_type',
+ 'sys_unit'
+);
+
+const dictFormat = (dict: any, value: any) => {
+ return proxy.selectDictLabel(dict, value);
+};
const visible = ref(false);
const detailData = ref<any>({});
-// 琛ㄦ牸閰嶇疆
-const tableOption = {
- tip: false,
- header: false, // 闅愯棌澶撮儴鎸夐挳
- addBtn: false,
- editBtn: false,
- delBtn: false,
- menu: false, // 闅愯棌鎿嶄綔鏍�
- column: [
- { label: '璐圭敤绫诲瀷', prop: 'feeType' },
- { label: '璐圭敤鍚嶇О', prop: 'feeName' },
- { label: '璁¤垂鍗曚綅', prop: 'unit' },
- { label: '璁¤垂鍗曚环', prop: 'price' },
- { label: '璁¤垂閲戦', prop: 'totalAmount' },
- { label: '瀹炴敹閲戦', prop: 'actualAmount' },
- { label: '甯佸埗', prop: 'currency' },
- { label: '璐圭敤鐧昏鏃堕棿', prop: 'createTime', width: 160 },
- ]
-};
-
// 鏆撮湶缁欑埗缁勪欢鐨勬柟娉�
const open = (data: any) => {
detailData.value = data || {};
+ // 缁熶竴鏁版嵁鏉ユ簮瀛楁
+ if (data && data.receivableFeeDetailList) {
+ detailData.value.feeList = data.receivableFeeDetailList;
+ } else {
+ detailData.value.feeList = [];
+ }
visible.value = true;
};
const handleClosed = () => {
detailData.value = {};
-};
-
-const handleConfirm = () => {
- visible.value = false;
};
defineExpose({ open });
@@ -94,26 +122,29 @@
.modal-content {
padding: 10px;
}
+
.section-title {
font-size: 16px;
font-weight: bold;
- margin: 20px 0 10px 0;
+ margin: 10px 0;
color: #333;
+ padding-left: 10px;
+ border-left: 4px solid #409eff; /* 娣诲姞浜嗚摑鑹蹭晶杈癸紝涓庝富娴佽储鍔$郴缁熼鏍肩粺涓� */
}
-.section-title:first-child {
- margin-top: 0;
-}
+
.amount-text {
color: #f56c6c;
font-weight: bold;
}
+
:deep(.el-descriptions__label) {
width: 120px;
background-color: #f5f7fa;
}
+
+/* 缁熶竴鎻忚堪鍒楄〃鍗曞厓鏍兼牱寮� */
::v-deep .el-descriptions__body .el-descriptions__table.is-bordered .el-descriptions__cell {
- border: var(--el-descriptions-table-border);
- padding: 8px 11px;
- width: 100px;
+ border: var(--el-descriptions-table-border);
+ padding: 8px 11px;
}
</style>
\ No newline at end of file
diff --git a/ui/admin-ui3/src/components/FeeDetailModal/index.vue b/ui/admin-ui3/src/components/FeeDetailModal/index.vue
index c8d3587..0d2d27d 100644
--- a/ui/admin-ui3/src/components/FeeDetailModal/index.vue
+++ b/ui/admin-ui3/src/components/FeeDetailModal/index.vue
@@ -36,7 +36,24 @@
</el-form-item>
</el-col>
- <el-col :span="8">
+ <el-col :span="8" v-if="typeText == '搴旀敹'" >
+ <el-form-item label="瀹㈡埛鍚嶇О" prop="customerName">
+ <!-- <el-select v-model="mainForm.customerName" placeholder="璇烽�夋嫨渚涘簲鍟嗗悕绉�" style="width: 100%;" clearable>
+ <el-option v-for="dict in sys_supplier" :key="dict.value" :label="dict.label"
+ :value="dict.value"></el-option>
+ </el-select> -->
+ <el-input v-model="mainForm.customerName" placeholder="璇烽�夋嫨 瀹㈡埛鍚嶇О" readonly @click="handleCustonerClick"
+ class="clickable-input">
+ <template #suffix>
+ <el-icon @click="handleCustonerClick" class="search-icon">
+ <Search />
+ </el-icon>
+ </template>
+ </el-input>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="8" v-if="typeText == '搴斾粯'" >
<el-form-item label="渚涘簲鍟嗗悕绉�" prop="customerName">
<!-- <el-select v-model="mainForm.customerName" placeholder="璇烽�夋嫨渚涘簲鍟嗗悕绉�" style="width: 100%;" clearable>
<el-option v-for="dict in sys_supplier" :key="dict.value" :label="dict.label"
@@ -79,7 +96,7 @@
</el-col>
<el-col :span="8" v-if="typeText == '搴旀敹'">
<el-form-item label="搴旀敹閲戦" prop="receivableAmount">
- <el-input-number v-model="mainForm.receivableAmount" :min="0" class="w-full" />
+ <el-input-number v-model="mainForm.receivableAmount" disabled :min="0" class="w-full" />
</el-form-item>
</el-col>
<el-col :span="8" v-if="typeText == '搴斾粯'">
@@ -119,13 +136,13 @@
<el-table :data="receivableFeeDetailList" border stripe style="width: 100%">
<el-table-column prop="feeType" label="璐圭敤绫诲瀷" >
<template #default="scope">
- {{ dictFormat('fee_type', scope.row.feeType) }}
+ {{ dictFormat(fee_type, scope.row.feeType) }}
</template>
</el-table-column>
<el-table-column prop="feeName" label="璐圭敤鍚嶇О" />
<el-table-column prop="billingUnit" label="璁¤垂鍗曚綅">
<template #default="scope">
- {{ dictFormat('sys_unit', scope.row.billingUnit)}}
+ {{ dictFormat(sys_unit, scope.row.billingUnit)}}
</template>
</el-table-column>
<el-table-column prop="unitPrice" label="璁¤垂鍗曚环" />
@@ -133,7 +150,7 @@
<el-table-column prop="actualAmount" label="瀹炴敹閲戦" />
<el-table-column prop="currency" label="甯佸埗">
<template #default="scope">
- {{ dictFormat('sys_currency', scope.row.currency)}}
+ {{ dictFormat(sys_currency, scope.row.currency)}}
</template>
</el-table-column>
<el-table-column prop="createTime" label="璐圭敤鐧昏鏃堕棿" width="180" />
@@ -228,7 +245,7 @@
</template>
<script setup lang="ts">
-import { ref, reactive, computed } from 'vue';
+import { ref, reactive, computed, watch } from 'vue';
import { ElMessage, type FormInstance } from 'element-plus';
import useCurrentInstance from '@/utils/useCurrentInstance'
import EntitySelector from '../EntitySelector/index.vue';
@@ -427,6 +444,29 @@
mainForm.customerId = selectedCustomer.id; // 鐜板湪瀛楁宸插0鏄庯紝璧嬪�兼湁鏁�
isCustomerSelectVisibleIshow.value = false;
};
+// 鐩戝惉璐圭敤鏄庣粏鍒楄〃鐨勫彉鍖栵紝鑷姩璁$畻鎬婚骞朵繚鐣�2浣嶅皬鏁�
+watch(
+ () => receivableFeeDetailList.value,
+ (newList) => {
+ const total = newList.reduce((sum, item) => {
+ // 纭繚鍙栧埌鐨勬槸鏁板�硷紝濡傛灉涓虹┖鍒欓粯璁や负 0
+ const amount = parseFloat(item.actualAmount) || 0;
+ return sum + amount;
+ }, 0);
+
+ // 璁$畻缁撴灉淇濈暀2浣嶅皬鏁�
+ // parseFloat(...toFixed(2)) 鏄负浜嗙‘淇濇渶鍚庡瓨鍏� mainForm 鐨勬槸鏁板瓧绫诲瀷鑰岄潪瀛楃涓�
+ const formattedTotal = parseFloat(total.toFixed(2));
+
+ // 鏍规嵁绫诲瀷璧嬪��
+ if (typeText.value === '搴旀敹') {
+ mainForm.receivableAmount = formattedTotal;
+ } else {
+ mainForm.payableAmount = formattedTotal;
+ }
+ },
+ { deep: true, immediate: true } // immediate: true 纭繚鍒濆鍔犺浇鏁版嵁鏃朵篃鑳借绠椾竴娆�
+);
defineExpose({ open, canceleClick });
</script>
diff --git a/ui/admin-ui3/src/components/GenerateBillDialog/index.vue b/ui/admin-ui3/src/components/GenerateBillDialog/index.vue
index d921c00..be29b90 100644
--- a/ui/admin-ui3/src/components/GenerateBillDialog/index.vue
+++ b/ui/admin-ui3/src/components/GenerateBillDialog/index.vue
@@ -48,28 +48,28 @@
<h3 class="section-title">璐﹀崟鏄庣粏</h3>
</div>
<el-table :data="detailList" border stripe height="300px" style="width: 100%">
- <el-table-column prop="systemNo" label="绯荤粺缂栧彿" width="120" />
- <el-table-column prop="sourceSystem" label="鏉ユ簮绯荤粺" width="120">
+ <el-table-column prop="systemNo" align="center" label="绯荤粺缂栧彿" width="140" />
+ <el-table-column prop="sourceSystem" align="center" label="鏉ユ簮绯荤粺" width="120">
<template #default="scope">
{{ dictFormat(sys_system, scope.row.sourceSystem) }}
</template>
</el-table-column><!-- sys_system -->
- <el-table-column prop="businessSector" label="涓氬姟鏉垮潡" width="120">
+ <el-table-column prop="businessSector" align="center" label="涓氬姟鏉垮潡" width="120">
<template #default="scope">
{{ dictFormat(sys_business, scope.row.businessSector) }}
</template>
</el-table-column>
<!-- sys_business -->
- <el-table-column prop="documentType" label="鍗曟嵁绫诲瀷" width="120">
+ <el-table-column prop="documentType" align="center" label="鍗曟嵁绫诲瀷" width="120">
<template #default="scope">
{{ dictFormat(sys_receipts, scope.row.documentType) }}
</template>
</el-table-column><!-- sys_receipts -->
- <el-table-column prop="documentNo" label="鍗曟嵁缂栧彿" width="150" />
- <el-table-column prop="customerName" label="瀹㈡埛鍚嶇О" width="150" />
- <el-table-column prop="projectName" label="椤圭洰鍚嶇О" width="150" />
- <el-table-column prop="receivableAmount" label="搴旀敹閲戦" align="right" />
- <el-table-column prop="currency" label="甯佸埗" width="100">
+ <el-table-column prop="documentNo" align="center" label="鍗曟嵁缂栧彿" width="150" />
+ <el-table-column prop="customerName" align="center" label="瀹㈡埛鍚嶇О" width="150" />
+ <el-table-column prop="projectName" align="center" label="椤圭洰鍚嶇О" width="150" />
+ <el-table-column prop="receivableAmount" align="center" label="搴旀敹閲戦" />
+ <el-table-column prop="currency" align="center" label="甯佸埗" width="100">
<template #default="scope">
{{ dictFormat(sys_currency, scope.row.currency) }}
</template>
@@ -79,7 +79,7 @@
<template #footer>
<el-button @click="cancel">鍙栨秷</el-button>
- <el-button type="primary" @click="handleConfirm" >纭鐢熸垚</el-button>
+ <el-button type="primary" @click="handleConfirm">纭鐢熸垚</el-button>
</template>
</el-dialog>
</template>
@@ -127,15 +127,49 @@
const open = (data: any, selectionList: any[]) => {
visible.value = true;
if (data) {
- if (data) {
- // 鍋囪 data 鐨勭粨鏋勫氨鏄� mainForm 闇�瑕佺殑缁撴瀯
- Object.assign(statistics.value, data);
- // 纭繚鍚庣杩斿洖鐨勬槑缁嗗瓧娈靛悕涓庢涓�鑷�
- if (selectionList.length > 0) {
- detailList.value = [...selectionList];
- }
- }
+ Object.assign(statistics.value, data);
+ if (selectionList && selectionList.length > 0) {
+ detailList.value = selectionList.flatMap(item => {
+ if (!item.receivableAmountStr) return [item];
+
+ // 1. 鎷嗗垎澶氫釜甯佺瀛楃涓�
+ const amountParts = item.receivableAmountStr.trim().split(/\s+/);
+
+ return amountParts.map(part => {
+ // 2. 姝e垯瑙f瀽鎻愬彇鏁板�煎拰甯佺鍚嶇О
+ // ([\d.]+) 鍖归厤鏁板瓧鍜屽皬鏁扮偣
+ // ([\u4e00-\u9fa5]+) 鍖归厤涓枃瀛楃锛堝竵绉嶏級
+ const match = part.match(/([\d.]+)([\u4e00-\u9fa5]+)/);
+
+ let amount = item.receivableAmount; // 榛樿鍊�
+ let currencyValue = item.currency; // 榛樿鍊�
+
+ if (match) {
+ amount = parseFloat(match[1]); // 鎻愬彇鐨勬暟瀛�
+ const currencyName = match[2]; // 鎻愬彇鐨勫竵绉嶆枃瀛楋紝濡� "娓竵"
+
+ // 3. 鏍规嵁鎻愬彇鐨勬枃瀛楀尮閰嶅瓧鍏镐腑鐨� Value
+ // 鍋囪瀛楀吀 sys_currency.value: 0 鏄汉姘戝竵, 1 鏄腐甯� (璇锋牴鎹偍瀹為檯瀛楀吀鍊艰皟鏁�)
+ if (currencyName.includes('浜烘皯甯�')) {
+ currencyValue = 'RMB'; // 瀵瑰簲瀛楀吀鐨勪汉姘戝竵value
+ } else if (currencyName.includes('娓竵')) {
+ currencyValue = 'HKD'; // 瀵瑰簲瀛楀吀鐨勬腐甯乿alue
+ }
+ }
+
+ // 4. 杩斿洖鏂板璞★紝瑕嗙洊閲戦鍜屽竵鍒�
+ return {
+ ...item,
+ receivableAmount: amount, // 璧嬪�兼彁鍙栫殑鏁板瓧
+ currency: currencyValue, // 璧嬪�煎尮閰嶅埌鐨勫瓧鍏窱D
+ receivableAmountStr: part // 淇濇寔鎷嗗垎鍚庣殑鏂囨湰
+ };
+ });
+ });
+ } else {
+ detailList.value = [];
+ }
}
};
// 3. 纭鐢熸垚鎸夐挳閫昏緫
diff --git a/ui/admin-ui3/src/components/NestedDetailDialog/index.vue b/ui/admin-ui3/src/components/NestedDetailDialog/index.vue
new file mode 100644
index 0000000..20e79ad
--- /dev/null
+++ b/ui/admin-ui3/src/components/NestedDetailDialog/index.vue
@@ -0,0 +1,216 @@
+<template>
+ <el-dialog v-model="visible" :title="type === 'receivable' ? '搴旀敹璐﹀崟璐圭敤鏄庣粏' : '搴斾粯璐﹀崟璐圭敤鏄庣粏'" width="1300px"
+ destroy-on-close>
+ <div class="modal-content">
+ <section class="info-section">
+ <el-descriptions title="璐﹀崟淇℃伅" :column="3" border class="mb-5">
+ <el-descriptions-item label="绯荤粺缂栧彿">{{ billInfo.systemNo }}</el-descriptions-item>
+ <el-descriptions-item label="璐﹀崟鍚嶇О">{{ billInfo.billName }}</el-descriptions-item>
+ <el-descriptions-item :label="type == 'receivable' ? '瀹㈡埛鍚嶇О' : '渚涘簲鍟嗗悕绉�'">
+ {{ billInfo.customerName }}
+ </el-descriptions-item>
+
+ <el-descriptions-item label="鍗曟嵁鏁伴噺">{{ billInfo.documentCount }}</el-descriptions-item>
+ <el-descriptions-item label="搴旂粨绠楅噾棰�">
+ <span class="text-bold">{{ billInfo.totalAmount }}</span>
+ </el-descriptions-item>
+ <el-descriptions-item label="甯佸埗">{{ billInfo.currency }}</el-descriptions-item>
+
+ <el-descriptions-item label="鍑忓厤閲戦">{{ billInfo.discountAmount }}</el-descriptions-item>
+ <el-descriptions-item :label="type == 'receivable' ? '宸叉敹閲戦' : '宸蹭粯閲戦'">
+ {{ billInfo.receivedAmount }}
+ </el-descriptions-item>
+ <el-descriptions-item :label="type == 'receivable' ? '寰呮敹閲戦' : '寰呬粯閲戦'">
+ <span class="text-danger">{{ billInfo.pendingAmount }}</span>
+ </el-descriptions-item>
+
+ <el-descriptions-item label="鍛ㄦ湡绫诲瀷">{{ billInfo.periodType }}</el-descriptions-item>
+ <el-descriptions-item label="涓氬姟鏈熼棿">
+ <span v-if="billInfo.businessStartDate">{{ billInfo.businessStartDate }}</span>
+ <span v-if="billInfo.businessStartDate && billInfo.businessEndDate"> ~ </span>
+ <span v-if="billInfo.businessEndDate">{{ billInfo.businessEndDate }}</span>
+ </el-descriptions-item>
+ <el-descriptions-item label="璐﹀崟鍛ㄦ湡">
+ <span v-if="billInfo.billingStartDate">{{ billInfo.billingStartDate }}</span>
+ <span v-if="billInfo.billingStartDate && billInfo.billingEndDate"> ~ </span>
+ <span v-if="billInfo.billingEndDate">{{ billInfo.billingEndDate }}</span>
+ </el-descriptions-item>
+
+ <el-descriptions-item label="璐﹀崟鐢熸垚鏃ユ湡">{{ billInfo.billGenerateDate }}</el-descriptions-item>
+ <el-descriptions-item label="璐﹀崟鍙戦�佹棩鏈�">{{ billInfo.billSendDate }}</el-descriptions-item>
+ <el-descriptions-item label="璐﹀崟鍒版湡鏃ユ湡">{{ billInfo.billDueDate }}</el-descriptions-item>
+ </el-descriptions>
+ </section>
+
+ <section class="table-section">
+ <h3 class="section-title">璐圭敤鏄庣粏</h3>
+
+ <el-table :data="mainTableData" border stripe style="width: 100%" v-loading="loading">
+ <el-table-column prop="systemNo" label="绯荤粺缂栧彿" width="160" align="center" />
+ <el-table-column prop="sourceSystem" label="鏉ユ簮绯荤粺" align="center">
+ <template #default="scope">
+ {{ dictFormat(sys_system, scope.row.sourceSystem) }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="businessSector" label="涓氬姟鏉垮潡" align="center">
+ <template #default="scope">
+ {{ dictFormat(sys_business, scope.row.businessSector) }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="documentType" label="鍗曟嵁绫诲瀷" align="center">
+ <template #default="scope">
+ {{ dictFormat(sys_business, scope.row.documentType) }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="documentNo" label="鍗曟嵁缂栧彿" width="160" align="center" />
+ <el-table-column prop="customerName" :label="type === 'receivable' ? '瀹㈡埛鍚嶇О' : '渚涘簲鍟嗗悕绉�'"
+ min-width="150" align="center" />
+ <el-table-column prop="projectName" label="椤圭洰鍚嶇О" align="center" />
+ <el-table-column prop="receivableAmount" :label="type === 'receivable' ? '搴旀敹閲戦' : '搴斾粯閲戦'"
+ align="center" />
+ <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
+ <template #default="scope">
+ <el-button type="text" @click="handleExamine(scope.row)">鏌ョ湅
+ </el-button>
+ </template>
+
+ </el-table-column>
+ <!-- <el-table-column prop="currency" label="甯佸埗" align="center" /> -->
+ </el-table>
+
+ <pagination v-show="pageF.total > 0" :total="pageF.total" v-model:page="queryParams.pageNum"
+ v-model:limit="queryParams.pageSize" @pagination="getDataList" />
+ </section>
+ </div>
+
+ <template #footer>
+ <el-button @click="visible = false">鍏� 闂�</el-button>
+ </template>
+ </el-dialog>
+ <DetailModal ref="detailModalRef" />
+</template>
+
+<script setup lang="ts">
+import { ref, reactive } from 'vue';
+import { getReceivableBillManagement } from "@/api/cwgl/receivableBillManagement";
+import { listReceivableFeeManagement } from "@/api/cwgl/receivableFeeManagement";
+import useCurrentInstance from "@/utils/useCurrentInstance";
+import DetailModal from '@/components/DetailModal/index.vue';
+import {
+ getReceivableFeeManagement,
+} from "@/api/cwgl/receivableFeeManagement";
+const { proxy } = useCurrentInstance()
+const { sys_system, sys_business, sys_receipts, sys_supplier, sys_whether_type, sys_currency } = proxy.useDict(
+ 'sys_system',
+ 'sys_business',
+ 'sys_receipts',
+ 'sys_supplier',
+ 'sys_whether_type', 'sys_currency'
+)
+const dictFormat = (dict: any, value: any) => {
+ return proxy.selectDictLabel(dict, value);
+}
+const props = defineProps<{
+ type: 'receivable' | 'payable'
+}>();
+
+const visible = ref(false);
+const loading = ref(false);
+const billInfo = ref<any>({});
+const mainTableData = ref([]);
+
+// 鍒嗛〉鎬绘暟瀵硅薄
+const pageF = reactive({
+ total: 0
+});
+
+// 鏌ヨ鍙傛暟瀵硅薄锛堝搴� pagination 缁勪欢鐨勭粦瀹氾級
+const queryParams = reactive({
+ pageNum: 1,
+ pageSize: 10,
+ relatedBillNo: ''
+});
+
+/** 鑾峰彇琛ㄦ牸鏁版嵁鍒楄〃 */
+const getDataList = () => {
+ if (!queryParams.relatedBillNo) return;
+ loading.value = true;
+ listReceivableFeeManagement(queryParams).then(res => {
+ if (res.code === 200) {
+ mainTableData.value = res.rows || [];
+ pageF.total = res.total || 0;
+ }
+ }).finally(() => {
+ loading.value = false;
+ });
+};
+
+/** 鎵撳紑寮圭獥涓诲叆鍙� */
+const open = (data: any) => {
+ // 閲嶇疆鍒嗛〉
+ queryParams.pageNum = 1;
+ queryParams.relatedBillNo = '';
+ mainTableData.value = [];
+ pageF.total = 0;
+ // 鑾峰彇璐﹀崟璇︽儏
+ fetchBillDetail(data.id);
+};
+
+/** 鑾峰彇璐﹀崟椤堕儴璇︽儏淇℃伅 */
+const fetchBillDetail = (id: string | number) => {
+ getReceivableBillManagement(id).then((response) => {
+ if (response.code == 200) {
+ billInfo.value = response.data;
+ queryParams.relatedBillNo = response.data.systemNo;
+ visible.value = true;
+ // 璇︽儏鎷垮埌鍚庯紝鍔犺浇琛ㄦ牸
+ getDataList();
+ }
+ });
+};
+const detailModalRef = ref(null);
+const handleExamine = (row) => {
+ getReceivableFeeManagement(row.id).then((res) => {
+ if (res.code === 200) {
+ detailModalRef.value.open(res.data);
+ }
+ });
+
+};
+defineExpose({ open });
+</script>
+
+<style scoped>
+.mb-5 {
+ margin-bottom: 20px;
+}
+
+.section-title {
+ font-size: 16px;
+ font-weight: bold;
+ margin: 15px 0;
+ padding-left: 10px;
+ border-left: 4px solid #409eff;
+}
+
+.text-bold {
+ font-weight: bold;
+}
+
+.text-danger {
+ color: #f56c6c;
+ font-weight: bold;
+}
+
+/* 娣卞害閫傞厤鏍峰紡 */
+:deep(.el-descriptions__label) {
+ width: 140px;
+ background-color: #f5f7fa !important;
+}
+
+::v-deep .el-descriptions__body .el-descriptions__table.is-bordered .el-descriptions__cell {
+ border: var(--el-descriptions-table-border);
+ padding: 8px 11px;
+ width: 200px;
+}
+</style>
\ No newline at end of file
diff --git a/ui/admin-ui3/src/components/OperationLogModal/index.vue b/ui/admin-ui3/src/components/OperationLogModal/index.vue
index 64677c0..b65932c 100644
--- a/ui/admin-ui3/src/components/OperationLogModal/index.vue
+++ b/ui/admin-ui3/src/components/OperationLogModal/index.vue
@@ -1,13 +1,16 @@
<template>
- <el-dialog v-model="visible" title="鎿嶄綔鏃ュ織" width="1100px" destroy-on-close>
+ <el-dialog v-model="visible" title="鎿嶄綔鏃ュ織" width="1000px" destroy-on-close>
<div class="log-container">
- <avue-crud ref="crudRef" :data="tableData" :option="tableOption" :table-loading="loading">
- <!-- <template #type="{ row }">
- <el-tag :type="getTypeTag(row.type)">
- {{ row.typeDesc || row.type }}
- </el-tag>
- </template> -->
- </avue-crud>
+ <el-table v-if="logModalRef == 'listReceivableFeeManagementLog'" v-loading="loading" :data="tableData" border stripe style="width: 100%" max-height="500px">
+ <el-table-column prop="operator" label="鎿嶄綔浜�" width="120" />
+ <el-table-column prop="createTime" label="鎿嶄綔鏃堕棿" width="180" />
+ <el-table-column prop="operationDesc" label="鎿嶄綔鎻忚堪" show-overflow-tooltip />
+ </el-table>
+ <el-table v-if="logModalRef == 'listReceivableBillManagementLog'" v-loading="loading" :data="tableData" border stripe style="width: 100%" max-height="500px">
+ <el-table-column prop="createBy" label="鎿嶄綔浜�" width="120" />
+ <el-table-column prop="createTime" label="鎿嶄綔鏃堕棿" width="180" />
+ <el-table-column prop="operation" label="鎿嶄綔鎻忚堪" show-overflow-tooltip />
+ </el-table>
</div>
<template #footer>
<el-button @click="visible = false">鍏� 闂�</el-button>
@@ -17,70 +20,21 @@
<script setup lang="ts">
import { ref } from 'vue';
- import { listReceivableFeeManagementLog} from "@/api/cwgl/receivableFeeManagementLog";
-
+// 濡傛灉闇�瑕佽皟鐢ㄦ帴鍙h幏鍙栨暟鎹紝淇濈暀姝ゅ紩鍏�
+// import { listReceivableFeeManagementLog } from "@/api/cwgl/receivableFeeManagementLog";
const visible = ref(false);
const loading = ref(false);
const tableData = ref([]);
-
-const tableOption = {
- header: false,
- tip: false, // 闅愯棌鈥滃綋鍓嶅凡閫夋嫨鈥濇彁绀�
- addBtn: false,
-
- editBtn: false,
- delBtn: false,
- menu: false, // 闅愯棌鎿嶄綔鍒�
- border: true,
- stripe: true,
- column: [
- {
- label: '鎿嶄綔浜�',
- prop: 'operator',
- width: 120
- },
- {
- label: '鎿嶄綔鏃堕棿',
- prop: 'operationTime',
- width: 180
- },
- // {
- // label: '鎿嶄綔绫诲瀷',
- // prop: 'type',
- // slot: true, // 寮�鍚嚜瀹氫箟鎻掓Ы鐢ㄤ簬灞曠ず Tag
- // width: 120
- // },
- {
- label: '鎿嶄綔鎻忚堪',
- prop: 'operationDesc',
- overHidden: true // 鍐呭杩囬暱鏃舵樉绀虹渷鐣ュ彿
- },
- {
- label: '璁板綍鍒涘缓鏃堕棿',
- prop: 'createTime',
- overHidden: true // 鍐呭杩囬暱鏃舵樉绀虹渷鐣ュ彿
- }
- ]
-};
-
-// 鏍规嵁绫诲瀷杩斿洖涓嶅悓鐨� Tag 棰滆壊
-const getTypeTag = (type: string) => {
- const map: Record<string, string> = {
- 'add': 'success',
- 'edit': 'warning',
- 'del': 'danger',
- 'import': 'info',
- 'export': 'primary'
- };
- return map[type] || '';
-};
-
+const logModalRef = ref();
// 鏆撮湶缁欏閮ㄨ皟鐢ㄧ殑鎵撳紑鏂规硶
-const open = (logs: any[]) => {
+const open = (logs: any[],apiString: string) => {
visible.value = true;
loading.value = true;
- // 妯℃嫙寮傛鍔犺浇
+ console.log(apiString);
+
+ logModalRef.value = apiString;
+ // 妯℃嫙鍔犺浇鍔ㄧ敾
setTimeout(() => {
tableData.value = logs || [];
loading.value = false;
@@ -94,4 +48,9 @@
.log-container {
padding: 10px 0;
}
+
+/* 璋冩暣琛ㄦ牸鍐呰竟璺濓紝浣垮叾鏇寸編瑙� */
+:deep(.el-table) {
+ margin-top: 10px;
+}
</style>
\ No newline at end of file
diff --git a/ui/admin-ui3/src/components/Pagination/index.vue b/ui/admin-ui3/src/components/Pagination/index.vue
new file mode 100644
index 0000000..cf1ae3d
--- /dev/null
+++ b/ui/admin-ui3/src/components/Pagination/index.vue
@@ -0,0 +1,104 @@
+<template>
+ <div :class="{ 'hidden': hidden }" class="pagination-container">
+ <el-pagination
+ :background="background"
+ v-model:current-page="currentPage"
+ v-model:page-size="pageSize"
+ :layout="layout"
+ :page-sizes="pageSizes"
+ :pager-count="pagerCount"
+ :total="total"
+ @size-change="handleSizeChange"
+ @current-change="handleCurrentChange"
+ />
+ </div>
+</template>
+
+<script setup lang="ts">
+import { scrollTo } from '@/utils/scroll-to'
+import {computed} from "vue";
+
+const props = defineProps({
+ total: {
+ required: true,
+ type: Number
+ },
+ page: {
+ type: Number,
+ default: 1
+ },
+ limit: {
+ type: Number,
+ default: 10
+ },
+ pageSizes: {
+ type: Array,
+ default() {
+ return [10, 20, 30, 50]
+ }
+ },
+ // 绉诲姩绔〉鐮佹寜閽殑鏁伴噺绔粯璁ゅ��5
+ pagerCount: {
+ type: Number,
+ default: document.body.clientWidth < 992 ? 5 : 7
+ },
+ layout: {
+ type: String,
+ default: 'total, sizes, prev, pager, next, jumper'
+ },
+ background: {
+ type: Boolean,
+ default: true
+ },
+ autoScroll: {
+ type: Boolean,
+ default: true
+ },
+ hidden: {
+ type: Boolean,
+ default: false
+ }
+})
+
+const emit = defineEmits(['update:page','update:limit','pagination']);
+const currentPage = computed({
+ get() {
+ return props.page
+ },
+ set(val) {
+ emit('update:page', val)
+ }
+})
+const pageSize = computed({
+ get() {
+ return props.limit
+ },
+ set(val){
+ emit('update:limit', val)
+ }
+})
+function handleSizeChange(val:any) {
+ emit('pagination', { page: currentPage.value, limit: val })
+ if (props.autoScroll) {
+ scrollTo(0, 800)
+ }
+}
+function handleCurrentChange(val:any) {
+ emit('pagination', { page: val, limit: pageSize.value })
+ if (props.autoScroll) {
+ scrollTo(0, 800)
+ }
+}
+
+</script>
+
+<style scoped>
+.pagination-container {
+ background: #fff;
+ padding: 32px 16px;
+ position: relative;
+}
+.pagination-container.hidden {
+ display: none;
+}
+</style>
\ No newline at end of file
diff --git a/ui/admin-ui3/src/components/SettlementDialog/index.vue b/ui/admin-ui3/src/components/SettlementDialog/index.vue
new file mode 100644
index 0000000..2daf7f3
--- /dev/null
+++ b/ui/admin-ui3/src/components/SettlementDialog/index.vue
@@ -0,0 +1,367 @@
+<template>
+ <el-dialog v-model="visible" :title="type === 'receivable' ? '搴旀敹璐﹀崟缁撶畻' : '搴斾粯璐﹀崟缁撶畻'" width="1200px" destroy-on-close
+ @closed="handleClosed">
+ <el-descriptions title="璐﹀崟淇℃伅" :column="3" border class="mb-5">
+ <el-descriptions-item label="绯荤粺缂栧彿">{{ billInfo.systemNo }}</el-descriptions-item>
+ <el-descriptions-item label="璐﹀崟鍚嶇О">{{ billInfo.billName }}</el-descriptions-item>
+ <el-descriptions-item v-if="type == 'receivable'" label="瀹㈡埛鍚嶇О">{{ billInfo.customerName
+ }}</el-descriptions-item>
+ <el-descriptions-item v-if="type == 'payable'" label="渚涘簲鍟嗗悕绉�">{{ billInfo.customerName
+ }}</el-descriptions-item>
+
+ <el-descriptions-item label="鍗曟嵁鏁伴噺">{{ billInfo.documentCount }}</el-descriptions-item>
+ <el-descriptions-item label="搴旂粨绠楅噾棰�">
+ <span class="text-bold">{{ billInfo.totalAmount }}</span>
+ </el-descriptions-item>
+ <el-descriptions-item label="甯佸埗">{{ billInfo.currency }}</el-descriptions-item>
+
+ <el-descriptions-item label="鍑忓厤閲戦">{{ billInfo.discountAmount }}</el-descriptions-item>
+ <el-descriptions-item v-if="type == 'receivable'" label="宸叉敹閲戦">{{ billInfo.receivedAmount
+ }}</el-descriptions-item>
+ <el-descriptions-item v-if="type == 'payable'" label="宸蹭粯閲戦">{{ billInfo.receivedAmount
+ }}</el-descriptions-item>
+
+ <el-descriptions-item v-if="type == 'receivable'" label="寰呮敹閲戦">
+ <span class="text-danger">{{ billInfo.pendingAmount }}</span>
+ </el-descriptions-item>
+
+ <el-descriptions-item v-if="type == 'payable'" label="寰呬粯閲戦">
+ <span class="text-danger">{{ billInfo.pendingAmount }}</span>
+ </el-descriptions-item>
+
+ <el-descriptions-item label="鍛ㄦ湡绫诲瀷">
+ {{ billInfo.periodType }}
+ </el-descriptions-item>
+ <el-descriptions-item label="涓氬姟鏈熼棿">
+ <span v-if="billInfo.businessEndDate !== null">{{ billInfo.businessEndDate + '-' }}</span>
+ <span v-if="billInfo.businessStartDate !== null">
+ {{ billInfo.businessStartDate }}
+ </span>
+ </el-descriptions-item>
+ <el-descriptions-item label="璐﹀崟鍛ㄦ湡">
+ <span v-if="billInfo.billingStartDate !== null">{{ billInfo.billingStartDate + '-' }}</span>
+ <span v-if="billInfo.billingEndDate !== null">
+ {{ billInfo.billingEndDate }}
+ </span>
+ </el-descriptions-item>
+
+ <el-descriptions-item label="璐﹀崟鐢熸垚鏃ユ湡">{{ billInfo.billGenerateDate }}</el-descriptions-item>
+ <el-descriptions-item label="璐﹀崟鍙戦�佹棩鏈�">{{ billInfo.billSendDate }}</el-descriptions-item>
+ <el-descriptions-item label="璐﹀崟鍒版湡鏃ユ湡">{{ billInfo.billDueDate }}</el-descriptions-item>
+ </el-descriptions>
+
+ <h3 class="section-title">鏈缁撶畻淇℃伅</h3>
+ <el-form ref="formRef" :model="formData" :rules="rules" label-width="110px" label-position="right">
+ <el-row :gutter="20">
+ <el-col :span="8">
+ <el-form-item label="缁撶畻鏂瑰紡" prop="settlementMethod">
+ <el-select v-model="formData.settlementMethod" placeholder="璇烽�夌粨绠楁柟寮�" clearable>
+ <el-option v-for="dict in sys_clearing_form" :key="dict.value" :label="dict.label"
+ :value="dict.value" />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8" v-if="type == 'receivable'">
+ <el-form-item label="瀹㈡埛閾惰璐︽埛" prop="customerBankAccount">
+ <el-input v-model="formData.customerBankAccount" @click="openBankDialog('customer')" readonly
+ placeholder="鐐瑰嚮閫夋嫨">
+ <template #append>
+ <el-button icon="Search" @click="openBankDialog('customer')" />
+ </template>
+ </el-input>
+ </el-form-item>
+ </el-col>
+ <!-- <el-col :span="8" v-if="type == 'payable'">
+ <el-form-item label="浠樻閾惰璐︽埛" prop="customerAccount">
+ <el-input v-model="formData.customerAccount" placeholder="鐐瑰嚮閫夋嫨">
+ <template #append>
+ <el-button icon="Search" @click="handleSelectAccount('customer')" />
+ </template>
+ </el-input>
+ </el-form-item>
+ </el-col> -->
+ <el-col :span="8" v-if="type == 'receivable'">
+ <el-form-item label="瀹㈡埛寮�鎴疯">
+ <el-input v-model="formData.customerBank" disabled />
+ </el-form-item>
+ </el-col>
+ <!-- <el-col :span="8" v-if="type == 'payable'">
+ <el-form-item label="浠樻璐︽埛寮�鎴疯">
+ <el-input v-model="formData.customerBank" disabled />
+ </el-form-item>
+ </el-col> -->
+ </el-row>
+
+ <el-row :gutter="20">
+ <el-col :span="8">
+ <el-form-item label="鏀舵閾惰璐︽埛" prop="receivingBankAccount">
+ <el-input v-model="formData.receivingBankAccount" @click="openBankDialog('receiving')" readonly
+ placeholder="璇疯緭鍏ユ敹娆鹃摱琛岃处鎴�">
+ <template #append>
+ <el-button icon="Search" @click="openBankDialog('receiving')" />
+ </template>
+ </el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鏀舵璐︽埛寮�鎴疯">
+ <el-input v-model="formData.receivingBank" disabled />
+ </el-form-item>
+ </el-col>
+ <!-- 灏� -->
+ <el-col :span="8" v-if="type == 'receivable'">
+ <el-form-item label="鏀舵浜�">
+ <el-input v-model="formData.operator" />
+ </el-form-item>
+ </el-col>
+
+ <!-- <el-col :span="8" v-if="type == 'payable'">
+ <el-form-item label="鏀舵閾惰璐︽埛">
+ <el-input v-model="formData.operator" disabled />
+ </el-form-item>
+ </el-col> -->
+ </el-row>
+
+ <el-row :gutter="20">
+ <el-col :span="8" v-if="type == 'receivable'">
+ <el-form-item label="鏀舵鏃ユ湡" prop="receiptDate">
+ <el-date-picker v-model="formData.receiptDate" type="date" placeholder="璇烽�夋嫨鏃ユ湡"
+ style="width: 100%" value-format="YYYY-MM-DD" />
+ </el-form-item>
+ </el-col>
+ <!-- <el-col :span="8" v-if="type == 'payable'">
+ <el-form-item label="浠樻鏃ユ湡" prop="settleDate">
+ <el-date-picker v-model="formData.settleDate" type="date" placeholder="璇烽�夋嫨鏃ユ湡"
+ style="width: 100%" value-format="YYYY-MM-DD" />
+ </el-form-item>
+ </el-col> -->
+ <el-col :span="8" v-if="type == 'receivable'">
+ <el-form-item label="鏀舵閲戦" prop="receiptAmount">
+ <el-input-number v-model="formData.receiptAmount" :precision="2" :min="0" style="width: 100%"
+ @change="calcRemaining" />
+ </el-form-item>
+ </el-col>
+ <!-- <el-col :span="8" v-if="type == 'payable'">
+ <el-form-item label="浠樻閲戦" prop="settleAmount">
+ <el-input-number v-model="formData.settleAmount" :precision="2" :step="0.1" :min="0"
+ style="width: 100%" @change="calcRemaining" />
+ </el-form-item>
+ </el-col> -->
+ <el-col :span="8" v-if="type == 'receivable'">
+ <el-form-item label="鏀舵鍚庡緟鏀堕噾棰�">
+ <el-input v-model="formData.remainingPendingAmount" disabled class="remaining-input" />
+ </el-form-item>
+ </el-col>
+ <!-- <el-col :span="8" v-if="type == 'payable'">
+ <el-form-item label="鏀舵鍚庡緟浠橀噾棰�">
+ <el-input v-model="formData.remainingAmount" disabled class="remaining-input" />
+ </el-form-item>
+ </el-col> -->
+ </el-row>
+ </el-form>
+
+ <template #footer>
+ <el-button @click="openIshpw">鍙栨秷</el-button>
+ <el-button type="primary" :loading="submitting" @click="handleSubmit">纭畾</el-button>
+ </template>
+ </el-dialog>
+ <bankCardData v-model:visible="bankDialogVisible"
+ :default-selected-id="currentSelectType === 'customer' ? formData.bankAccountId : formData.receivingBankAccountId"
+ :mode="currentSelectType === 'customer' ? 'config' : 'internal'" @confirm="handleBankConfirm" />
+</template>
+
+<script setup lang="ts">
+import { ref, reactive, nextTick } from 'vue'
+import { ElMessage } from 'element-plus'
+import useCurrentInstance from "@/utils/useCurrentInstance";
+import bankCardData from "../bankCardData/index.vue";
+
+const props = defineProps<{
+ type: 'receivable' | 'payable' // 绫诲瀷锛氬簲鏀舵垨搴斾粯
+}>()
+
+const { proxy } = useCurrentInstance();
+// 鑾峰彇鎵�闇�瀛楀吀鏁版嵁
+const {
+ sys_clearing_form
+} = proxy.useDict(
+ 'sys_clearing_form'
+);
+const emit = defineEmits(['success'])
+
+const visible = ref(false)
+const submitting = ref(false)
+const formRef = ref()
+
+// 璐﹀崟璇︽儏鏁版嵁
+const billInfo = ref<any>({})
+
+// 琛ㄥ崟鏁版嵁
+const formData = reactive({
+ settlementMethod: '', // 纭繚鍚嶇О涓� prop 涓�鑷�
+ customerBankAccount: '',
+ customerBank: '',
+ receivingBankAccount: '',
+ receivingBank: '',
+ receivingBankAccountId: '',
+ operator: 'admin',
+
+ // 鏀舵
+ receiptDate: '',
+ receiptAmount: 0,
+ remainingPendingAmount: 0,
+
+ // 浠樻 (澶囩敤)
+ settleDate: '',
+ settleAmount: 0,
+ bankAccountId: ''
+})
+
+// 鏍¢獙瑙勫垯
+const rules = {
+ // 缁撶畻鏂瑰紡
+ settlementMethod: [{ required: true, message: '璇烽�夋嫨缁撶畻鏂瑰紡', trigger: 'change' }],
+
+ // 鏀舵鐩稿叧鏍¢獙 (type === 'receivable')
+ receiptDate: [{ required: true, message: '璇烽�夋嫨鏀舵鏃ユ湡', trigger: 'change' }],
+ receiptAmount: [
+ { required: true, message: '璇疯緭鍏ユ敹娆鹃噾棰�', trigger: 'blur' },
+ { type: 'number', min: 0.01, message: '閲戦蹇呴』澶т簬0', trigger: 'blur' }
+ ],
+
+ // 浠樻鐩稿叧鏍¢獙 (type === 'payable' - 濡傛灉浣犲悗缁彇娑堟敞閲婄殑璇�)
+ settleDate: [{ required: true, message: '璇烽�夋嫨浠樻鏃ユ湡', trigger: 'change' }],
+ settleAmount: [
+ { required: true, message: '璇疯緭鍏ヤ粯娆鹃噾棰�', trigger: 'blur' },
+ { type: 'number', min: 0.01, message: '閲戦蹇呴』澶т簬0', trigger: 'blur' }
+ ]
+}
+// 鎵撳紑寮圭獥
+const open = (row: any) => {
+ visible.value = true
+ billInfo.value = { ...row }
+
+ // 鍒濆鍖栨湰娆℃敹娆鹃噾棰濓細榛樿濉叆鍏ㄩ儴寰呮敹閲戦锛堢敤鎴峰彲鏀癸級
+ formData.receiptAmount = row.pendingAmount || 0;
+ formData.settleAmount = row.pendingAmount || 0
+ calcRemaining()
+}
+// 璁$畻鍓╀綑寰呮敹/寰呬粯
+const calcRemaining = () => {
+ // 1. 鑾峰彇鍘熷寰呮敹閲戦 (浠� billInfo 涓幏鍙�)
+ const pending = Number(billInfo.value.pendingAmount || 0);
+
+ // 2. 鑾峰彇褰撳墠杈撳叆鐨勬敹娆鹃噾棰� (娉ㄦ剰锛氫綘 HTML 涓粦瀹氱殑鏄� receiptAmount)
+ const current = Number(formData.receiptAmount || 0);
+
+ // 3. 璁$畻宸�煎苟淇濈暀 2 浣嶅皬鏁�
+ // 浣跨敤 Number().toFixed(2) 纭繚绮惧害锛屽啀杞洖 Number 浠ヤ究鍚庣画閫昏緫浣跨敤
+ formData.remainingPendingAmount = Number((pending - current).toFixed(2));
+};
+
+// 寮圭獥鏄剧ず鐘舵��
+const bankDialogVisible = ref(false);
+
+// 瀹氫箟涓�涓爣璇嗭紝璁板綍褰撳墠鏄皝鍦ㄩ�夐摱琛�
+const currentSelectType = ref<'customer' | 'receiving'>('customer');
+
+// 淇敼鎵撳紑寮圭獥鐨勬柟娉曪紝浼犲叆鏍囪瘑
+const openBankDialog = (type: 'customer' | 'receiving') => {
+ currentSelectType.value = type;
+ bankDialogVisible.value = true;
+};
+const openIshpw = () => {
+ visible.value = false
+}
+// 澶勭悊纭鍥炶皟
+const handleBankConfirm = (data: any) => {
+ if (currentSelectType.value === 'customer') {
+ // 濉厖瀹㈡埛閾惰淇℃伅
+ formData.bankAccountId = data.id;
+ formData.customerBankAccount = data.accountNo;
+ formData.customerBank = data.bankName;
+ } else {
+ // 濉厖鏀舵閾惰淇℃伅 (瀵瑰簲浣犱唬鐮侀噷鐨� receivingBankAccount 绛�)
+ formData.receivingBankAccountId = data.id; // 寤鸿鍦� formData 澧炲姞姝� ID 瀛楁鐢ㄤ簬鍥炴樉
+ formData.receivingBankAccount = data.accountNo;
+ formData.receivingBank = data.bankName;
+ }
+};
+
+// 鎻愪氦
+const handleSubmit = async () => {
+ await formRef.value.validate()
+ submitting.value = true
+
+ try {
+ // 妯℃嫙API璋冪敤
+ // console.log('鎻愪氦鏁版嵁:', { ...formData, billId: billInfo.value.id, type: props.type })
+ // await new Promise(resolve => setTimeout(resolve, 1000))
+
+ emit('success',formData)
+ // visible.value = false
+ } catch (error) {
+ console.error(error)
+ } finally {
+ submitting.value = false
+ }
+}
+
+// 4. 淇敼閲嶇疆閫昏緫
+const handleClosed = () => {
+ formRef.value?.resetFields()
+ Object.assign(formData, {
+ settlementMethod: '',
+ receiptDate: '',
+ receiptAmount: 0,
+ customerBankAccount: '',
+ customerBank: '',
+ receivingBankAccount: '',
+ receivingBank: '',
+ // ... 鍏朵粬闇�瑕佹竻绌虹殑瀛楁
+ })
+ billInfo.value = {}
+}
+
+defineExpose({ open,openIshpw })
+</script>
+
+<style scoped>
+.mb-5 {
+ margin-bottom: 20px;
+}
+
+.section-title {
+ font-size: 16px;
+ font-weight: bold;
+ margin: 20px 0;
+ padding-left: 10px;
+ border-left: 4px solid #409eff;
+}
+
+.text-bold {
+ font-weight: bold;
+ font-size: 15px;
+}
+
+.text-danger {
+ color: #f56c6c;
+ font-weight: bold;
+}
+
+.remaining-input :deep(.el-input__inner) {
+ color: #e6a23c;
+ font-weight: bold;
+}
+
+:deep(.el-descriptions__label) {
+ width: 120px;
+ background-color: #f5f7fa !important;
+}
+
+::v-deep .el-descriptions__body .el-descriptions__table.is-bordered .el-descriptions__cell {
+ border: var(--el-descriptions-table-border);
+ padding: 8px 11px;
+ width: 200px;
+}
+</style>
\ No newline at end of file
diff --git a/ui/admin-ui3/src/components/bankCardCate/index.vue b/ui/admin-ui3/src/components/bankCardCate/index.vue
index c0ff190..237186f 100644
--- a/ui/admin-ui3/src/components/bankCardCate/index.vue
+++ b/ui/admin-ui3/src/components/bankCardCate/index.vue
@@ -6,14 +6,37 @@
<el-form ref="formRef" :model="form" :rules="formRules" label-width="140px" size="default"
class="form-container">
<!-- 鍏宠仈瀹㈡埛锛堝甫鎼滅储鍥炬爣锛� -->
- <el-form-item label="鍏宠仈瀹㈡埛" prop="customerName">
- <el-input v-model="form.customerName" placeholder="璇烽�夋嫨鍏宠仈瀹㈡埛" readonly suffix-icon="Search"
- @click="openCustomerSelectDialog" class="search-input" />
+ <el-form-item label="鍏宠仈瀹㈡埛" v-if="ishowBank" prop="customerName">
+ <!-- <el-input v-model="form.customerName" placeholder="璇烽�夋嫨鍏宠仈瀹㈡埛" readonly suffix-icon="Search"
+ @click="openCustomerSelectDialog" class="search-input" /> -->
+ <el-input v-model="form.customerName" placeholder="璇烽�夋嫨鍏宠仈瀹㈡埛" readonly class="search-input"
+ @click="openCustomerSelectDialog">
+ <template #suffix>
+ <el-icon class="el-input__icon" style="cursor: pointer;" @click="openCustomerSelectDialog">
+ <Search />
+ </el-icon>
+ </template>
+ </el-input>
+ </el-form-item>
+
+ <el-form-item label="鍏宠仈涓讳綋" v-if="!ishowBank" prop="customerName">
+ <el-input v-model="form.customerName" placeholder="璇烽�夋嫨鍏宠仈涓讳綋" readonly class="search-input"
+ @click="subjectPerationSelectDialog">
+ <template #suffix>
+ <el-icon class="el-input__icon" style="cursor: pointer;" @click="subjectPerationSelectDialog">
+ <Search />
+ </el-icon>
+ </template>
+ </el-input>
</el-form-item>
<!-- 鎶ご鍏徃 -->
- <el-form-item label="璐﹀彿缂栧彿" prop="accountNo">
+ <el-form-item label="璐﹀彿缂栧彿" v-if="ishowBank" prop="accountNo">
<el-input v-model="form.accountNo" placeholder="璇疯緭鍏ヨ处鍙风紪鍙�" />
+ </el-form-item>
+
+ <el-form-item label="閾惰璐﹀彿" v-if="!ishowBank" prop="accountNo">
+ <el-input v-model="form.accountNo" placeholder="璇疯緭鍏ラ摱琛岃处鍙�" />
</el-form-item>
<!-- 缁熶竴绀句細淇$敤浠g爜 -->
@@ -21,7 +44,7 @@
<el-input v-model="form.accountName" placeholder="璇疯緭鍏ユ埛鍚�" maxlength="18" />
</el-form-item>
- <!-- 寮�鎴烽摱琛屽悕绉� -->
+ <!-- 寮�鎴烽摱琛屽悕绉� -->
<el-form-item label="閾惰鍚嶇О" prop="bankName">
<el-input v-model="form.bankName" placeholder="璇疯緭鍏ュ紑鎴烽摱琛屽悕绉�" />
</el-form-item>
@@ -30,33 +53,39 @@
<el-input v-model="form.branchName" placeholder="璇疯緭鍏ユ敮琛屽悕绉�" />
</el-form-item>
- <el-form-item label="璐﹀彿绫诲瀷" prop="accountType">
+ <el-form-item label="璐﹀彿绫诲瀷" v-if="ishowBank" prop="accountType">
<el-select v-model="form.accountType" placeholder="璇烽�夎处鍙风被鍨�" clearable>
<el-option v-for="dict in sys_invoice_type" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
- <el-form-item label="甯佺" prop="currency">
- <el-select v-model="form.currency" placeholder="璇烽�夊竵绉�" clearable>
- <el-option v-for="dict in sys_currency" :key="dict.value" :label="dict.label"
+ <el-form-item label="璐﹀彿绫诲瀷" v-if="!ishowBank" prop="accountType">
+ <el-select v-model="form.accountType" placeholder="璇烽�夎处鍙风被鍨�" clearable>
+ <el-option v-for="dict in sys_internal_type" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
+ <el-form-item label="甯佺" prop="currency">
+ <el-select v-model="form.currency" placeholder="璇烽�夊竵绉�" clearable>
+ <el-option v-for="dict in sys_currency" :key="dict.value" :label="dict.label" :value="dict.value" />
+ </el-select>
+ </el-form-item>
- <el-form-item label="璐︽埛鐘舵��" prop="status">
+
+ <el-form-item label="璐︽埛鐘舵��" prop="status">
<el-select v-model="form.status" placeholder="璇烽�夎处鎴风姸鎬�" clearable>
<el-option v-for="dict in sys_bank_type" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
-
-
-
+
+
+
</el-form>
<!-- 搴曢儴鎸夐挳 -->
@@ -69,12 +98,10 @@
</el-dialog>
<!-- 鍏宠仈瀹㈡埛閫夋嫨寮圭獥 -->
- <CustomerSelectDialog
- :visible="isCustomerSelectVisibleIshow"
- :default-selected-id="form.customerId"
- @confirm="handleCustomerSelect"
- @close="isCustomerSelectVisibleIshow = false"
- />
+ <CustomerSelectDialog :visible="isCustomerSelectVisibleIshow" :default-selected-id="form.customerId"
+ @confirm="handleCustomerSelect" @close="isCustomerSelectVisibleIshow = false" />
+ <subjectPeration :visible="subjectPerationShow" :default-selected-id="form.customerId"
+ @confirm="subjectPerationSelect" @close="subjectPerationShow = false" />
</template>
<script setup lang="ts">
@@ -83,11 +110,21 @@
import { ElMessage } from 'element-plus';
// 寮曞叆瀹㈡埛閫夋嫨寮圭獥缁勪欢
import CustomerSelectDialog from '../CustomerSelectDialog/index';
+import subjectPeration from '../subjectPeration/index';
+
import useCurrentInstance from "@/utils/useCurrentInstance";
const { proxy } = useCurrentInstance();
-const { sys_invoice_type,sys_currency,sys_bank_type } = proxy.useDict('sys_invoice_type','sys_currency','sys_bank_type');
+const { sys_invoice_type, sys_currency, sys_bank_type,sys_internal_type } = proxy.useDict('sys_invoice_type', 'sys_currency', 'sys_bank_type',
+ 'sys_internal_type'
+);
+const props = defineProps({
+ ishowBank: {
+ type: Boolean,
+ default: true
+ },
+});
// 瀹氫箟琛ㄥ崟鏁版嵁绫诲瀷锛堟柊澧瀋ustomerId瀛楁锛岄伩鍏嶈祴鍊兼椂鎶ラ敊锛�
interface InvoiceForm {
customerId?: string | number; // 鏂板锛氬鎴稩D锛堢敤浜庡洖鏄鹃�変腑锛�
@@ -120,12 +157,12 @@
accountType: '',
bankName: '',
branchName: '',
- id:'',
+ id: '',
invoiceOperatingLicenseAddress: '',
invoiceOperatingLicensePhone: '',
invoiceOperatingLicenseEmail: '',
- currency:'',
- status:'',
+ currency: '',
+ status: '',
});
// 琛ㄥ崟鏍¢獙瑙勫垯
@@ -158,14 +195,14 @@
// 鎵撳紑寮圭獥锛堜緵鐖剁粍浠惰皟鐢紝淇鍥炴樉閫昏緫锛�
const openDialog = (data?: Partial<InvoiceForm>) => {
dialogVisible.value = true;
-
+
// 鍏堥噸缃〃鍗曪紝閬垮厤鏃ф暟鎹畫鐣�
nextTick(() => {
formRef.value?.resetFields();
-
+
// 鏈夊洖鏄炬暟鎹椂锛岄�愪釜璧嬪�硷紙鏍稿績淇锛氶伩鍏嶆暣浣撹祴鍊糵orm = data锛�
if (data && Object.keys(data).length > 0) {
- // 閬嶅巻data鐨勬墍鏈夊瓧娈碉紝璧嬪�煎埌form锛堜粎瑕嗙洊瀵瑰簲瀛楁锛�
+ // 閬嶅巻data鐨勬墍鏈夊瓧娈碉紝璧嬪�煎埌form锛堜粎瑕嗙洊瀵瑰簲瀛楁锛�
Object.assign(form, data);
// 娓呯┖琛ㄥ崟鏍¢獙鐘舵��
formRef.value?.clearValidate();
@@ -179,12 +216,12 @@
accountType: '',
bankName: '',
branchName: '',
- id:'',
+ id: '',
invoiceOperatingLicenseAddress: '',
invoiceOperatingLicensePhone: '',
invoiceOperatingLicenseEmail: '',
- currency:'',
- status:''
+ currency: '',
+ status: ''
});
}
});
@@ -201,7 +238,16 @@
form.customerId = selectedCustomer.id; // 鐜板湪瀛楁宸插0鏄庯紝璧嬪�兼湁鏁�
isCustomerSelectVisibleIshow.value = false;
};
+const subjectPerationShow = ref(false);
+const subjectPerationSelectDialog = () => {
+ subjectPerationShow.value = true;
+};
+const subjectPerationSelect = (selectedCustomer) => {
+ form.customerName = selectedCustomer.customerFullName;
+ form.customerId = selectedCustomer.id; // 鐜板湪瀛楁宸插0鏄庯紝璧嬪�兼湁鏁�
+ isCustomerSelectVisibleIshow.value = false;
+};
// 鎻愪氦琛ㄥ崟锛堜慨澶嶆牎楠岄�昏緫 + 鍏抽棴寮圭獥锛�
const handleSubmit = async () => {
if (!formRef.value) return;
@@ -241,13 +287,41 @@
<style scoped lang="scss">
.form-container {
padding: 10px 0;
- :deep(.el-form-item) { margin-bottom: 18px; }
+
+ :deep(.el-form-item) {
+ margin-bottom: 18px;
+ }
}
.search-input {
- :deep(.el-input__inner) { cursor: pointer; background-color: #f8f9fa; }
- :deep(.el-icon-search) { color: #409eff; }
+ :deep(.el-input__inner) {
+ cursor: pointer;
+ background-color: #f8f9fa;
+ }
+
+ :deep(.el-icon-search) {
+ color: #409eff;
+ }
}
-.dialog-footer { text-align: right; }
+.dialog-footer {
+ text-align: right;
+}
+/* */
+/* 浣跨敤 :deep() 绌块�忕粍浠舵牱寮� */
+:deep(.search-input .el-input__wrapper) {
+ background-color: #ffffff !important; /* 寮哄埗鑳屾櫙涓虹櫧鑹� */
+ box-shadow: 0 0 0 1px var(--el-input-border-color, #dcdfe6) inset; /* 淇濇寔杈规 */
+}
+
+/* 閽堝 readonly 鐘舵�佷笅鐨勭壒瀹氬鐞嗭紙濡傛灉闇�瑕佹洿绮剧‘鎺у埗锛� */
+:deep(.search-input .el-input__inner[readonly]) {
+ background-color: #ffffff !important;
+ cursor: pointer; /* 鏃㈢劧鏄偣鍑诲脊鍑猴紝寤鸿榧犳爣鎵嬪娍璁句负 pointer */
+}
+
+/* 濡傛灉浣犺繕鎯冲幓鎺夐紶鏍囨粦杩囨椂鐨勭伆鑹叉劅锛堝鏋滄湁鐨勮瘽锛� */
+:deep(.search-input .el-input__wrapper:hover) {
+ background-color: #ffffff !important;
+}
</style>
\ No newline at end of file
diff --git a/ui/admin-ui3/src/components/bankCardData/index.vue b/ui/admin-ui3/src/components/bankCardData/index.vue
new file mode 100644
index 0000000..75d0e66
--- /dev/null
+++ b/ui/admin-ui3/src/components/bankCardData/index.vue
@@ -0,0 +1,220 @@
+<template>
+ <el-dialog v-model="dialogVisible" :title="mode === 'internal' ? '璇烽�夋嫨鍐呴儴閾惰' : '璇烽�夋嫨鍏宠仈瀹㈡埛'" width="85%" destroy-on-close
+ @close="handleClose" append-to-body>
+ <div class="search-bar">
+ <el-form inline :model="queryParams" class="search-form" label-width="80px">
+ <el-form-item v-if="mode === 'config'" label="瀹㈡埛鍚嶇О:">
+ <el-input v-model="queryParams.customerName" placeholder="璇疯緭鍏ュ鎴峰悕绉�" clearable style="width: 180px" />
+ </el-form-item>
+
+ <el-form-item label="璐﹀彿缂栧彿:">
+ <el-input v-model="queryParams.accountNo" placeholder="璇疯緭鍏ヨ处鍙风紪鍙�" clearable style="width: 180px" />
+ </el-form-item>
+
+ <el-form-item label="鎴峰悕:">
+ <el-input v-model="queryParams.accountName" placeholder="璇疯緭鍏ユ埛鍚�" clearable style="width: 180px" />
+ </el-form-item>
+
+ <el-form-item label="璐﹀彿绫诲瀷:">
+ <el-select v-model="queryParams.accountType" placeholder="璇烽�夋嫨绫诲瀷" clearable style="width: 150px">
+ <el-option v-for="dict in sys_account_type" :key="dict.value" :label="dict.label"
+ :value="dict.value" />
+ </el-select>
+ </el-form-item>
+
+ <el-form-item class="search-btns">
+ <el-button type="primary" icon="Search" @click="handleSearch">鎼滅储</el-button>
+ <el-button plain icon="RefreshLeft" @click="handleReset">娓呯┖</el-button>
+ </el-form-item>
+ </el-form>
+ </div>
+
+ <el-table ref="customerTableRef" :data="customerList" border size="small" style="width: 100%"
+ highlight-current-row row-key="id" @current-change="handleRowSelect" class="custom-highlight-table">
+ <el-table-column v-if="mode === 'config'" prop="customerName" align="center" label="瀹㈡埛鍚嶇О" min-width="120"
+ show-overflow-tooltip />
+ <el-table-column prop="accountNo" label="璐﹀彿缂栧彿" align="center" show-overflow-tooltip />
+ <el-table-column prop="accountName" label="鎴峰悕" align="center" />
+ <el-table-column prop="bankName" label="閾惰鍚嶇О" align="center" show-overflow-tooltip />
+ <el-table-column prop="branchName" label="鏀鍚嶇О" align="center" show-overflow-tooltip />
+
+ <el-table-column prop="accountType" label="璐﹀彿绫诲瀷" align="center">
+ <template #default="scope">
+ {{ dictFormat(sys_account_type, scope.row.accountType) }}
+ </template>
+ </el-table-column>
+
+ <el-table-column prop="currency" label="甯佺" align="center">
+ <template #default="scope">
+ {{ dictFormat(sys_currency, scope.row.currency) }}
+ </template>
+ </el-table-column>
+
+ <el-table-column prop="status" label="璐︽埛鐘舵��" align="center">
+ <template #default="scope">
+ {{ dictFormat(sys_bank_type, scope.row.status) }}
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <div class="pagination-container">
+ <pagination v-show="pageF.total > 0" :total="pageF.total" v-model:page="queryParams.pageNum"
+ v-model:limit="queryParams.pageSize" @pagination="getDataList" />
+ </div>
+
+ <template #footer>
+ <div class="dialog-footer">
+ <el-button @click="handleClose">鍙栨秷</el-button>
+ <el-button type="primary" @click="handleConfirm">纭畾</el-button>
+ </div>
+ </template>
+ </el-dialog>
+</template>
+
+<script setup lang="ts">
+import { ref, reactive, watch, nextTick } from 'vue';
+import { ElMessage } from 'element-plus';
+import useCurrentInstance from "@/utils/useCurrentInstance";
+import { listBankAccountConfig } from "@/api/cwgl/bankAccountConfig";
+// import { listInternalBank } from "@/api/cwgl/internalBank"; // 鍋囪杩欐槸浣犵殑鍐呴儴閾�
+import { listBankConfig,} from "@/api/cwgl/bankConfig";
+
+const { proxy } = useCurrentInstance();
+const { sys_currency, sys_account_type, sys_bank_type } = proxy.useDict('sys_currency', 'sys_account_type', 'sys_bank_type');
+const dictFormat = (dict: any, value: any) => {
+ return proxy.selectDictLabel(dict, value);
+}
+const props = defineProps({
+ visible: { type: Boolean, default: false },
+ defaultSelectedId: { type: [String, Number], default: '' },
+ mode: { type: String, default: 'config' }
+});
+
+const emit = defineEmits(['confirm', 'close', 'update:visible']);
+
+const queryParams = reactive({
+ pageNum: 1,
+ pageSize: 10,
+ customerName: '',
+ accountNo: '',
+ accountName: '',
+ accountType: '',
+});
+
+const pageF = reactive({ total: 0 });
+const dialogVisible = ref(false);
+const customerList = ref([]);
+const selectedRow = ref(null);
+const customerTableRef = ref();
+
+// 鑾峰彇鏁版嵁閫昏緫
+// 2. 淇敼鑾峰彇鏁版嵁閫昏緫 getDataList
+const getDataList = async () => {
+ try {
+ // 鏍稿績閫昏緫锛氭牴鎹� mode 鍒囨崲 API 鏂规硶
+ const apiMethod = props.mode === 'internal' ? listBankConfig : listBankAccountConfig;
+
+ const res = await apiMethod(queryParams);
+
+ if (res.code === 200) {
+ customerList.value = res.rows;
+ pageF.total = res.total;
+ if (props.defaultSelectedId) {
+ syncSelection();
+ }
+ }
+ } catch (err) {
+ console.error(err);
+ }
+};
+
+// 鏍稿績閫変腑鍚屾閫昏緫
+const syncSelection = () => {
+ nextTick(() => {
+ if (!props.defaultSelectedId || customerList.value.length === 0) return;
+
+ const row = customerList.value.find(item => String(item.id) === String(props.defaultSelectedId));
+ if (row) {
+ selectedRow.value = row;
+ // 璋冪敤 Element Plus 鍘熺敓鏂规硶璁剧疆楂樹寒琛�
+ customerTableRef.value?.setCurrentRow(row);
+ }
+ });
+};
+
+const handleSearch = () => {
+ queryParams.pageNum = 1;
+ getDataList();
+};
+
+const handleReset = () => {
+ Object.keys(queryParams).forEach(key => {
+ if (key !== 'pageNum' && key !== 'pageSize') queryParams[key] = '';
+ });
+ queryParams.pageNum = 1;
+ handleSearch();
+};
+
+const handleRowSelect = (val: any) => {
+ selectedRow.value = val;
+};
+
+const handleConfirm = () => {
+ if (!selectedRow.value) return ElMessage.warning('璇烽�夋嫨涓�琛屾暟鎹�');
+ emit('confirm', { ...selectedRow.value });
+ handleClose();
+};
+
+const handleClose = () => {
+ emit('update:visible', false);
+ emit('close');
+};
+
+// 鐩戝惉寮圭獥鏄剧ず锛岃Е鍙戞暟鎹姞杞藉拰鑷姩閫変腑
+watch(() => props.visible, (newVal) => {
+ dialogVisible.value = newVal;
+ if (newVal) {
+ handleSearch();
+ } else {
+ selectedRow.value = null;
+ customerTableRef.value?.setCurrentRow(null);
+ }
+});
+</script>
+
+<style scoped lang="scss">
+.search-bar {
+ background: #fdfdfd;
+ padding: 15px 10px 5px;
+ border-bottom: 1px solid #eee;
+ margin-bottom: 15px;
+
+ .search-btns {
+ margin-left: 10px;
+ }
+}
+
+.pagination-container {
+ margin-top: 15px;
+ display: flex;
+ justify-content: flex-end;
+}
+
+/* 鏍稿績锛氫豢鐓у浘鐗囦腑鐨勬贰缁胯壊閫変腑鏁堟灉 */
+.custom-highlight-table {
+ :deep(.el-table__body tr.current-row > td) {
+ background-color: #e1f3d8 !important;
+ /* 鍥剧墖涓殑娣$豢鑹� */
+ color: #606266;
+ }
+
+ /* 鎮诞鏁堟灉璋冩暣 */
+ :deep(.el-table__body tr:hover > td) {
+ background-color: #f5f7fa !important;
+ }
+}
+
+.dialog-footer {
+ padding-top: 10px;
+}
+</style>
\ No newline at end of file
diff --git a/ui/admin-ui3/src/components/subjectPeration/index.vue b/ui/admin-ui3/src/components/subjectPeration/index.vue
new file mode 100644
index 0000000..eb4ef95
--- /dev/null
+++ b/ui/admin-ui3/src/components/subjectPeration/index.vue
@@ -0,0 +1,284 @@
+<template>
+ <!-- 鍏宠仈瀹㈡埛閫夋嫨寮圭獥 -->
+ <el-dialog v-model="dialogVisible" title="璇烽�夋嫨 鍏宠仈瀹㈡埛" width="80%" destroy-on-close @close="handleClose"
+ append-to-body>
+ <!-- 鎼滅储鍖哄煙 -->
+ <div class="search-bar">
+ <el-form inline :model="queryParams" class="search-form">
+
+ <el-form-item label="杩愯惀涓讳綋绠�绉�:">
+ <el-input v-model="queryParams.customerShortName" placeholder="璇疯緭鍏ヨ繍钀ヤ富浣撶畝绉�" style="width: 180px" />
+ </el-form-item>
+ <el-form-item label="杩愯惀涓讳綋鍏ㄧО:">
+ <el-input v-model="queryParams.customerFullName" placeholder="璇疯緭鍏ヨ繍钀ヤ富浣撳叏绉�" style="width: 180px" />
+ </el-form-item>
+ <el-form-item label="杩愯惀涓讳綋缂栧彿:">
+ <el-input v-model="queryParams.customerCode" placeholder="璇疯緭鍏ヨ繍钀ヤ富浣撶紪鍙�" style="width: 180px" />
+ </el-form-item>
+ <el-form-item label="缁忚惀鐘舵��:">
+ <el-select v-model="queryParams.operatingStatus" style="width: 200px;" placeholder="璇烽�夋嫨缁忚惀鐘舵��" clearable>
+ <el-option v-for="dict in customer_type" :key="dict.value" :label="dict.label"
+ :value="parseInt(dict.value)" />
+ </el-select>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" icon="Search" @click="handleSearch">鎼滅储</el-button>
+ <el-button plain icon="RefreshLeft" @click="handleReset">娓呯┖</el-button>
+ </el-form-item>
+ </el-form>
+ </div>
+
+ <!-- 瀹㈡埛琛ㄦ牸锛堝崟閫�+榛樿閫変腑锛� -->
+ <el-table ref="customerTableRef" :data="customerList" border size="small" style="width: 100%"
+ :highlight-current-row="true" @current-change="handleRowSelect" :current-row-key="selectedRow?.id"
+ class="customer-table">
+ <!-- <el-table-column prop="customerType" label="瀹㈡埛绫诲瀷">
+ <template #default="scope">
+ {{ dictFormat(customer_type, scope.row.customerType) }}
+ </template>
+ </el-table-column> -->
+ <el-table-column prop="customerShortName" label="杩愯惀涓讳綋绠�绉�" />
+ <el-table-column prop="customerFullName" label="杩愯惀涓讳綋鍏ㄧО" />
+
+ <el-table-column prop="customerCode" label="杩愯惀涓讳綋缂栧彿" />
+ <el-table-column prop="contactName" label="鑱旂郴浜哄鍚�" />
+ <el-table-column prop="operatingStatus" label="缁忚惀鐘舵��">
+ <template #default="scope">
+ {{ dictFormat(business_status, scope.row.operatingStatus) }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="updateTime" label="鏇存柊鏃堕棿" />
+
+ </el-table>
+ <pagination v-show="pageF.total > 0" :total="pageF.total" v-model:page="queryParams.pageNum"
+ v-model:limit="queryParams.pageSize" @pagination="getList" />
+
+ <!-- 搴曢儴鎸夐挳 -->
+ <template #footer>
+ <div class="dialog-footer">
+ <el-button type="primary" @click="handleConfirm">纭畾</el-button>
+ </div>
+ </template>
+ </el-dialog>
+</template>
+
+<script setup lang="ts">
+import { ref, reactive, watch, nextTick } from 'vue';
+import type { Table, TableCurrentRow } from 'element-plus';
+import { ElMessage } from 'element-plus';
+import useCurrentInstance from "@/utils/useCurrentInstance";
+import { PageF } from "@/utils/globalInterface";
+import { listTmsSettlementEntity } from "@/api/tms/tmsSettlementEntity";
+const dictFormat = (dict: any, value: any) => {
+ return proxy.selectDictLabel(dict, value);
+}
+// 鍒嗛〉鍙傛暟
+const pageF = reactive({
+ ...PageF,
+});
+
+// 鑾峰彇鍏ㄥ眬瀹炰緥鍜屽瓧鍏�
+const { proxy } = useCurrentInstance();
+const { customer_type, sys_invoice_type, sys_currency, sys_account_type, sys_bank_type,business_status } =
+ proxy.useDict('customer_type', 'sys_invoice_type', 'sys_currency', 'sys_account_type', 'sys_bank_type','business_status');
+
+// 瀹氫箟瀹㈡埛鏁版嵁绫诲瀷
+interface Customer {
+ id: string | number;
+ operatingStatus: string;
+ customerShortName: string;
+ customerCode: string;
+ contactName: string;
+ contractCompany: string;
+}
+
+// Props
+const props = defineProps({
+ visible: {
+ type: Boolean,
+ default: false
+ },
+ defaultSelectedId: {
+ type: [String, Number],
+ default: ''
+ }
+});
+
+// Emits
+const emit = defineEmits<{
+ (e: 'confirm', selected: Customer): void;
+ (e: 'close'): void;
+}>();
+
+// 鍝嶅簲寮忔暟鎹�
+const dialogVisible = ref(false);
+const queryParams = reactive({
+ operatingStatus: '',
+ customerShortName: '',
+ customerCode: '',
+ pageNum: 1,
+ pageSize: 10
+});
+const customerList = ref<Customer[]>([]);
+const selectedRow = ref<Customer>();
+const customerTableRef = ref<InstanceType<typeof Table>>();
+
+// 鏍稿績淇锛氱洃鍚粯璁ら�変腑ID + 鏁版嵁鍔犺浇瀹屾垚鍚庡啀閫変腑
+const loadAndSelectRow = async (id: string | number) => {
+ if (!id) return;
+
+ // 1. 鍏堢‘淇濇暟鎹姞杞藉畬鎴�
+ await getDataList();
+
+ nextTick(() => {
+ // 2. 澶勭悊绫诲瀷涓嶅尮閰嶉棶棰橈紙缁熶竴杞垚瀛楃涓�/鏁板瓧锛�
+ const targetId = typeof id === 'string' ? id : String(id);
+ // 鏌ユ壘瀵瑰簲琛岋紙蹇界暐绫诲瀷锛屽彧姣旇緝鍊硷級
+ const targetRow = customerList.value.find(item => String(item.id) === targetId);
+
+ if (targetRow) {
+ selectedRow.value = targetRow;
+ // 3. 鎵嬪姩璁剧疆琛ㄦ牸閫変腑琛�
+ if (customerTableRef.value) {
+ customerTableRef.value.setCurrentRow(targetRow);
+ }
+ } else {
+ // 鍙�夛細濡傛灉褰撳墠椤垫病鏈夛紝鎻愮ず鐢ㄦ埛鎴栬嚜鍔ㄥ垎椤垫煡鎵撅紙绠�鍗曞満鏅彲鐪佺暐锛�
+ ElMessage.info('閫変腑鐨勫鎴蜂笉鍦ㄥ綋鍓嶅垪琛紝璇疯皟鏁存悳绱㈡潯浠�');
+ }
+ });
+};
+
+// 鐩戝惉寮圭獥鏄剧ず + 榛樿閫変腑ID鍙樺寲
+watch(
+ () => [props.defaultSelectedId, props.visible],
+ async ([id, visible]) => {
+ if (visible && id) {
+ // 寮圭獥鏄剧ず涓旀湁榛樿ID鏃讹紝鍔犺浇鏁版嵁骞堕�変腑
+ await loadAndSelectRow(id);
+ } else if (!visible) {
+ // 寮圭獥鍏抽棴娓呯┖閫変腑
+ selectedRow.value = undefined;
+ if (customerTableRef.value) {
+ customerTableRef.value.setCurrentRow(null);
+ }
+ }
+ },
+ { immediate: true }
+);
+
+// 鐩戝惉寮圭獥鏄剧ず鐘舵�侊紙鍏煎鍘熸湁閫昏緫锛�
+watch(
+ () => props.visible,
+ (val) => {
+ dialogVisible.value = val;
+ if (val) handleReset();
+ },
+ { immediate: true }
+);
+
+// 鍔犺浇鏁版嵁鍒楄〃锛堟敼涓篴sync锛屾敮鎸乤wait锛�
+const getDataList = async () => {
+ try {
+ const res = await listTmsSettlementEntity(queryParams);
+ if (res.code === 200) {
+ customerList.value = res.rows;
+ pageF.total = res.total;
+ }
+ } catch (err) {
+ console.error('鍔犺浇瀹㈡埛鍒楄〃澶辫触锛�', err);
+ }
+};
+
+// 鎼滅储
+const handleSearch = () => {
+ queryParams.pageNum = 1;
+ getDataList().then(() => {
+ // 鎼滅储鍚庨噸鏂板皾璇曢�変腑锛堝鏋滄湁榛樿ID锛�
+ if (props.defaultSelectedId) {
+ loadAndSelectRow(props.defaultSelectedId);
+ }
+ });
+};
+
+// 閲嶇疆
+const handleReset = () => {
+ queryParams.operatingStatus = '';
+ queryParams.customerShortName = '';
+ queryParams.customerCode = '';
+ queryParams.customerFullName = '';
+
+ queryParams.pageNum = 1;
+ queryParams.pageSize = 10;
+
+ selectedRow.value = undefined;
+ if (customerTableRef.value) {
+ customerTableRef.value.setCurrentRow(null);
+ }
+
+ getDataList().then(() => {
+ // 閲嶇疆鍚庨噸鏂板皾璇曢�変腑锛堝鏋滄湁榛樿ID锛�
+ if (props.defaultSelectedId) {
+ loadAndSelectRow(props.defaultSelectedId);
+ }
+ });
+};
+
+// 鍒嗛〉鍥炶皟
+const getList = () => {
+ getDataList().then(() => {
+ // 鍒嗛〉鍚庨噸鏂板皾璇曢�変腑锛堝鏋滄湁榛樿ID锛�
+ if (props.defaultSelectedId) {
+ loadAndSelectRow(props.defaultSelectedId);
+ }
+ });
+};
+
+// 閫変腑琛�
+const handleRowSelect = (val: TableCurrentRow<Customer>) => {
+ selectedRow.value = val as Customer;
+};
+
+// 纭閫夋嫨
+const handleConfirm = () => {
+ if (!selectedRow.value) {
+ ElMessage.warning('璇烽�夋嫨涓�涓鎴�');
+ return;
+ }
+ emit('confirm', selectedRow.value);
+ dialogVisible.value = false;
+};
+
+// 鍏抽棴寮圭獥
+const handleClose = () => {
+ dialogVisible.value = false;
+ emit('close');
+};
+
+// 鍒濆鍖栧姞杞芥暟鎹�
+getDataList();
+</script>
+
+<style scoped lang="scss">
+.search-bar {
+ margin-bottom: 15px;
+ padding: 0 5px;
+}
+
+.customer-table {
+ :deep(.el-table__body tr.current-row > td) {
+ background-color: #d4f5d4 !important;
+ color: #333;
+ }
+
+ :deep(.el-table__header th) {
+ background-color: #f5f7fa;
+ font-weight: 500;
+ }
+}
+
+.dialog-footer {
+ text-align: right;
+ width: 100%;
+}
+</style>
\ No newline at end of file
diff --git a/ui/admin-ui3/src/main.ts b/ui/admin-ui3/src/main.ts
index 3d13802..f2f3820 100644
--- a/ui/admin-ui3/src/main.ts
+++ b/ui/admin-ui3/src/main.ts
@@ -23,6 +23,7 @@
const app = createApp(App);
app.use(pinia)
+import Pagination from '@/components/Pagination/index.vue'
import DictTag from "/src/components/DictTag/index.vue";
import FileUpload from "/src/components/FileUpload/index.vue";
@@ -33,6 +34,7 @@
import SvgIcon from "/src/components/SvgIcon/index.vue";
app.component("DictTag", DictTag);
+app.component('Pagination', Pagination);
app.component('FileUpload', FileUpload);
app.component('basicContainer', basicContainer)
app.component('XlsFileImport', XlsFileImport);
diff --git a/ui/admin-ui3/src/views/cwgl/bankAccountConfig/index.vue b/ui/admin-ui3/src/views/cwgl/bankAccountConfig/index.vue
index 1473fd8..75f5d46 100644
--- a/ui/admin-ui3/src/views/cwgl/bankAccountConfig/index.vue
+++ b/ui/admin-ui3/src/views/cwgl/bankAccountConfig/index.vue
@@ -150,6 +150,7 @@
accountTypeData: {
label: '璐﹀彿绫诲瀷',
minWidth: 120,
+ hide: true,
addDisplay: false, // 鏂板鏃朵笉鏄剧ず
editDisplay: false, // 淇敼鏃朵笉鏄剧ず
viewDisplay: true,
@@ -168,6 +169,7 @@
currencyData: {
label: '甯佺',
minWidth: 120,
+ hide: true,
addDisplay: false, // 鏂板鏃朵笉鏄剧ず
editDisplay: false, // 淇敼鏃朵笉鏄剧ず
viewDisplay: true,
@@ -188,6 +190,7 @@
statusData: {
label: '璐︽埛鐘舵��',
minWidth: 120,
+ hide: true,
addDisplay: false, // 鏂板鏃朵笉鏄剧ず
editDisplay: false, // 淇敼鏃朵笉鏄剧ず
viewDisplay: true,
diff --git a/ui/admin-ui3/src/views/cwgl/bankConfig/index.vue b/ui/admin-ui3/src/views/cwgl/bankConfig/index.vue
index 8358223..8fac0fb 100644
--- a/ui/admin-ui3/src/views/cwgl/bankConfig/index.vue
+++ b/ui/admin-ui3/src/views/cwgl/bankConfig/index.vue
@@ -1,48 +1,18 @@
<template>
- <basicContainer >
- <avue-crud
- :option="option"
- :table-loading="pageF.loading"
- :data="tableData"
- :page="page"
- :permission="permissionList"
- :before-open="beforeOpen"
- v-model="form"
- ref="crudRef"
- @row-update="rowUpdate"
- @row-save="rowSave"
- @refresh-change="refreshChange"
- @row-del="rowDel"
- @search-change="searchChange"
- @search-reset="searchReset"
- @selection-change="selectionChange"
- @current-change="currentChange"
- @size-change="sizeChange"
- @on-load="onLoad"
- >
+ <basicContainer>
+ <avue-crud :option="option" :table-loading="pageF.loading" :data="tableData" :page="page"
+ :permission="permissionList" :before-open="beforeOpen" v-model="form" ref="crudRef" @row-update="rowUpdate"
+ @row-save="rowSave" @refresh-change="refreshChange" @row-del="rowDel" @search-change="searchChange"
+ @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
+ @size-change="sizeChange" @on-load="onLoad">
<template #menu-left>
- <el-button
- type="success"
- icon="Edit"
- :disabled="pageF.single"
- v-hasPermi="['cwgl:bankConfig:edit']"
- @click="handleUpdate">淇敼
+ <el-button type="success" icon="Edit" :disabled="pageF.single" v-hasPermi="['cwgl:bankConfig:edit']"
+ @click="handleUpdate">淇敼
</el-button>
- <el-button
- type="danger"
- icon="Delete"
- :disabled="pageF.multiple"
- @click="handleDelete"
- v-hasPermi="['cwgl:bankConfig:remove']"
- >鍒犻櫎
+ <el-button type="danger" icon="Delete" :disabled="pageF.multiple" @click="handleDelete"
+ v-hasPermi="['cwgl:bankConfig:remove']">鍒犻櫎
</el-button>
- <el-button
- type="warning"
- plain
- icon="Download"
- @click="handleExport"
- v-hasPermi="['cwgl:bankConfig:export']"
- >瀵煎嚭
+ <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['cwgl:bankConfig:export']">瀵煎嚭
</el-button>
</template>
</avue-crud>
@@ -50,141 +20,151 @@
</template>
<script setup name="bankConfig" lang="ts">
- import {BankConfigI,addBankConfig, delBankConfig, exportBankConfig, getBankConfig, listBankConfig, updateBankConfig} from "@/api/cwgl/bankConfig";
- import useCurrentInstance from "@/utils/useCurrentInstance";
- import {computed,reactive, ref, toRefs} from "vue";
- import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface";
- import {usePagePlus} from "@/hooks/usePagePlus";
- import {hasPermission} from "@/utils/permissionUtils";
+import { BankConfigI, addBankConfig, delBankConfig, exportBankConfig, getBankConfig, listBankConfig, updateBankConfig } from "@/api/cwgl/bankConfig";
+import useCurrentInstance from "@/utils/useCurrentInstance";
+import { computed, reactive, ref, toRefs } from "vue";
+import { PagesInterface, PageQueryInterface } from "@/utils/globalInterface";
+import { usePagePlus } from "@/hooks/usePagePlus";
+import { hasPermission } from "@/utils/permissionUtils";
- const { proxy } = useCurrentInstance();
- const crudRef = ref();
+const { proxy } = useCurrentInstance();
+const crudRef = ref();
- const permissionList = computed(()=>{
- return {
- addBtn: hasPermission(["cwgl:bankConfig:add"]),
- delBtn: hasPermission(["cwgl:bankConfig:remove"]),
- editBtn: hasPermission(["cwgl:bankConfig:edit"]),
- viewBtn: hasPermission(["cwgl:bankConfig:query"]),
- }
- })
+const permissionList = computed(() => {
+ return {
+ addBtn: hasPermission(["cwgl:bankConfig:add"]),
+ delBtn: hasPermission(["cwgl:bankConfig:remove"]),
+ editBtn: hasPermission(["cwgl:bankConfig:edit"]),
+ viewBtn: hasPermission(["cwgl:bankConfig:query"]),
+ }
+})
- const data = reactive({
- form:<BankConfigI>{},
- queryParams:<BankConfigI&PageQueryInterface>{},
- page: <PagesInterface>{
- pageSize: 10,
- total: 0,
- currentPage: 1,
+const data = reactive({
+ form: <BankConfigI>{},
+ queryParams: <BankConfigI & PageQueryInterface>{},
+ page: <PagesInterface>{
+ pageSize: 10,
+ total: 0,
+ currentPage: 1,
+ },
+ selectionList: [],
+})
+const { queryParams, form, page, selectionList } = toRefs(data);
+const option = ref({
+ pageKey: 'BankConfig',
+ rowKey: 'id',
+ column: {
+ id: {
+ label: 'ID',
},
- selectionList:[],
- })
- const {queryParams,form,page,selectionList} = toRefs(data);
- const option = ref({
- pageKey: 'BankConfig',
- rowKey: 'id',
- column: {
- id: {
- label: 'ID',
- },
- customerId: {
- label: '瀹㈡埛ID',
- rules: [
- {
- required: true,
- message: "瀹㈡埛ID涓嶈兘涓虹┖", trigger: "blur" }
- ], },
- customerName: {
- label: '瀹㈡埛鍚嶇О',
- rules: [
- {
- required: true,
- message: "瀹㈡埛鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }
- ], },
- accountNo: {
- label: '璐﹀彿缂栧彿',
- rules: [
- {
- required: true,
- message: "璐﹀彿缂栧彿涓嶈兘涓虹┖", trigger: "blur" }
- ], },
- accountName: {
- label: '鎴峰悕',
- rules: [
- {
- required: true,
- message: "鎴峰悕涓嶈兘涓虹┖", trigger: "blur" }
- ], },
- bankName: {
- label: '閾惰鍚嶇О',
- rules: [
- {
- required: true,
- message: "閾惰鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }
- ], },
- branchName: {
- label: '鏀鍚嶇О',
- },
- accountType: {
- label: '璐﹀彿绫诲瀷(corporate:瀵瑰叕璐︽埛;personal:涓汉璐︽埛;collection:鏀舵璐︽埛;payment:浠樻璐︽埛)',
- },
- currency: {
- label: '甯佺',
- },
- status: {
- label: '鐘舵��(normal:姝e父;frozen:鍐荤粨;cancelled:娉ㄩ攢;abnormal:寮傚父)',
- },
- accountNumber: {
- label: '閾惰璐﹀彿',
- },
- openingDate: {
- label: '寮�鎴锋棩鏈�',
- },
- bankCode: {
- label: '閾惰琛屽彿',
- },
- remark: {
- label: '澶囨敞',
- type: 'textarea', minRows: 3, maxRows: 5,
- },
- isDefault: {
- label: '鏄惁榛樿璐︽埛(0:鍚�;1:鏄�)',
- },
- createBy: {
- label: '鍒涘缓浜�',
- },
- updateBy: {
- label: '鏇存柊浜�',
- },
- createTime: {
- label: '鍒涘缓鏃堕棿',
- },
- updateTime: {
- label: '鏇存柊鏃堕棿',
- },
- deleted: {
- label: '鍒犻櫎鏍囪(0:姝e父;1:鍒犻櫎)',
- },
- }
- })
+ customerId: {
+ label: '瀹㈡埛ID',
+ rules: [
+ {
+ required: true,
+ message: "瀹㈡埛ID涓嶈兘涓虹┖", trigger: "blur"
+ }
+ ],
+ },
+ customerName: {
+ label: '瀹㈡埛鍚嶇О',
+ rules: [
+ {
+ required: true,
+ message: "瀹㈡埛鍚嶇О涓嶈兘涓虹┖", trigger: "blur"
+ }
+ ],
+ },
+ accountNo: {
+ label: '璐﹀彿缂栧彿',
+ rules: [
+ {
+ required: true,
+ message: "璐﹀彿缂栧彿涓嶈兘涓虹┖", trigger: "blur"
+ }
+ ],
+ },
+ accountName: {
+ label: '鎴峰悕',
+ rules: [
+ {
+ required: true,
+ message: "鎴峰悕涓嶈兘涓虹┖", trigger: "blur"
+ }
+ ],
+ },
+ bankName: {
+ label: '閾惰鍚嶇О',
+ rules: [
+ {
+ required: true,
+ message: "閾惰鍚嶇О涓嶈兘涓虹┖", trigger: "blur"
+ }
+ ],
+ },
+ branchName: {
+ label: '鏀鍚嶇О',
+ },
+ accountType: {
+ label: '璐﹀彿绫诲瀷(corporate:瀵瑰叕璐︽埛;personal:涓汉璐︽埛;collection:鏀舵璐︽埛;payment:浠樻璐︽埛)',
+ },
+ currency: {
+ label: '甯佺',
+ },
+ status: {
+ label: '鐘舵��(normal:姝e父;frozen:鍐荤粨;cancelled:娉ㄩ攢;abnormal:寮傚父)',
+ },
+ accountNumber: {
+ label: '閾惰璐﹀彿',
+ },
+ openingDate: {
+ label: '寮�鎴锋棩鏈�',
+ },
+ bankCode: {
+ label: '閾惰琛屽彿',
+ },
+ remark: {
+ label: '澶囨敞',
+ type: 'textarea', minRows: 3, maxRows: 5,
+ },
+ isDefault: {
+ label: '鏄惁榛樿璐︽埛(0:鍚�;1:鏄�)',
+ },
+ createBy: {
+ label: '鍒涘缓浜�',
+ },
+ updateBy: {
+ label: '鏇存柊浜�',
+ },
+ createTime: {
+ label: '鍒涘缓鏃堕棿',
+ },
+ updateTime: {
+ label: '鏇存柊鏃堕棿',
+ },
+ deleted: {
+ label: '鍒犻櫎鏍囪(0:姝e父;1:鍒犻櫎)',
+ },
+ }
+})
- const { tableData,pageF,rowSave,rowUpdate,rowDel,beforeOpen,searchChange,
- searchReset,selectionChange,onLoad,currentChange,sizeChange,handleDelete,handleExport,handleUpdate,refreshChange} = usePagePlus({
- form:form,
- option:option,
- queryParams:queryParams,
- idKey:'id',
- page:page.value,
- getListApi:listBankConfig,
- getDetailApi:getBankConfig,
- exportApi:exportBankConfig,
- deleteApi:delBankConfig,
- addApi:addBankConfig,
- updateApi:updateBankConfig,
- handleUpdateFunc:()=>{
+const { tableData, pageF, rowSave, rowUpdate, rowDel, beforeOpen, searchChange,
+ searchReset, selectionChange, onLoad, currentChange, sizeChange, handleDelete, handleExport, handleUpdate, refreshChange } = usePagePlus({
+ form: form,
+ option: option,
+ queryParams: queryParams,
+ idKey: 'id',
+ page: page.value,
+ getListApi: listBankConfig,
+ getDetailApi: getBankConfig,
+ exportApi: exportBankConfig,
+ deleteApi: delBankConfig,
+ addApi: addBankConfig,
+ updateApi: updateBankConfig,
+ handleUpdateFunc: () => {
crudRef.value.rowEdit(selectionList.value[0]);
},
- handleSelectionChangeFunc:(selection:any)=>{
+ handleSelectionChangeFunc: (selection: any) => {
selectionList.value = selection;
}
})
diff --git a/ui/admin-ui3/src/views/cwgl/interiorBankAccountConfig/index.vue b/ui/admin-ui3/src/views/cwgl/interiorBankAccountConfig/index.vue
new file mode 100644
index 0000000..c275b08
--- /dev/null
+++ b/ui/admin-ui3/src/views/cwgl/interiorBankAccountConfig/index.vue
@@ -0,0 +1,306 @@
+<template>
+ <basicContainer>
+ <avue-crud :option="option" :table-loading="pageF.loading" :data="tableData" :page="page"
+ :permission="permissionList" :before-open="beforeOpen" v-model="form" ref="crudRef" @row-update="rowUpdate"
+ @row-save="rowSave" @refresh-change="refreshChange" @row-del="rowDel" @search-change="searchChange"
+ @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
+ @size-change="sizeChange" @on-load="onLoad">
+ <template #menu-left>
+ <el-button type="primary" icon="Plus" v-hasPermi="['cwgl:bankConfig:add']" @click="handleAdd">鏂板
+ </el-button>
+ <!-- <el-button type="success" icon="Edit" :disabled="pageF.single" v-hasPermi="['cwgl:bankAccountConfig:edit']"
+ @click="handleUpdate">淇敼
+ </el-button> -->
+ <!-- <el-button type="danger" icon="Delete" :disabled="pageF.multiple" @click="handleDelete"
+ v-hasPermi="['cwgl:bankAccountConfig:remove']">鍒犻櫎
+ </el-button> -->
+ <el-button type="warning" plain icon="Download" @click="handleExport"
+ v-hasPermi="['cwgl:bankConfig:export']">瀵煎嚭
+ </el-button>
+ </template>
+ <template #menu="{ size, row, index }">
+ <el-link class="link-btn" type="primary" icon="Edit" :underline="false" plain :size="size"
+ @click="handleFy(row)" v-hasPermi="['cwgl:bankConfig:edit']"> 缂栬緫
+ </el-link>
+ </template>
+ </avue-crud>
+ </basicContainer>
+ <bankCardCate ref="invoiceFormRef" :ishowBank="false" @submit="handleFormSubmit" />
+</template>
+
+<script setup name="bankAccountConfig" lang="ts">
+import { BankAccountConfigI, addBankAccountConfig, delBankAccountConfig, exportBankAccountConfig, getBankAccountConfig, listBankAccountConfig, updateBankAccountConfig } from "@/api/cwgl/twoBankAccountConfig";
+import { BankConfigI, addBankConfig, delBankConfig, exportBankConfig, getBankConfig, listBankConfig, updateBankConfig } from "@/api/cwgl/bankConfig";
+
+import useCurrentInstance from "@/utils/useCurrentInstance";
+import { computed, reactive, ref, toRefs } from "vue";
+import { PagesInterface, PageQueryInterface } from "@/utils/globalInterface";
+import { usePagePlus } from "@/hooks/usePagePlus";
+import { hasPermission } from "@/utils/permissionUtils";
+import bankCardCate from "@/components/bankCardCate/index.vue";
+const { proxy } = useCurrentInstance();
+const crudRef = ref();
+const {
+ customer_type, sys_invoice_type, sys_currency, sys_account_type, sys_bank_type
+} =
+ proxy.useDict(
+ 'customer_type', 'sys_invoice_type', 'sys_currency', 'sys_account_type', 'sys_bank_type'
+ );
+const dictFormat = (dict: any, value: any) => {
+ return proxy.selectDictLabel(dict, value);
+}
+const permissionList = computed(() => {
+ return {
+ addBtn: hasPermission(["cwgl:bankConfig:add"]),
+ delBtn: hasPermission(["cwgl:bankConfig:remove"]),
+ editBtn: hasPermission(["cwgl:bankConfig:edit"]),
+ viewBtn: hasPermission(["cwgl:bankConfig:query"]),
+ }
+})
+
+const data = reactive({
+ form: <BankAccountConfigI>{},
+ queryParams: <BankAccountConfigI & PageQueryInterface>{},
+ page: <PagesInterface>{
+ pageSize: 10,
+ total: 0,
+ currentPage: 1,
+ },
+ selectionList: [],
+})
+const { queryParams, form, page, selectionList } = toRefs(data);
+const option = ref({
+ pageKey: 'BankAccountConfig',
+ rowKey: 'id',
+ addBtn: false,
+ editBtn: false,
+ searchSpan: 5,
+ labelWidth: 150,
+ searchLabelWidth: 120,
+ column: {
+ // id: {
+ // label: 'ID',
+ // },
+ // customerId: {
+ // label: '瀹㈡埛ID',
+ // rules: [
+ // {
+ // required: true,
+ // message: "瀹㈡埛ID涓嶈兘涓虹┖", trigger: "blur"
+ // }
+ // ],
+ // },
+ customerName: {
+ label: '瀹㈡埛鍚嶇О',
+ minWidth: 120,
+ search: true,
+ rules: [
+ {
+ required: true,
+ message: "瀹㈡埛鍚嶇О涓嶈兘涓虹┖", trigger: "blur"
+ }
+ ],
+ },
+ accountNo: {
+ label: '璐﹀彿缂栧彿',
+ minWidth: 180,
+ search: true,
+ rules: [
+ {
+ required: true,
+ message: "璐﹀彿缂栧彿涓嶈兘涓虹┖", trigger: "blur"
+ }
+ ],
+ },
+ accountName: {
+ label: '鎴峰悕',
+ minWidth: 120,
+ search: true,
+ rules: [
+ {
+ required: true,
+ message: "鎴峰悕涓嶈兘涓虹┖", trigger: "blur"
+ }
+ ],
+ },
+ bankName: {
+ label: '閾惰鍚嶇О',
+ minWidth: 140,
+ rules: [
+ {
+ required: true,
+ message: "閾惰鍚嶇О涓嶈兘涓虹┖", trigger: "blur"
+ }
+ ],
+ },
+ branchName: {
+ label: '鏀鍚嶇О',
+ minWidth: 180,
+ },
+
+ accountType: {
+ label: '璐﹀彿绫诲瀷',
+ search: true,
+ minWidth: 120,
+ dataType: 'string',
+ type: 'select',
+ // addDisplay: false, // 鏂板鏃朵笉鏄剧ず
+ // editDisplay: false, // 淇敼鏃朵笉鏄剧ず
+ viewDisplay: false,
+ dicUrl: '/system/dict/data/type/sys_account_type',
+ },
+ accountTypeData: {
+ label: '璐﹀彿绫诲瀷',
+ minWidth: 120,
+ hide: true,
+ addDisplay: false, // 鏂板鏃朵笉鏄剧ず
+ editDisplay: false, // 淇敼鏃朵笉鏄剧ず
+ viewDisplay: true,
+ },
+ currency: {
+ label: '甯佺',
+ search: true,
+ minWidth: 120,
+ dataType: 'string',
+ type: 'select',
+ // addDisplay: false, // 鏂板鏃朵笉鏄剧ず
+ // editDisplay: false, // 淇敼鏃朵笉鏄剧ず
+ viewDisplay: false,
+ dicUrl: '/system/dict/data/type/sys_currency',
+ },
+ currencyData: {
+ label: '甯佺',
+ minWidth: 120,
+ hide: true,
+
+ addDisplay: false, // 鏂板鏃朵笉鏄剧ず
+ editDisplay: false, // 淇敼鏃朵笉鏄剧ず
+ viewDisplay: true,
+
+ },
+ status: {
+ label: '璐︽埛鐘舵��',
+ search: true,
+ minWidth: 120,
+ dataType: 'string',
+ type: 'select',
+ // addDisplay: false, // 鏂板鏃朵笉鏄剧ず
+ // editDisplay: false, // 淇敼鏃朵笉鏄剧ず
+ viewDisplay: false,
+ dicUrl: '/system/dict/data/type/sys_bank_type',
+
+ },
+ statusData: {
+ label: '璐︽埛鐘舵��',
+ minWidth: 120,
+ hide: true,
+
+ addDisplay: false, // 鏂板鏃朵笉鏄剧ず
+ editDisplay: false, // 淇敼鏃朵笉鏄剧ず
+ viewDisplay: true,
+ }
+ // accountNumber: {
+ // label: '閾惰璐﹀彿',
+ // },
+ // openingDate: {
+ // label: '寮�鎴锋棩鏈�',
+ // },
+ // bankCode: {
+ // label: '閾惰琛屽彿',
+ // },
+ // remark: {
+ // label: '澶囨敞',
+ // type: 'textarea', minRows: 3, maxRows: 5,
+ // },
+ // isDefault: {
+ // label: '鏄惁榛樿璐︽埛(0:鍚�;1:鏄�)',
+ // },
+ // createBy: {
+ // label: '鍒涘缓浜�',
+ // },
+ // updateBy: {
+ // label: '鏇存柊浜�',
+ // },
+ // createTime: {
+ // label: '鍒涘缓鏃堕棿',
+ // },
+ // updateTime: {
+ // label: '鏇存柊鏃堕棿',
+ // },
+ // deleted: {
+ // label: '鍒犻櫎鏍囪(0:姝e父;1:鍒犻櫎)',
+ // },
+ }
+})
+
+const { tableData, pageF, rowSave, rowUpdate, rowDel, beforeOpen, searchChange,
+ searchReset, selectionChange, onLoad, currentChange, sizeChange, handleDelete, handleExport, handleUpdate, refreshChange } = usePagePlus({
+ form: form,
+ option: option,
+ queryParams: queryParams,
+ idKey: 'id',
+ page: page.value,
+ getListApi: listBankConfig,
+ getDetailApi: getBankConfig,
+ exportApi: exportBankConfig,
+ deleteApi: delBankConfig,
+ addApi: addBankConfig,
+ updateApi: updateBankConfig,
+ handleUpdateFunc: () => {
+ crudRef.value.rowEdit(selectionList.value[0]);
+ },
+ handleSelectionChangeFunc: (selection: any) => {
+ selectionList.value = selection;
+ },
+ handleEndOpenFunc: (data, obj) => {
+ if (data == 'view') {
+ nextTick(() => {
+ // 寮哄埗灏� row 鐨勫師濮嬫暟鎹�(鍖呭惈'pc') 閲嶆柊鐏屽叆琛ㄥ崟
+ // 杩欒兘瑙e喅浣犳墦鍗颁俊鎭腑鏈�鍚庡嚭鐜扮殑 {} 缃┖闂
+ Object.assign(form.value, obj.data);
+ form.value.accountTypeData = dictFormat(sys_account_type.value, form.value.accountType);
+ form.value.currencyData = dictFormat(sys_currency.value, form.value.currency);
+ form.value.statusData = dictFormat(sys_bank_type.value, form.value.status);
+
+ });
+ }
+
+
+ },
+ })
+const invoiceFormRef = ref();
+const handleAdd = () => {
+ invoiceFormRef.value.openDialog('');
+};
+
+const handleFormSubmit = (data: any) => {
+ if (data.id !== '') {
+
+ updateBankConfig(data).then((res) => {
+ if (res.code == 200) {
+ proxy.$message.success(res.msg);
+ invoiceFormRef.value.handleClose();
+ onLoad(page.value)
+ }
+ });
+ } else {
+ addBankConfig(data).then((res) => {
+ if (res.code == 200) {
+ proxy.$message.success(res.msg);
+ invoiceFormRef.value.handleClose();
+ onLoad(page.value)
+ }
+ });
+ }
+
+
+};
+const handleFy = (row: any) => {
+ getBankConfig(row.id).then((res) => {
+ if (res.code == 200) {
+ invoiceFormRef.value.openDialog(res.data);
+ }
+ });
+};
+
+</script>
diff --git a/ui/admin-ui3/src/views/cwgl/receivableBillManagement/index.vue b/ui/admin-ui3/src/views/cwgl/receivableBillManagement/index.vue
index 5a0b088..4cb4a1d 100644
--- a/ui/admin-ui3/src/views/cwgl/receivableBillManagement/index.vue
+++ b/ui/admin-ui3/src/views/cwgl/receivableBillManagement/index.vue
@@ -1,245 +1,400 @@
<template>
- <basicContainer >
- <avue-crud
- :option="option"
- :table-loading="pageF.loading"
- :data="tableData"
- :page="page"
- :permission="permissionList"
- :before-open="beforeOpen"
- v-model="form"
- ref="crudRef"
- @row-update="rowUpdate"
- @row-save="rowSave"
- @refresh-change="refreshChange"
- @row-del="rowDel"
- @search-change="searchChange"
- @search-reset="searchReset"
- @selection-change="selectionChange"
- @current-change="currentChange"
- @size-change="sizeChange"
- @on-load="onLoad"
- >
+ <basicContainer>
+ <avue-crud :option="option" :table-loading="pageF.loading" :data="tableData" :page="page"
+ :permission="permissionList" :before-open="beforeOpen" v-model="form" ref="crudRef" @row-update="rowUpdate"
+ @row-save="rowSave" @refresh-change="refreshChange" @row-del="rowDel" @search-change="searchChange"
+ @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
+ @size-change="sizeChange" @on-load="onLoad">
<template #menu-left>
- <el-button
- type="success"
- icon="Edit"
- :disabled="pageF.single"
- v-hasPermi="['cwgl:receivableBillManagement:edit']"
- @click="handleUpdate">淇敼
+ <!-- <el-button type="success" icon="Edit" :disabled="pageF.single"
+ v-hasPermi="['cwgl:receivableBillManagement:edit']" @click="handleUpdate">淇敼
</el-button>
- <el-button
- type="danger"
- icon="Delete"
- :disabled="pageF.multiple"
- @click="handleDelete"
- v-hasPermi="['cwgl:receivableBillManagement:remove']"
- >鍒犻櫎
+ <el-button type="danger" icon="Delete" :disabled="pageF.multiple" @click="handleDelete"
+ v-hasPermi="['cwgl:receivableBillManagement:remove']">鍒犻櫎
+ </el-button> -->
+ <el-button type="warning" plain icon="Download" @click="handleExport"
+ v-hasPermi="['cwgl:receivableBillManagement:export']">瀵煎嚭
</el-button>
- <el-button
- type="warning"
- plain
- icon="Download"
- @click="handleExport"
- v-hasPermi="['cwgl:receivableBillManagement:export']"
- >瀵煎嚭
- </el-button>
+ </template>
+ <template #menu="{ size, row, index }">
+ <el-link class="link-btn" type="primary" v-if="row.status == 0 || row.status == 1" :underline="false" plain :size="size" @click="handleSettle(row)"
+ v-hasPermi="['cwgl:receivableBillManagement:view']"> 缁撶畻
+ </el-link>
+ <el-link class="link-btn" type="primary" v-if="row.status == 0 || row.status == 1|| row.status == 3" :underline="false" plain :size="size" @click="handleViewHistory(row)"
+ v-hasPermi="['cwgl:receivableBillManagement:view']"> 缁撶畻鏄庣粏
+ </el-link>
+ <el-link class="link-btn" type="primary" :underline="false" plain :size="size" @click="handleViewFeeDetail(row)"
+ v-hasPermi="['cwgl:receivableBillManagement:view']"> 璇︽儏
+ </el-link>
+ <!-- <el-link class="link-btn" v-if="row.status == 0" type="primary" :underline="false" plain :size="size"
+ icon="el-icon-edit" @click="handleEdit(row)" v-hasPermi="['cwgl:receivableFeeManagement:edit']"> 缂栬緫
+ </el-link> -->
+ <el-link class="link-btn" v-if="row.status == 0" type="primary"
+ :underline="false"
+ plain @click="handleInvalid(row)" v-hasPermi="['cwgl:receivableBillManagement:invalid']"> 浣滃簾
+ </el-link>
+
+ <el-button type="text" icon="View" @click="handleFlow(row)"
+ v-hasPermi="['cwgl:receivableBillManagement:flow']">鏃ュ織</el-button>
+
</template>
</avue-crud>
</basicContainer>
+
+ <SettlementDialog ref="settleDialogRef" :type="currentType" @success="handleRefresh" />
+ <BillSettlementHistory ref="historyRef" :type="activeType" />
+ <NestedDetailDialog ref="feeDetailRef" :type="activeType" />
+ <OperationLogModal ref="logModalRef" />
+
</template>
<script setup name="receivableBillManagement" lang="ts">
- import {ReceivableBillManagementI,addReceivableBillManagement, delReceivableBillManagement, exportReceivableBillManagement, getReceivableBillManagement, listReceivableBillManagement, updateReceivableBillManagement} from "@/api/cwgl/receivableBillManagement";
- import useCurrentInstance from "@/utils/useCurrentInstance";
- import {computed,reactive, ref, toRefs} from "vue";
- import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface";
- import {usePagePlus} from "@/hooks/usePagePlus";
- import {hasPermission} from "@/utils/permissionUtils";
+import { ReceivableBillManagementI, addReceivableBillManagement, delReceivableBillManagement, exportReceivableBillManagement, getReceivableBillManagement, listReceivableBillManagement, updateReceivableBillManagement,receivableBillManagementVoid } from "@/api/cwgl/receivableBillManagement";
+import useCurrentInstance from "@/utils/useCurrentInstance";
+import { computed, reactive, ref, toRefs } from "vue";
+import { PagesInterface, PageQueryInterface } from "@/utils/globalInterface";
+import { usePagePlus } from "@/hooks/usePagePlus";
+import { hasPermission } from "@/utils/permissionUtils";
+import SettlementDialog from '@/components/SettlementDialog/index.vue';
+import BillSettlementHistory from '../../../components/BillSettlementHistory/index.vue';
+import NestedDetailDialog from '../../../components/NestedDetailDialog/index.vue';
+import OperationLogModal from '@/components/OperationLogModal/index.vue';
+ import { listReceivableBillManagementLog} from "@/api/cwgl/receivableBillManagementLog";
- const { proxy } = useCurrentInstance();
- const crudRef = ref();
+import { addReceivableBillSettlementDetail, } from "@/api/cwgl/receivableBillSettlementDetail";
+const { proxy } = useCurrentInstance();
+const crudRef = ref();
- const permissionList = computed(()=>{
- return {
- addBtn: hasPermission(["cwgl:receivableBillManagement:add"]),
- delBtn: hasPermission(["cwgl:receivableBillManagement:remove"]),
- editBtn: hasPermission(["cwgl:receivableBillManagement:edit"]),
- viewBtn: hasPermission(["cwgl:receivableBillManagement:query"]),
- }
- })
+const permissionList = computed(() => {
+ return {
+ addBtn: hasPermission(["cwgl:receivableBillManagement:add"]),
+ delBtn: hasPermission(["cwgl:receivableBillManagement:remove"]),
+ editBtn: hasPermission(["cwgl:receivableBillManagement:edit"]),
+ viewBtn: hasPermission(["cwgl:receivableBillManagement:query"]),
+ }
+})
- const data = reactive({
- form:<ReceivableBillManagementI>{},
- queryParams:<ReceivableBillManagementI&PageQueryInterface>{},
- page: <PagesInterface>{
- pageSize: 10,
- total: 0,
- currentPage: 1,
+const data = reactive({
+ form: <ReceivableBillManagementI>{},
+ queryParams: <ReceivableBillManagementI & PageQueryInterface>{},
+ page: <PagesInterface>{
+ pageSize: 10,
+ total: 0,
+ currentPage: 1,
+ },
+ selectionList: [],
+})
+const { queryParams, form, page, selectionList } = toRefs(data);
+const option = ref({
+ pageKey: 'ReceivableBillManagement',
+ rowKey: 'id',
+ labelWidth: 150,
+ delBtn: false,
+ addBtn: false,
+ viewBtn: false,
+ editBtn: false,
+ searchLabelWidth: 120,
+ column: {
+ // id: {
+ // label: 'ID',
+ // },
+ systemNo: {
+ label: '绯荤粺缂栧彿',
+ minWidth: 150,
+ search: true,
+
+ rules: [
+ {
+ required: true,
+ message: "绯荤粺缂栧彿涓嶈兘涓虹┖", trigger: "blur"
+ }
+ ],
},
- selectionList:[],
- })
- const {queryParams,form,page,selectionList} = toRefs(data);
- const option = ref({
- pageKey: 'ReceivableBillManagement',
- rowKey: 'id',
- column: {
- id: {
- label: 'ID',
- },
- systemNo: {
- label: '绯荤粺缂栧彿',
- rules: [
- {
- required: true,
- message: "绯荤粺缂栧彿涓嶈兘涓虹┖", trigger: "blur" }
- ], },
- billName: {
- label: '璐﹀崟鍚嶇О',
- rules: [
- {
- required: true,
- message: "璐﹀崟鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }
- ], },
- customerName: {
- label: '瀹㈡埛鍚嶇О',
- rules: [
- {
- required: true,
- message: "瀹㈡埛鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }
- ], },
- isInternalSettlement: {
- label: '鏄惁鍐呴儴缁撶畻',
- rules: [
- {
- required: true,
- message: "鏄惁鍐呴儴缁撶畻涓嶈兘涓虹┖", trigger: "blur" }
- ], },
- internalSettlementUnit: {
- label: '鍐呴儴缁撶畻鍗曚綅',
- },
- documentCount: {
- label: '鍗曟嵁鏁伴噺',
- },
- totalAmount: {
- label: '搴旂粨绠楅噾棰�',
- },
- currency: {
- label: '甯佸埗',
- },
- discountAmount: {
- label: '鍑忓厤閲戦',
- },
- receivedAmount: {
- label: '宸叉敹閲戦',
- },
- pendingAmount: {
- label: '寰呮敹閲戦',
- },
- exchangeRate: {
- label: '姹囩巼',
- },
- cnyAmount: {
- label: '浜烘皯甯侀噾棰�',
- },
- periodType: {
- label: '鍛ㄦ湡绫诲瀷',
- rules: [
- {
- required: true,
- message: "鍛ㄦ湡绫诲瀷涓嶈兘涓虹┖", trigger: "change"
- }
- ], },
- businessStartDate: {
- label: '涓氬姟鏈熼棿寮�濮嬫棩鏈�',
- rules: [
- {
- required: true,
- message: "涓氬姟鏈熼棿寮�濮嬫棩鏈熶笉鑳戒负绌�", trigger: "blur" }
- ], },
- businessEndDate: {
- label: '涓氬姟鏈熼棿缁撴潫鏃ユ湡',
- rules: [
- {
- required: true,
- message: "涓氬姟鏈熼棿缁撴潫鏃ユ湡涓嶈兘涓虹┖", trigger: "blur" }
- ], },
- billingStartDate: {
- label: '璐︽湡寮�濮嬫棩鏈�',
- rules: [
- {
- required: true,
- message: "璐︽湡寮�濮嬫棩鏈熶笉鑳戒负绌�", trigger: "blur" }
- ], },
- billingEndDate: {
- label: '璐︽湡缁撴潫鏃ユ湡',
- rules: [
- {
- required: true,
- message: "璐︽湡缁撴潫鏃ユ湡涓嶈兘涓虹┖", trigger: "blur" }
- ], },
- billGenerateDate: {
- label: '璐﹀崟鐢熸垚鏃ユ湡',
- rules: [
- {
- required: true,
- message: "璐﹀崟鐢熸垚鏃ユ湡涓嶈兘涓虹┖", trigger: "blur" }
- ], },
- billSendDate: {
- label: '璐﹀崟鍙戦�佹棩鏈�',
- },
- billDueDate: {
- label: '璐﹀崟鍒版湡鏃ユ湡',
- rules: [
- {
- required: true,
- message: "璐﹀崟鍒版湡鏃ユ湡涓嶈兘涓虹┖", trigger: "blur" }
- ], },
- status: {
- label: '鐘舵��(draft:鑽夌;generated:宸茬敓鎴�;sent:宸插彂閫�;partial_paid:閮ㄥ垎鏀舵;paid:宸叉敹娆�;cancelled:宸插彇娑�)',
- },
- remark: {
- label: '澶囨敞',
- type: 'textarea', minRows: 3, maxRows: 5,
- },
- createBy: {
- label: '鍒涘缓浜�',
- },
- createTime: {
- label: '鍒涘缓鏃堕棿',
- },
- updateBy: {
- label: '鏇存柊浜�',
- },
- updateTime: {
- label: '鏇存柊鏃堕棿',
- },
- deleted: {
- label: '鍒犻櫎鏍囪(0:姝e父;1:鍒犻櫎)',
- },
- }
- })
+ billName: {
+ label: '璐﹀崟鍚嶇О',
+ minWidth: 150,
+ search: true,
- const { tableData,pageF,rowSave,rowUpdate,rowDel,beforeOpen,searchChange,
- searchReset,selectionChange,onLoad,currentChange,sizeChange,handleDelete,handleExport,handleUpdate,refreshChange} = usePagePlus({
- form:form,
- option:option,
- queryParams:queryParams,
- idKey:'id',
- page:page.value,
- getListApi:listReceivableBillManagement,
- getDetailApi:getReceivableBillManagement,
- exportApi:exportReceivableBillManagement,
- deleteApi:delReceivableBillManagement,
- addApi:addReceivableBillManagement,
- updateApi:updateReceivableBillManagement,
- handleUpdateFunc:()=>{
+
+ rules: [
+ {
+ required: true,
+ message: "璐﹀崟鍚嶇О涓嶈兘涓虹┖", trigger: "blur"
+ }
+ ],
+ },
+ customerName: {
+ label: '瀹㈡埛鍚嶇О',
+ minWidth: 150,
+ search: true,
+
+
+ rules: [
+ {
+ required: true,
+ message: "瀹㈡埛鍚嶇О涓嶈兘涓虹┖", trigger: "blur"
+ }
+ ],
+ },
+ // isInternalSettlement: {
+ // label: '鏄惁鍐呴儴缁撶畻',
+ // rules: [
+ // {
+ // required: true,
+ // message: "鏄惁鍐呴儴缁撶畻涓嶈兘涓虹┖", trigger: "blur"
+ // }
+ // ],
+ // },
+ // internalSettlementUnit: {
+ // label: '鍐呴儴缁撶畻鍗曚綅',
+ // },
+ documentCount: {
+ label: '鍗曟嵁鏁伴噺',
+ minWidth: 100,
+
+ },
+ totalAmount: {
+ label: '搴旂粨绠楅噾棰�',
+ minWidth: 100,
+
+ },
+ currency: {
+ label: '甯佸埗',
+ minWidth: 100,
+
+ },
+ discountAmount: {
+ label: '鍑忓厤閲戦',
+ minWidth: 100,
+
+ },
+ receivedAmount: {
+ label: '宸叉敹閲戦',
+ minWidth: 100,
+
+ },
+ pendingAmount: {
+ label: '寰呮敹閲戦',
+ minWidth: 100,
+
+ },
+ // exchangeRate: {
+ // label: '姹囩巼',
+ // },
+ // cnyAmount: {
+ // label: '浜烘皯甯侀噾棰�',
+ // },
+ // 鍦� option 鐨� column 涓慨鏀� periodType
+ periodType: {
+ label: '鍛ㄦ湡绫诲瀷',
+ minWidth: 200, // 澧炲姞瀹藉害浠ュ绾虫棩鏈熻寖鍥�
+
+ },
+ businessStartDateArray: {
+ label: '涓氬姟鏈熼棿',
+ formatter: (row) => {
+ if (row.businessEndDate && row.businessStartDate) {
+ return `${row.businessStartDate} 鑷� ${row.businessEndDate}`;
+ }
+ return row.periodType || '-';
+ }
+ },
+ businessDateArray: {
+ label: '璐﹀崟鍛ㄦ湡',
+ formatter: (row) => {
+ if (row.billingStartDate && row.billingEndDate) {
+ return `${row.billingStartDate} 鑷� ${row.billingEndDate}`;
+ }
+ return row.periodType || '-';
+ }
+ },
+ // businessEndDate: {
+ // label: '涓氬姟鏈熼棿缁撴潫鏃ユ湡',
+ // rules: [
+ // {
+ // required: true,
+ // message: "涓氬姟鏈熼棿缁撴潫鏃ユ湡涓嶈兘涓虹┖", trigger: "blur"
+ // }
+ // ],
+ // },
+ // billingStartDate: {
+ // label: '璐︽湡寮�濮嬫棩鏈�',
+ // rules: [
+ // {
+ // required: true,
+ // message: "璐︽湡寮�濮嬫棩鏈熶笉鑳戒负绌�", trigger: "blur"
+ // }
+ // ],
+ // },
+ // billingEndDate: {
+ // label: '璐︽湡缁撴潫鏃ユ湡',
+ // rules: [
+ // {
+ // required: true,
+ // message: "璐︽湡缁撴潫鏃ユ湡涓嶈兘涓虹┖", trigger: "blur"
+ // }
+ // ],
+ // },
+ billGenerateDate: {
+ label: '璐﹀崟鐢熸垚鏃ユ湡',
+ minWidth: 150,
+
+ rules: [
+ {
+ required: true,
+ message: "璐﹀崟鐢熸垚鏃ユ湡涓嶈兘涓虹┖", trigger: "blur"
+ }
+ ],
+ },
+ billSendDate: {
+ label: '璐﹀崟鍙戦�佹棩鏈�',
+ minWidth: 150,
+
+ },
+ billDueDate: {
+ label: '璐﹀崟鍒版湡鏃ユ湡',
+ minWidth: 150,
+
+ rules: [
+ {
+ required: true,
+ message: "璐﹀崟鍒版湡鏃ユ湡涓嶈兘涓虹┖", trigger: "blur"
+ }
+ ],
+ },
+
+
+ // remark: {
+ // label: '澶囨敞',
+ // type: 'textarea', minRows: 3, maxRows: 5,
+ // },
+ createBy: {
+ label: '鍒涘缓浜�',
+ minWidth: 150,
+
+ },
+ createTime: {
+ label: '鍒涘缓鏃堕棿',
+ minWidth: 200,
+
+ },
+ updateBy: {
+ label: '鏇存柊浜�',
+ minWidth: 150,
+
+ },
+ updateTime: {
+ label: '鏇存柊鏃堕棿',
+ minWidth: 200,
+
+ },
+ status: {
+ label: '鐘舵��',
+ minWidth: 120,
+ fixed: 'right',
+ type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/sys_bill_status',
+ search: true,
+ rules: [
+ {
+ required: true,
+ message: "鐘舵�佷笉鑳戒负绌�", trigger: "blur"
+ }
+ ],
+ },
+ // deleted: {
+ // label: '鍒犻櫎鏍囪(0:姝e父;1:鍒犻櫎)',
+ // },
+ }
+})
+
+const { tableData, pageF, rowSave, rowUpdate, rowDel, beforeOpen, searchChange,
+ searchReset, selectionChange, onLoad, currentChange, sizeChange, handleDelete, handleExport, handleUpdate, refreshChange } = usePagePlus({
+ form: form,
+ option: option,
+ queryParams: queryParams,
+ idKey: 'id',
+ page: page.value,
+ getListApi: listReceivableBillManagement,
+ getDetailApi: getReceivableBillManagement,
+ exportApi: exportReceivableBillManagement,
+ deleteApi: delReceivableBillManagement,
+ addApi: addReceivableBillManagement,
+ updateApi: updateReceivableBillManagement,
+ handleUpdateFunc: () => {
crudRef.value.rowEdit(selectionList.value[0]);
},
- handleSelectionChangeFunc:(selection:any)=>{
+ handleSelectionChangeFunc: (selection: any) => {
selectionList.value = selection;
}
})
+const settleDialogRef = ref()
+const currentType = ref<'receivable' | 'payable'>('receivable')
+const ids = ref('')
+const handleSettle = (row) => {
+ currentType.value = 'receivable'
+ ids.value = row.id
+ getReceivableBillManagement(row.id).then((res) => {
+ if (res.code === 200) {
+ settleDialogRef.value.open(res.data)
+ }
+ })
+
+}
+
+
+const handleRefresh = (data) => {
+ console.log(data);
+ // ids.value
+ data.billId = ids.value
+ addReceivableBillSettlementDetail(data).then((res) => {
+ if (res.code == 200) {
+ settleDialogRef.value.openIshpw()
+ proxy.$modal.msgSuccess(res.msg);
+ onLoad(page.value)
+
+ }
+ })
+}
+// 缁撶畻鍘嗗彶寮圭獥寮曠敤
+const historyRef = ref();
+const activeType = ref('receivable');
+/** 鏌ョ湅缁撶畻璁板綍 */
+const handleViewHistory = (row: any) => {
+ // 鍋囪鐖剁粍浠堕�氳繃鏌愮鏂瑰紡鐭ラ亾褰撳墠鏄簲鏀惰繕鏄簲浠橀�昏緫
+ // 鎴栬�呯洿鎺ヤ粠 row 閲岀殑鏌愪釜瀛楁鍒ゆ柇
+ historyRef.value.open(row);
+};
+
+/* 鑾峰彇缁撶畻鍘嗗彶鏁版嵁 */
+// 2. 瀹氫箟寮曠敤鍜岀被鍨�
+const feeDetailRef = ref();
+
+/** 鏌ョ湅璐圭敤鏄庣粏鎸夐挳鐐瑰嚮浜嬩欢 */
+const handleViewFeeDetail = (row: any) => {
+ // 璁剧疆褰撳墠涓氬姟绫诲瀷锛堝簲鏀堕〉闈紶 'receivable'锛屽簲浠橀〉闈紶 'payable'锛�
+ activeType.value = 'receivable';
+ feeDetailRef.value.open(row);
+
+};
+const handleInvalid = (row: any) => {
+ proxy.$modal.confirm(`鏄惁浣滃簾璇ョ郴缁熺紪鍙� 锛�${row.systemNo}?`).then(function () {
+ return receivableBillManagementVoid(row.id);
+ }).then((res) => {
+ onLoad(page.value);
+ proxy.$modal.msgSuccess(res.msg);
+ })
+
+}
+const logModalRef = ref(null);
+const handleFlow = (row: any,) => {
+ // 杩欓噷鍙互浠� row 涓洿鎺ヨ幏鍙栨棩蹇楋紝鎴栬�呰皟鐢ㄥ悗绔帴鍙f煡璇�
+ listReceivableBillManagementLog({billId:row.id}).then((res) => {
+ if (res.code == 200) {
+ logModalRef.value.open(res.rows,'listReceivableBillManagementLog');
+
+ }
+ });
+}
</script>
diff --git a/ui/admin-ui3/src/views/cwgl/receivableFeeManagement/index.vue b/ui/admin-ui3/src/views/cwgl/receivableFeeManagement/index.vue
index d51b095..3c252df 100644
--- a/ui/admin-ui3/src/views/cwgl/receivableFeeManagement/index.vue
+++ b/ui/admin-ui3/src/views/cwgl/receivableFeeManagement/index.vue
@@ -26,8 +26,8 @@
</el-button>
</template>
<template #menu="{ size, row, index }">
- <el-link class="link-btn" type="primary" :underline="false" plain
- :size="size" icon="View" @click="handleExamine(row)" v-hasPermi="['cwgl:receivableFeeManagement:view']"> 鏌ョ湅
+ <el-link class="link-btn" type="primary" :underline="false" plain :size="size" icon="View"
+ @click="handleExamine(row)" v-hasPermi="['cwgl:receivableFeeManagement:view']"> 鏌ョ湅
</el-link>
<el-link class="link-btn" v-if="row.status == 0" type="primary" :underline="false" plain :size="size"
icon="el-icon-edit" @click="handleEdit(row)" v-hasPermi="['cwgl:receivableFeeManagement:edit']"> 缂栬緫
@@ -54,7 +54,7 @@
<script setup name="receivableFeeManagement" lang="ts">
import {
ReceivableFeeManagementI, addReceivableFeeManagement, delReceivableFeeManagement, exportReceivableFeeManagement, getReceivableFeeManagement, listReceivableFeeManagement, updateReceivableFeeManagement,
- getStatistics, addCreateBill,receivableFeeManagementVoid
+ getStatistics, addCreateBill, receivableFeeManagementVoid
} from "@/api/cwgl/receivableFeeManagement";
import useCurrentInstance from "@/utils/useCurrentInstance";
import { computed, reactive, ref, toRefs } from "vue";
@@ -65,7 +65,7 @@
import GenerateBillDialog from '@/components/GenerateBillDialog/index.vue';
import DetailModal from '@/components/DetailModal/index.vue';
import OperationLogModal from '@/components/OperationLogModal/index.vue';
- import { listReceivableFeeManagementLog} from "@/api/cwgl/receivableFeeManagementLog";
+import { listReceivableFeeManagementLog } from "@/api/cwgl/receivableFeeManagementLog";
@@ -167,6 +167,21 @@
}
],
},
+ receivableAmountStr: {
+ label: '搴旀敹閲戦鎻忚堪',
+ minWidth: 150,
+ search: true,
+ formatter: (row) => {
+ if (!row.receivableAmountStr) return '-';
+ // 灏嗙┖鏍兼浛鎹负鎹㈣绗︺�傚鏋滃悗绔繑鍥炵殑鏄� "0娓竵 2420浜烘皯甯�"
+ // 鎴戜滑灏嗗叾杞崲涓� "0娓竵\n2420浜烘皯甯�"
+ return row.receivableAmountStr.replace(/\s+/g, '\n');
+ },
+ styles: {
+ whiteSpace: 'pre-wrap',
+ lineHeight: '1.5'
+ },
+ },
documentNo: {
label: '鍗曟嵁缂栧彿',
minWidth: 150,
@@ -178,7 +193,7 @@
}
],
},
- isInternalSettlement: {
+ isInternalSettlement: {
label: '鏄惁鍐呴儴缁撶畻',
search: true,
minWidth: 120,
@@ -193,7 +208,7 @@
internalSettlementUnit: {
label: '鍐呴儴缁撶畻鍗曚綅',
minWidth: 150,
- search: true,
+ search: true,
},
customerName: {
label: '瀹㈡埛鍚嶇О',
@@ -319,7 +334,6 @@
search: true,
label: '鐘舵��',
fixed: 'right',
- search: true,
minWidth: 120,
type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/sys_charge',
},
@@ -435,6 +449,7 @@
getStatistics(ids).then((res) => {
if (res.code === 200) {
// 鎵撳紑寮圭獥骞朵紶鍏ユ暟鎹�
+ console.log(selectionList.valu);
billDialogRef.value.open(res.data, selectionList.value);
}
});
@@ -446,9 +461,9 @@
billType: obj.billType,
billName: obj.billName,
statisticsData: statisticsData,
- customerName: selectionList.value[0].customerName,
- isInternalSettlement: selectionList.value[0].isInternalSettlement,
- internalSettlementUnit: selectionList.value[0].internalSettlementUnit,
+ customerName: selectionList.value[0].customerName,
+ isInternalSettlement: selectionList.value[0].isInternalSettlement,
+ internalSettlementUnit: selectionList.value[0].internalSettlementUnit,
};
addCreateBill(payload).then((res) => {
@@ -487,9 +502,9 @@
const handleFlow = (row: any) => {
// 杩欓噷鍙互浠� row 涓洿鎺ヨ幏鍙栨棩蹇楋紝鎴栬�呰皟鐢ㄥ悗绔帴鍙f煡璇�
// 绀轰緥妯℃嫙鏁版嵁
- listReceivableFeeManagementLog({receivableFeeId:row.id}).then((res) => {
+ listReceivableFeeManagementLog({ receivableFeeId: row.id }).then((res) => {
if (res.code == 200) {
- logModalRef.value.open(res.rows);
+ logModalRef.value.open(res.rows,'listReceivableFeeManagementLog');
}
});
@@ -504,3 +519,10 @@
};
</script>
+<style scoped>
+/* 纭繚 el-table 鑳藉璇嗗埆鎹㈣绗� */
+:deep(.el-table .cell) {
+ white-space: pre-wrap !important;
+ word-break: break-all;
+}
+</style>
--
Gitblit v1.8.0