{{ formatDate(item.StartDate) }}
~
{{ formatDate(item.EndDate) }}
@@ -59,6 +59,9 @@ export default {
methods: {
formatDate,
dateCountDown,
+ goToExhibition(){
+ this.$router.push(this.localePath(`/exhibition/${this.item.ExhibitionID}`));
+ }
},
};
diff --git a/FrontEnd/components/service/Company.vue b/FrontEnd/components/service/Company.vue
index e4bb779..958ab00 100644
--- a/FrontEnd/components/service/Company.vue
+++ b/FrontEnd/components/service/Company.vue
@@ -6,7 +6,7 @@
|
@@ -28,7 +28,7 @@
|
@@ -51,7 +51,7 @@
|
@@ -75,7 +75,7 @@
|
@@ -98,7 +98,7 @@
|
@@ -149,7 +149,7 @@
|
@@ -398,7 +398,8 @@ export default {
return formData;
// this.validators();
// if (this.validators()) {
- // const patchData = JSON.parse(JSON.stringify(this.formData));
+
+ // // const patchData = JSON.parse(JSON.stringify(this.formData));
// // this.$axios
// // .post(
// // `/member/contacts?jwt=${
@@ -416,40 +417,53 @@ export default {
// // .catch((err) => {
// // console.log(err);
// // });
+ // }else{
+ // return null;
// }
},
validators() {
- // if (is.empty(this.formData.first_name)) {
- // this.validation.first_name = false;
- // } else {
- // this.validation.first_name = true;
- // }
- // if (is.empty(this.formData.last_name)) {
- // this.validation.last_name = false;
- // } else {
- // this.validation.last_name = true;
- // }
- // if (is.empty(this.formData.email) || is.not.email(this.formData.email)) {
- // this.validation.email = false;
- // } else {
- // this.validation.email = true;
- // }
- // if (
- // is.empty(this.formData.phone_number) &&
- // is.number(this.formData.phone_number)
- // ) {
- // this.validation.phone_number = false;
- // } else {
- // this.validation.phone_number = true;
- // }
- // this.errors = Object.entries(this.validation).filter(
- // (e) => e[1] == false
- // );
- // if (this.errors.length > 0) {
- // return false;
- // } else {
- // return true;
- // }
+ if (is.empty(this.formData.company_name)) {
+ this.validation.company_name = false;
+ } else {
+ this.validation.company_name = true;
+ }
+ if (is.empty(this.formData.unified_number)) {
+ this.validation.unified_number = false;
+ } else {
+ this.validation.unified_number = true;
+ }
+ if (is.empty(this.formData.company_address)) {
+ this.validation.company_address = false;
+ } else {
+ this.validation.company_address = true;
+ }
+
+ if (is.empty(this.formData.city_)) {
+ this.validation.city_ = false;
+ } else {
+ this.validation.city_ = true;
+ }
+
+ if (is.empty(this.formData.state_or_province)) {
+ this.validation.state_or_province = false;
+ } else {
+ this.validation.state_or_province = true;
+ }
+
+ if (is.empty(this.formData.postal_code)) {
+ this.validation.postal_code = false;
+ } else {
+ this.validation.postal_code = true;
+ }
+
+ this.errors = Object.entries(this.validation).filter(
+ (e) => e[1] == false
+ );
+ if (this.errors.length > 0) {
+ return false;
+ } else {
+ return true;
+ }
},
},
};
diff --git a/FrontEnd/components/service/PurchaserInfo.vue b/FrontEnd/components/service/PurchaserInfo.vue
index d7f806d..08f6f46 100644
--- a/FrontEnd/components/service/PurchaserInfo.vue
+++ b/FrontEnd/components/service/PurchaserInfo.vue
@@ -550,10 +550,13 @@ export default {
break;
case "Company":
this.$emit("type", "Company");
- this.Company = this.$refs.ref_company.getFormData();
- this.$emit("company", this.Company);
- this.purchaserValidation = true;
- this.$emit("purchaserInfo_validation", this.purchaserValidation);
+ this.$refs.ref_company.validators();
+ if(this.$refs.ref_company.validators()){
+ this.Company = this.$refs.ref_company.getFormData();
+ this.$emit("company", this.Company);
+ this.purchaserValidation = true;
+ this.$emit("purchaserInfo_validation", this.purchaserValidation);
+ }
break;
}
@@ -563,7 +566,10 @@ export default {
this.updateIndividual();
}
}
- this.updateCompany();
+ if (this.$refs.ref_company.validators()) {
+ this.updateCompany();
+ }
+
}
},
diff --git a/FrontEnd/pages/service/_id.vue b/FrontEnd/pages/service/_id.vue
index 4a8fc21..92f237f 100644
--- a/FrontEnd/pages/service/_id.vue
+++ b/FrontEnd/pages/service/_id.vue
@@ -915,6 +915,7 @@ export default {
ChangeCosts(data){
let totalPrice = 0;
this.totalPrice = 0;
+ this.rulesShow = false;
// let selectExhibitionData = this.$refs.ref_selectExhibition.formData;
let selectExhibitionServiceData = [];
if(this.selectExhibitionServiceList.length>0){
diff --git a/FrontEnd/plugins/storeCache.js b/FrontEnd/plugins/storeCache.js
new file mode 100644
index 0000000..56e2403
--- /dev/null
+++ b/FrontEnd/plugins/storeCache.js
@@ -0,0 +1,14 @@
+export default function(ctx){
+ //离开页面 刷新前 将store中的数据存到session
+ window.addEventListener('beforeunload', ()=> {
+ sessionStorage.setItem("storeCache",JSON.stringify(ctx.store.state))
+ });
+ //页面加载完成 将session中的store数据
+ window.addEventListener('load', ()=> {
+ let storeCache = sessionStorage.getItem("storeCache")
+ if(storeCache){
+ // 将session中的store数据替换到store中
+ ctx.store.replaceState(JSON.parse(storeCache));
+ }
+ });
+}