feat: update appraisal ordering and payment flows

This commit is contained in:
wushumin
2026-06-03 18:14:40 +08:00
parent 0838db5aba
commit 6383ec5a2a
50 changed files with 6143 additions and 988 deletions

View File

@@ -96,6 +96,10 @@ export const useAppraisalStore = defineStore("appraisal", {
draftId: 0,
serviceProvider: "anxinyan",
serviceMode: "physical",
pricePackageId: 0,
pricePackageName: "",
pricePackageCode: "",
pricePackagePrice: 0,
currentStep: 1,
product: initialProduct(),
extra: initialExtra(),
@@ -128,6 +132,10 @@ export const useAppraisalStore = defineStore("appraisal", {
draftId: this.draftId,
serviceProvider: this.serviceProvider,
serviceMode: this.serviceMode,
pricePackageId: this.pricePackageId,
pricePackageName: this.pricePackageName,
pricePackageCode: this.pricePackageCode,
pricePackagePrice: this.pricePackagePrice,
currentStep: this.currentStep,
product: this.product,
extra: this.extra,
@@ -144,6 +152,18 @@ export const useAppraisalStore = defineStore("appraisal", {
this.serviceProvider = serviceProvider;
this.persist();
},
setPricePackage(payload: {
id: number;
packageName: string;
packageCode: string;
price: number;
}) {
this.pricePackageId = payload.id;
this.pricePackageName = payload.packageName;
this.pricePackageCode = payload.packageCode;
this.pricePackagePrice = payload.price;
this.persist();
},
setDraft(id: number) {
this.draftId = id;
this.persist();
@@ -255,6 +275,10 @@ export const useAppraisalStore = defineStore("appraisal", {
resetForNewFlow() {
this.serviceProvider = "anxinyan";
this.serviceMode = "physical";
this.pricePackageId = 0;
this.pricePackageName = "";
this.pricePackageCode = "";
this.pricePackagePrice = 0;
this.draftId = 0;
this.currentStep = 1;
this.product = initialProduct();