1、调整收付款

2、调整基础配置
3、调整结算
This commit is contained in:
2026-09-01 17:35:53 +08:00
parent f858eb2bcd
commit 80a15fc626
7 changed files with 932 additions and 121 deletions
+49 -19
View File
@@ -35,7 +35,6 @@
v-model="form.feeCategory"
class="fee-item-form-control"
clearable
:disabled="dialogType !== 'add'"
filterable
placeholder="请选择费用类型"
@change="handleFeeCategoryChange"
@@ -43,7 +42,7 @@
<el-option
v-for="item in feeCategoryOptions"
:key="item.id || item.dictKey"
:label="item.dictValue"
:label="`${item.dictValue}/${item.dictKey}`"
:value="item.dictKey"
/>
</el-select>
@@ -54,7 +53,6 @@
:maxlength="feeItemCodeMaxlength"
class="fee-item-form-control"
clearable
:disabled="dialogType !== 'add'"
placeholder="请输入费用项代码"
@change="handleFeeItemCodeChange"
>
@@ -339,31 +337,63 @@ export default {
values.englishName = this.getFeeItemCodeSuffix(values.englishName, values.feeCategory);
return values;
},
validateUnique(row) {
const rowId = String(row.id || '');
const hasDuplicate = (params, prop) => {
if (!row[prop]) {
return Promise.resolve(false);
}
return getList(1, 100, params).then(res => {
const records = res.data.data.records || [];
return records.some(
item =>
String(item[prop] || '').trim() === String(row[prop]).trim() &&
String(item.id || '') !== rowId
);
});
};
return Promise.all([
hasDuplicate({ name: row.name }, 'name'),
hasDuplicate({ englishName: row.englishName }, 'englishName'),
]).then(([nameExists, codeExists]) => {
if (nameExists) {
return Promise.reject(new Error('该费用项已存在'));
}
if (codeExists) {
return Promise.reject(new Error('该费用项代码已存在'));
}
return Promise.resolve();
});
},
handleSubmitError(error, loading) {
const uniqueMessages = ['该费用项已存在', '该费用项代码已存在'];
if (uniqueMessages.includes(error.message)) {
this.$message.warning(error.message);
}
window.console.log(error);
loading();
},
rowSave(row, done, loading) {
submit(this.normalizeRow(row)).then(
() => {
const submitRow = this.normalizeRow(row);
this.validateUnique(submitRow)
.then(() => submit(submitRow))
.then(() => {
this.onLoad(this.page);
this.$message({ type: 'success', message: '操作成功!' });
done();
},
error => {
window.console.log(error);
loading();
}
);
})
.catch(error => this.handleSubmitError(error, loading));
},
rowUpdate(row, index, done, loading) {
submit(this.normalizeRow(row)).then(
() => {
const submitRow = this.normalizeRow(row);
this.validateUnique(submitRow)
.then(() => submit(submitRow))
.then(() => {
this.onLoad(this.page);
this.$message({ type: 'success', message: '操作成功!' });
done();
},
error => {
window.console.log(error);
loading();
}
);
})
.catch(error => this.handleSubmitError(error, loading));
},
rowDel(row) {
this.$confirm('确定将选择数据删除?', {