✨ 收票单推送金蝶与票池实时游标分页前端适配:选票弹窗hasMore分页,下线镜像补查与票池同步入口,保存时按票号重查回填
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
<el-col :span="6">
|
||||
<el-form-item label="开票金额">
|
||||
<el-input
|
||||
:model-value="form.kingdeeInvoicePoolId ? formatMoney(form.invoiceAmount) : ''"
|
||||
:model-value="form.invoiceNo ? formatMoney(form.invoiceAmount) : ''"
|
||||
disabled
|
||||
placeholder="从金蝶票据池带出"
|
||||
/>
|
||||
@@ -56,7 +56,7 @@
|
||||
<el-col :span="6">
|
||||
<el-form-item label="税额">
|
||||
<el-input
|
||||
:model-value="form.kingdeeInvoicePoolId ? formatMoney(form.taxAmount) : ''"
|
||||
:model-value="form.invoiceNo ? formatMoney(form.taxAmount) : ''"
|
||||
disabled
|
||||
placeholder="从金蝶票据池带出"
|
||||
/>
|
||||
@@ -154,8 +154,6 @@
|
||||
title="查询金蝶票据池"
|
||||
:initial-invoice-no="form.invoiceNo"
|
||||
:query-api="apiQueryInvoicePool"
|
||||
:fetch-api="apiFetchInvoicePool"
|
||||
:sync-api="apiSyncInvoicePool"
|
||||
@confirm="handleInvoicePicked"
|
||||
/>
|
||||
|
||||
@@ -217,7 +215,6 @@ import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.v
|
||||
|
||||
const emptyForm = () => ({
|
||||
id: null,
|
||||
kingdeeInvoicePoolId: null,
|
||||
invoiceNo: '',
|
||||
invoiceDate: '',
|
||||
invoiceType: '',
|
||||
@@ -302,12 +299,6 @@ export default {
|
||||
apiQueryInvoicePool(params) {
|
||||
return api.queryInvoicePool(params);
|
||||
},
|
||||
apiFetchInvoicePool(invoiceNo) {
|
||||
return api.fetchInvoicePoolByNo(invoiceNo);
|
||||
},
|
||||
apiSyncInvoicePool() {
|
||||
return api.syncInvoicePool();
|
||||
},
|
||||
handleInvoicePicked(rows) {
|
||||
this.confirmInvoice(rows[0]);
|
||||
},
|
||||
@@ -356,7 +347,7 @@ export default {
|
||||
if (this.settlementIds.length) await this.loadReferenceInformation();
|
||||
},
|
||||
validateInvoice(rule, value, callback) {
|
||||
if (!value || !this.form.kingdeeInvoicePoolId) {
|
||||
if (!value) {
|
||||
callback(new Error('请选择金蝶票据池发票'));
|
||||
return;
|
||||
}
|
||||
@@ -393,7 +384,6 @@ export default {
|
||||
}
|
||||
const preserveUserInput = options.preserveUserInput === true;
|
||||
Object.assign(this.form, {
|
||||
kingdeeInvoicePoolId: selected.id,
|
||||
invoiceNo: selected.invoiceNo,
|
||||
invoiceDate: selected.invoiceDate,
|
||||
invoiceType: selected.invoiceType,
|
||||
@@ -517,7 +507,6 @@ export default {
|
||||
payload() {
|
||||
return {
|
||||
id: this.form.id,
|
||||
kingdeeInvoicePoolId: this.form.kingdeeInvoicePoolId,
|
||||
invoiceNo: this.form.invoiceNo,
|
||||
invoiceDate: this.form.invoiceDate,
|
||||
invoiceType: this.form.invoiceType,
|
||||
@@ -567,8 +556,15 @@ export default {
|
||||
this.$message.warning('请先选择金蝶票据池发票');
|
||||
return;
|
||||
}
|
||||
const invoice = this.unwrapData(await api.fetchInvoicePoolByNo(this.form.invoiceNo));
|
||||
if (!invoice || !this.confirmInvoice(invoice, { preserveUserInput: true })) return;
|
||||
const data = this.unwrapData(
|
||||
await api.queryInvoicePool({ current: 1, size: 1, invoiceNo: this.form.invoiceNo })
|
||||
);
|
||||
const invoice = (data.records || []).find(item => item.invoiceNo === this.form.invoiceNo);
|
||||
if (!invoice) {
|
||||
this.$message.warning('金蝶票池未查询到该发票');
|
||||
return;
|
||||
}
|
||||
if (!this.confirmInvoice(invoice, { preserveUserInput: true })) return;
|
||||
if (this.settlementIds.length) await this.loadReferenceInformation();
|
||||
this.$message.success('同步成功');
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user