✨ MK公开页、预结算体验优化、地图选址与认证密码规则完善
This commit is contained in:
@@ -364,7 +364,7 @@
|
||||
@click="submitForm"
|
||||
>提交</el-button
|
||||
>
|
||||
<el-button @click="goBack">返回</el-button>
|
||||
<el-button v-if="!isPublicViewPage" @click="goBack">返回</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-dialog
|
||||
@@ -596,6 +596,7 @@ import '@open-file-viewer/core/style.css';
|
||||
import pdfWorkerSrc from 'pdfjs-dist/build/pdf.worker.mjs?url';
|
||||
import { mapGetters } from 'vuex';
|
||||
import * as api from '@/api/payment/paymentApplication';
|
||||
import { getMkPublicDetail } from '@/api/mk-process';
|
||||
import * as billLedgerApi from '@/api/payment/billLedger';
|
||||
import { getDictionary } from '@/api/system/dictbiz';
|
||||
import { getList as getProjectList } from '@/api/business/project-apply';
|
||||
@@ -791,7 +792,10 @@ export default {
|
||||
return this.$route.query.id || '';
|
||||
},
|
||||
readonly() {
|
||||
return this.$route.query.mode === 'view';
|
||||
return this.$route.query.mode === 'view' || this.isPublicViewPage;
|
||||
},
|
||||
isPublicViewPage() {
|
||||
return this.$route.path === '/payment/payment-application/public-view';
|
||||
},
|
||||
canSave() {
|
||||
const code = this.recordId ? 'payment_application_edit' : 'payment_application_add';
|
||||
@@ -1036,7 +1040,55 @@ export default {
|
||||
const body = response?.data || response || {};
|
||||
return body?.data || body;
|
||||
},
|
||||
async loadPublicDetail() {
|
||||
if (!this.recordId) return;
|
||||
const data = this.unwrapData(
|
||||
await getMkPublicDetail('payment-application', this.recordId)
|
||||
);
|
||||
this.form = {
|
||||
...emptyForm(),
|
||||
...data,
|
||||
preSettlementIds: data.preSettlementIds?.length
|
||||
? data.preSettlementIds
|
||||
: data.preSettlementId
|
||||
? [data.preSettlementId]
|
||||
: [],
|
||||
attachments: this.parse(data.attachmentsJson),
|
||||
invoices: data.invoices || [],
|
||||
};
|
||||
if (this.form.paymentMethod) {
|
||||
this.paymentMethodOptions = [
|
||||
{
|
||||
label: this.form.paymentMethodName || this.form.paymentMethod,
|
||||
value: this.form.paymentMethod,
|
||||
},
|
||||
];
|
||||
}
|
||||
if (this.form.projectId) {
|
||||
this.projectOptions = [
|
||||
{
|
||||
id: this.form.projectId,
|
||||
projectName: this.form.projectName || this.form.projectCode,
|
||||
},
|
||||
];
|
||||
}
|
||||
if (this.form.contractId) {
|
||||
this.contractOptions = [
|
||||
{
|
||||
id: this.form.contractId,
|
||||
contractName: this.form.contractName || this.form.contractNo,
|
||||
},
|
||||
];
|
||||
}
|
||||
const referenceRow = this.createReferenceRow(data);
|
||||
this.referenceRows = referenceRow.settlementNo ? [referenceRow] : [];
|
||||
this.paymentRecords = data.paymentRecords || [];
|
||||
},
|
||||
async initialize() {
|
||||
if (this.isPublicViewPage) {
|
||||
await this.loadPublicDetail();
|
||||
return;
|
||||
}
|
||||
await this.loadPaymentMethodOptions();
|
||||
if (this.recordId) {
|
||||
const data = this.unwrapData(await api.getDetail(this.recordId));
|
||||
|
||||
Reference in New Issue
Block a user