From 6483982ce6ab1261d3ef5cc2f7eec4dc4b74c74a Mon Sep 17 00:00:00 2001 From: "DESKTOP-FUS91B7\\Showeasy" Date: Mon, 20 Mar 2023 16:29:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=84=A1=E7=99=BB=E5=85=A5=E7=8B=80=E6=85=8B?= =?UTF-8?q?=E4=B8=8B=E5=96=AE=E5=8A=9F=E8=83=BD(=E6=9C=AA=E5=AE=8C?= =?UTF-8?q?=E6=88=90)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/service/OrderingPersonInfo.vue | 219 +++++++++++++----- FrontEnd/pages/service/_id.vue | 4 + FrontEnd/pages/service/checkout/_id.vue | 71 +++++- 3 files changed, 231 insertions(+), 63 deletions(-) diff --git a/FrontEnd/components/service/OrderingPersonInfo.vue b/FrontEnd/components/service/OrderingPersonInfo.vue index a8a1cd1..056134a 100644 --- a/FrontEnd/components/service/OrderingPersonInfo.vue +++ b/FrontEnd/components/service/OrderingPersonInfo.vue @@ -17,11 +17,11 @@ ]" @click="show = !show" > - {{ $t("Purchaser Info") }} + {{ $t("Ordering person") }}
@@ -31,47 +31,12 @@
- - -
-
+
+ +
+ +
+ +
+ >
- - -
+ + + + +
+ +
+
-
-
- +
@@ -167,6 +137,11 @@ import is from "is_js"; export default { name: "OrderingPersonInfo", + props: { + countryOptions: { + type: Array, + }, + }, components: { elementInput, elementSelect, @@ -176,6 +151,18 @@ export default { }, data() { return { + show: false, + disabled: false, + orderingPersonValidation: false, + userData: { + first_name: "", + last_name: "", + email: "", + phone_number: "", + country: "0", + phone_code: "", + UserCompany: [], + }, validation: { first_name: true, last_name: true, @@ -186,12 +173,124 @@ export default { }, } }, - created() {}, + created() { + this.getUser() + }, watch: {}, - methods: {} + methods: { + async getUser() { + await this.$axios + .get(`/trending/api/Onsite/MemberInfo`) + .then((res) => { + + if(res && res.data && res.data.DATA && res.data.DATA.rel){ + const data = res.data.DATA.rel + if(data){ + this.userData.first_name = data.FirstName; + this.userData.last_name = data.LastName; + this.userData.email = data.Email; + this.userData.phone_number = data.Phone; + this.userData.country = data.CountryID; + this.userData.phone_code = data.PhoneCode; + } + } + + }) + }, + getReturnCode(code){ + this.userData.phone_code = code; + }, + getPhoneData(phoneData) { + this.validation.phone_number = phoneData.isValid; + }, + } } diff --git a/FrontEnd/pages/service/_id.vue b/FrontEnd/pages/service/_id.vue index 3bdde9d..fa6cead 100644 --- a/FrontEnd/pages/service/_id.vue +++ b/FrontEnd/pages/service/_id.vue @@ -1,5 +1,6 @@