This commit is contained in:
2026-08-25 00:10:45 +08:00
parent e1bade226f
commit 1ef050dda6
35 changed files with 2041 additions and 263 deletions
+19 -1
View File
@@ -14,6 +14,7 @@
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@@ -40,6 +41,7 @@
v-model="form.feeCategory"
class="fee-item-form-control"
clearable
:disabled="dialogType !== 'add'"
filterable
placeholder="请选择费用类型"
@change="handleFeeCategoryChange"
@@ -58,6 +60,7 @@
:maxlength="feeItemCodeMaxlength"
class="fee-item-form-control"
clearable
:disabled="dialogType !== 'add'"
placeholder="请输入费用项代码"
@change="handleFeeItemCodeChange"
>
@@ -114,12 +117,14 @@ export default {
data: [],
excelBox: false,
excelForm: {},
dialogType: 'add',
feeCategoryOptions: [],
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
selectionList: [],
option: {
height: 'auto',
calcHeight: 32,
@@ -139,7 +144,7 @@ export default {
viewBtn: false,
delBtn: false,
editBtn: false,
selection: false,
selection: true,
dialogClickModal: false,
menuWidth: 180,
column: [
@@ -294,6 +299,9 @@ export default {
feeItemCodeMaxlength() {
return Math.max(1, 100 - this.feeCategoryPrefix.length);
},
ids() {
return this.selectionList.map(item => item.id).join(',');
},
permissionList() {
return {
addBtn: this.validData(this.permission.fee_item_add, false),
@@ -418,6 +426,7 @@ export default {
});
},
beforeOpen(done, type) {
this.dialogType = type || 'add';
if (['edit', 'view'].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = this.normalizeFormForEdit(res.data.data || {});
@@ -439,6 +448,13 @@ export default {
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
@@ -454,6 +470,7 @@ export default {
buildExportParams() {
return {
...this.query,
ids: this.ids,
[this.website.tokenHeader]: getToken(),
};
},
@@ -490,6 +507,7 @@ export default {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.selectionClear();
this.loading = false;
});
},