Compare commits

..

7 Commits

Author SHA1 Message Date
woody 07407ee670 feat(index.html): update tab icon 2025-09-04 10:28:55 +08:00
woody 91b0bcfa45 feat(index): update logo 2025-08-28 15:56:58 +08:00
woody 39fab98d95 chore(env): update pro env 2025-08-28 15:41:55 +08:00
woody c32f286230 feat(personal): 隐藏邮箱设置入口 2025-08-28 14:32:11 +08:00
woody b3a64cba8b feat(argeement): 隐藏协议 2025-08-28 14:18:55 +08:00
woody b304daea28 chore(env): update env 2025-08-28 13:44:55 +08:00
woody edc69ae054 chore(env): update env 2025-08-15 13:54:53 +08:00
21 changed files with 7716 additions and 6598 deletions

View File

@ -1,7 +1,7 @@
# just a flag # just a flag
ENV = 'development' ENV = 'development'
# base api # base api
VUE_APP_BASE_API = 'http://f.hzs413.com/inter-api/' VUE_APP_BASE_API = '/prod-api'
VUE_APP_BASE_INTERAPI = 'https://dny-test.s3.ap-southeast-1.amazonaws.com/online/language' VUE_APP_BASE_INTERAPI = 'https://bd-qd.oss-cn-beijing.aliyuncs.com/test_africa/language'
VUE_APP_BASE_INTERAPI2 = 'http://f.hzs413.com/language' VUE_APP_BASE_INTERAPI2 = 'https://bd-qd.oss-cn-beijing.aliyuncs.com/test_africa/language'

View File

@ -2,8 +2,8 @@
ENV = 'production' ENV = 'production'
# base api # base api
VUE_APP_BASE_API = '/inter-api' VUE_APP_BASE_API = '/prod-api'
VUE_APP_BASE_API1 = 'http://index.hzs413.com' VUE_APP_BASE_API1 = 'http://index.hzs413.com'
VUE_APP_BASE_INTERAPI = 'https://dny-test.s3.ap-southeast-1.amazonaws.com/test/language' VUE_APP_BASE_INTERAPI = 'https://agl413-test.s3.af-south-1.amazonaws.com/test'
VUE_APP_BASE_INTERAPI2 = 'https://dny-test.s3.ap-southeast-1.amazonaws.com/test/language' VUE_APP_BASE_INTERAPI2 = 'http://ma.angelo413.com/lang'

View File

@ -2,7 +2,8 @@
ENV = 'test' ENV = 'test'
# base api # base api
VUE_APP_BASE_API = 'http://f.hzs413.com/inter-api/' VUE_APP_BASE_API = '/prod-api'
VUE_APP_BASE_INTERAPI = 'https://dny-test.s3.ap-southeast-1.amazonaws.com/test/language' VUE_APP_BASE_API1 = 'http://index.hzs413.com'
VUE_APP_BASE_INTERAPI2 = 'https://dny-test.s3.ap-southeast-1.amazonaws.com/test/language' VUE_APP_BASE_INTERAPI = 'https://bd-qd.oss-cn-beijing.aliyuncs.com/test_africa/language'
VUE_APP_BASE_INTERAPI2 = 'https://bd-qd.oss-cn-beijing.aliyuncs.com/test_africa/language'
VUE_APP_BASE_AREA = '' VUE_APP_BASE_AREA = ''

View File

@ -10,7 +10,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>tab-icon.png">
<title><%= htmlWebpackPlugin.options.title %></title> <title><%= htmlWebpackPlugin.options.title %></title>
<!-- <script src="https://hzs-in.oss-cn-beijing.aliyuncs.com/test-africa/language/zh-CN.js"></script> --> <!-- <script src="https://hzs-in.oss-cn-beijing.aliyuncs.com/test-africa/language/zh-CN.js"></script> -->
<!-- <script src="https://dny-test.s3.ap-southeast-1.amazonaws.com/test/language/zh-CN.js"></script> --> <!-- <script src="https://dny-test.s3.ap-southeast-1.amazonaws.com/test/language/zh-CN.js"></script> -->

BIN
public/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
public/tab-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

View File

@ -17,9 +17,7 @@
import HeaderTop from "@/components/HeaderTop"; import HeaderTop from "@/components/HeaderTop";
import enLocale from "element-ui/lib/locale/lang/en"; import enLocale from "element-ui/lib/locale/lang/en";
import zhLocale from "element-ui/lib/locale/lang/zh-CN"; import zhLocale from "element-ui/lib/locale/lang/zh-CN";
import ruLocale from "element-ui/lib/locale/lang/ru-RU";
import frLocale from "element-ui/lib/locale/lang/fr";
import ptLocale from "element-ui/lib/locale/lang/pt";
import { env } from "echarts"; import { env } from "echarts";
export default { export default {
components: { components: {
@ -36,7 +34,6 @@ export default {
self.loading = false; self.loading = false;
self.addScriptChild("zh-CN"); self.addScriptChild("zh-CN");
self.addScriptChild("en-US"); self.addScriptChild("en-US");
self.addScriptChild("ru-RU");
self.addScriptChild("fr-FR"); self.addScriptChild("fr-FR");
if (process.env.NODE_ENV != "production") { if (process.env.NODE_ENV != "production") {
// self.addScriptChild("fr-FR"); // self.addScriptChild("fr-FR");
@ -150,14 +147,7 @@ export default {
...enLocale, ...enLocale,
}); });
} }
if (name == "ru-RU") {
if (ruRU) {
const localruRU = this.getJS(ruRU, "ruRU");
var STlocalruRU = JSON.stringify(localruRU);
localStorage.setItem("local-ruRU", STlocalruRU);
}
this.$i18n.mergeLocaleMessage(name, ruRU);
}
if (name == "fr-FR") { if (name == "fr-FR") {
if (frFR) { if (frFR) {
const localfrFR = this.getJS(frFR, "frFR"); const localfrFR = this.getJS(frFR, "frFR");

View File

@ -4,43 +4,42 @@
* @Author: kBank * @Author: kBank
* @Date: 2022-07-05 17:57:49 * @Date: 2022-07-05 17:57:49
*/ */
import Vue from 'vue' import Vue from "vue";
import VueI18n from 'vue-i18n' import VueI18n from "vue-i18n";
import locale from 'element-ui/lib/locale' import locale from "element-ui/lib/locale";
// import zhCn from 'zhCN' // import zhCn from 'zhCN'
// import enUS from 'enUS' // import enUS from 'enUS'
// import ruRU from 'ruRU' // import ruRU from 'ruRU'
// import frFR from 'frFR' // import frFR from 'frFR'
// import ptPT from 'ptPT' // import ptPT from 'ptPT'
var localenUS = {} var localenUS = {};
var localzhCN = {} var localzhCN = {};
var localruRU = {} var localruRU = {};
var localfrFR = {} var localfrFR = {};
var localptPT = {} var localptPT = {};
if (localStorage.getItem('local-enUS') != undefined) { if (localStorage.getItem("local-enUS") != undefined) {
localenUS = JSON.parse(localStorage.getItem('local-enUS')); localenUS = JSON.parse(localStorage.getItem("local-enUS"));
} }
if (localStorage.getItem('local-zhCN') != undefined) { if (localStorage.getItem("local-zhCN") != undefined) {
localzhCN = JSON.parse(localStorage.getItem('local-zhCN')); localzhCN = JSON.parse(localStorage.getItem("local-zhCN"));
} }
if (localStorage.getItem('local-ruRU') != undefined) { if (localStorage.getItem("local-ruRU") != undefined) {
localruRU = JSON.parse(localStorage.getItem('local-ruRU')); localruRU = JSON.parse(localStorage.getItem("local-ruRU"));
} }
if (localStorage.getItem('local-frFR') != undefined) { if (localStorage.getItem("local-frFR") != undefined) {
localfrFR = JSON.parse(localStorage.getItem('local-frFR')); localfrFR = JSON.parse(localStorage.getItem("local-frFR"));
} }
if (localStorage.getItem('local-ptPT') != undefined) { if (localStorage.getItem("local-ptPT") != undefined) {
localptPT = JSON.parse(localStorage.getItem('local-ptPT')); localptPT = JSON.parse(localStorage.getItem("local-ptPT"));
} }
import enLocale from 'element-ui/lib/locale/lang/en' import enLocale from "element-ui/lib/locale/lang/en";
import zhLocale from 'element-ui/lib/locale/lang/zh-CN' import zhLocale from "element-ui/lib/locale/lang/zh-CN";
import ruLocale from 'element-ui/lib/locale/lang/ru-RU' import frLocale from "element-ui/lib/locale/lang/fr";
import frLocale from 'element-ui/lib/locale/lang/fr' import ptLocale from "element-ui/lib/locale/lang/pt";
import ptLocale from 'element-ui/lib/locale/lang/pt' const lang = localStorage.getItem("lang") || "en-US";
const lang = localStorage.getItem('lang') || 'en-US'
Vue.use(VueI18n) Vue.use(VueI18n);
console.log('18n') console.log("18n");
const i18n = new VueI18n({ const i18n = new VueI18n({
locale: lang, locale: lang,
@ -51,30 +50,24 @@ const i18n = new VueI18n({
// 'ru-RU': { ...ruRU }, // 'ru-RU': { ...ruRU },
// 'fr-FR': { ...frFR }, // 'fr-FR': { ...frFR },
// 'pt-PT': { ...ptPT }, // 'pt-PT': { ...ptPT },
'zh-CN': { "zh-CN": {
...localzhCN, ...localzhCN,
...zhLocale ...zhLocale,
}, },
'en-US': { "en-US": {
...localenUS, ...localenUS,
...enLocale ...enLocale,
}, },
'ru-RU': {
...localruRU, "fr-FR": {
...ruLocale
},
'fr-FR': {
...localfrFR, ...localfrFR,
...frLocale ...frLocale,
}, },
'pt-PT': { "pt-PT": {
...localptPT, ...localptPT,
...ptLocale ...ptLocale,
}, },
} },
});
}) locale.i18n((key, value) => i18n.t(key, value));
locale.i18n((key, value) => i18n.t(key, value)) export default i18n;
export default i18n

View File

@ -13,20 +13,17 @@
<template> <template>
<div class="agreementBox flex_ac" v-if="userInfo.buyAgreementFlag != 1"> <div class="agreementBox flex_ac" v-if="userInfo.buyAgreementFlag != 1">
<div class="agreementIcon"> <div class="agreementIcon">
<el-checkbox v-model="toShow" <el-checkbox v-model="toShow" @change="toCheck"> </el-checkbox>
@change="toCheck">
</el-checkbox>
<div class="agreementText flex"> <div class="agreementText flex">
<span> <span>
<span>{{ $t('w_0207') }}</span> <span>{{ $t("w_0207") }}</span>
<span class="agreementDetail" <span class="agreementDetail" @click="popupShow = true"
@click="popupShow = true">{{ $t('w_0208') }}</span> >{{ $t("w_0208") }}</span
>
</span> </span>
</div> </div>
</div> </div>
<el-dialog class="pop" <el-dialog class="pop" :append-to-body="true" :visible.sync="popupShow">
:append-to-body="true"
:visible.sync="popupShow">
<div class="pop_box" v-if="userInfo.pkCountry == 1"> <div class="pop_box" v-if="userInfo.pkCountry == 1">
<div class="pop_title">会员协议</div> <div class="pop_title">会员协议</div>
<h3>特别提示</h3> <h3>特别提示</h3>
@ -74,7 +71,10 @@
1会员理解并同意会员必须为自己注册账号下的一切行为负责包括会员在购物平台上的操作以及由此产生的任何后果会员应对服务中的内容自行加以判断并承担因使用内容而引起的所有风险包括因对内容的正确性完整性或实用性的依赖而产生的风险海之圣无法且不会对因会员个人行为而导致的任何损失或损害承担责任 1会员理解并同意会员必须为自己注册账号下的一切行为负责包括会员在购物平台上的操作以及由此产生的任何后果会员应对服务中的内容自行加以判断并承担因使用内容而引起的所有风险包括因对内容的正确性完整性或实用性的依赖而产生的风险海之圣无法且不会对因会员个人行为而导致的任何损失或损害承担责任
</h4> </h4>
<h4> <h4>
2如果会员发现任何人违反本协议约定或以其他不当的方式使用本服务请立即向海之圣举报或投诉举报或投诉电话为<span style="color: red">4001112818</span>海之圣将依本协议约定进行处理 2如果会员发现任何人违反本协议约定或以其他不当的方式使用本服务请立即向海之圣举报或投诉举报或投诉电话为<span
style="color: red"
>4001112818</span
>海之圣将依本协议约定进行处理
</h4> </h4>
<h4> <h4>
3会员理解并同意因业务发展需要海之圣保留单方面对本公司网站等服务的全部或部分服务内容变更暂停终止或撤销的权利会员不同意即视为退出需承担因此带来的风险 3会员理解并同意因业务发展需要海之圣保留单方面对本公司网站等服务的全部或部分服务内容变更暂停终止或撤销的权利会员不同意即视为退出需承担因此带来的风险
@ -84,7 +84,10 @@
1基于网站平台的法定责任如果海之圣发现或收到他人举报或投诉会员违反本协议约定的海之圣有权随时对相关会员户籍进行审查删除并视情节轻重对违规账号处以包括但不限于警告账号封禁功能封禁的处罚且可能公示处理结果 1基于网站平台的法定责任如果海之圣发现或收到他人举报或投诉会员违反本协议约定的海之圣有权随时对相关会员户籍进行审查删除并视情节轻重对违规账号处以包括但不限于警告账号封禁功能封禁的处罚且可能公示处理结果
</h4> </h4>
<h4> <h4>
2因违反会员协议被封禁的会员可向海之圣客服热线<span style="color: red">4001112818</span>相关人员提交申诉海之圣将对申诉进行审查并自行合理判断决定是否变更处罚措施 2因违反会员协议被封禁的会员可向海之圣客服热线<span
style="color: red"
>4001112818</span
>相关人员提交申诉海之圣将对申诉进行审查并自行合理判断决定是否变更处罚措施
</h4> </h4>
<h4> <h4>
3会员应在会员权益内遵守海之圣公司相关业务及会员管理规定会员在会员权益外的个人行为需遵守中华人民共和国各项法律法规会员需理解并同意海之圣有权依合理判断对违反有关法律法规或本协议规定的行为进行处理对违法违规的任何会员采取适当的法律行动并依据法律法规保存有关信息向有关部门报告等会员应承担由此而产生的一切法律责任如由此给海之圣造成损失应承担赔偿责任 3会员应在会员权益内遵守海之圣公司相关业务及会员管理规定会员在会员权益外的个人行为需遵守中华人民共和国各项法律法规会员需理解并同意海之圣有权依合理判断对违反有关法律法规或本协议规定的行为进行处理对违法违规的任何会员采取适当的法律行动并依据法律法规保存有关信息向有关部门报告等会员应承担由此而产生的一切法律责任如由此给海之圣造成损失应承担赔偿责任
@ -230,29 +233,23 @@
<h4> <h4>
4海之圣与会员双方均认可中华人民共和国电子签名法认可依据中华人民共和国电子签名法赋予本协议正式的法律效力一经点击同意本协议即具有了法律赋予的合同效力 4海之圣与会员双方均认可中华人民共和国电子签名法认可依据中华人民共和国电子签名法赋予本协议正式的法律效力一经点击同意本协议即具有了法律赋予的合同效力
</h4> </h4>
<h3 class="bold" <h3 class="bold" style="margin-bottom: 0.1rem; margin-top: 0.4rem">
style="margin-bottom: 0.1rem; margin-top: 0.4rem">
附件一 附件一
</h3> </h3>
<h4 class="bold">青岛海之圣生物工程有限公司退换货制度</h4> <h4 class="bold">青岛海之圣生物工程有限公司退换货制度</h4>
<h4 class="bold" <h4 class="bold" style="text-indent: 0">1.0目的</h4>
style="text-indent: 0">1.0目的</h4>
<h4> <h4>
为了规范公司退换货服务标准保障消费者经销商利益特制定本制度 为了规范公司退换货服务标准保障消费者经销商利益特制定本制度
</h4> </h4>
<h4 class="bold" <h4 class="bold" style="text-indent: 0">1.0目的</h4>
style="text-indent: 0">1.0目的</h4>
<h4></h4> <h4></h4>
<h4 class="bold" <h4 class="bold" style="text-indent: 0">2.0适用范围</h4>
style="text-indent: 0">2.0适用范围</h4>
<h4>适用于公司所有消费者和经销商正常退换货业务处理</h4> <h4>适用于公司所有消费者和经销商正常退换货业务处理</h4>
<h4 class="bold" <h4 class="bold" style="text-indent: 0">3.0职责</h4>
style="text-indent: 0">3.0职责</h4>
<h4>3.1总部营运中心负责受理退换货</h4> <h4>3.1总部营运中心负责受理退换货</h4>
<h4>3.2总部营运中心负责受理顾客投诉</h4> <h4>3.2总部营运中心负责受理顾客投诉</h4>
<h4>3.3总经理直接负责管理监督顾客投诉处理情况</h4> <h4>3.3总经理直接负责管理监督顾客投诉处理情况</h4>
<h4 class="bold" <h4 class="bold" style="text-indent: 0">4.0退换货管理规定</h4>
style="text-indent: 0">4.0退换货管理规定</h4>
<h4> <h4>
4.1总部营运中心为公司指定受理退换货部门所有退换货受理部门必须按照国家直销管理条例相关规定严格执行公司退换货制度 4.1总部营运中心为公司指定受理退换货部门所有退换货受理部门必须按照国家直销管理条例相关规定严格执行公司退换货制度
</h4> </h4>
@ -262,19 +259,16 @@
<h4> <h4>
4.3自提出换货或者退货之日起7个工作日内按照发票或者售货凭证标明的价款办理换货和退货 4.3自提出换货或者退货之日起7个工作日内按照发票或者售货凭证标明的价款办理换货和退货
</h4> </h4>
<h4 class="bold" <h4 class="bold" style="text-indent: 0">5.0退换货受理部门</h4>
style="text-indent: 0">5.0退换货受理部门</h4>
<h4>5.1总部营运中心</h4> <h4>5.1总部营运中心</h4>
<h4 class="bold" <h4 class="bold" style="text-indent: 0">6.0退换货程序</h4>
style="text-indent: 0">6.0退换货程序</h4>
<h4> <h4>
6.1换货程序当消费者经销商到总部营运中心提出换货要求时经受理人员确认符合换货条件后将产品退回公司予以换货处理 6.1换货程序当消费者经销商到总部营运中心提出换货要求时经受理人员确认符合换货条件后将产品退回公司予以换货处理
</h4> </h4>
<h4> <h4>
6.2退货程序当消费者经销商到总部营运中心提出退货要求时经受理人员确认符合退货条件后将产品退库将货款全额返还 6.2退货程序当消费者经销商到总部营运中心提出退货要求时经受理人员确认符合退货条件后将产品退库将货款全额返还
</h4> </h4>
<h4 class="bold" <h4 class="bold" style="text-indent: 0">
style="text-indent: 0">
7.0消费者经销商退货处理流程 7.0消费者经销商退货处理流程
</h4> </h4>
<h4> <h4>
@ -289,8 +283,7 @@
</h4> </h4>
<h4 class="footer">青岛海之圣生物工程有限公司</h4> <h4 class="footer">青岛海之圣生物工程有限公司</h4>
</div> </div>
<div class="pop_box" <div class="pop_box" v-else>
v-else>
<div class="pop_title2 pop_title1"> <div class="pop_title2 pop_title1">
KODE ETIK BAGI MITRA USAHA PT HZS INTERNATIONAL INDONESIA (HZS) KODE ETIK BAGI MITRA USAHA PT HZS INTERNATIONAL INDONESIA (HZS)
</div> </div>
@ -1055,9 +1048,9 @@
</template> </template>
<script> <script>
import { mapGetters, mapMutations } from 'vuex' import { mapGetters, mapMutations } from "vuex";
export default { export default {
name: 'Title', name: "Title",
props: { props: {
isShow: { isShow: {
type: Boolean, type: Boolean,
@ -1066,8 +1059,8 @@ export default {
}, },
watch: { watch: {
isShow(n, o) { isShow(n, o) {
console.log('🚀 ~ n', n) console.log("🚀 ~ n", n);
this.toShow = n this.toShow = n;
}, },
}, },
data() { data() {
@ -1076,29 +1069,29 @@ export default {
isqyj: false, isqyj: false,
toShow: this.isShow, toShow: this.isShow,
hasQyj: 0, hasQyj: 0,
agreeData: '', agreeData: "",
agreementTitle: '', agreementTitle: "",
} };
}, },
computed: { computed: {
...mapGetters(['userInfo']), ...mapGetters(["userInfo"]),
}, },
methods: { methods: {
openIsqyj(val) { openIsqyj(val) {
this.agreementTitle = val this.agreementTitle = val;
this.isqyj = true this.isqyj = true;
}, },
agreeList(val) { agreeList(val) {
this.agreeData = val this.agreeData = val;
}, },
getHasQyj(val) { getHasQyj(val) {
this.hasQyj = val this.hasQyj = val;
}, },
toCheck(e) { toCheck(e) {
this.$emit('agree', this.toShow) this.$emit("agree", this.toShow);
}, },
}, },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

File diff suppressed because it is too large Load Diff

View File

@ -10,7 +10,14 @@
<personInfo></personInfo> <personInfo></personInfo>
<div class="rt dis_flex"><div class="rti dis_flex">积分会员信息</div></div> <div class="rt dis_flex"><div class="rti dis_flex">积分会员信息</div></div>
<!-- 表单 --> <!-- 表单 -->
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-position="top" status-icon class="demo-ruleForm"> <el-form
:model="ruleForm"
:rules="rules"
ref="ruleForm"
label-position="top"
status-icon
class="demo-ruleForm"
>
<el-row :gutter="40" class="padRow"> <el-row :gutter="40" class="padRow">
<!-- <el-col :span="6"> <!-- <el-col :span="6">
<el-form-item :label="$t('ENU_REG_AU_2')" <el-form-item :label="$t('ENU_REG_AU_2')"
@ -22,19 +29,36 @@
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('N_I_124')" prop="upgradeMemberCode"> <el-form-item :label="$t('N_I_124')" prop="upgradeMemberCode">
<!-- <div class="dis_flex"> --> <!-- <div class="dis_flex"> -->
<el-input v-model="ruleForm.upgradeMemberCode" :placeholder="$t('w_0046')"></el-input> <el-input
v-model="ruleForm.upgradeMemberCode"
:placeholder="$t('w_0046')"
></el-input>
<!-- </div> --> <!-- </div> -->
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('CK_KS_14')" prop="upgradeMemberName"> <el-form-item :label="$t('CK_KS_14')" prop="upgradeMemberName">
<el-input v-model="ruleForm.upgradeMemberName" :placeholder="$t('w_0060')" disabled></el-input> <el-input
v-model="ruleForm.upgradeMemberName"
:placeholder="$t('w_0060')"
disabled
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('w_0061')" prop="deliveryWay"> <el-form-item :label="$t('w_0061')" prop="deliveryWay">
<el-select v-model="ruleForm.deliveryWay" @change="selDelivery" :disabled="this.userInfo.pkSettleCountry == 1" :placeholder="$t('w_0062')"> <el-select
<el-option v-for="item in deliList" :key="item.value" :label="item.label" :value="item.value"></el-option> v-model="ruleForm.deliveryWay"
@change="selDelivery"
:disabled="this.userInfo.pkSettleCountry == 1"
:placeholder="$t('w_0062')"
>
<el-option
v-for="item in deliList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -48,57 +72,117 @@
</el-row> </el-row>
<div v-show="isDeliveryWay"> <div v-show="isDeliveryWay">
<div class="xian1"> <div class="xian1">
<div class="title">{{ $t('w_0065') }}</div> <div class="title">{{ $t("w_0065") }}</div>
<div class="lan" @click="openAddress">{{ $t('w_0066') }}</div> <div class="lan" @click="openAddress">{{ $t("w_0066") }}</div>
</div> </div>
<el-row :gutter="40" class="padRow"> <el-row :gutter="40" class="padRow">
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('MY_ORD_10')" :required="isDeliveryWay" prop="recName"> <el-form-item
<el-input v-model="ruleForm.recName" :placeholder="$t('w_0067')"></el-input> :label="$t('MY_ORD_10')"
:required="isDeliveryWay"
prop="recName"
>
<el-input
v-model="ruleForm.recName"
:placeholder="$t('w_0067')"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('w_0052')" :required="isDeliveryWay" prop="recPhone"> <el-form-item
<el-input v-model="ruleForm.recPhone" :placeholder="$t('w_0053')"></el-input> :label="$t('w_0052')"
:required="isDeliveryWay"
prop="recPhone"
>
<el-input
v-model="ruleForm.recPhone"
:placeholder="$t('w_0053')"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('w_0068')" class="dizhi" :required="isDeliveryWay" prop="dizhi"> <el-form-item
<el-cascader v-model="ruleForm.dizhi" @change="setDizhi" :options="areaData" :props="regionParams" :placeholder="$t('w_0069')"></el-cascader> :label="$t('w_0068')"
class="dizhi"
:required="isDeliveryWay"
prop="dizhi"
>
<el-cascader
v-model="ruleForm.dizhi"
@change="setDizhi"
:options="areaData"
:props="regionParams"
:placeholder="$t('w_0069')"
></el-cascader>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('S_C_27')" :required="isDeliveryWay" prop="recAddress"> <el-form-item
<el-input v-model="ruleForm.recAddress" maxlength="200" :placeholder="$t('w_0070')"></el-input> :label="$t('S_C_27')"
:required="isDeliveryWay"
prop="recAddress"
>
<el-input
v-model="ruleForm.recAddress"
maxlength="200"
:placeholder="$t('w_0070')"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="40" class="padRow"> <el-row :gutter="40" class="padRow">
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('w_0071')"><el-input v-model="ruleForm.postage" disabled></el-input></el-form-item> <el-form-item :label="$t('w_0071')"
><el-input v-model="ruleForm.postage" disabled></el-input
></el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('MY_WAL_22')"><el-input v-model="ruleForm.remark" :placeholder="$t('w_0072')"></el-input></el-form-item> <el-form-item :label="$t('MY_WAL_22')"
><el-input
v-model="ruleForm.remark"
:placeholder="$t('w_0072')"
></el-input
></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
</el-form> </el-form>
<div class="nox"> <div class="nox">
<div class="title">{{ $t('w_0073') }}</div> <div class="title">{{ $t("w_0073") }}</div>
</div> </div>
<div class="local" v-show="isDeliveryWay"> <div class="local" v-show="isDeliveryWay">
<div :class="['local_i', item.pkId == moren ? 'local_a' : '']" v-for="item in addressList" :key="item.pkId"> <div
<el-radio v-model="moren" @input="checkRadio" :label="item.pkId">{{}}</el-radio> :class="['local_i', item.pkId == moren ? 'local_a' : '']"
<div class="local1">{{ item.recArea }}{{ item.recAddress }}({{ item.recName }} )</div> v-for="item in addressList"
<div class="local2" v-show="item.isDefault == 1">{{ $t('w_0074') }}</div> :key="item.pkId"
<div class="local2 local3" v-show="item.isDefault == 0" @click="setDefaultAds(item.pkId)">{{ $t('w_0075') }}</div> >
<div class="local2" @click="changeAds(item.pkId)">{{ $t('w_0076') }}</div> <el-radio v-model="moren" @input="checkRadio" :label="item.pkId"
<div class="local3" @click="delAds(item.pkId)">{{ $t('ENU_CONTROL_TYPE_3') }}</div> >{{}}</el-radio
>
<div class="local1">
{{ item.recArea }}{{ item.recAddress }}({{ item.recName }} )
</div>
<div class="local2" v-show="item.isDefault == 1">
{{ $t("w_0074") }}
</div>
<div
class="local2 local3"
v-show="item.isDefault == 0"
@click="setDefaultAds(item.pkId)"
>
{{ $t("w_0075") }}
</div>
<div class="local2" @click="changeAds(item.pkId)">
{{ $t("w_0076") }}
</div>
<div class="local3" @click="delAds(item.pkId)">
{{ $t("ENU_CONTROL_TYPE_3") }}
</div>
</div> </div>
</div> </div>
<!-- 商品信息 --> <!-- 商品信息 -->
<div class="nox"> <div class="nox">
<div class="title">{{ $t('w_0077') }}</div> <div class="title">{{ $t("w_0077") }}</div>
</div> </div>
<el-table <el-table
:data="allData" :data="allData"
@ -109,11 +193,16 @@
background: '#C8161D', background: '#C8161D',
color: '#fff', color: '#fff',
fontWeight: 'bold', fontWeight: 'bold',
fontSize: '15px' fontSize: '15px',
}" }"
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
> >
<el-table-column align="center" prop="waresName" width="400" :label="$t('w_0078')"> <el-table-column
align="center"
prop="waresName"
width="400"
:label="$t('w_0078')"
>
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <span>{{ scope.row.goodsPrice | numberToCurrency}}</span> --> <!-- <span>{{ scope.row.goodsPrice | numberToCurrency}}</span> -->
<div class="goods"> <div class="goods">
@ -121,7 +210,11 @@
<img :src="scope.row.cover1" alt="" /> <img :src="scope.row.cover1" alt="" />
<div>{{ scope.row.waresName }}</div> <div>{{ scope.row.waresName }}</div>
</div> </div>
<div class="goods_tit" v-for="item in scope.row.waresItemsParamList" :key="item.pkWaresSpecsSku"> <div
class="goods_tit"
v-for="item in scope.row.waresItemsParamList"
:key="item.pkWaresSpecsSku"
>
<div class="goods_tit_l"> <div class="goods_tit_l">
<img :src="item.specCover" alt="" /> <img :src="item.specCover" alt="" />
<div class="goods_tit_lr"> <div class="goods_tit_lr">
@ -134,18 +227,34 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="goodsPrice" :label="$t('w_0079') + '(¥)'"> <el-table-column
align="center"
prop="goodsPrice"
:label="$t('w_0079') + '(¥)'"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.price | numberToCurrency }}</span> <span>{{ scope.row.price | numberToCurrency }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="goodsAchive" :label="$t('w_0080') + '(PV)'"> <el-table-column
align="center"
prop="goodsAchive"
:label="$t('w_0080') + '(PV)'"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.achieve | numberToCurrency }}</span> <span>{{ scope.row.achieve | numberToCurrency }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="quantity" :label="$t('w_0081')"></el-table-column> <el-table-column
<el-table-column align="center" prop="spyjxj" :label="$t('w_0082') + 'PV'"> align="center"
prop="quantity"
:label="$t('w_0081')"
></el-table-column>
<el-table-column
align="center"
prop="spyjxj"
:label="$t('w_0082') + 'PV'"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.achieveAmount | numberToCurrency }}</span> <span>{{ scope.row.achieveAmount | numberToCurrency }}</span>
</template> </template>
@ -157,8 +266,14 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="tab_b"> <div class="tab_b">
<div>{{ $t('w_0083') }}:{{ userInfo.currencyIcon }}{{ allGoodsData.priceAmount | numberToCurrency }}</div> <div>
<div>{{ $t('w_0071') }}:{{ userInfo.currencyIcon }}{{ ruleForm.postage | numberToCurrency }}</div> {{ $t("w_0083") }}:{{ userInfo.currencyIcon
}}{{ allGoodsData.priceAmount | numberToCurrency }}
</div>
<div>
{{ $t("w_0071") }}:{{ userInfo.currencyIcon
}}{{ ruleForm.postage | numberToCurrency }}
</div>
</div> </div>
<AddAddress ref="addAddress" @getAdList="getAddressList"></AddAddress> <AddAddress ref="addAddress" @getAdList="getAddressList"></AddAddress>
<div class="zhan"></div> <div class="zhan"></div>
@ -167,23 +282,46 @@
<div class="footer_t"> <div class="footer_t">
<div class="footer_tt"> <div class="footer_tt">
<div class="dis_flex"> <div class="dis_flex">
<div class="f1">{{ $t('w_0325') }}:</div> <div class="f1">{{ $t("w_0325") }}:</div>
<div class="f2">{{ userInfo.currencyIcon }}{{ totalAmont | numberToCurrency }}</div> <div class="f2">
{{ userInfo.currencyIcon }}{{ totalAmont | numberToCurrency }}
</div>
</div> </div>
<div class="dis_flex"> <div class="dis_flex">
<div class="f1">{{ $t('ENU_TOTAL_V_1') }}:</div> <div class="f1">{{ $t("ENU_TOTAL_V_1") }}:</div>
<div class="f3">{{ allGoodsData.achieveAmount | numberToCurrency }}</div> <div class="f3">
{{ allGoodsData.achieveAmount | numberToCurrency }}
</div> </div>
</div> </div>
<div class="footer_tt" v-show="ruleForm.recAddress && ruleForm.recName && ruleForm.recPhone && ruleForm.nameList"> </div>
<div class="f2 f4">{{ $t('w_0084') }}{{ ruleForm.nameList }}{{ ruleForm.recAddress }}</div> <div
<div class="f4">{{ $t('MY_ORD_10') }}{{ ruleForm.recName }} {{ ruleForm.recPhone }}</div> class="footer_tt"
v-show="
ruleForm.recAddress &&
ruleForm.recName &&
ruleForm.recPhone &&
ruleForm.nameList
"
>
<div class="f2 f4">
{{ $t("w_0084") }}{{ ruleForm.nameList }}{{ ruleForm.recAddress }}
</div>
<div class="f4">
{{ $t("MY_ORD_10") }}{{ ruleForm.recName }}
{{ ruleForm.recPhone }}
</div>
</div> </div>
</div> </div>
<div class="footer_b"> <div class="footer_b">
<!-- 协议 --> <!-- 协议 -->
<agreement :isShow="agreementShow" ref="agree" @agree="agree"></agreement> <!-- <agreement
<div class="btn" @click="submitRegister('ruleForm')">{{ $t('w_0085') }}</div> :isShow="agreementShow"
ref="agree"
@agree="agree"
></agreement> -->
<div class="btn" @click="submitRegister('ruleForm')">
{{ $t("w_0085") }}
</div>
</div> </div>
</div> </div>
<!-- 强制阅读协议 --> <!-- 强制阅读协议 -->
@ -193,14 +331,14 @@
</template> </template>
<script> <script>
import personInfo from '@/components/personInfo.vue'; import personInfo from "@/components/personInfo.vue";
import AddAddress from '@/components/AddAddress.vue'; import AddAddress from "@/components/AddAddress.vue";
import agreement from '@/components/agreement.vue'; import agreement from "@/components/agreement.vue";
import { mapGetters } from 'vuex'; import { mapGetters } from "vuex";
import * as api from '@/api/register.js'; import * as api from "@/api/register.js";
import { setTokenMi } from '@/util/auth'; import { setTokenMi } from "@/util/auth";
import Pay from '@/components/Pay.vue'; import Pay from "@/components/Pay.vue";
import mustAgreeMent from '@/components/mustAgreeMent.vue'; import mustAgreeMent from "@/components/mustAgreeMent.vue";
export default { export default {
components: { components: {
@ -208,12 +346,12 @@ export default {
AddAddress, AddAddress,
agreement, agreement,
Pay, Pay,
mustAgreeMent mustAgreeMent,
}, },
data() { data() {
let validateRecTransType = (rule, value, callback) => { let validateRecTransType = (rule, value, callback) => {
if (this.ruleForm.transType == '' && this.isDeliveryWay) { if (this.ruleForm.transType == "" && this.isDeliveryWay) {
callback(new Error(this.$t('w_0064'))); callback(new Error(this.$t("w_0064")));
} else { } else {
callback(); callback();
} }
@ -221,39 +359,49 @@ export default {
return { return {
waresCodeList: [], waresCodeList: [],
isPay: false, isPay: false,
paramsPost: '', paramsPost: "",
isClick: 0, isClick: 0,
ruleForm: { ruleForm: {
dizhi: [], dizhi: [],
fwzx: '', fwzx: "",
upgradeMemberCode: '', upgradeMemberCode: "",
upgradeMemberName: '', upgradeMemberName: "",
postage: '', postage: "",
recName: '', recName: "",
recPhone: '', recPhone: "",
recAddress: '', recAddress: "",
deliveryWay: '', deliveryWay: "",
transType: '' transType: "",
}, },
rules: { rules: {
upgradeMemberCode: [ upgradeMemberCode: [
{ {
required: true, required: true,
validator: this.upgradeMemberCodePass, validator: this.upgradeMemberCodePass,
trigger: 'blur' trigger: "blur",
} },
],
gradeName: [
{ required: true, message: this.$t("w_0086"), trigger: "change" },
],
upgradeMemberName: [
{ required: true, message: this.$t("w_0060"), trigger: "change" },
],
recName: [
{ required: true, message: this.$t("w_0087"), trigger: "blur" },
],
recPhone: [
{ required: true, message: this.$t("w_0053"), trigger: "blur" },
],
recAddress: [
{ required: true, message: this.$t("w_0070"), trigger: "blur" },
], ],
gradeName: [{ required: true, message: this.$t('w_0086'), trigger: 'change' }],
upgradeMemberName: [{ required: true, message: this.$t('w_0060'), trigger: 'change' }],
recName: [{ required: true, message: this.$t('w_0087'), trigger: 'blur' }],
recPhone: [{ required: true, message: this.$t('w_0053'), trigger: 'blur' }],
recAddress: [{ required: true, message: this.$t('w_0070'), trigger: 'blur' }],
deliveryWay: [ deliveryWay: [
{ {
required: true, required: true,
message: this.$t('w_0062'), message: this.$t("w_0062"),
trigger: 'change' trigger: "change",
} },
], ],
// transType: [ // transType: [
// { // {
@ -262,47 +410,47 @@ export default {
// trigger: 'change', // trigger: 'change',
// }, // },
// ], // ],
transType: [{ validator: validateRecTransType }] transType: [{ validator: validateRecTransType }],
}, },
addressList: [], addressList: [],
moren: '', moren: "",
allGoodsData: [], allGoodsData: [],
allData: [], allData: [],
agreementShow: false, agreementShow: true,
countryList: [], countryList: [],
transList: [ transList: [
{ {
value: 1, value: 1,
label: '陆运' label: "陆运",
}, },
{ {
value: 2, value: 2,
label: '空运' label: "空运",
}, },
{ {
value: 3, value: 3,
label: '海运' label: "海运",
} },
], ],
deliList: [], deliList: [],
bankLists: [], bankLists: [],
areaData: [], areaData: [],
regionParams: { regionParams: {
label: 'name', label: "name",
value: 'id', value: "id",
children: 'children', children: "children",
expandTrigger: 'hover' expandTrigger: "hover",
}, },
totalPrice: 0, totalPrice: 0,
totalAchive: 0, totalAchive: 0,
isLoading: '', isLoading: "",
isDeliveryWay: true, isDeliveryWay: true,
shoppingArr: '', shoppingArr: "",
totalAmont: 0 totalAmont: 0,
}; };
}, },
computed: { computed: {
...mapGetters(['userInfo']) ...mapGetters(["userInfo"]),
}, },
mounted() { mounted() {
// // // //
@ -338,11 +486,11 @@ export default {
// // // //
// // this.getMember() // // this.getMember()
// //
this.shoppingArr = JSON.parse(localStorage.getItem('allGoods')); this.shoppingArr = JSON.parse(localStorage.getItem("allGoods"));
// //
this.getCatDetail(); this.getCatDetail();
// //
api.generate().then(res => { api.generate().then((res) => {
setTokenMi(res.msg); setTokenMi(res.msg);
}); });
if (this.userInfo.pkSettleCountry == 1) { if (this.userInfo.pkSettleCountry == 1) {
@ -354,12 +502,13 @@ export default {
// name // name
upgradeMemberCodePass(rule, value, callback) { upgradeMemberCodePass(rule, value, callback) {
if (!value) { if (!value) {
callback(new Error(this.$t('w_0046'))); callback(new Error(this.$t("w_0046")));
} else { } else {
api.upgRel({ api
upgradeMemberCode: value .upgRel({
upgradeMemberCode: value,
}) })
.then(res => { .then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.ruleForm.upgradeMemberName = res.data.upgradeMemberName; this.ruleForm.upgradeMemberName = res.data.upgradeMemberName;
// this.getMember() // this.getMember()
@ -367,18 +516,20 @@ export default {
callback(); callback();
} }
}) })
.catch(err => { .catch((err) => {
callback(new Error(err)); callback(new Error(err));
}); });
} }
}, },
getCatDetail() { getCatDetail() {
api.shoppingWaresDetail({ api
.shoppingWaresDetail({
shoppingIds: this.shoppingArr, shoppingIds: this.shoppingArr,
specialArea: 11 specialArea: 11,
}).then(res => { })
.then((res) => {
this.allGoodsData = res.data; this.allGoodsData = res.data;
this.waresCodeList = res.data.orderItemsParams.map(item => { this.waresCodeList = res.data.orderItemsParams.map((item) => {
return item.waresCode; return item.waresCode;
}); });
this.allGoodsData.specialArea = 11; this.allGoodsData.specialArea = 11;
@ -409,23 +560,25 @@ export default {
openLoading() { openLoading() {
this.isLoading = this.$loading({ this.isLoading = this.$loading({
lock: true, lock: true,
text: 'Loading', text: "Loading",
spinner: 'el-icon-loading', spinner: "el-icon-loading",
background: 'rgba(0, 0, 0, 0.7)' background: "rgba(0, 0, 0, 0.7)",
}); });
}, },
resetAll() { resetAll() {
this.ruleForm.parent = ''; this.ruleForm.parent = "";
this.ruleForm.deliveryWay = ''; this.ruleForm.deliveryWay = "";
this.ruleForm.transType = ''; this.ruleForm.transType = "";
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ruleForm.clearValidate(); this.$refs.ruleForm.clearValidate();
}); });
}, },
getUserName() { getUserName() {
api.upgRel({ api
upgradeMemberCode: this.ruleForm.upgradeMemberCode .upgRel({
}).then(res => { upgradeMemberCode: this.ruleForm.upgradeMemberCode,
})
.then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.ruleForm.upgradeMemberName = res.data.upgradeMemberName; this.ruleForm.upgradeMemberName = res.data.upgradeMemberName;
this.$forceUpdate(); this.$forceUpdate();
@ -436,8 +589,8 @@ export default {
if (val) { if (val) {
this.isPay = false; this.isPay = false;
this.$router.push({ this.$router.push({
path: '/vipCenter', path: "/vipCenter",
query: { id: 1 } query: { id: 1 },
}); });
} else { } else {
this.$confirm(this.$t("w_0090"), "", { this.$confirm(this.$t("w_0090"), "", {
@ -445,54 +598,55 @@ export default {
cancelButtonText: this.$t("ENU_P_TYPE0"), cancelButtonText: this.$t("ENU_P_TYPE0"),
type: "warning", type: "warning",
}) })
.then(_ => { .then((_) => {
this.isPay = false; this.isPay = false;
this.$router.push({ this.$router.push({
path: '/vipCenter', path: "/vipCenter",
query: { id: 1 } query: { id: 1 },
}); });
}) })
.catch(_ => {}); .catch((_) => {});
} }
}, },
// //
submitRegister(formName) { submitRegister(formName) {
let deleteList = []; let deleteList = [];
this.shoppingArr.forEach(item => { this.shoppingArr.forEach((item) => {
deleteList.push({ deleteList.push({
shoppingId: item shoppingId: item,
}); });
}); });
if (!this.agreementShow) { // if (!this.agreementShow) {
this.$message({ // this.$message({
message: this.$t('w_0091'), // message: this.$t("w_0091"),
type: 'warning' // type: "warning",
}); // });
return; // return;
} // }
if (this.isDeliveryWay && !this.ruleForm.recPhone) { if (this.isDeliveryWay && !this.ruleForm.recPhone) {
this.$message({ this.$message({
message: this.$t('w_0092'), message: this.$t("w_0092"),
type: 'warning' type: "warning",
}); });
return; return;
} }
this.$refs[formName].validate(valid => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
this.openLoading(); this.openLoading();
let obj = Object.assign({}, this.allGoodsData, this.ruleForm, { let obj = Object.assign({}, this.allGoodsData, this.ruleForm, {
deleteList: deleteList deleteList: deleteList,
}); });
api.confirmOthOrder(obj) api
.then(res => { .confirmOthOrder(obj)
.then((res) => {
this.isLoading.close(); this.isLoading.close();
if (res.code == 200) { if (res.code == 200) {
this.isPay = true; this.isPay = true;
this.paramsPost = res.data; this.paramsPost = res.data;
} }
}) })
.catch(err => { .catch((err) => {
this.isLoading.close(); this.isLoading.close();
}); });
} else { } else {
@ -508,14 +662,17 @@ export default {
}, },
flatten(arr) { flatten(arr) {
return arr.reduce((result, item) => { return arr.reduce((result, item) => {
return result.concat(item, Array.isArray(item.children) ? this.flatten(item.children) : []); return result.concat(
item,
Array.isArray(item.children) ? this.flatten(item.children) : []
);
}, []); }, []);
}, },
setDizhi(e, val) { setDizhi(e, val) {
let arr = this.flatten(this.areaData); let arr = this.flatten(this.areaData);
let nameList = ''; let nameList = "";
arr.forEach(item => { arr.forEach((item) => {
this.ruleForm.dizhi.forEach(ctem => { this.ruleForm.dizhi.forEach((ctem) => {
if (ctem == item.id) { if (ctem == item.id) {
nameList += item.name; nameList += item.name;
} }
@ -524,26 +681,30 @@ export default {
this.ruleForm.nameList = nameList; this.ruleForm.nameList = nameList;
this.allGoodsData.recProvince = this.ruleForm.dizhi[0]; this.allGoodsData.recProvince = this.ruleForm.dizhi[0];
this.allGoodsData.recCity = this.ruleForm.dizhi[1]; this.allGoodsData.recCity = this.ruleForm.dizhi[1];
this.allGoodsData.recCounty = this.ruleForm.dizhi[2] || ''; this.allGoodsData.recCounty = this.ruleForm.dizhi[2] || "";
this.getPostAge(); this.getPostAge();
}, },
checkRadio() { checkRadio() {
this.$set(this.ruleForm, 'dizhi', []); this.$set(this.ruleForm, "dizhi", []);
let arr = []; let arr = [];
this.addressList.forEach(item => { this.addressList.forEach((item) => {
if (item.pkId == this.moren) { if (item.pkId == this.moren) {
this.ruleForm.recName = item.recName; this.ruleForm.recName = item.recName;
this.ruleForm.nameList = item.recArea; this.ruleForm.nameList = item.recArea;
this.ruleForm.recPhone = item.recPhone; this.ruleForm.recPhone = item.recPhone;
this.ruleForm.recAddress = item.recAddress; this.ruleForm.recAddress = item.recAddress;
arr = [item.recProvince + '', item.recCity + '', (item.recCounty || '') + '']; arr = [
item.recProvince + "",
item.recCity + "",
(item.recCounty || "") + "",
];
} }
}); });
arr = arr.filter(s => { arr = arr.filter((s) => {
return s && s.trim(); return s && s.trim();
}); });
this.$set(this.ruleForm, 'dizhi', arr); this.$set(this.ruleForm, "dizhi", arr);
this.allGoodsData.deliveryWay = this.ruleForm.deliveryWay; this.allGoodsData.deliveryWay = this.ruleForm.deliveryWay;
this.allGoodsData.transType = this.ruleForm.transType; this.allGoodsData.transType = this.ruleForm.transType;
this.allGoodsData.recProvince = this.ruleForm.dizhi[0]; this.allGoodsData.recProvince = this.ruleForm.dizhi[0];
@ -554,15 +715,17 @@ export default {
}, },
getPostAge() { getPostAge() {
let deleteList = []; let deleteList = [];
this.shoppingArr.forEach(item => { this.shoppingArr.forEach((item) => {
deleteList.push({ deleteList.push({
shoppingId: item shoppingId: item,
}); });
}); });
this.allGoodsData.deleteList = deleteList; this.allGoodsData.deleteList = deleteList;
api.queryPostage(this.allGoodsData).then(res => { api.queryPostage(this.allGoodsData).then((res) => {
this.ruleForm.postage = Number(res.data.postage).toFixed(2); this.ruleForm.postage = Number(res.data.postage).toFixed(2);
this.totalAmont = parseFloat(this.allGoodsData.priceAmount) + parseFloat(res.data.postage); this.totalAmont =
parseFloat(this.allGoodsData.priceAmount) +
parseFloat(res.data.postage);
}); });
}, },
// getMember() { // getMember() {
@ -576,32 +739,32 @@ export default {
// }) // })
// }, // },
getTransList() { getTransList() {
api.transportList().then(res => { api.transportList().then((res) => {
this.transList = res.data; this.transList = res.data;
}); });
}, },
getDeliveryList() { getDeliveryList() {
api.deliveryList().then(res => { api.deliveryList().then((res) => {
this.deliList = res.data; this.deliList = res.data;
}); });
}, },
delAds(id) { delAds(id) {
this.$confirm(this.$t('w_0088') + '?', '', { this.$confirm(this.$t("w_0088") + "?", "", {
confirmButtonText: this.$t('w_0035'), confirmButtonText: this.$t("w_0035"),
cancelButtonText: this.$t('ENU_P_TYPE0'), cancelButtonText: this.$t("ENU_P_TYPE0"),
type: 'warning' type: "warning",
}).then(() => { }).then(() => {
api.delAddress(id).then(res => { api.delAddress(id).then((res) => {
this.$message({ this.$message({
type: 'success', type: "success",
message: this.$t('w_0089') + '!' message: this.$t("w_0089") + "!",
}); });
this.getAddressList(); this.getAddressList();
}); });
}); });
}, },
getAllArea() { getAllArea() {
api.allArea().then(res => { api.allArea().then((res) => {
this.areaData = res.data; this.areaData = res.data;
}); });
}, },
@ -609,7 +772,7 @@ export default {
this.$refs.addAddress.isShowAddress(true, this.areaData, id); this.$refs.addAddress.isShowAddress(true, this.areaData, id);
}, },
setDefaultAds(id) { setDefaultAds(id) {
api.addressDefault(id).then(res => { api.addressDefault(id).then((res) => {
this.getAddressList(); this.getAddressList();
}); });
}, },
@ -621,9 +784,9 @@ export default {
this.$refs.addAddress.isShowAddress(true, this.areaData); this.$refs.addAddress.isShowAddress(true, this.areaData);
}, },
getAddressList() { getAddressList() {
api.addressList({}).then(res => { api.addressList({}).then((res) => {
this.addressList = res.data; this.addressList = res.data;
this.addressList.forEach(item => { this.addressList.forEach((item) => {
if (item.isDefault == 1) { if (item.isDefault == 1) {
this.moren = item.pkId; this.moren = item.pkId;
this.checkRadio(); this.checkRadio();
@ -635,13 +798,13 @@ export default {
// 线 // 线
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 0) { if (rowIndex % 2 == 0) {
return 'warning-row'; return "warning-row";
} else if (rowIndex % 2 == 1) { } else if (rowIndex % 2 == 1) {
return 'success-row'; return "success-row";
}
return '';
}
} }
return "";
},
},
}; };
</script> </script>

View File

@ -395,7 +395,7 @@
<div @click="loginPwd = 0">{{ $t("PER_DA_32") }}</div> <div @click="loginPwd = 0">{{ $t("PER_DA_32") }}</div>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <!-- <el-row>
<el-col :span="14"> <el-col :span="14">
<el-form-item :label="$t('PER_DA_33')" <el-form-item :label="$t('PER_DA_33')"
><el-input v-model="safty.email" disabled></el-input ><el-input v-model="safty.email" disabled></el-input
@ -404,7 +404,7 @@
<el-col :span="10" class="righTxt"> <el-col :span="10" class="righTxt">
<div @click="loginPwd = 3">{{ $t("PER_DA_34") }}</div> <div @click="loginPwd = 3">{{ $t("PER_DA_34") }}</div>
</el-col> </el-col>
</el-row> </el-row> -->
<el-row> <el-row>
<el-col :span="14"> <el-col :span="14">
<el-form-item :label="$t('MN_F_23')" <el-form-item :label="$t('MN_F_23')"
@ -585,7 +585,7 @@
</div> </div>
</div> </div>
<!-- 修改邮箱 --> <!-- 修改邮箱 -->
<div class="main_r" v-show="isClick == 2 && loginPwd == 3"> <!-- <div class="main_r" v-show="isClick == 2 && loginPwd == 3">
<div class="main_rt"> <div class="main_rt">
<div class="tit">{{ $t("PER_DA_43") }}</div> <div class="tit">{{ $t("PER_DA_43") }}</div>
<div class="safty1"> <div class="safty1">
@ -623,7 +623,7 @@
<div class="pwdBtn" @click="upEmailObj">{{ $t("MY_WAL_23") }}</div> <div class="pwdBtn" @click="upEmailObj">{{ $t("MY_WAL_23") }}</div>
</div> </div>
</div> </div>
</div> </div> -->
<AddAddress ref="addAddress" @getAdList="getAddressList"></AddAddress> <AddAddress ref="addAddress" @getAdList="getAddressList"></AddAddress>
<giftAddress ref="addAddress1" @getAdList1="getAddressList1"></giftAddress> <giftAddress ref="addAddress1" @getAdList1="getAddressList1"></giftAddress>
</div> </div>

View File

@ -732,11 +732,11 @@
</div> </div>
<div class="footer_b"> <div class="footer_b">
<!-- 协议 --> <!-- 协议 -->
<agreement <!-- <agreement
:isShow="agreementShow" :isShow="agreementShow"
ref="agree" ref="agree"
@agree="agree" @agree="agree"
></agreement> ></agreement> -->
<div class="btn" @click="submitRegister('ruleForm')"> <div class="btn" @click="submitRegister('ruleForm')">
{{ $t("w_0085") }} {{ $t("w_0085") }}
</div> </div>
@ -1036,7 +1036,7 @@ export default {
], ],
allGoodsData: {}, allGoodsData: {},
allData: [], allData: [],
agreementShow: false, agreementShow: true,
countryList: [], countryList: [],
transList: [ transList: [
// { // {
@ -1121,9 +1121,7 @@ export default {
// //
this.getStorehouseList(); this.getStorehouseList();
} }
if (this.userInfo.buyAgreementFlag == 1) {
this.agreementShow = true;
}
// this.howRegiest = localStorage.getItem('howRegiest') || 0 // this.howRegiest = localStorage.getItem('howRegiest') || 0
// //
api.generate().then((res) => { api.generate().then((res) => {
@ -1400,13 +1398,6 @@ export default {
}); });
}); });
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (!this.agreementShow) {
this.$message({
message: this.$t("w_0091"),
type: "warning",
});
return;
}
if (valid) { if (valid) {
this.openLoading(); this.openLoading();
let obj = Object.assign({}, this.allGoodsData, this.ruleForm, { let obj = Object.assign({}, this.allGoodsData, this.ruleForm, {

View File

@ -10,11 +10,20 @@
<!-- 用户头 --> <!-- 用户头 -->
<personInfo></personInfo> <personInfo></personInfo>
<div class="rt dis_flex"> <div class="rt dis_flex">
<div class="rti dis_flex" v-if="specialArea==33">{{ $t("APP_ADD_28") }}</div> <div class="rti dis_flex" v-if="specialArea == 33">
{{ $t("APP_ADD_28") }}
</div>
<div class="rti dis_flex" v-else>{{ $t("w_0244") }}</div> <div class="rti dis_flex" v-else>{{ $t("w_0244") }}</div>
</div> </div>
<!-- 表单 --> <!-- 表单 -->
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-position="top" status-icon class="demo-ruleForm"> <el-form
:model="ruleForm"
:rules="rules"
ref="ruleForm"
label-position="top"
status-icon
class="demo-ruleForm"
>
<el-row :gutter="40" class="padRow"> <el-row :gutter="40" class="padRow">
<!-- <el-col :span="6"> <!-- <el-col :span="6">
<el-form-item :label="$t('ENU_REG_AU_2')" <el-form-item :label="$t('ENU_REG_AU_2')"
@ -24,31 +33,59 @@
</el-form-item> </el-form-item>
</el-col> --> </el-col> -->
<el-col :span="6"> <el-col :span="6">
<el-form-item v-if="specialArea == 33" :label="$t('APP_ADD_29')" prop="upgradeMemberCode"> <el-form-item
<el-input v-model="ruleForm.upgradeMemberCode" :disabled="toShow" v-if="specialArea == 33"
:placeholder="$t('APP_ADD_29')"></el-input> :label="$t('APP_ADD_29')"
prop="upgradeMemberCode"
>
<el-input
v-model="ruleForm.upgradeMemberCode"
:disabled="toShow"
:placeholder="$t('APP_ADD_29')"
></el-input>
</el-form-item> </el-form-item>
<el-form-item v-else :label="$t('w_0245')" prop="upgradeMemberCode"> <el-form-item v-else :label="$t('w_0245')" prop="upgradeMemberCode">
<el-input v-model="ruleForm.upgradeMemberCode" :disabled="toShow" <el-input
:placeholder="$t('w_0280')"></el-input> v-model="ruleForm.upgradeMemberCode"
:disabled="toShow"
:placeholder="$t('w_0280')"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item v-if="specialArea == 33" :label="$t('APP_ADD_30')" prop="upgradeMemberName"> <el-form-item
<el-input v-model="ruleForm.upgradeMemberName" :placeholder="$t('APP_ADD_30')" v-if="specialArea == 33"
disabled></el-input> :label="$t('APP_ADD_30')"
prop="upgradeMemberName"
>
<el-input
v-model="ruleForm.upgradeMemberName"
:placeholder="$t('APP_ADD_30')"
disabled
></el-input>
</el-form-item> </el-form-item>
<el-form-item v-else :label="$t('w_0246')" prop="upgradeMemberName"> <el-form-item v-else :label="$t('w_0246')" prop="upgradeMemberName">
<el-input v-model="ruleForm.upgradeMemberName" :placeholder="$t('w_0281')" disabled></el-input> <el-input
v-model="ruleForm.upgradeMemberName"
:placeholder="$t('w_0281')"
disabled
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('w_0061')" prop="deliveryWay"> <el-form-item :label="$t('w_0061')" prop="deliveryWay">
<el-select v-model="ruleForm.deliveryWay" @change="selDelivery" <el-select
:disabled="this.userInfo.pkSettleCountry == 1" :placeholder="$t('w_0062')"> v-model="ruleForm.deliveryWay"
<el-option v-for="item in deliList" :key="item.value" :label="item.label" @change="selDelivery"
:value="item.value"></el-option> :disabled="this.userInfo.pkSettleCountry == 1"
:placeholder="$t('w_0062')"
>
<el-option
v-for="item in deliList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -59,7 +96,10 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> --> </el-col> -->
<el-col :span="6" v-if="userInfo.pkSettleCountry != 1 && ruleForm.deliveryWay != 2"> <el-col
:span="6"
v-if="userInfo.pkSettleCountry != 1 && ruleForm.deliveryWay != 2"
>
<!-- <el-form-item :label="$t('w_0100')" prop="pkMemberStore"> <!-- <el-form-item :label="$t('w_0100')" prop="pkMemberStore">
<el-select <el-select
filterable filterable
@ -76,11 +116,19 @@
</el-form-item> --> </el-form-item> -->
<div @click="handleInputClick"> <div @click="handleInputClick">
<el-form-item :label="$t('w_0100')" prop="selectedStoreName"> <el-form-item :label="$t('w_0100')" prop="selectedStoreName">
<el-input v-model="ruleForm.selectedStoreName" :placeholder="$t('w_0101')" <el-input
readonly></el-input> v-model="ruleForm.selectedStoreName"
:placeholder="$t('w_0101')"
readonly
></el-input>
</el-form-item> </el-form-item>
</div> </div>
<el-dialog :title="$t('w_0100')" :visible.sync="dialogVisible" width="80%" class="titles-dialog"> <el-dialog
:title="$t('w_0100')"
:visible.sync="dialogVisible"
width="80%"
class="titles-dialog"
>
<div class="topbox"> <div class="topbox">
<el-form label-width="80px" :model="queryParams" inline> <el-form label-width="80px" :model="queryParams" inline>
<el-row> <el-row>
@ -91,13 +139,20 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('S_C_27')" class="dizhi"> <el-form-item :label="$t('S_C_27')" class="dizhi">
<el-cascader clearable v-model="queryParams.address" :options="areaData" <el-cascader
:props="regionParams" @change="handleChange1"></el-cascader> clearable
v-model="queryParams.address"
:options="areaData"
:props="regionParams"
@change="handleChange1"
></el-cascader>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<div class="searchbox" <div
:style="userInfo.pkCountry == 1 ? 'margin-left:10px' : ''"> class="searchbox"
:style="userInfo.pkCountry == 1 ? 'margin-left:10px' : ''"
>
<el-button class="btn2" @click="research">{{ <el-button class="btn2" @click="research">{{
$t("N_I_183") $t("N_I_183")
}}</el-button> }}</el-button>
@ -110,17 +165,41 @@
</el-form> </el-form>
</div> </div>
<div> <div>
<el-table :data="storeLists" @row-click="handleRowClick" highlight-current-row <el-table
style="width: 100%"> :data="storeLists"
<el-table-column prop="storeName" :label="$t('MN_F_T_1207')"></el-table-column> @row-click="handleRowClick"
<el-table-column prop="storeCode" :label="$t('MN_F_T_1206')"></el-table-column> highlight-current-row
<el-table-column prop="storePerson" :label="$t('S_C_86')"></el-table-column> style="width: 100%"
<el-table-column prop="storePhone" :label="$t('w_0052')"></el-table-column> >
<el-table-column prop="address" :label="$t('S_C_27')"></el-table-column> <el-table-column
prop="storeName"
:label="$t('MN_F_T_1207')"
></el-table-column>
<el-table-column
prop="storeCode"
:label="$t('MN_F_T_1206')"
></el-table-column>
<el-table-column
prop="storePerson"
:label="$t('S_C_86')"
></el-table-column>
<el-table-column
prop="storePhone"
:label="$t('w_0052')"
></el-table-column>
<el-table-column
prop="address"
:label="$t('S_C_27')"
></el-table-column>
</el-table> </el-table>
</div> </div>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" <pagination
:limit.sync="queryParams.pageSize" @pagination="getStoreLists" /> v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getStoreLists"
/>
<div slot="footer"> <div slot="footer">
<el-button @click="dialogVisible = false">{{ <el-button @click="dialogVisible = false">{{
$t("MY_ORD_24") $t("MY_ORD_24")
@ -174,23 +253,39 @@
</div> </div>
<el-row :gutter="40" class="padRow"> <el-row :gutter="40" class="padRow">
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('MY_ORD_10')" prop="recName"><el-input v-model="ruleForm.recName" <el-form-item :label="$t('MY_ORD_10')" prop="recName"
:placeholder="$t('w_0067')"></el-input></el-form-item> ><el-input
v-model="ruleForm.recName"
:placeholder="$t('w_0067')"
></el-input
></el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('w_0052')" prop="recPhone"><el-input v-model="ruleForm.recPhone" <el-form-item :label="$t('w_0052')" prop="recPhone"
:placeholder="$t('w_0053')"></el-input></el-form-item> ><el-input
v-model="ruleForm.recPhone"
:placeholder="$t('w_0053')"
></el-input
></el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('w_0068')" class="dizhi" prop="dizhi"> <el-form-item :label="$t('w_0068')" class="dizhi" prop="dizhi">
<el-cascader v-model="ruleForm.dizhi" @change="setDizhi" :options="areaData" <el-cascader
:props="regionParams" :placeholder="$t('w_0069')"></el-cascader> v-model="ruleForm.dizhi"
@change="setDizhi"
:options="areaData"
:props="regionParams"
:placeholder="$t('w_0069')"
></el-cascader>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('S_C_27')" prop="recAddress"> <el-form-item :label="$t('S_C_27')" prop="recAddress">
<el-input v-model="ruleForm.recAddress" maxlength="200" <el-input
:placeholder="$t('w_0070')"></el-input> v-model="ruleForm.recAddress"
maxlength="200"
:placeholder="$t('w_0070')"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -199,8 +294,12 @@
<el-form-item :label="$t('w_0071')"><el-input v-model="ruleForm.postage" disabled></el-input></el-form-item> <el-form-item :label="$t('w_0071')"><el-input v-model="ruleForm.postage" disabled></el-input></el-form-item>
</el-col> --> </el-col> -->
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('MY_WAL_22')"><el-input v-model="ruleForm.remark" <el-form-item :label="$t('MY_WAL_22')"
:placeholder="$t('w_0072')"></el-input></el-form-item> ><el-input
v-model="ruleForm.remark"
:placeholder="$t('w_0072')"
></el-input
></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@ -209,15 +308,28 @@
<div class="title">{{ $t("w_0073") }}</div> <div class="title">{{ $t("w_0073") }}</div>
</div> </div>
<div class="local" v-if="isDeliveryWay"> <div class="local" v-if="isDeliveryWay">
<div :class="['local_i', item.pkId == moren ? 'local_a' : '']" v-for="item in addressList" :key="item.pkId"> <div
<el-radio v-model="moren" @input="checkRadio" :label="item.pkId">{{ }}</el-radio> :class="['local_i', item.pkId == moren ? 'local_a' : '']"
v-for="item in addressList"
:key="item.pkId"
>
<el-radio
v-model="moren"
@input="checkRadio"
:label="item.pkId"
>{{
}}</el-radio>
<div class="local1"> <div class="local1">
{{ item.recArea }}{{ item.recAddress }}({{ item.recName }} ) {{ item.recArea }}{{ item.recAddress }}({{ item.recName }} )
</div> </div>
<div class="local2" v-show="item.isDefault == 1"> <div class="local2" v-show="item.isDefault == 1">
{{ $t("w_0074") }} {{ $t("w_0074") }}
</div> </div>
<div class="local2 local3" v-show="item.isDefault == 0" @click="setDefaultAds(item.pkId)"> <div
class="local2 local3"
v-show="item.isDefault == 0"
@click="setDefaultAds(item.pkId)"
>
{{ $t("w_0075") }} {{ $t("w_0075") }}
</div> </div>
<div class="local2" @click="changeAds(item.pkId)"> <div class="local2" @click="changeAds(item.pkId)">
@ -232,14 +344,25 @@
<div class="nox"> <div class="nox">
<div class="title">{{ $t("w_0077") }}</div> <div class="title">{{ $t("w_0077") }}</div>
</div> </div>
<el-table :data="allData" :row-style="{ height: '60px', fontSize: '15px', color: '#333333' }" <el-table
:cell-style="{ padding: '0' }" :fit="true" :header-cell-style="{ :data="allData"
:row-style="{ height: '60px', fontSize: '15px', color: '#333333' }"
:cell-style="{ padding: '0' }"
:fit="true"
:header-cell-style="{
background: '#C8161D', background: '#C8161D',
color: '#fff', color: '#fff',
fontWeight: 'bold', fontWeight: 'bold',
fontSize: '15px', fontSize: '15px',
}" :row-class-name="tableRowClassName"> }"
<el-table-column align="center" prop="waresName" width="400" :label="$t('w_0078')"> :row-class-name="tableRowClassName"
>
<el-table-column
align="center"
prop="waresName"
width="400"
:label="$t('w_0078')"
>
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <span>{{ scope.row.goodsPrice | numberToCurrency}}</span> --> <!-- <span>{{ scope.row.goodsPrice | numberToCurrency}}</span> -->
<div class="goods"> <div class="goods">
@ -247,8 +370,11 @@
<img :src="scope.row.cover1" alt="" /> <img :src="scope.row.cover1" alt="" />
<div>{{ scope.row.waresName }}</div> <div>{{ scope.row.waresName }}</div>
</div> </div>
<div class="goods_tit" v-for="item in scope.row.waresItemsParamList" <div
:key="item.pkWaresSpecsSku"> class="goods_tit"
v-for="item in scope.row.waresItemsParamList"
:key="item.pkWaresSpecsSku"
>
<div class="goods_tit_l"> <div class="goods_tit_l">
<img :src="item.specCover" alt="" /> <img :src="item.specCover" alt="" />
<div class="goods_tit_lr"> <div class="goods_tit_lr">
@ -266,13 +392,27 @@
<span>{{ scope.row.price | numberToCurrency }}</span> <span>{{ scope.row.price | numberToCurrency }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="goodsAchive" :label="$t('w_0080') + '(PV)'" v-if="specialArea !=30"> <el-table-column
align="center"
prop="goodsAchive"
:label="$t('w_0080') + '(PV)'"
v-if="specialArea != 30"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.achieve | numberToCurrency }}</span> <span>{{ scope.row.achieve | numberToCurrency }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="quantity" :label="$t('w_0081')"></el-table-column> <el-table-column
<el-table-column align="center" prop="spyjxj" :label="$t('w_0082') + 'PV'" v-if="specialArea !=30"> align="center"
prop="quantity"
:label="$t('w_0081')"
></el-table-column>
<el-table-column
align="center"
prop="spyjxj"
:label="$t('w_0082') + 'PV'"
v-if="specialArea != 30"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.achieveAmount | numberToCurrency }}</span> <span>{{ scope.row.achieveAmount | numberToCurrency }}</span>
</template> </template>
@ -312,12 +452,15 @@
</div> </div>
</div> </div>
</div> </div>
<div class="footer_tt" v-show=" <div
class="footer_tt"
v-show="
ruleForm.recAddress && ruleForm.recAddress &&
ruleForm.recName && ruleForm.recName &&
ruleForm.recPhone && ruleForm.recPhone &&
ruleForm.nameList ruleForm.nameList
"> "
>
<div class="f2 f4"> <div class="f2 f4">
{{ $t("w_0084") }}{{ ruleForm.nameList }}{{ ruleForm.recAddress }} {{ $t("w_0084") }}{{ ruleForm.nameList }}{{ ruleForm.recAddress }}
</div> </div>
@ -329,7 +472,7 @@
</div> </div>
<div class="footer_b"> <div class="footer_b">
<!-- 协议 --> <!-- 协议 -->
<agreement :isShow="agreementShow" ref="agree" @agree="agree"></agreement> <!-- <agreement :isShow="agreementShow" ref="agree" @agree="agree"></agreement> -->
<div class="btn" @click="submitRegister('ruleForm')"> <div class="btn" @click="submitRegister('ruleForm')">
{{ $t("w_0085") }} {{ $t("w_0085") }}
</div> </div>
@ -345,17 +488,11 @@
import personInfo from "@/components/personInfo.vue"; import personInfo from "@/components/personInfo.vue";
import AddAddress from "@/components/AddAddress.vue"; import AddAddress from "@/components/AddAddress.vue";
import agreement from "@/components/agreement.vue"; import agreement from "@/components/agreement.vue";
import { import { mapGetters } from "vuex";
mapGetters
} from "vuex";
import * as api from "@/api/register.js"; import * as api from "@/api/register.js";
import { import { setTokenMi } from "@/util/auth";
setTokenMi
} from "@/util/auth";
import Pay from "@/components/Pay.vue"; import Pay from "@/components/Pay.vue";
import { import { Loading } from "element-ui";
Loading
} from 'element-ui';
import mustAgreeMent from "@/components/mustAgreeMent.vue"; import mustAgreeMent from "@/components/mustAgreeMent.vue";
export default { export default {
components: { components: {
@ -405,56 +542,76 @@
selectedStoreName: "", selectedStoreName: "",
}, },
rules: { rules: {
upgradeMemberCode: [{ upgradeMemberCode: [
{
required: true, required: true,
validator: this.upgradeMemberCodePass, validator: this.upgradeMemberCodePass,
trigger: "blur", trigger: "blur",
}, ], },
fwzx: [{ ],
fwzx: [
{
required: true, required: true,
message: "请输入活动名称", message: "请输入活动名称",
trigger: "change", trigger: "change",
}, ], },
gradeName: [{ ],
gradeName: [
{
required: true, required: true,
message: this.$t("w_0086"), message: this.$t("w_0086"),
trigger: "change", trigger: "change",
}, ], },
upgradeMemberName: [{ ],
upgradeMemberName: [
{
required: true, required: true,
message: this.$t("w_0097"), message: this.$t("w_0097"),
trigger: "blur", trigger: "blur",
}, ], },
recName: [{ ],
recName: [
{
required: true, required: true,
message: this.$t("w_0087"), message: this.$t("w_0087"),
trigger: "blur", trigger: "blur",
}, ], },
recPhone: [{ ],
recPhone: [
{
required: true, required: true,
message: this.$t("w_0053"), message: this.$t("w_0053"),
trigger: "blur", trigger: "blur",
}, ], },
recAddress: [{ ],
recAddress: [
{
required: true, required: true,
message: this.$t("w_0070"), message: this.$t("w_0070"),
trigger: "blur", trigger: "blur",
}, ], },
deliveryWay: [{ ],
deliveryWay: [
{
required: true, required: true,
message: this.$t("w_0062"), message: this.$t("w_0062"),
trigger: "change", trigger: "change",
}, ], },
pkMemberStore: [{ ],
pkMemberStore: [
{
required: true, required: true,
message: this.$t("w_0101"), message: this.$t("w_0101"),
trigger: "change", trigger: "change",
}, ], },
selectedStoreName: [{ ],
selectedStoreName: [
{
required: true, required: true,
message: this.$t("w_0101"), message: this.$t("w_0101"),
trigger: "change", trigger: "change",
}, ], },
],
// transType: [ // transType: [
// { // {
// required: true, // required: true,
@ -462,17 +619,20 @@
// trigger: 'change', // trigger: 'change',
// }, // },
// ], // ],
transType: [{ transType: [
{
validator: validateRecTransType, validator: validateRecTransType,
}, ], },
],
}, },
addressList: [], addressList: [],
moren: "", moren: "",
allGoodsData: [], allGoodsData: [],
allData: [], allData: [],
agreementShow: false, agreementShow: true,
countryList: [], countryList: [],
transList: [{ transList: [
{
value: 1, value: 1,
label: "陆运", label: "陆运",
}, },
@ -578,9 +738,6 @@
this.ruleForm.transType = 1; this.ruleForm.transType = 1;
this.ruleForm.deliveryWay = 1; this.ruleForm.deliveryWay = 1;
} }
if (this.userInfo.buyAgreementFlag == 1) {
this.agreementShow = true
}
}, },
methods: { methods: {
handleSizeChange(val) { handleSizeChange(val) {
@ -601,11 +758,13 @@
}, },
handleRowClick(row) { handleRowClick(row) {
if (row.address && row.storeCode) { if (row.address && row.storeCode) {
this.ruleForm.selectedStoreName = row.storeName + '(' + row.storeCode + ')'; this.ruleForm.selectedStoreName =
row.storeName + "(" + row.storeCode + ")";
this.ruleForm.pkMemberStore = row.pkId; this.ruleForm.pkMemberStore = row.pkId;
} else { } else {
row.storeCode == null ? this.$message.warning(this.$t("该店铺未设置编号")) : this.$message.warning(this.$t( row.storeCode == null
"该店铺未设置地址")); ? this.$message.warning(this.$t("该店铺未设置编号"))
: this.$message.warning(this.$t("该店铺未设置地址"));
} }
this.selectedStoreId = row.pkId; this.selectedStoreId = row.pkId;
}, },
@ -620,33 +779,30 @@
research() { research() {
const loading = Loading.service({ const loading = Loading.service({
lock: true, lock: true,
text: 'Loading', text: "Loading",
background: 'rgba(0, 0, 0, 0.7)', background: "rgba(0, 0, 0, 0.7)",
}) });
setTimeout(() => { setTimeout(() => {
loading.close() loading.close();
this.getStoreLists() this.getStoreLists();
}, 1000) }, 1000);
}, },
reChongzhi() { reChongzhi() {
this.queryParams = { this.queryParams = {
pageNum: 1, pageNum: 1,
pageSize: 50, pageSize: 50,
}; };
this.queryParams.province = ""; this.queryParams.province = "";
this.queryParams.city = ""; this.queryParams.city = "";
this.queryParams.address = ""; this.queryParams.address = "";
this.getStoreLists() this.getStoreLists();
}, },
getStoreLists() { getStoreLists() {
this.queryParams.pkCountry = this.pkCountry; this.queryParams.pkCountry = this.pkCountry;
// this.queryParams.province = this.areaData.address[0]; // this.queryParams.province = this.areaData.address[0];
// this.queryParams.city = this.areaData.address[1]; // this.queryParams.city = this.areaData.address[1];
// delete this.queryParams.address; // delete this.queryParams.address;
api api.storeLists(this.queryParams).then((res) => {
.storeLists(this.queryParams)
.then((res) => {
this.storeLists = res.rows; this.storeLists = res.rows;
this.total = res.total; this.total = res.total;
}); });
@ -799,13 +955,7 @@
shoppingId: item, shoppingId: item,
}); });
}); });
if (!this.agreementShow) {
this.$message({
message: this.$t("w_0091"),
type: "warning",
});
return;
}
if (this.isDeliveryWay && !this.ruleForm.recPhone) { if (this.isDeliveryWay && !this.ruleForm.recPhone) {
this.$message({ this.$message({
message: this.$t("w_0092"), message: this.$t("w_0092"),
@ -977,10 +1127,7 @@
}); });
}, },
// 线 // 线
tableRowClassName({ tableRowClassName({ row, rowIndex }) {
row,
rowIndex
}) {
if (rowIndex % 2 == 0) { if (rowIndex % 2 == 0) {
return "warning-row"; return "warning-row";
} else if (rowIndex % 2 == 1) { } else if (rowIndex % 2 == 1) {

View File

@ -9,10 +9,17 @@
<!-- 用户头 --> <!-- 用户头 -->
<personInfo></personInfo> <personInfo></personInfo>
<div class="rt dis_flex"> <div class="rt dis_flex">
<div class="rti dis_flex">{{ $t('w_0282') }}</div> <div class="rti dis_flex">{{ $t("w_0282") }}</div>
</div> </div>
<!-- 表单 --> <!-- 表单 -->
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-position="top" status-icon class="demo-ruleForm"> <el-form
:model="ruleForm"
:rules="rules"
ref="ruleForm"
label-position="top"
status-icon
class="demo-ruleForm"
>
<el-row :gutter="40" class="padRow"> <el-row :gutter="40" class="padRow">
<!-- <el-col :span="6"> <!-- <el-col :span="6">
<el-form-item :label="$t('ENU_REG_AU_2')" <el-form-item :label="$t('ENU_REG_AU_2')"
@ -24,19 +31,37 @@
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('N_I_124')" prop="upgradeMemberCode"> <el-form-item :label="$t('N_I_124')" prop="upgradeMemberCode">
<!-- <div class="dis_flex"> --> <!-- <div class="dis_flex"> -->
<el-input v-model="ruleForm.upgradeMemberCode" disabled :placeholder="$t('w_0046')"></el-input> <el-input
v-model="ruleForm.upgradeMemberCode"
disabled
:placeholder="$t('w_0046')"
></el-input>
<!-- </div> --> <!-- </div> -->
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('CK_KS_14')" prop="upgradeMemberName"> <el-form-item :label="$t('CK_KS_14')" prop="upgradeMemberName">
<el-input v-model="ruleForm.upgradeMemberName" :placeholder="$t('w_0060')" disabled></el-input> <el-input
v-model="ruleForm.upgradeMemberName"
:placeholder="$t('w_0060')"
disabled
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('w_0061')" prop="deliveryWay"> <el-form-item :label="$t('w_0061')" prop="deliveryWay">
<el-select v-model="ruleForm.deliveryWay" @change="selDelivery" :disabled="this.userInfo.pkSettleCountry == 1" :placeholder="$t('w_0062')"> <el-select
<el-option v-for="item in deliList" :key="item.value" :label="item.label" :value="item.value"></el-option> v-model="ruleForm.deliveryWay"
@change="selDelivery"
:disabled="this.userInfo.pkSettleCountry == 1"
:placeholder="$t('w_0062')"
>
<el-option
v-for="item in deliList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -51,53 +76,100 @@
<!-- 收货人信息 --> <!-- 收货人信息 -->
<div v-show="isDeliveryWay"> <div v-show="isDeliveryWay">
<div class="xian"> <div class="xian">
<div class="title">{{ $t('w_0065') }}</div> <div class="title">{{ $t("w_0065") }}</div>
<div class="lan" @click="openAddress">{{ $t('w_0066') }}</div> <div class="lan" @click="openAddress">{{ $t("w_0066") }}</div>
</div> </div>
<el-row :gutter="40" class="padRow"> <el-row :gutter="40" class="padRow">
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('MY_ORD_10')" prop="recName"><el-input v-model="ruleForm.recName" :placeholder="$t('w_0067')"></el-input></el-form-item> <el-form-item :label="$t('MY_ORD_10')" prop="recName"
><el-input
v-model="ruleForm.recName"
:placeholder="$t('w_0067')"
></el-input
></el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('w_0052')" prop="recPhone"><el-input v-model="ruleForm.recPhone" :placeholder="$t('w_0053')"></el-input></el-form-item> <el-form-item :label="$t('w_0052')" prop="recPhone"
><el-input
v-model="ruleForm.recPhone"
:placeholder="$t('w_0053')"
></el-input
></el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('w_0068')" class="dizhi" prop="dizhi"> <el-form-item :label="$t('w_0068')" class="dizhi" prop="dizhi">
<el-cascader v-model="ruleForm.dizhi" @change="setDizhi" :options="areaData" :props="regionParams" :placeholder="$t('w_0069')"></el-cascader> <el-cascader
v-model="ruleForm.dizhi"
@change="setDizhi"
:options="areaData"
:props="regionParams"
:placeholder="$t('w_0069')"
></el-cascader>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('S_C_27')" prop="recAddress"> <el-form-item :label="$t('S_C_27')" prop="recAddress">
<el-input v-model="ruleForm.recAddress" maxlength="200" :placeholder="$t('w_0070')"></el-input> <el-input
v-model="ruleForm.recAddress"
maxlength="200"
:placeholder="$t('w_0070')"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="40" class="padRow"> <el-row :gutter="40" class="padRow">
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('w_0071')"><el-input v-model="ruleForm.postage" disabled></el-input></el-form-item> <el-form-item :label="$t('w_0071')"
><el-input v-model="ruleForm.postage" disabled></el-input
></el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('MY_WAL_22')"><el-input v-model="ruleForm.remark" :placeholder="$t('w_0072')"></el-input></el-form-item> <el-form-item :label="$t('MY_WAL_22')"
><el-input
v-model="ruleForm.remark"
:placeholder="$t('w_0072')"
></el-input
></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
</el-form> </el-form>
<div class="nox"> <div class="nox">
<div class="title">{{ $t('w_0073') }}</div> <div class="title">{{ $t("w_0073") }}</div>
</div> </div>
<div class="local" v-show="isDeliveryWay"> <div class="local" v-show="isDeliveryWay">
<div :class="['local_i', item.pkId == moren ? 'local_a' : '']" v-for="item in addressList" :key="item.pkId"> <div
<el-radio v-model="moren" @input="checkRadio" :label="item.pkId">{{}}</el-radio> :class="['local_i', item.pkId == moren ? 'local_a' : '']"
<div class="local1">{{ item.recArea }}{{ item.recAddress }}({{ item.recName }} )</div> v-for="item in addressList"
<div class="local2" v-show="item.isDefault == 1">{{ $t('w_0074') }}</div> :key="item.pkId"
<div class="local2 local3" v-show="item.isDefault == 0" @click="setDefaultAds(item.pkId)">{{ $t('w_0075') }}</div> >
<div class="local2" @click="changeAds(item.pkId)">{{ $t('w_0076') }}</div> <el-radio v-model="moren" @input="checkRadio" :label="item.pkId"
<div class="local3" @click="delAds(item.pkId)">{{ $t('ENU_CONTROL_TYPE_3') }}</div> >{{}}</el-radio
>
<div class="local1">
{{ item.recArea }}{{ item.recAddress }}({{ item.recName }} )
</div>
<div class="local2" v-show="item.isDefault == 1">
{{ $t("w_0074") }}
</div>
<div
class="local2 local3"
v-show="item.isDefault == 0"
@click="setDefaultAds(item.pkId)"
>
{{ $t("w_0075") }}
</div>
<div class="local2" @click="changeAds(item.pkId)">
{{ $t("w_0076") }}
</div>
<div class="local3" @click="delAds(item.pkId)">
{{ $t("ENU_CONTROL_TYPE_3") }}
</div>
</div> </div>
</div> </div>
<!-- 商品信息 --> <!-- 商品信息 -->
<div class="nox"> <div class="nox">
<div class="title">{{ $t('w_0077') }}</div> <div class="title">{{ $t("w_0077") }}</div>
</div> </div>
<el-table <el-table
:data="allData" :data="allData"
@ -108,7 +180,7 @@
background: '#C8161D', background: '#C8161D',
color: '#fff', color: '#fff',
fontWeight: 'bold', fontWeight: 'bold',
fontSize: '15px' fontSize: '15px',
}" }"
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
> >
@ -120,7 +192,11 @@
<img :src="scope.row.cover1" alt="" /> <img :src="scope.row.cover1" alt="" />
<div>{{ scope.row.waresName }}</div> <div>{{ scope.row.waresName }}</div>
</div> </div>
<div class="goods_tit" v-for="item in scope.row.waresItemsParamList" :key="item.pkWaresSpecsSku"> <div
class="goods_tit"
v-for="item in scope.row.waresItemsParamList"
:key="item.pkWaresSpecsSku"
>
<div class="goods_tit_l"> <div class="goods_tit_l">
<img :src="item.specCover" alt="" /> <img :src="item.specCover" alt="" />
<div class="goods_tit_lr"> <div class="goods_tit_lr">
@ -133,18 +209,34 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="goodsPrice" :label="$t('w_0079') + '(¥)'"> <el-table-column
align="center"
prop="goodsPrice"
:label="$t('w_0079') + '(¥)'"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.price | numberToCurrency }}</span> <span>{{ scope.row.price | numberToCurrency }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="goodsAchive" :label="$t('w_0080') + '(PV)'"> <el-table-column
align="center"
prop="goodsAchive"
:label="$t('w_0080') + '(PV)'"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.achieve | numberToCurrency }}</span> <span>{{ scope.row.achieve | numberToCurrency }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="quantity" :label="$t('w_0081')"></el-table-column> <el-table-column
<el-table-column align="center" prop="spyjxj" :label="$t('w_0082') + 'PV'"> align="center"
prop="quantity"
:label="$t('w_0081')"
></el-table-column>
<el-table-column
align="center"
prop="spyjxj"
:label="$t('w_0082') + 'PV'"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.achieveAmount | numberToCurrency }}</span> <span>{{ scope.row.achieveAmount | numberToCurrency }}</span>
</template> </template>
@ -156,8 +248,10 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="tab_b"> <div class="tab_b">
<div>{{ $t('w_0083') }}:¥{{ allGoodsData.priceAmount | numberToCurrency }}</div> <div>
<div>{{ $t('w_0071') }}:¥{{ ruleForm.postage | numberToCurrency }}</div> {{ $t("w_0083") }}:¥{{ allGoodsData.priceAmount | numberToCurrency }}
</div>
<div>{{ $t("w_0071") }}:¥{{ ruleForm.postage | numberToCurrency }}</div>
</div> </div>
<AddAddress ref="addAddress" @getAdList="getAddressList"></AddAddress> <AddAddress ref="addAddress" @getAdList="getAddressList"></AddAddress>
<div class="zhan"></div> <div class="zhan"></div>
@ -166,23 +260,46 @@
<div class="footer_t"> <div class="footer_t">
<div class="footer_tt"> <div class="footer_tt">
<div class="dis_flex"> <div class="dis_flex">
<div class="f1">{{ $t('w_0325') }}:</div> <div class="f1">{{ $t("w_0325") }}:</div>
<div class="f2">{{ userInfo.currencyIcon }}{{ totalAmont | numberToCurrency }}</div> <div class="f2">
{{ userInfo.currencyIcon }}{{ totalAmont | numberToCurrency }}
</div>
</div> </div>
<div class="dis_flex"> <div class="dis_flex">
<div class="f1">{{ $t('ENU_TOTAL_V_1') }}:</div> <div class="f1">{{ $t("ENU_TOTAL_V_1") }}:</div>
<div class="f3">{{ allGoodsData.achieveAmount | numberToCurrency }}</div> <div class="f3">
{{ allGoodsData.achieveAmount | numberToCurrency }}
</div> </div>
</div> </div>
<div class="footer_tt" v-show="ruleForm.recAddress && ruleForm.recName && ruleForm.recPhone && ruleForm.nameList"> </div>
<div class="f2 f4">{{ $t('w_0084') }}{{ ruleForm.nameList }}{{ ruleForm.recAddress }}</div> <div
<div class="f4">{{ $t('MY_ORD_10') }}{{ ruleForm.recName }} {{ ruleForm.recPhone }}</div> class="footer_tt"
v-show="
ruleForm.recAddress &&
ruleForm.recName &&
ruleForm.recPhone &&
ruleForm.nameList
"
>
<div class="f2 f4">
{{ $t("w_0084") }}{{ ruleForm.nameList }}{{ ruleForm.recAddress }}
</div>
<div class="f4">
{{ $t("MY_ORD_10") }}{{ ruleForm.recName }}
{{ ruleForm.recPhone }}
</div>
</div> </div>
</div> </div>
<div class="footer_b"> <div class="footer_b">
<!-- 协议 --> <!-- 协议 -->
<agreement :isShow="agreementShow" ref="agree" @agree="agree"></agreement> <!-- <agreement
<div class="btn" @click="submitRegister('ruleForm')">{{ $t('w_0085') }}</div> :isShow="agreementShow"
ref="agree"
@agree="agree"
></agreement> -->
<div class="btn" @click="submitRegister('ruleForm')">
{{ $t("w_0085") }}
</div>
</div> </div>
</div> </div>
<!-- 强制阅读协议 --> <!-- 强制阅读协议 -->
@ -192,26 +309,26 @@
</template> </template>
<script> <script>
import personInfo from '@/components/personInfo.vue'; import personInfo from "@/components/personInfo.vue";
import AddAddress from '@/components/AddAddress.vue'; import AddAddress from "@/components/AddAddress.vue";
import agreement from '@/components/agreement.vue'; import agreement from "@/components/agreement.vue";
import { mapGetters } from 'vuex'; import { mapGetters } from "vuex";
import * as api from '@/api/register.js'; import * as api from "@/api/register.js";
import { setTokenMi } from '@/util/auth'; import { setTokenMi } from "@/util/auth";
import Pay from '@/components/Pay.vue'; import Pay from "@/components/Pay.vue";
import mustAgreeMent from '@/components/mustAgreeMent.vue'; import mustAgreeMent from "@/components/mustAgreeMent.vue";
export default { export default {
components: { components: {
personInfo, personInfo,
AddAddress, AddAddress,
agreement, agreement,
Pay, Pay,
mustAgreeMent mustAgreeMent,
}, },
data() { data() {
let validateRecTransType = (rule, value, callback) => { let validateRecTransType = (rule, value, callback) => {
if (this.ruleForm.transType == '' && this.isDeliveryWay) { if (this.ruleForm.transType == "" && this.isDeliveryWay) {
callback(new Error(this.$t('w_0064'))); callback(new Error(this.$t("w_0064")));
} else { } else {
callback(); callback();
} }
@ -219,39 +336,49 @@ export default {
return { return {
waresCodeList: [], waresCodeList: [],
isPay: false, isPay: false,
paramsPost: '', paramsPost: "",
isClick: 0, isClick: 0,
ruleForm: { ruleForm: {
dizhi: [], dizhi: [],
fwzx: '', fwzx: "",
upgradeMemberCode: '', upgradeMemberCode: "",
upgradeMemberName: '', upgradeMemberName: "",
postage: '', postage: "",
recName: '', recName: "",
recPhone: '', recPhone: "",
recAddress: '', recAddress: "",
deliveryWay: '', deliveryWay: "",
transType: '' transType: "",
}, },
rules: { rules: {
upgradeMemberCode: [ upgradeMemberCode: [
{ {
required: true, required: true,
validator: this.upgradeMemberCodePass, validator: this.upgradeMemberCodePass,
trigger: 'blur' trigger: "blur",
} },
],
gradeName: [
{ required: true, message: this.$t("w_0086"), trigger: "change" },
],
upgradeMemberName: [
{ required: true, message: this.$t("w_0060"), trigger: "change" },
],
recName: [
{ required: true, message: this.$t("w_0087"), trigger: "blur" },
],
recPhone: [
{ required: true, message: this.$t("w_0053"), trigger: "blur" },
],
recAddress: [
{ required: true, message: this.$t("w_0070"), trigger: "blur" },
], ],
gradeName: [{ required: true, message: this.$t('w_0086'), trigger: 'change' }],
upgradeMemberName: [{ required: true, message: this.$t('w_0060'), trigger: 'change' }],
recName: [{ required: true, message: this.$t('w_0087'), trigger: 'blur' }],
recPhone: [{ required: true, message: this.$t('w_0053'), trigger: 'blur' }],
recAddress: [{ required: true, message: this.$t('w_0070'), trigger: 'blur' }],
deliveryWay: [ deliveryWay: [
{ {
required: true, required: true,
message: this.$t('w_0062'), message: this.$t("w_0062"),
trigger: 'change' trigger: "change",
} },
], ],
// transType: [ // transType: [
// { // {
@ -260,47 +387,47 @@ export default {
// trigger: 'change', // trigger: 'change',
// }, // },
// ], // ],
transType: [{ validator: validateRecTransType }] transType: [{ validator: validateRecTransType }],
}, },
addressList: [], addressList: [],
moren: '', moren: "",
allGoodsData: [], allGoodsData: [],
allData: [], allData: [],
agreementShow: false, agreementShow: true,
countryList: [], countryList: [],
transList: [ transList: [
{ {
value: 1, value: 1,
label: '陆运' label: "陆运",
}, },
{ {
value: 2, value: 2,
label: '空运' label: "空运",
}, },
{ {
value: 3, value: 3,
label: '海运' label: "海运",
} },
], ],
deliList: [], deliList: [],
bankLists: [], bankLists: [],
areaData: [], areaData: [],
regionParams: { regionParams: {
label: 'name', label: "name",
value: 'id', value: "id",
children: 'children', children: "children",
expandTrigger: 'hover' expandTrigger: "hover",
}, },
totalPrice: 0, totalPrice: 0,
totalAchive: 0, totalAchive: 0,
isLoading: '', isLoading: "",
isDeliveryWay: true, isDeliveryWay: true,
shoppingArr: '', shoppingArr: "",
totalAmont: 0 totalAmont: 0,
}; };
}, },
computed: { computed: {
...mapGetters(['userInfo']) ...mapGetters(["userInfo"]),
}, },
mounted() { mounted() {
// // // //
@ -336,11 +463,11 @@ export default {
// // // //
// // this.getMember() // // this.getMember()
// //
this.shoppingArr = JSON.parse(localStorage.getItem('allGoods')); this.shoppingArr = JSON.parse(localStorage.getItem("allGoods"));
// //
this.getCatDetail(); this.getCatDetail();
// //
api.generate().then(res => { api.generate().then((res) => {
setTokenMi(res.msg); setTokenMi(res.msg);
}); });
if (this.userInfo.pkSettleCountry == 1) { if (this.userInfo.pkSettleCountry == 1) {
@ -352,12 +479,13 @@ export default {
// name // name
upgradeMemberCodePass(rule, value, callback) { upgradeMemberCodePass(rule, value, callback) {
if (!value) { if (!value) {
callback(new Error(this.$t('w_0046'))); callback(new Error(this.$t("w_0046")));
} else { } else {
api.upgRel({ api
upgradeMemberCode: value .upgRel({
upgradeMemberCode: value,
}) })
.then(res => { .then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.ruleForm.upgradeMemberName = res.data.upgradeMemberName; this.ruleForm.upgradeMemberName = res.data.upgradeMemberName;
// this.getMember() // this.getMember()
@ -365,16 +493,16 @@ export default {
callback(); callback();
} }
}) })
.catch(err => { .catch((err) => {
callback(new Error(err)); callback(new Error(err));
}); });
} }
}, },
setDizhi(e, val) { setDizhi(e, val) {
let arr = this.flatten(this.areaData); let arr = this.flatten(this.areaData);
let nameList = ''; let nameList = "";
arr.forEach(item => { arr.forEach((item) => {
this.ruleForm.dizhi.forEach(ctem => { this.ruleForm.dizhi.forEach((ctem) => {
if (ctem == item.id) { if (ctem == item.id) {
nameList += item.name; nameList += item.name;
} }
@ -383,16 +511,18 @@ export default {
this.ruleForm.nameList = nameList; this.ruleForm.nameList = nameList;
this.allGoodsData.recProvince = this.ruleForm.dizhi[0]; this.allGoodsData.recProvince = this.ruleForm.dizhi[0];
this.allGoodsData.recCity = this.ruleForm.dizhi[1]; this.allGoodsData.recCity = this.ruleForm.dizhi[1];
this.allGoodsData.recCounty = this.ruleForm.dizhi[2] || ''; this.allGoodsData.recCounty = this.ruleForm.dizhi[2] || "";
this.getPostAge(); this.getPostAge();
}, },
getCatDetail() { getCatDetail() {
api.shoppingWaresDetail({ api
.shoppingWaresDetail({
shoppingIds: this.shoppingArr, shoppingIds: this.shoppingArr,
specialArea: 10 specialArea: 10,
}).then(res => { })
.then((res) => {
this.allGoodsData = res.data; this.allGoodsData = res.data;
this.waresCodeList = res.data.orderItemsParams.map(item => { this.waresCodeList = res.data.orderItemsParams.map((item) => {
return item.waresCode; return item.waresCode;
}); });
this.allGoodsData.specialArea = 10; this.allGoodsData.specialArea = 10;
@ -423,23 +553,25 @@ export default {
openLoading() { openLoading() {
this.isLoading = this.$loading({ this.isLoading = this.$loading({
lock: true, lock: true,
text: 'Loading', text: "Loading",
spinner: 'el-icon-loading', spinner: "el-icon-loading",
background: 'rgba(0, 0, 0, 0.7)' background: "rgba(0, 0, 0, 0.7)",
}); });
}, },
resetAll() { resetAll() {
this.ruleForm.parent = ''; this.ruleForm.parent = "";
this.ruleForm.deliveryWay = ''; this.ruleForm.deliveryWay = "";
this.ruleForm.transType = ''; this.ruleForm.transType = "";
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ruleForm.clearValidate(); this.$refs.ruleForm.clearValidate();
}); });
}, },
getUserName() { getUserName() {
api.upgRel({ api
upgradeMemberCode: this.ruleForm.upgradeMemberCode .upgRel({
}).then(res => { upgradeMemberCode: this.ruleForm.upgradeMemberCode,
})
.then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.ruleForm.upgradeMemberName = res.data.upgradeMemberName; this.ruleForm.upgradeMemberName = res.data.upgradeMemberName;
this.$forceUpdate(); this.$forceUpdate();
@ -450,8 +582,8 @@ export default {
if (val) { if (val) {
this.isPay = false; this.isPay = false;
this.$router.push({ this.$router.push({
path: '/vipCenter', path: "/vipCenter",
query: { id: 1 } query: { id: 1 },
}); });
} else { } else {
this.$confirm(this.$t("w_0090"), "", { this.$confirm(this.$t("w_0090"), "", {
@ -459,54 +591,49 @@ export default {
cancelButtonText: this.$t("ENU_P_TYPE0"), cancelButtonText: this.$t("ENU_P_TYPE0"),
type: "warning", type: "warning",
}) })
.then(_ => { .then((_) => {
this.isPay = false; this.isPay = false;
this.$router.push({ this.$router.push({
path: '/vipCenter', path: "/vipCenter",
query: { id: 1 } query: { id: 1 },
}); });
}) })
.catch(_ => {}); .catch((_) => {});
} }
}, },
// //
submitRegister(formName) { submitRegister(formName) {
let deleteList = []; let deleteList = [];
this.shoppingArr.forEach(item => { this.shoppingArr.forEach((item) => {
deleteList.push({ deleteList.push({
shoppingId: item shoppingId: item,
}); });
}); });
if (!this.agreementShow) {
this.$message({
message: this.$t('w_0091'),
type: 'warning'
});
return;
}
if (this.isDeliveryWay && !this.ruleForm.recPhone) { if (this.isDeliveryWay && !this.ruleForm.recPhone) {
this.$message({ this.$message({
message: this.$t('w_0092'), message: this.$t("w_0092"),
type: 'warning' type: "warning",
}); });
return; return;
} }
this.$refs[formName].validate(valid => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
this.openLoading(); this.openLoading();
let obj = Object.assign({}, this.allGoodsData, this.ruleForm, { let obj = Object.assign({}, this.allGoodsData, this.ruleForm, {
deleteList: deleteList deleteList: deleteList,
}); });
api.confirmOthOrder(obj) api
.then(res => { .confirmOthOrder(obj)
.then((res) => {
this.isLoading.close(); this.isLoading.close();
if (res.code == 200) { if (res.code == 200) {
this.isPay = true; this.isPay = true;
this.paramsPost = res.data; this.paramsPost = res.data;
} }
}) })
.catch(err => { .catch((err) => {
this.isLoading.close(); this.isLoading.close();
}); });
} else { } else {
@ -522,26 +649,33 @@ export default {
}, },
flatten(arr) { flatten(arr) {
return arr.reduce((result, item) => { return arr.reduce((result, item) => {
return result.concat(item, Array.isArray(item.children) ? this.flatten(item.children) : []); return result.concat(
item,
Array.isArray(item.children) ? this.flatten(item.children) : []
);
}, []); }, []);
}, },
checkRadio() { checkRadio() {
this.$set(this.ruleForm, 'dizhi', []); this.$set(this.ruleForm, "dizhi", []);
let arr = []; let arr = [];
this.addressList.forEach(item => { this.addressList.forEach((item) => {
if (item.pkId == this.moren) { if (item.pkId == this.moren) {
this.ruleForm.recName = item.recName; this.ruleForm.recName = item.recName;
this.ruleForm.nameList = item.recArea; this.ruleForm.nameList = item.recArea;
this.ruleForm.recPhone = item.recPhone; this.ruleForm.recPhone = item.recPhone;
this.ruleForm.recAddress = item.recAddress; this.ruleForm.recAddress = item.recAddress;
arr = [item.recProvince + '', item.recCity + '', (item.recCounty || '') + '']; arr = [
item.recProvince + "",
item.recCity + "",
(item.recCounty || "") + "",
];
} }
}); });
arr = arr.filter(s => { arr = arr.filter((s) => {
return s && s.trim(); return s && s.trim();
}); });
this.$set(this.ruleForm, 'dizhi', arr); this.$set(this.ruleForm, "dizhi", arr);
this.allGoodsData.deliveryWay = this.ruleForm.deliveryWay; this.allGoodsData.deliveryWay = this.ruleForm.deliveryWay;
this.allGoodsData.transType = this.ruleForm.transType; this.allGoodsData.transType = this.ruleForm.transType;
this.allGoodsData.recProvince = this.ruleForm.dizhi[0]; this.allGoodsData.recProvince = this.ruleForm.dizhi[0];
@ -552,15 +686,17 @@ export default {
}, },
getPostAge() { getPostAge() {
let deleteList = []; let deleteList = [];
this.shoppingArr.forEach(item => { this.shoppingArr.forEach((item) => {
deleteList.push({ deleteList.push({
shoppingId: item shoppingId: item,
}); });
}); });
this.allGoodsData.deleteList = deleteList; this.allGoodsData.deleteList = deleteList;
api.queryPostage(this.allGoodsData).then(res => { api.queryPostage(this.allGoodsData).then((res) => {
this.ruleForm.postage = Number(res.data.postage).toFixed(2); this.ruleForm.postage = Number(res.data.postage).toFixed(2);
this.totalAmont = parseFloat(this.allGoodsData.priceAmount) + parseFloat(res.data.postage); this.totalAmont =
parseFloat(this.allGoodsData.priceAmount) +
parseFloat(res.data.postage);
}); });
}, },
// getMember() { // getMember() {
@ -574,32 +710,32 @@ export default {
// }) // })
// }, // },
getTransList() { getTransList() {
api.transportList().then(res => { api.transportList().then((res) => {
this.transList = res.data; this.transList = res.data;
}); });
}, },
getDeliveryList() { getDeliveryList() {
api.deliveryList().then(res => { api.deliveryList().then((res) => {
this.deliList = res.data; this.deliList = res.data;
}); });
}, },
delAds(id) { delAds(id) {
this.$confirm(this.$t('w_0088') + '?', '', { this.$confirm(this.$t("w_0088") + "?", "", {
confirmButtonText: this.$t('w_0035'), confirmButtonText: this.$t("w_0035"),
cancelButtonText: this.$t('ENU_P_TYPE0'), cancelButtonText: this.$t("ENU_P_TYPE0"),
type: 'warning' type: "warning",
}).then(() => { }).then(() => {
api.delAddress(id).then(res => { api.delAddress(id).then((res) => {
this.$message({ this.$message({
type: 'success', type: "success",
message: this.$t('w_0089') + '!' message: this.$t("w_0089") + "!",
}); });
this.getAddressList(); this.getAddressList();
}); });
}); });
}, },
getAllArea() { getAllArea() {
api.allArea().then(res => { api.allArea().then((res) => {
this.areaData = res.data; this.areaData = res.data;
}); });
}, },
@ -607,7 +743,7 @@ export default {
this.$refs.addAddress.isShowAddress(true, this.areaData, id); this.$refs.addAddress.isShowAddress(true, this.areaData, id);
}, },
setDefaultAds(id) { setDefaultAds(id) {
api.addressDefault(id).then(res => { api.addressDefault(id).then((res) => {
this.getAddressList(); this.getAddressList();
}); });
}, },
@ -619,9 +755,9 @@ export default {
this.$refs.addAddress.isShowAddress(true, this.areaData); this.$refs.addAddress.isShowAddress(true, this.areaData);
}, },
getAddressList() { getAddressList() {
api.addressList({}).then(res => { api.addressList({}).then((res) => {
this.addressList = res.data; this.addressList = res.data;
this.addressList.forEach(item => { this.addressList.forEach((item) => {
if (item.isDefault == 1) { if (item.isDefault == 1) {
this.moren = item.pkId; this.moren = item.pkId;
this.checkRadio(); this.checkRadio();
@ -633,13 +769,13 @@ export default {
// 线 // 线
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 0) { if (rowIndex % 2 == 0) {
return 'warning-row'; return "warning-row";
} else if (rowIndex % 2 == 1) { } else if (rowIndex % 2 == 1) {
return 'success-row'; return "success-row";
}
return '';
}
} }
return "";
},
},
}; };
</script> </script>

File diff suppressed because it is too large Load Diff

View File

@ -9,10 +9,17 @@
<!-- 用户头 --> <!-- 用户头 -->
<personInfo></personInfo> <personInfo></personInfo>
<div class="rt dis_flex"> <div class="rt dis_flex">
<div class="rti dis_flex">{{ $t('MN_F_T_8') }}</div> <div class="rti dis_flex">{{ $t("MN_F_T_8") }}</div>
</div> </div>
<!-- 表单 --> <!-- 表单 -->
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-position="top" status-icon class="demo-ruleForm"> <el-form
:model="ruleForm"
:rules="rules"
ref="ruleForm"
label-position="top"
status-icon
class="demo-ruleForm"
>
<el-row :gutter="40" class="padRow"> <el-row :gutter="40" class="padRow">
<!-- <el-col :span="6"> <!-- <el-col :span="6">
<el-form-item :label="$t('ENU_REG_AU_2')" <el-form-item :label="$t('ENU_REG_AU_2')"
@ -24,19 +31,37 @@
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('N_I_124')" prop="upgradeMemberCode"> <el-form-item :label="$t('N_I_124')" prop="upgradeMemberCode">
<!-- <div class="dis_flex"> --> <!-- <div class="dis_flex"> -->
<el-input :disabled="true" v-model="ruleForm.upgradeMemberCode" :placeholder="$t('w_0046')"></el-input> <el-input
:disabled="true"
v-model="ruleForm.upgradeMemberCode"
:placeholder="$t('w_0046')"
></el-input>
<!-- </div> --> <!-- </div> -->
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('CK_KS_14')" prop="upgradeMemberName"> <el-form-item :label="$t('CK_KS_14')" prop="upgradeMemberName">
<el-input v-model="ruleForm.upgradeMemberName" :placeholder="$t('w_0060')" disabled></el-input> <el-input
v-model="ruleForm.upgradeMemberName"
:placeholder="$t('w_0060')"
disabled
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('w_0061')" prop="deliveryWay"> <el-form-item :label="$t('w_0061')" prop="deliveryWay">
<el-select v-model="ruleForm.deliveryWay" @change="selDelivery" :disabled="this.userInfo.pkSettleCountry == 1" :placeholder="$t('w_0062')"> <el-select
<el-option v-for="item in deliList" :key="item.value" :label="item.label" :value="item.value"></el-option> v-model="ruleForm.deliveryWay"
@change="selDelivery"
:disabled="this.userInfo.pkSettleCountry == 1"
:placeholder="$t('w_0062')"
>
<el-option
v-for="item in deliList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -51,53 +76,100 @@
<!-- 收货人信息 --> <!-- 收货人信息 -->
<div v-show="isDeliveryWay"> <div v-show="isDeliveryWay">
<div class="xian"> <div class="xian">
<div class="title">{{ $t('w_0065') }}</div> <div class="title">{{ $t("w_0065") }}</div>
<div class="lan" @click="openAddress">{{ $t('w_0066') }}</div> <div class="lan" @click="openAddress">{{ $t("w_0066") }}</div>
</div> </div>
<el-row :gutter="40" class="padRow"> <el-row :gutter="40" class="padRow">
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('MY_ORD_10')" prop="recName"><el-input v-model="ruleForm.recName" :placeholder="$t('w_0067')"></el-input></el-form-item> <el-form-item :label="$t('MY_ORD_10')" prop="recName"
><el-input
v-model="ruleForm.recName"
:placeholder="$t('w_0067')"
></el-input
></el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('w_0052')" prop="recPhone"><el-input v-model="ruleForm.recPhone" :placeholder="$t('w_0053')"></el-input></el-form-item> <el-form-item :label="$t('w_0052')" prop="recPhone"
><el-input
v-model="ruleForm.recPhone"
:placeholder="$t('w_0053')"
></el-input
></el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('w_0068')" class="dizhi" prop="dizhi"> <el-form-item :label="$t('w_0068')" class="dizhi" prop="dizhi">
<el-cascader v-model="ruleForm.dizhi" @change="setDizhi" :options="areaData" :props="regionParams" :placeholder="$t('w_0069')"></el-cascader> <el-cascader
v-model="ruleForm.dizhi"
@change="setDizhi"
:options="areaData"
:props="regionParams"
:placeholder="$t('w_0069')"
></el-cascader>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('S_C_27')" prop="recAddress"> <el-form-item :label="$t('S_C_27')" prop="recAddress">
<el-input v-model="ruleForm.recAddress" maxlength="200" :placeholder="$t('w_0070')"></el-input> <el-input
v-model="ruleForm.recAddress"
maxlength="200"
:placeholder="$t('w_0070')"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="40" class="padRow"> <el-row :gutter="40" class="padRow">
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('w_0071')"><el-input v-model="ruleForm.postage" disabled></el-input></el-form-item> <el-form-item :label="$t('w_0071')"
><el-input v-model="ruleForm.postage" disabled></el-input
></el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('MY_WAL_22')"><el-input v-model="ruleForm.remark" :placeholder="$t('w_0072')"></el-input></el-form-item> <el-form-item :label="$t('MY_WAL_22')"
><el-input
v-model="ruleForm.remark"
:placeholder="$t('w_0072')"
></el-input
></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
</el-form> </el-form>
<div class="nox"> <div class="nox">
<div class="title">{{ $t('w_0073') }}</div> <div class="title">{{ $t("w_0073") }}</div>
</div> </div>
<div class="local" v-show="isDeliveryWay"> <div class="local" v-show="isDeliveryWay">
<div :class="['local_i', item.pkId == moren ? 'local_a' : '']" v-for="item in addressList" :key="item.pkId"> <div
<el-radio v-model="moren" @input="checkRadio" :label="item.pkId">{{}}</el-radio> :class="['local_i', item.pkId == moren ? 'local_a' : '']"
<div class="local1">{{ item.recArea }}{{ item.recAddress }}({{ item.recName }} )</div> v-for="item in addressList"
<div class="local2" v-show="item.isDefault == 1">{{ $t('w_0074') }}</div> :key="item.pkId"
<div class="local2 local3" v-show="item.isDefault == 0" @click="setDefaultAds(item.pkId)">{{ $t('w_0075') }}</div> >
<div class="local2" @click="changeAds(item.pkId)">{{ $t('w_0076') }}</div> <el-radio v-model="moren" @input="checkRadio" :label="item.pkId"
<div class="local3" @click="delAds(item.pkId)">{{ $t('ENU_CONTROL_TYPE_3') }}</div> >{{}}</el-radio
>
<div class="local1">
{{ item.recArea }}{{ item.recAddress }}({{ item.recName }} )
</div>
<div class="local2" v-show="item.isDefault == 1">
{{ $t("w_0074") }}
</div>
<div
class="local2 local3"
v-show="item.isDefault == 0"
@click="setDefaultAds(item.pkId)"
>
{{ $t("w_0075") }}
</div>
<div class="local2" @click="changeAds(item.pkId)">
{{ $t("w_0076") }}
</div>
<div class="local3" @click="delAds(item.pkId)">
{{ $t("ENU_CONTROL_TYPE_3") }}
</div>
</div> </div>
</div> </div>
<!-- 商品信息 --> <!-- 商品信息 -->
<div class="nox"> <div class="nox">
<div class="title">{{ $t('w_0077') }}</div> <div class="title">{{ $t("w_0077") }}</div>
</div> </div>
<el-table <el-table
:data="allData" :data="allData"
@ -108,7 +180,7 @@
background: '#C8161D', background: '#C8161D',
color: '#fff', color: '#fff',
fontWeight: 'bold', fontWeight: 'bold',
fontSize: '15px' fontSize: '15px',
}" }"
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
> >
@ -120,7 +192,11 @@
<img :src="scope.row.cover1" alt="" /> <img :src="scope.row.cover1" alt="" />
<div>{{ scope.row.waresName }}</div> <div>{{ scope.row.waresName }}</div>
</div> </div>
<div class="goods_tit" v-for="item in scope.row.waresItemsParamList" :key="item.pkWaresSpecsSku"> <div
class="goods_tit"
v-for="item in scope.row.waresItemsParamList"
:key="item.pkWaresSpecsSku"
>
<div class="goods_tit_l"> <div class="goods_tit_l">
<img :src="item.specCover" alt="" /> <img :src="item.specCover" alt="" />
<div class="goods_tit_lr"> <div class="goods_tit_lr">
@ -133,18 +209,34 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="goodsPrice" :label="$t('w_0079') + '(¥)'"> <el-table-column
align="center"
prop="goodsPrice"
:label="$t('w_0079') + '(¥)'"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.price | numberToCurrency }}</span> <span>{{ scope.row.price | numberToCurrency }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="goodsAchive" :label="$t('w_0080') + '(PV)'"> <el-table-column
align="center"
prop="goodsAchive"
:label="$t('w_0080') + '(PV)'"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.achieve | numberToCurrency }}</span> <span>{{ scope.row.achieve | numberToCurrency }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="quantity" :label="$t('w_0081')"></el-table-column> <el-table-column
<el-table-column align="center" prop="spyjxj" :label="$t('w_0082') + 'PV'"> align="center"
prop="quantity"
:label="$t('w_0081')"
></el-table-column>
<el-table-column
align="center"
prop="spyjxj"
:label="$t('w_0082') + 'PV'"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.achieveAmount | numberToCurrency }}</span> <span>{{ scope.row.achieveAmount | numberToCurrency }}</span>
</template> </template>
@ -156,8 +248,10 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="tab_b"> <div class="tab_b">
<div>{{ $t('w_0083') }}:¥{{ allGoodsData.priceAmount | numberToCurrency }}</div> <div>
<div>{{ $t('w_0071') }}:¥{{ ruleForm.postage | numberToCurrency }}</div> {{ $t("w_0083") }}:¥{{ allGoodsData.priceAmount | numberToCurrency }}
</div>
<div>{{ $t("w_0071") }}:¥{{ ruleForm.postage | numberToCurrency }}</div>
</div> </div>
<AddAddress ref="addAddress" @getAdList="getAddressList"></AddAddress> <AddAddress ref="addAddress" @getAdList="getAddressList"></AddAddress>
<div class="zhan"></div> <div class="zhan"></div>
@ -166,23 +260,42 @@
<div class="footer_t"> <div class="footer_t">
<div class="footer_tt"> <div class="footer_tt">
<div class="dis_flex"> <div class="dis_flex">
<div class="f1">{{ $t('w_0325') }}:</div> <div class="f1">{{ $t("w_0325") }}:</div>
<div class="f2">{{ userInfo.currencyIcon }}{{ totalAmont | numberToCurrency }}</div> <div class="f2">
{{ userInfo.currencyIcon }}{{ totalAmont | numberToCurrency }}
</div>
</div> </div>
<div class="dis_flex"> <div class="dis_flex">
<div class="f1">{{ $t('ENU_TOTAL_V_1') }}:</div> <div class="f1">{{ $t("ENU_TOTAL_V_1") }}:</div>
<div class="f3">{{ allGoodsData.achieveAmount | numberToCurrency }}</div> <div class="f3">
{{ allGoodsData.achieveAmount | numberToCurrency }}
</div> </div>
</div> </div>
<div class="footer_tt" v-show="ruleForm.recAddress && ruleForm.recName && ruleForm.recPhone && ruleForm.nameList"> </div>
<div class="f2 f4">{{ $t('w_0084') }}{{ ruleForm.nameList }}{{ ruleForm.recAddress }}</div> <div
<div class="f4">{{ $t('MY_ORD_10') }}{{ ruleForm.recName }} {{ ruleForm.recPhone }}</div> class="footer_tt"
v-show="
ruleForm.recAddress &&
ruleForm.recName &&
ruleForm.recPhone &&
ruleForm.nameList
"
>
<div class="f2 f4">
{{ $t("w_0084") }}{{ ruleForm.nameList }}{{ ruleForm.recAddress }}
</div>
<div class="f4">
{{ $t("MY_ORD_10") }}{{ ruleForm.recName }}
{{ ruleForm.recPhone }}
</div>
</div> </div>
</div> </div>
<div class="footer_b"> <div class="footer_b">
<!-- 协议 --> <!-- 协议 -->
<agreement :isShow="agreementShow" ref="agree" @agree="agree"></agreement> <!-- <agreement :isShow="agreementShow" ref="agree" @agree="agree"></agreement> -->
<div class="btn" @click="submitRegister('ruleForm')">{{ $t('w_0085') }}</div> <div class="btn" @click="submitRegister('ruleForm')">
{{ $t("w_0085") }}
</div>
</div> </div>
</div> </div>
<!-- 强制阅读协议 --> <!-- 强制阅读协议 -->
@ -192,26 +305,26 @@
</template> </template>
<script> <script>
import personInfo from '@/components/personInfo.vue'; import personInfo from "@/components/personInfo.vue";
import AddAddress from '@/components/AddAddress.vue'; import AddAddress from "@/components/AddAddress.vue";
import agreement from '@/components/agreement.vue'; import agreement from "@/components/agreement.vue";
import { mapGetters } from 'vuex'; import { mapGetters } from "vuex";
import * as api from '@/api/register.js'; import * as api from "@/api/register.js";
import { setTokenMi } from '@/util/auth'; import { setTokenMi } from "@/util/auth";
import Pay from '@/components/Pay.vue'; import Pay from "@/components/Pay.vue";
import mustAgreeMent from '@/components/mustAgreeMent.vue'; import mustAgreeMent from "@/components/mustAgreeMent.vue";
export default { export default {
components: { components: {
personInfo, personInfo,
AddAddress, AddAddress,
agreement, agreement,
Pay, Pay,
mustAgreeMent mustAgreeMent,
}, },
data() { data() {
let validateRecTransType = (rule, value, callback) => { let validateRecTransType = (rule, value, callback) => {
if (this.ruleForm.transType == '' && this.isDeliveryWay) { if (this.ruleForm.transType == "" && this.isDeliveryWay) {
callback(new Error(this.$t('w_0064'))); callback(new Error(this.$t("w_0064")));
} else { } else {
callback(); callback();
} }
@ -219,40 +332,52 @@ export default {
return { return {
waresCodeList: [], waresCodeList: [],
isPay: false, isPay: false,
paramsPost: '', paramsPost: "",
isClick: 0, isClick: 0,
ruleForm: { ruleForm: {
upgradeMemberCode: '', upgradeMemberCode: "",
dizhi: [], dizhi: [],
fwzx: '', fwzx: "",
upgradeMemberName: '', upgradeMemberName: "",
postage: '', postage: "",
recName: '', recName: "",
recPhone: '', recPhone: "",
recAddress: '', recAddress: "",
deliveryWay: '', deliveryWay: "",
transType: '' transType: "",
}, },
rules: { rules: {
upgradeMemberCode: [ upgradeMemberCode: [
{ {
required: true, required: true,
validator: this.upgradeMemberCodePass, validator: this.upgradeMemberCodePass,
trigger: 'blur' trigger: "blur",
} },
],
fwzx: [
{ required: true, message: "请输入活动名称", trigger: "change" },
],
gradeName: [
{ required: true, message: this.$t("w_0086"), trigger: "change" },
],
upgradeMemberName: [
{ required: true, message: this.$t("w_0097"), trigger: "blur" },
],
recName: [
{ required: true, message: this.$t("w_0087"), trigger: "blur" },
],
recPhone: [
{ required: true, message: this.$t("w_0053"), trigger: "blur" },
],
recAddress: [
{ required: true, message: this.$t("w_0070"), trigger: "blur" },
], ],
fwzx: [{ required: true, message: '请输入活动名称', trigger: 'change' }],
gradeName: [{ required: true, message: this.$t('w_0086'), trigger: 'change' }],
upgradeMemberName: [{ required: true, message: this.$t('w_0097'), trigger: 'blur' }],
recName: [{ required: true, message: this.$t('w_0087'), trigger: 'blur' }],
recPhone: [{ required: true, message: this.$t('w_0053'), trigger: 'blur' }],
recAddress: [{ required: true, message: this.$t('w_0070'), trigger: 'blur' }],
deliveryWay: [ deliveryWay: [
{ {
required: true, required: true,
message: this.$t('w_0062'), message: this.$t("w_0062"),
trigger: 'change' trigger: "change",
} },
], ],
// transType: [ // transType: [
// { // {
@ -261,48 +386,48 @@ export default {
// trigger: 'change', // trigger: 'change',
// }, // },
// ], // ],
transType: [{ validator: validateRecTransType }] transType: [{ validator: validateRecTransType }],
}, },
addressList: [], addressList: [],
moren: '', moren: "",
allGoodsData: [], allGoodsData: [],
allData: [], allData: [],
agreementShow: false, agreementShow: true,
countryList: [], countryList: [],
transList: [ transList: [
{ {
value: 1, value: 1,
label: '陆运' label: "陆运",
}, },
{ {
value: 2, value: 2,
label: '空运' label: "空运",
}, },
{ {
value: 3, value: 3,
label: '海运' label: "海运",
} },
], ],
deliList: [], deliList: [],
bankLists: [], bankLists: [],
areaData: [], areaData: [],
regionParams: { regionParams: {
label: 'name', label: "name",
value: 'id', value: "id",
children: 'children', children: "children",
expandTrigger: 'hover' expandTrigger: "hover",
}, },
totalPrice: 0, totalPrice: 0,
totalAchive: 0, totalAchive: 0,
isLoading: '', isLoading: "",
isDeliveryWay: true, isDeliveryWay: true,
shoppingArr: '', shoppingArr: "",
totalAmont: 0, totalAmont: 0,
specialArea: 18 specialArea: 18,
}; };
}, },
computed: { computed: {
...mapGetters(['userInfo']) ...mapGetters(["userInfo"]),
}, },
mounted() { mounted() {
// // // //
@ -337,12 +462,12 @@ export default {
// // // //
// // this.getMember() // // this.getMember()
// //
this.shoppingArr = JSON.parse(localStorage.getItem('allGoods')); this.shoppingArr = JSON.parse(localStorage.getItem("allGoods"));
this.specialArea = this.$route.query.specialArea; this.specialArea = this.$route.query.specialArea;
// //
this.getCatDetail(); this.getCatDetail();
// //
api.generate().then(res => { api.generate().then((res) => {
setTokenMi(res.msg); setTokenMi(res.msg);
}); });
if (this.userInfo.pkSettleCountry == 1) { if (this.userInfo.pkSettleCountry == 1) {
@ -354,12 +479,13 @@ export default {
// name // name
upgradeMemberCodePass(rule, value, callback) { upgradeMemberCodePass(rule, value, callback) {
if (!value) { if (!value) {
callback(new Error(this.$t('w_0046'))); callback(new Error(this.$t("w_0046")));
} else { } else {
api.upgRel({ api
upgradeMemberCode: value .upgRel({
upgradeMemberCode: value,
}) })
.then(res => { .then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.ruleForm.upgradeMemberName = res.data.upgradeMemberName; this.ruleForm.upgradeMemberName = res.data.upgradeMemberName;
// this.getMember() // this.getMember()
@ -367,18 +493,20 @@ export default {
callback(); callback();
} }
}) })
.catch(err => { .catch((err) => {
callback(new Error(err)); callback(new Error(err));
}); });
} }
}, },
getCatDetail() { getCatDetail() {
api.shoppingWaresDetail({ api
.shoppingWaresDetail({
shoppingIds: this.shoppingArr, shoppingIds: this.shoppingArr,
specialArea: this.specialArea specialArea: this.specialArea,
}).then(res => { })
.then((res) => {
this.allGoodsData = res.data; this.allGoodsData = res.data;
this.waresCodeList = res.data.orderItemsParams.map(item => { this.waresCodeList = res.data.orderItemsParams.map((item) => {
return item.waresCode; return item.waresCode;
}); });
this.allGoodsData.specialArea = this.specialArea; this.allGoodsData.specialArea = this.specialArea;
@ -400,9 +528,11 @@ export default {
}); });
}, },
getUserName() { getUserName() {
api.upgRel({ api
upgradeMemberCode: this.ruleForm.upgradeMemberCode .upgRel({
}).then(res => { upgradeMemberCode: this.ruleForm.upgradeMemberCode,
})
.then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.ruleForm.upgradeMemberName = res.data.upgradeMemberName; this.ruleForm.upgradeMemberName = res.data.upgradeMemberName;
this.$forceUpdate(); this.$forceUpdate();
@ -419,16 +549,16 @@ export default {
openLoading() { openLoading() {
this.isLoading = this.$loading({ this.isLoading = this.$loading({
lock: true, lock: true,
text: 'Loading', text: "Loading",
spinner: 'el-icon-loading', spinner: "el-icon-loading",
background: 'rgba(0, 0, 0, 0.7)' background: "rgba(0, 0, 0, 0.7)",
}); });
}, },
resetAll() { resetAll() {
this.ruleForm.parent = ''; this.ruleForm.parent = "";
this.ruleForm.upgradeMemberName = ''; this.ruleForm.upgradeMemberName = "";
this.ruleForm.deliveryWay = ''; this.ruleForm.deliveryWay = "";
this.ruleForm.transType = ''; this.ruleForm.transType = "";
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ruleForm.clearValidate(); this.$refs.ruleForm.clearValidate();
}); });
@ -437,8 +567,8 @@ export default {
if (val) { if (val) {
this.isPay = false; this.isPay = false;
this.$router.push({ this.$router.push({
path: '/vipCenter', path: "/vipCenter",
query: { id: 1 } query: { id: 1 },
}); });
} else { } else {
this.$confirm(this.$t("w_0090"), "", { this.$confirm(this.$t("w_0090"), "", {
@ -446,21 +576,21 @@ export default {
cancelButtonText: this.$t("ENU_P_TYPE0"), cancelButtonText: this.$t("ENU_P_TYPE0"),
type: "warning", type: "warning",
}) })
.then(_ => { .then((_) => {
this.isPay = false; this.isPay = false;
this.$router.push({ this.$router.push({
path: '/vipCenter', path: "/vipCenter",
query: { id: 1 } query: { id: 1 },
}); });
}) })
.catch(_ => {}); .catch((_) => {});
} }
}, },
setDizhi(e, val) { setDizhi(e, val) {
let arr = this.flatten(this.areaData); let arr = this.flatten(this.areaData);
let nameList = ''; let nameList = "";
arr.forEach(item => { arr.forEach((item) => {
this.ruleForm.dizhi.forEach(ctem => { this.ruleForm.dizhi.forEach((ctem) => {
if (ctem == item.id) { if (ctem == item.id) {
nameList += item.name; nameList += item.name;
} }
@ -469,47 +599,42 @@ export default {
this.ruleForm.nameList = nameList; this.ruleForm.nameList = nameList;
this.allGoodsData.recProvince = this.ruleForm.dizhi[0]; this.allGoodsData.recProvince = this.ruleForm.dizhi[0];
this.allGoodsData.recCity = this.ruleForm.dizhi[1]; this.allGoodsData.recCity = this.ruleForm.dizhi[1];
this.allGoodsData.recCounty = this.ruleForm.dizhi[2] || ''; this.allGoodsData.recCounty = this.ruleForm.dizhi[2] || "";
this.getPostAge(); this.getPostAge();
}, },
// //
submitRegister(formName) { submitRegister(formName) {
let deleteList = []; let deleteList = [];
this.shoppingArr.forEach(item => { this.shoppingArr.forEach((item) => {
deleteList.push({ deleteList.push({
shoppingId: item shoppingId: item,
}); });
}); });
if (!this.agreementShow) {
this.$message({
message: this.$t('w_0091'),
type: 'warning'
});
return;
}
if (this.isDeliveryWay && !this.ruleForm.recPhone) { if (this.isDeliveryWay && !this.ruleForm.recPhone) {
this.$message({ this.$message({
message: this.$t('w_0092'), message: this.$t("w_0092"),
type: 'warning' type: "warning",
}); });
return; return;
} }
this.$refs[formName].validate(valid => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
this.openLoading(); this.openLoading();
let obj = Object.assign({}, this.allGoodsData, this.ruleForm, { let obj = Object.assign({}, this.allGoodsData, this.ruleForm, {
deleteList: deleteList deleteList: deleteList,
}); });
api.confirmOthOrder(obj) api
.then(res => { .confirmOthOrder(obj)
.then((res) => {
this.isLoading.close(); this.isLoading.close();
if (res.code == 200) { if (res.code == 200) {
this.isPay = true; this.isPay = true;
this.paramsPost = res.data; this.paramsPost = res.data;
} }
}) })
.catch(err => { .catch((err) => {
this.isLoading.close(); this.isLoading.close();
}); });
} else { } else {
@ -525,26 +650,33 @@ export default {
}, },
flatten(arr) { flatten(arr) {
return arr.reduce((result, item) => { return arr.reduce((result, item) => {
return result.concat(item, Array.isArray(item.children) ? this.flatten(item.children) : []); return result.concat(
item,
Array.isArray(item.children) ? this.flatten(item.children) : []
);
}, []); }, []);
}, },
checkRadio() { checkRadio() {
this.$set(this.ruleForm, 'dizhi', []); this.$set(this.ruleForm, "dizhi", []);
let arr = []; let arr = [];
this.addressList.forEach(item => { this.addressList.forEach((item) => {
if (item.pkId == this.moren) { if (item.pkId == this.moren) {
this.ruleForm.recName = item.recName; this.ruleForm.recName = item.recName;
this.ruleForm.nameList = item.recArea; this.ruleForm.nameList = item.recArea;
this.ruleForm.recPhone = item.recPhone; this.ruleForm.recPhone = item.recPhone;
this.ruleForm.recAddress = item.recAddress; this.ruleForm.recAddress = item.recAddress;
arr = [item.recProvince + '', item.recCity + '', (item.recCounty || '') + '']; arr = [
item.recProvince + "",
item.recCity + "",
(item.recCounty || "") + "",
];
} }
}); });
arr = arr.filter(s => { arr = arr.filter((s) => {
return s && s.trim(); return s && s.trim();
}); });
this.$set(this.ruleForm, 'dizhi', arr); this.$set(this.ruleForm, "dizhi", arr);
this.allGoodsData.deliveryWay = this.ruleForm.deliveryWay; this.allGoodsData.deliveryWay = this.ruleForm.deliveryWay;
this.allGoodsData.transType = this.ruleForm.transType; this.allGoodsData.transType = this.ruleForm.transType;
this.allGoodsData.recProvince = this.ruleForm.dizhi[0]; this.allGoodsData.recProvince = this.ruleForm.dizhi[0];
@ -555,15 +687,17 @@ export default {
}, },
getPostAge() { getPostAge() {
let deleteList = []; let deleteList = [];
this.shoppingArr.forEach(item => { this.shoppingArr.forEach((item) => {
deleteList.push({ deleteList.push({
shoppingId: item shoppingId: item,
}); });
}); });
this.allGoodsData.deleteList = deleteList; this.allGoodsData.deleteList = deleteList;
api.queryPostage(this.allGoodsData).then(res => { api.queryPostage(this.allGoodsData).then((res) => {
this.ruleForm.postage = Number(res.data.postage).toFixed(2); this.ruleForm.postage = Number(res.data.postage).toFixed(2);
this.totalAmont = parseFloat(this.allGoodsData.priceAmount) + parseFloat(res.data.postage); this.totalAmont =
parseFloat(this.allGoodsData.priceAmount) +
parseFloat(res.data.postage);
}); });
}, },
// getMember() { // getMember() {
@ -577,32 +711,32 @@ export default {
// }) // })
// }, // },
getTransList() { getTransList() {
api.transportList().then(res => { api.transportList().then((res) => {
this.transList = res.data; this.transList = res.data;
}); });
}, },
getDeliveryList() { getDeliveryList() {
api.deliveryList().then(res => { api.deliveryList().then((res) => {
this.deliList = res.data; this.deliList = res.data;
}); });
}, },
delAds(id) { delAds(id) {
this.$confirm(this.$t('w_0088') + '?', '', { this.$confirm(this.$t("w_0088") + "?", "", {
confirmButtonText: this.$t('w_0035'), confirmButtonText: this.$t("w_0035"),
cancelButtonText: this.$t('ENU_P_TYPE0'), cancelButtonText: this.$t("ENU_P_TYPE0"),
type: 'warning' type: "warning",
}).then(() => { }).then(() => {
api.delAddress(id).then(res => { api.delAddress(id).then((res) => {
this.$message({ this.$message({
type: 'success', type: "success",
message: this.$t('w_0089') + '!' message: this.$t("w_0089") + "!",
}); });
this.getAddressList(); this.getAddressList();
}); });
}); });
}, },
getAllArea() { getAllArea() {
api.allArea().then(res => { api.allArea().then((res) => {
this.areaData = res.data; this.areaData = res.data;
}); });
}, },
@ -610,7 +744,7 @@ export default {
this.$refs.addAddress.isShowAddress(true, this.areaData, id); this.$refs.addAddress.isShowAddress(true, this.areaData, id);
}, },
setDefaultAds(id) { setDefaultAds(id) {
api.addressDefault(id).then(res => { api.addressDefault(id).then((res) => {
this.getAddressList(); this.getAddressList();
}); });
}, },
@ -622,9 +756,9 @@ export default {
this.$refs.addAddress.isShowAddress(true, this.areaData); this.$refs.addAddress.isShowAddress(true, this.areaData);
}, },
getAddressList() { getAddressList() {
api.addressList({}).then(res => { api.addressList({}).then((res) => {
this.addressList = res.data; this.addressList = res.data;
this.addressList.forEach(item => { this.addressList.forEach((item) => {
if (item.isDefault == 1) { if (item.isDefault == 1) {
this.moren = item.pkId; this.moren = item.pkId;
this.checkRadio(); this.checkRadio();
@ -636,13 +770,13 @@ export default {
// 线 // 线
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 0) { if (rowIndex % 2 == 0) {
return 'warning-row'; return "warning-row";
} else if (rowIndex % 2 == 1) { } else if (rowIndex % 2 == 1) {
return 'success-row'; return "success-row";
}
return '';
}
} }
return "";
},
},
}; };
</script> </script>

View File

@ -9,10 +9,17 @@
<!-- 用户头 --> <!-- 用户头 -->
<personInfo></personInfo> <personInfo></personInfo>
<div class="rt dis_flex"> <div class="rt dis_flex">
<div class="rti dis_flex">{{ $t('w_0104') }}</div> <div class="rti dis_flex">{{ $t("w_0104") }}</div>
</div> </div>
<!-- 表单 --> <!-- 表单 -->
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-position="top" status-icon class="demo-ruleForm"> <el-form
:model="ruleForm"
:rules="rules"
ref="ruleForm"
label-position="top"
status-icon
class="demo-ruleForm"
>
<el-row :gutter="40" class="padRow"> <el-row :gutter="40" class="padRow">
<!-- <el-col :span="6"> <!-- <el-col :span="6">
<el-form-item :label="$t('ENU_REG_AU_2')" <el-form-item :label="$t('ENU_REG_AU_2')"
@ -24,19 +31,36 @@
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('N_I_124')" prop="upgradeMemberCode"> <el-form-item :label="$t('N_I_124')" prop="upgradeMemberCode">
<!-- <div class="dis_flex"> --> <!-- <div class="dis_flex"> -->
<el-input v-model="ruleForm.upgradeMemberCode" :placeholder="$t('w_0046')"></el-input> <el-input
v-model="ruleForm.upgradeMemberCode"
:placeholder="$t('w_0046')"
></el-input>
<!-- </div> --> <!-- </div> -->
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('CK_KS_14')" prop="upgradeMemberName"> <el-form-item :label="$t('CK_KS_14')" prop="upgradeMemberName">
<el-input v-model="ruleForm.upgradeMemberName" :placeholder="$t('w_0060')" disabled></el-input> <el-input
v-model="ruleForm.upgradeMemberName"
:placeholder="$t('w_0060')"
disabled
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('w_0061')" prop="deliveryWay"> <el-form-item :label="$t('w_0061')" prop="deliveryWay">
<el-select v-model="ruleForm.deliveryWay" @change="selDelivery" :disabled="this.userInfo.pkSettleCountry == 1" :placeholder="$t('w_0062')"> <el-select
<el-option v-for="item in deliList" :key="item.value" :label="item.label" :value="item.value"></el-option> v-model="ruleForm.deliveryWay"
@change="selDelivery"
:disabled="this.userInfo.pkSettleCountry == 1"
:placeholder="$t('w_0062')"
>
<el-option
v-for="item in deliList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -51,53 +75,100 @@
<!-- 收货人信息 --> <!-- 收货人信息 -->
<div v-show="isDeliveryWay"> <div v-show="isDeliveryWay">
<div class="xian"> <div class="xian">
<div class="title">{{ $t('w_0065') }}</div> <div class="title">{{ $t("w_0065") }}</div>
<div class="lan" @click="openAddress">{{ $t('w_0066') }}</div> <div class="lan" @click="openAddress">{{ $t("w_0066") }}</div>
</div> </div>
<el-row :gutter="40" class="padRow"> <el-row :gutter="40" class="padRow">
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('MY_ORD_10')" prop="recName"><el-input v-model="ruleForm.recName" :placeholder="$t('w_0067')"></el-input></el-form-item> <el-form-item :label="$t('MY_ORD_10')" prop="recName"
><el-input
v-model="ruleForm.recName"
:placeholder="$t('w_0067')"
></el-input
></el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('w_0052')" prop="recPhone"><el-input v-model="ruleForm.recPhone" :placeholder="$t('w_0053')"></el-input></el-form-item> <el-form-item :label="$t('w_0052')" prop="recPhone"
><el-input
v-model="ruleForm.recPhone"
:placeholder="$t('w_0053')"
></el-input
></el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('w_0068')" class="dizhi" prop="dizhi"> <el-form-item :label="$t('w_0068')" class="dizhi" prop="dizhi">
<el-cascader v-model="ruleForm.dizhi" @change="setDizhi" :options="areaData" :props="regionParams" :placeholder="$t('w_0069')"></el-cascader> <el-cascader
v-model="ruleForm.dizhi"
@change="setDizhi"
:options="areaData"
:props="regionParams"
:placeholder="$t('w_0069')"
></el-cascader>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('S_C_27')" prop="recAddress"> <el-form-item :label="$t('S_C_27')" prop="recAddress">
<el-input v-model="ruleForm.recAddress" maxlength="200" :placeholder="$t('w_0070')"></el-input> <el-input
v-model="ruleForm.recAddress"
maxlength="200"
:placeholder="$t('w_0070')"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="40" class="padRow"> <el-row :gutter="40" class="padRow">
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('w_0071')"><el-input v-model="ruleForm.postage" disabled></el-input></el-form-item> <el-form-item :label="$t('w_0071')"
><el-input v-model="ruleForm.postage" disabled></el-input
></el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('MY_WAL_22')"><el-input v-model="ruleForm.remark" :placeholder="$t('w_0072')"></el-input></el-form-item> <el-form-item :label="$t('MY_WAL_22')"
><el-input
v-model="ruleForm.remark"
:placeholder="$t('w_0072')"
></el-input
></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
</el-form> </el-form>
<div class="nox"> <div class="nox">
<div class="title">{{ $t('w_0073') }}</div> <div class="title">{{ $t("w_0073") }}</div>
</div> </div>
<div class="local" v-show="isDeliveryWay"> <div class="local" v-show="isDeliveryWay">
<div :class="['local_i', item.pkId == moren ? 'local_a' : '']" v-for="item in addressList" :key="item.pkId"> <div
<el-radio v-model="moren" @input="checkRadio" :label="item.pkId">{{}}</el-radio> :class="['local_i', item.pkId == moren ? 'local_a' : '']"
<div class="local1">{{ item.recArea }}{{ item.recAddress }}({{ item.recName }} )</div> v-for="item in addressList"
<div class="local2" v-show="item.isDefault == 1">{{ $t('w_0074') }}</div> :key="item.pkId"
<div class="local2 local3" v-show="item.isDefault == 0" @click="setDefaultAds(item.pkId)">{{ $t('w_0075') }}</div> >
<div class="local2" @click="changeAds(item.pkId)">{{ $t('w_0076') }}</div> <el-radio v-model="moren" @input="checkRadio" :label="item.pkId"
<div class="local3" @click="delAds(item.pkId)">{{ $t('ENU_CONTROL_TYPE_3') }}</div> >{{}}</el-radio
>
<div class="local1">
{{ item.recArea }}{{ item.recAddress }}({{ item.recName }} )
</div>
<div class="local2" v-show="item.isDefault == 1">
{{ $t("w_0074") }}
</div>
<div
class="local2 local3"
v-show="item.isDefault == 0"
@click="setDefaultAds(item.pkId)"
>
{{ $t("w_0075") }}
</div>
<div class="local2" @click="changeAds(item.pkId)">
{{ $t("w_0076") }}
</div>
<div class="local3" @click="delAds(item.pkId)">
{{ $t("ENU_CONTROL_TYPE_3") }}
</div>
</div> </div>
</div> </div>
<!-- 商品信息 --> <!-- 商品信息 -->
<div class="nox"> <div class="nox">
<div class="title">{{ $t('w_0077') }}</div> <div class="title">{{ $t("w_0077") }}</div>
</div> </div>
<el-table <el-table
:data="allData" :data="allData"
@ -108,11 +179,16 @@
background: '#C8161D', background: '#C8161D',
color: '#fff', color: '#fff',
fontWeight: 'bold', fontWeight: 'bold',
fontSize: '15px' fontSize: '15px',
}" }"
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
> >
<el-table-column align="center" prop="waresName" width="400" :label="$t('w_0078')"> <el-table-column
align="center"
prop="waresName"
width="400"
:label="$t('w_0078')"
>
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <span>{{ scope.row.goodsPrice | numberToCurrency}}</span> --> <!-- <span>{{ scope.row.goodsPrice | numberToCurrency}}</span> -->
<div class="goods"> <div class="goods">
@ -120,7 +196,11 @@
<img :src="scope.row.cover1" alt="" /> <img :src="scope.row.cover1" alt="" />
<div>{{ scope.row.waresName }}</div> <div>{{ scope.row.waresName }}</div>
</div> </div>
<div class="goods_tit" v-for="item in scope.row.waresItemsParamList" :key="item.pkWaresSpecsSku"> <div
class="goods_tit"
v-for="item in scope.row.waresItemsParamList"
:key="item.pkWaresSpecsSku"
>
<div class="goods_tit_l"> <div class="goods_tit_l">
<img :src="item.specCover" alt="" /> <img :src="item.specCover" alt="" />
<div class="goods_tit_lr"> <div class="goods_tit_lr">
@ -133,18 +213,34 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="goodsPrice" :label="$t('w_0079') + '(¥)'"> <el-table-column
align="center"
prop="goodsPrice"
:label="$t('w_0079') + '(¥)'"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.price | numberToCurrency }}</span> <span>{{ scope.row.price | numberToCurrency }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="goodsAchive" :label="$t('w_0080') + '(PV)'"> <el-table-column
align="center"
prop="goodsAchive"
:label="$t('w_0080') + '(PV)'"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.achieve | numberToCurrency }}</span> <span>{{ scope.row.achieve | numberToCurrency }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="quantity" :label="$t('w_0081')"></el-table-column> <el-table-column
<el-table-column align="center" prop="spyjxj" :label="$t('w_0082') + 'PV'"> align="center"
prop="quantity"
:label="$t('w_0081')"
></el-table-column>
<el-table-column
align="center"
prop="spyjxj"
:label="$t('w_0082') + 'PV'"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.achieveAmount | numberToCurrency }}</span> <span>{{ scope.row.achieveAmount | numberToCurrency }}</span>
</template> </template>
@ -156,8 +252,14 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="tab_b"> <div class="tab_b">
<div>{{ $t('w_0083') }}:{{ userInfo.currencyIcon }}{{ allGoodsData.priceAmount | numberToCurrency }}</div> <div>
<div>{{ $t('w_0071') }}:{{ userInfo.currencyIcon }}{{ ruleForm.postage | numberToCurrency }}</div> {{ $t("w_0083") }}:{{ userInfo.currencyIcon
}}{{ allGoodsData.priceAmount | numberToCurrency }}
</div>
<div>
{{ $t("w_0071") }}:{{ userInfo.currencyIcon
}}{{ ruleForm.postage | numberToCurrency }}
</div>
</div> </div>
<AddAddress ref="addAddress" @getAdList="getAddressList"></AddAddress> <AddAddress ref="addAddress" @getAdList="getAddressList"></AddAddress>
<div class="zhan"></div> <div class="zhan"></div>
@ -166,23 +268,46 @@
<div class="footer_t"> <div class="footer_t">
<div class="footer_tt"> <div class="footer_tt">
<div class="dis_flex"> <div class="dis_flex">
<div class="f1">{{ $t('w_0325') }}:</div> <div class="f1">{{ $t("w_0325") }}:</div>
<div class="f2">{{ userInfo.currencyIcon }}{{ totalAmont | numberToCurrency }}</div> <div class="f2">
{{ userInfo.currencyIcon }}{{ totalAmont | numberToCurrency }}
</div>
</div> </div>
<div class="dis_flex"> <div class="dis_flex">
<div class="f1">{{ $t('ENU_TOTAL_V_1') }}:</div> <div class="f1">{{ $t("ENU_TOTAL_V_1") }}:</div>
<div class="f3">{{ allGoodsData.achieveAmount | numberToCurrency }}</div> <div class="f3">
{{ allGoodsData.achieveAmount | numberToCurrency }}
</div> </div>
</div> </div>
<div class="footer_tt" v-show="ruleForm.recAddress && ruleForm.recName && ruleForm.recPhone && ruleForm.nameList"> </div>
<div class="f2 f4">{{ $t('w_0084') }}{{ ruleForm.nameList }}{{ ruleForm.recAddress }}</div> <div
<div class="f4">{{ $t('MY_ORD_10') }}{{ ruleForm.recName }} {{ ruleForm.recPhone }}</div> class="footer_tt"
v-show="
ruleForm.recAddress &&
ruleForm.recName &&
ruleForm.recPhone &&
ruleForm.nameList
"
>
<div class="f2 f4">
{{ $t("w_0084") }}{{ ruleForm.nameList }}{{ ruleForm.recAddress }}
</div>
<div class="f4">
{{ $t("MY_ORD_10") }}{{ ruleForm.recName }}
{{ ruleForm.recPhone }}
</div>
</div> </div>
</div> </div>
<div class="footer_b"> <div class="footer_b">
<!-- 协议 --> <!-- 协议 -->
<agreement :isShow="agreementShow" ref="agree" @agree="agree"></agreement> <!-- <agreement
<div class="btn" @click="submitRegister('ruleForm')">{{ $t('w_0085') }}</div> :isShow="agreementShow"
ref="agree"
@agree="agree"
></agreement> -->
<div class="btn" @click="submitRegister('ruleForm')">
{{ $t("w_0085") }}
</div>
</div> </div>
</div> </div>
<!-- 强制阅读协议 --> <!-- 强制阅读协议 -->
@ -192,26 +317,26 @@
</template> </template>
<script> <script>
import personInfo from '@/components/personInfo.vue'; import personInfo from "@/components/personInfo.vue";
import AddAddress from '@/components/AddAddress.vue'; import AddAddress from "@/components/AddAddress.vue";
import agreement from '@/components/agreement.vue'; import agreement from "@/components/agreement.vue";
import { mapGetters } from 'vuex'; import { mapGetters } from "vuex";
import * as api from '@/api/register.js'; import * as api from "@/api/register.js";
import { setTokenMi } from '@/util/auth'; import { setTokenMi } from "@/util/auth";
import Pay from '@/components/Pay.vue'; import Pay from "@/components/Pay.vue";
import mustAgreeMent from '@/components/mustAgreeMent.vue'; import mustAgreeMent from "@/components/mustAgreeMent.vue";
export default { export default {
components: { components: {
personInfo, personInfo,
AddAddress, AddAddress,
agreement, agreement,
Pay, Pay,
mustAgreeMent mustAgreeMent,
}, },
data() { data() {
let validateRecTransType = (rule, value, callback) => { let validateRecTransType = (rule, value, callback) => {
if (this.ruleForm.transType == '' && this.isDeliveryWay) { if (this.ruleForm.transType == "" && this.isDeliveryWay) {
callback(new Error(this.$t('w_0064'))); callback(new Error(this.$t("w_0064")));
} else { } else {
callback(); callback();
} }
@ -219,39 +344,49 @@ export default {
return { return {
waresCodeList: [], waresCodeList: [],
isPay: false, isPay: false,
paramsPost: '', paramsPost: "",
isClick: 0, isClick: 0,
ruleForm: { ruleForm: {
dizhi: [], dizhi: [],
fwzx: '', fwzx: "",
upgradeMemberCode: '', upgradeMemberCode: "",
upgradeMemberName: '', upgradeMemberName: "",
postage: '', postage: "",
recName: '', recName: "",
recPhone: '', recPhone: "",
recAddress: '', recAddress: "",
deliveryWay: '', deliveryWay: "",
transType: '' transType: "",
}, },
rules: { rules: {
upgradeMemberCode: [ upgradeMemberCode: [
{ {
required: true, required: true,
validator: this.upgradeMemberCodePass, validator: this.upgradeMemberCodePass,
trigger: 'blur' trigger: "blur",
} },
],
gradeName: [
{ required: true, message: this.$t("w_0086"), trigger: "change" },
],
upgradeMemberName: [
{ required: true, message: this.$t("w_0060"), trigger: "change" },
],
recName: [
{ required: true, message: this.$t("w_0087"), trigger: "blur" },
],
recPhone: [
{ required: true, message: this.$t("w_0053"), trigger: "blur" },
],
recAddress: [
{ required: true, message: this.$t("w_0070"), trigger: "blur" },
], ],
gradeName: [{ required: true, message: this.$t('w_0086'), trigger: 'change' }],
upgradeMemberName: [{ required: true, message: this.$t('w_0060'), trigger: 'change' }],
recName: [{ required: true, message: this.$t('w_0087'), trigger: 'blur' }],
recPhone: [{ required: true, message: this.$t('w_0053'), trigger: 'blur' }],
recAddress: [{ required: true, message: this.$t('w_0070'), trigger: 'blur' }],
deliveryWay: [ deliveryWay: [
{ {
required: true, required: true,
message: this.$t('w_0062'), message: this.$t("w_0062"),
trigger: 'change' trigger: "change",
} },
], ],
// transType: [ // transType: [
// { // {
@ -260,47 +395,47 @@ export default {
// trigger: 'change', // trigger: 'change',
// }, // },
// ], // ],
transType: [{ validator: validateRecTransType }] transType: [{ validator: validateRecTransType }],
}, },
addressList: [], addressList: [],
moren: '', moren: "",
allGoodsData: [], allGoodsData: [],
allData: [], allData: [],
agreementShow: false, agreementShow: true,
countryList: [], countryList: [],
transList: [ transList: [
{ {
value: 1, value: 1,
label: this.$t('ENU_TRA_1') label: this.$t("ENU_TRA_1"),
}, },
{ {
value: 2, value: 2,
label: this.$t('ENU_TRA_2') label: this.$t("ENU_TRA_2"),
}, },
{ {
value: 3, value: 3,
label: this.$t('ENU_TRA_3') label: this.$t("ENU_TRA_3"),
} },
], ],
deliList: [], deliList: [],
bankLists: [], bankLists: [],
areaData: [], areaData: [],
regionParams: { regionParams: {
label: 'name', label: "name",
value: 'id', value: "id",
children: 'children', children: "children",
expandTrigger: 'hover' expandTrigger: "hover",
}, },
totalPrice: 0, totalPrice: 0,
totalAchive: 0, totalAchive: 0,
isLoading: '', isLoading: "",
isDeliveryWay: true, isDeliveryWay: true,
shoppingArr: '', shoppingArr: "",
totalAmont: 0 totalAmont: 0,
}; };
}, },
computed: { computed: {
...mapGetters(['userInfo']) ...mapGetters(["userInfo"]),
}, },
mounted() { mounted() {
// // // //
@ -336,11 +471,11 @@ export default {
// // // //
// // this.getMember() // // this.getMember()
// //
this.shoppingArr = JSON.parse(localStorage.getItem('allGoods')); this.shoppingArr = JSON.parse(localStorage.getItem("allGoods"));
// //
this.getCatDetail(); this.getCatDetail();
// //
api.generate().then(res => { api.generate().then((res) => {
setTokenMi(res.msg); setTokenMi(res.msg);
}); });
if (this.userInfo.pkSettleCountry == 1) { if (this.userInfo.pkSettleCountry == 1) {
@ -352,12 +487,13 @@ export default {
// name // name
upgradeMemberCodePass(rule, value, callback) { upgradeMemberCodePass(rule, value, callback) {
if (!value) { if (!value) {
callback(new Error(this.$t('w_0046'))); callback(new Error(this.$t("w_0046")));
} else { } else {
api.upgRel({ api
upgradeMemberCode: value .upgRel({
upgradeMemberCode: value,
}) })
.then(res => { .then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.ruleForm.upgradeMemberName = res.data.upgradeMemberName; this.ruleForm.upgradeMemberName = res.data.upgradeMemberName;
// this.getMember() // this.getMember()
@ -365,16 +501,16 @@ export default {
callback(); callback();
} }
}) })
.catch(err => { .catch((err) => {
callback(new Error(err)); callback(new Error(err));
}); });
} }
}, },
setDizhi(e, val) { setDizhi(e, val) {
let arr = this.flatten(this.areaData); let arr = this.flatten(this.areaData);
let nameList = ''; let nameList = "";
arr.forEach(item => { arr.forEach((item) => {
this.ruleForm.dizhi.forEach(ctem => { this.ruleForm.dizhi.forEach((ctem) => {
if (ctem == item.id) { if (ctem == item.id) {
nameList += item.name; nameList += item.name;
} }
@ -383,16 +519,18 @@ export default {
this.ruleForm.nameList = nameList; this.ruleForm.nameList = nameList;
this.allGoodsData.recProvince = this.ruleForm.dizhi[0]; this.allGoodsData.recProvince = this.ruleForm.dizhi[0];
this.allGoodsData.recCity = this.ruleForm.dizhi[1]; this.allGoodsData.recCity = this.ruleForm.dizhi[1];
this.allGoodsData.recCounty = this.ruleForm.dizhi[2] || ''; this.allGoodsData.recCounty = this.ruleForm.dizhi[2] || "";
this.getPostAge(); this.getPostAge();
}, },
getCatDetail() { getCatDetail() {
api.shoppingWaresDetail({ api
.shoppingWaresDetail({
shoppingIds: this.shoppingArr, shoppingIds: this.shoppingArr,
specialArea: 11 specialArea: 11,
}).then(res => { })
.then((res) => {
this.allGoodsData = res.data; this.allGoodsData = res.data;
this.waresCodeList = res.data.orderItemsParams.map(item => { this.waresCodeList = res.data.orderItemsParams.map((item) => {
return item.waresCode; return item.waresCode;
}); });
this.allGoodsData.specialArea = 11; this.allGoodsData.specialArea = 11;
@ -423,23 +561,25 @@ export default {
openLoading() { openLoading() {
this.isLoading = this.$loading({ this.isLoading = this.$loading({
lock: true, lock: true,
text: 'Loading', text: "Loading",
spinner: 'el-icon-loading', spinner: "el-icon-loading",
background: 'rgba(0, 0, 0, 0.7)' background: "rgba(0, 0, 0, 0.7)",
}); });
}, },
resetAll() { resetAll() {
this.ruleForm.parent = ''; this.ruleForm.parent = "";
this.ruleForm.deliveryWay = ''; this.ruleForm.deliveryWay = "";
this.ruleForm.transType = ''; this.ruleForm.transType = "";
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ruleForm.clearValidate(); this.$refs.ruleForm.clearValidate();
}); });
}, },
getUserName() { getUserName() {
api.upgRel({ api
upgradeMemberCode: this.ruleForm.upgradeMemberCode .upgRel({
}).then(res => { upgradeMemberCode: this.ruleForm.upgradeMemberCode,
})
.then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.ruleForm.upgradeMemberName = res.data.upgradeMemberName; this.ruleForm.upgradeMemberName = res.data.upgradeMemberName;
this.$forceUpdate(); this.$forceUpdate();
@ -450,8 +590,8 @@ export default {
if (val) { if (val) {
this.isPay = false; this.isPay = false;
this.$router.push({ this.$router.push({
path: '/vipCenter', path: "/vipCenter",
query: { id: 1 } query: { id: 1 },
}); });
} else { } else {
this.$confirm(this.$t("w_0090"), "", { this.$confirm(this.$t("w_0090"), "", {
@ -459,54 +599,55 @@ export default {
cancelButtonText: this.$t("ENU_P_TYPE0"), cancelButtonText: this.$t("ENU_P_TYPE0"),
type: "warning", type: "warning",
}) })
.then(_ => { .then((_) => {
this.isPay = false; this.isPay = false;
this.$router.push({ this.$router.push({
path: '/vipCenter', path: "/vipCenter",
query: { id: 1 } query: { id: 1 },
}); });
}) })
.catch(_ => {}); .catch((_) => {});
} }
}, },
// //
submitRegister(formName) { submitRegister(formName) {
let deleteList = []; let deleteList = [];
this.shoppingArr.forEach(item => { this.shoppingArr.forEach((item) => {
deleteList.push({ deleteList.push({
shoppingId: item shoppingId: item,
}); });
}); });
if (!this.agreementShow) { // if (!this.agreementShow) {
this.$message({ // this.$message({
message: this.$t('w_0091'), // message: this.$t("w_0091"),
type: 'warning' // type: "warning",
}); // });
return; // return;
} // }
if (this.isDeliveryWay && !this.ruleForm.recPhone) { if (this.isDeliveryWay && !this.ruleForm.recPhone) {
this.$message({ this.$message({
message: this.$t('w_0092'), message: this.$t("w_0092"),
type: 'warning' type: "warning",
}); });
return; return;
} }
this.$refs[formName].validate(valid => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
this.openLoading(); this.openLoading();
let obj = Object.assign({}, this.allGoodsData, this.ruleForm, { let obj = Object.assign({}, this.allGoodsData, this.ruleForm, {
deleteList: deleteList deleteList: deleteList,
}); });
api.confirmOthOrder(obj) api
.then(res => { .confirmOthOrder(obj)
.then((res) => {
this.isLoading.close(); this.isLoading.close();
if (res.code == 200) { if (res.code == 200) {
this.isPay = true; this.isPay = true;
this.paramsPost = res.data; this.paramsPost = res.data;
} }
}) })
.catch(err => { .catch((err) => {
this.isLoading.close(); this.isLoading.close();
}); });
} else { } else {
@ -522,26 +663,33 @@ export default {
}, },
flatten(arr) { flatten(arr) {
return arr.reduce((result, item) => { return arr.reduce((result, item) => {
return result.concat(item, Array.isArray(item.children) ? this.flatten(item.children) : []); return result.concat(
item,
Array.isArray(item.children) ? this.flatten(item.children) : []
);
}, []); }, []);
}, },
checkRadio() { checkRadio() {
this.$set(this.ruleForm, 'dizhi', []); this.$set(this.ruleForm, "dizhi", []);
let arr = []; let arr = [];
this.addressList.forEach(item => { this.addressList.forEach((item) => {
if (item.pkId == this.moren) { if (item.pkId == this.moren) {
this.ruleForm.recName = item.recName; this.ruleForm.recName = item.recName;
this.ruleForm.nameList = item.recArea; this.ruleForm.nameList = item.recArea;
this.ruleForm.recPhone = item.recPhone; this.ruleForm.recPhone = item.recPhone;
this.ruleForm.recAddress = item.recAddress; this.ruleForm.recAddress = item.recAddress;
arr = [item.recProvince + '', item.recCity + '', (item.recCounty || '') + '']; arr = [
item.recProvince + "",
item.recCity + "",
(item.recCounty || "") + "",
];
} }
}); });
arr = arr.filter(s => { arr = arr.filter((s) => {
return s && s.trim(); return s && s.trim();
}); });
this.$set(this.ruleForm, 'dizhi', arr); this.$set(this.ruleForm, "dizhi", arr);
this.allGoodsData.deliveryWay = this.ruleForm.deliveryWay; this.allGoodsData.deliveryWay = this.ruleForm.deliveryWay;
this.allGoodsData.transType = this.ruleForm.transType; this.allGoodsData.transType = this.ruleForm.transType;
this.allGoodsData.recProvince = this.ruleForm.dizhi[0]; this.allGoodsData.recProvince = this.ruleForm.dizhi[0];
@ -552,15 +700,17 @@ export default {
}, },
getPostAge() { getPostAge() {
let deleteList = []; let deleteList = [];
this.shoppingArr.forEach(item => { this.shoppingArr.forEach((item) => {
deleteList.push({ deleteList.push({
shoppingId: item shoppingId: item,
}); });
}); });
this.allGoodsData.deleteList = deleteList; this.allGoodsData.deleteList = deleteList;
api.queryPostage(this.allGoodsData).then(res => { api.queryPostage(this.allGoodsData).then((res) => {
this.ruleForm.postage = Number(res.data.postage).toFixed(2); this.ruleForm.postage = Number(res.data.postage).toFixed(2);
this.totalAmont = parseFloat(this.allGoodsData.priceAmount) + parseFloat(res.data.postage); this.totalAmont =
parseFloat(this.allGoodsData.priceAmount) +
parseFloat(res.data.postage);
}); });
}, },
// getMember() { // getMember() {
@ -574,32 +724,32 @@ export default {
// }) // })
// }, // },
getTransList() { getTransList() {
api.transportList().then(res => { api.transportList().then((res) => {
this.transList = res.data; this.transList = res.data;
}); });
}, },
getDeliveryList() { getDeliveryList() {
api.deliveryList().then(res => { api.deliveryList().then((res) => {
this.deliList = res.data; this.deliList = res.data;
}); });
}, },
delAds(id) { delAds(id) {
this.$confirm(this.$t('w_0088') + '?', '', { this.$confirm(this.$t("w_0088") + "?", "", {
confirmButtonText: this.$t('w_0035'), confirmButtonText: this.$t("w_0035"),
cancelButtonText: this.$t('ENU_P_TYPE0'), cancelButtonText: this.$t("ENU_P_TYPE0"),
type: 'warning' type: "warning",
}).then(() => { }).then(() => {
api.delAddress(id).then(res => { api.delAddress(id).then((res) => {
this.$message({ this.$message({
type: 'success', type: "success",
message: this.$t('w_0089') + '!' message: this.$t("w_0089") + "!",
}); });
this.getAddressList(); this.getAddressList();
}); });
}); });
}, },
getAllArea() { getAllArea() {
api.allArea().then(res => { api.allArea().then((res) => {
this.areaData = res.data; this.areaData = res.data;
}); });
}, },
@ -607,7 +757,7 @@ export default {
this.$refs.addAddress.isShowAddress(true, this.areaData, id); this.$refs.addAddress.isShowAddress(true, this.areaData, id);
}, },
setDefaultAds(id) { setDefaultAds(id) {
api.addressDefault(id).then(res => { api.addressDefault(id).then((res) => {
this.getAddressList(); this.getAddressList();
}); });
}, },
@ -619,9 +769,9 @@ export default {
this.$refs.addAddress.isShowAddress(true, this.areaData); this.$refs.addAddress.isShowAddress(true, this.areaData);
}, },
getAddressList() { getAddressList() {
api.addressList({}).then(res => { api.addressList({}).then((res) => {
this.addressList = res.data; this.addressList = res.data;
this.addressList.forEach(item => { this.addressList.forEach((item) => {
if (item.isDefault == 1) { if (item.isDefault == 1) {
this.moren = item.pkId; this.moren = item.pkId;
this.checkRadio(); this.checkRadio();
@ -633,13 +783,13 @@ export default {
// 线 // 线
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 0) { if (rowIndex % 2 == 0) {
return 'warning-row'; return "warning-row";
} else if (rowIndex % 2 == 1) { } else if (rowIndex % 2 == 1) {
return 'success-row'; return "success-row";
}
return '';
}
} }
return "";
},
},
}; };
</script> </script>

View File

@ -512,11 +512,11 @@
</div> </div>
<div class="footer_b"> <div class="footer_b">
<!-- 协议 --> <!-- 协议 -->
<agreement <!-- <agreement
:isShow="agreementShow" :isShow="agreementShow"
ref="agree" ref="agree"
@agree="agree" @agree="agree"
></agreement> ></agreement> -->
<div class="btn" @click="submitRegister('ruleForm')"> <div class="btn" @click="submitRegister('ruleForm')">
{{ $t("w_0085") }} {{ $t("w_0085") }}
</div> </div>
@ -679,7 +679,7 @@ export default {
moren: "", moren: "",
allGoodsData: [], allGoodsData: [],
allData: [], allData: [],
agreementShow: false, agreementShow: true,
countryList: [], countryList: [],
transList: [ transList: [
{ {
@ -788,9 +788,6 @@ export default {
this.ruleForm.transType = 1; this.ruleForm.transType = 1;
this.ruleForm.deliveryWay = 1; this.ruleForm.deliveryWay = 1;
} }
if (this.userInfo.buyAgreementFlag == 1) {
this.agreementShow = true;
}
}, },
methods: { methods: {
handleSizeChange(val) { handleSizeChange(val) {
@ -1043,13 +1040,13 @@ export default {
shoppingId: item, shoppingId: item,
}); });
}); });
if (!this.agreementShow) { // if (!this.agreementShow) {
this.$message({ // this.$message({
message: this.$t("w_0091"), // message: this.$t("w_0091"),
type: "warning", // type: "warning",
}); // });
return; // return;
} // }
if (this.isDeliveryWay && !this.ruleForm.recPhone) { if (this.isDeliveryWay && !this.ruleForm.recPhone) {
this.$message({ this.$message({
message: this.$t("w_0092"), message: this.$t("w_0092"),

View File

@ -9,10 +9,17 @@
<!-- 用户头 --> <!-- 用户头 -->
<personInfo></personInfo> <personInfo></personInfo>
<div class="rt dis_flex"> <div class="rt dis_flex">
<div class="rti dis_flex">{{ $t('w_0059') }}</div> <div class="rti dis_flex">{{ $t("w_0059") }}</div>
</div> </div>
<!-- 表单 --> <!-- 表单 -->
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-position="top" status-icon class="demo-ruleForm"> <el-form
:model="ruleForm"
:rules="rules"
ref="ruleForm"
label-position="top"
status-icon
class="demo-ruleForm"
>
<el-row :gutter="40" class="padRow"> <el-row :gutter="40" class="padRow">
<!-- <el-col :span="6"> <!-- <el-col :span="6">
<el-form-item :label="$t('ENU_REG_AU_2')" <el-form-item :label="$t('ENU_REG_AU_2')"
@ -24,19 +31,36 @@
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('N_I_124')" prop="upgradeMemberCode"> <el-form-item :label="$t('N_I_124')" prop="upgradeMemberCode">
<!-- <div class="dis_flex"> --> <!-- <div class="dis_flex"> -->
<el-input v-model="ruleForm.upgradeMemberCode" :placeholder="$t('w_0046')"></el-input> <el-input
v-model="ruleForm.upgradeMemberCode"
:placeholder="$t('w_0046')"
></el-input>
<!-- </div> --> <!-- </div> -->
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('CK_KS_14')" prop="upgradeMemberName"> <el-form-item :label="$t('CK_KS_14')" prop="upgradeMemberName">
<el-input v-model="ruleForm.upgradeMemberName" :placeholder="$t('w_0060')" disabled></el-input> <el-input
v-model="ruleForm.upgradeMemberName"
:placeholder="$t('w_0060')"
disabled
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('w_0061')" prop="deliveryWay"> <el-form-item :label="$t('w_0061')" prop="deliveryWay">
<el-select v-model="ruleForm.deliveryWay" @change="selDelivery" :disabled="this.userInfo.pkSettleCountry == 1" :placeholder="$t('w_0062')"> <el-select
<el-option v-for="item in deliList" :key="item.value" :label="item.label" :value="item.value"></el-option> v-model="ruleForm.deliveryWay"
@change="selDelivery"
:disabled="this.userInfo.pkSettleCountry == 1"
:placeholder="$t('w_0062')"
>
<el-option
v-for="item in deliList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -50,53 +74,100 @@
</el-row> </el-row>
<div v-show="isDeliveryWay"> <div v-show="isDeliveryWay">
<div class="xian"> <div class="xian">
<div class="title">{{ $t('w_0065') }}</div> <div class="title">{{ $t("w_0065") }}</div>
<div class="lan" @click="openAddress">{{ $t('w_0066') }}</div> <div class="lan" @click="openAddress">{{ $t("w_0066") }}</div>
</div> </div>
<el-row :gutter="40" class="padRow"> <el-row :gutter="40" class="padRow">
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('MY_ORD_10')" prop="recName"><el-input v-model="ruleForm.recName" :placeholder="$t('w_0067')"></el-input></el-form-item> <el-form-item :label="$t('MY_ORD_10')" prop="recName"
><el-input
v-model="ruleForm.recName"
:placeholder="$t('w_0067')"
></el-input
></el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('w_0052')" prop="recPhone"><el-input v-model="ruleForm.recPhone" :placeholder="$t('w_0053')"></el-input></el-form-item> <el-form-item :label="$t('w_0052')" prop="recPhone"
><el-input
v-model="ruleForm.recPhone"
:placeholder="$t('w_0053')"
></el-input
></el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('w_0068')" class="dizhi" prop="dizhi"> <el-form-item :label="$t('w_0068')" class="dizhi" prop="dizhi">
<el-cascader v-model="ruleForm.dizhi" @change="setDizhi" :options="areaData" :props="regionParams" :placeholder="$t('w_0069')"></el-cascader> <el-cascader
v-model="ruleForm.dizhi"
@change="setDizhi"
:options="areaData"
:props="regionParams"
:placeholder="$t('w_0069')"
></el-cascader>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('S_C_27')" prop="recAddress"> <el-form-item :label="$t('S_C_27')" prop="recAddress">
<el-input v-model="ruleForm.recAddress" maxlength="200" :placeholder="$t('w_0070')"></el-input> <el-input
v-model="ruleForm.recAddress"
maxlength="200"
:placeholder="$t('w_0070')"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="40" class="padRow"> <el-row :gutter="40" class="padRow">
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('w_0071')"><el-input v-model="ruleForm.postage" disabled></el-input></el-form-item> <el-form-item :label="$t('w_0071')"
><el-input v-model="ruleForm.postage" disabled></el-input
></el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('MY_WAL_22')"><el-input v-model="ruleForm.remark" :placeholder="$t('w_0072')"></el-input></el-form-item> <el-form-item :label="$t('MY_WAL_22')"
><el-input
v-model="ruleForm.remark"
:placeholder="$t('w_0072')"
></el-input
></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
</el-form> </el-form>
<div class="nox"> <div class="nox">
<div class="title">{{ $t('w_0073') }}</div> <div class="title">{{ $t("w_0073") }}</div>
</div> </div>
<div class="local" v-show="isDeliveryWay"> <div class="local" v-show="isDeliveryWay">
<div :class="['local_i', item.pkId == moren ? 'local_a' : '']" v-for="item in addressList" :key="item.pkId"> <div
<el-radio v-model="moren" @input="checkRadio" :label="item.pkId">{{}}</el-radio> :class="['local_i', item.pkId == moren ? 'local_a' : '']"
<div class="local1">{{ item.recArea }}{{ item.recAddress }}({{ item.recName }} )</div> v-for="item in addressList"
<div class="local2" v-show="item.isDefault == 1">{{ $t('w_0074') }}</div> :key="item.pkId"
<div class="local2 local3" v-show="item.isDefault == 0" @click="setDefaultAds(item.pkId)">{{ $t('w_0075') }}</div> >
<div class="local2" @click="changeAds(item.pkId)">{{ $t('w_0076') }}</div> <el-radio v-model="moren" @input="checkRadio" :label="item.pkId"
<div class="local3" @click="delAds(item.pkId)">{{ $t('ENU_CONTROL_TYPE_3') }}</div> >{{}}</el-radio
>
<div class="local1">
{{ item.recArea }}{{ item.recAddress }}({{ item.recName }} )
</div>
<div class="local2" v-show="item.isDefault == 1">
{{ $t("w_0074") }}
</div>
<div
class="local2 local3"
v-show="item.isDefault == 0"
@click="setDefaultAds(item.pkId)"
>
{{ $t("w_0075") }}
</div>
<div class="local2" @click="changeAds(item.pkId)">
{{ $t("w_0076") }}
</div>
<div class="local3" @click="delAds(item.pkId)">
{{ $t("ENU_CONTROL_TYPE_3") }}
</div>
</div> </div>
</div> </div>
<!-- 商品信息 --> <!-- 商品信息 -->
<div class="nox"> <div class="nox">
<div class="title">{{ $t('w_0077') }}</div> <div class="title">{{ $t("w_0077") }}</div>
</div> </div>
<el-table <el-table
:data="allData" :data="allData"
@ -107,11 +178,16 @@
background: '#C8161D', background: '#C8161D',
color: '#fff', color: '#fff',
fontWeight: 'bold', fontWeight: 'bold',
fontSize: '15px' fontSize: '15px',
}" }"
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
> >
<el-table-column align="center" prop="waresName" width="400" :label="$t('w_0078')"> <el-table-column
align="center"
prop="waresName"
width="400"
:label="$t('w_0078')"
>
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <span>{{ scope.row.goodsPrice | numberToCurrency}}</span> --> <!-- <span>{{ scope.row.goodsPrice | numberToCurrency}}</span> -->
<div class="goods"> <div class="goods">
@ -119,7 +195,11 @@
<img :src="scope.row.cover1" alt="" /> <img :src="scope.row.cover1" alt="" />
<div>{{ scope.row.waresName }}</div> <div>{{ scope.row.waresName }}</div>
</div> </div>
<div class="goods_tit" v-for="item in scope.row.waresItemsParamList" :key="item.pkWaresSpecsSku"> <div
class="goods_tit"
v-for="item in scope.row.waresItemsParamList"
:key="item.pkWaresSpecsSku"
>
<div class="goods_tit_l"> <div class="goods_tit_l">
<img :src="item.specCover" alt="" /> <img :src="item.specCover" alt="" />
<div class="goods_tit_lr"> <div class="goods_tit_lr">
@ -132,18 +212,34 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="goodsPrice" :label="$t('w_0079') + '(¥)'"> <el-table-column
align="center"
prop="goodsPrice"
:label="$t('w_0079') + '(¥)'"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.price | numberToCurrency }}</span> <span>{{ scope.row.price | numberToCurrency }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="goodsAchive" :label="$t('w_0080') + '(PV)'"> <el-table-column
align="center"
prop="goodsAchive"
:label="$t('w_0080') + '(PV)'"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.achieve | numberToCurrency }}</span> <span>{{ scope.row.achieve | numberToCurrency }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="quantity" :label="$t('w_0081')"></el-table-column> <el-table-column
<el-table-column align="center" prop="spyjxj" :label="$t('w_0082') + 'PV'"> align="center"
prop="quantity"
:label="$t('w_0081')"
></el-table-column>
<el-table-column
align="center"
prop="spyjxj"
:label="$t('w_0082') + 'PV'"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.achieveAmount | numberToCurrency }}</span> <span>{{ scope.row.achieveAmount | numberToCurrency }}</span>
</template> </template>
@ -155,8 +251,14 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="tab_b"> <div class="tab_b">
<div>{{ $t('w_0083') }}:{{ userInfo.currencyIcon }}{{ allGoodsData.priceAmount | numberToCurrency }}</div> <div>
<div>{{ $t('w_0071') }}:{{ userInfo.currencyIcon }}{{ ruleForm.postage | numberToCurrency }}</div> {{ $t("w_0083") }}:{{ userInfo.currencyIcon
}}{{ allGoodsData.priceAmount | numberToCurrency }}
</div>
<div>
{{ $t("w_0071") }}:{{ userInfo.currencyIcon
}}{{ ruleForm.postage | numberToCurrency }}
</div>
</div> </div>
<AddAddress ref="addAddress" @getAdList="getAddressList"></AddAddress> <AddAddress ref="addAddress" @getAdList="getAddressList"></AddAddress>
<div class="zhan"></div> <div class="zhan"></div>
@ -165,27 +267,53 @@
<div class="footer_t"> <div class="footer_t">
<div class="footer_tt"> <div class="footer_tt">
<div class="dis_flex"> <div class="dis_flex">
<div class="f1">{{ $t('w_0325') }}:</div> <div class="f1">{{ $t("w_0325") }}:</div>
<div class="f2">{{ userInfo.currencyIcon }}{{ totalAmont | numberToCurrency }}</div> <div class="f2">
{{ userInfo.currencyIcon }}{{ totalAmont | numberToCurrency }}
</div>
</div> </div>
<div class="dis_flex f2"> <div class="dis_flex f2">
<div class="f1">{{ $t('ENU_TOTAL_V_1') }}:</div> <div class="f1">{{ $t("ENU_TOTAL_V_1") }}:</div>
<div class="f3">{{ allGoodsData.achieveAmount | numberToCurrency }}</div> <div class="f3">
{{ allGoodsData.achieveAmount | numberToCurrency }}
</div>
</div> </div>
<div class="dis_flex"> <div class="dis_flex">
<div class="f1">BV:</div> <div class="f1">BV:</div>
<div class="f3">{{ userInfo.currencyIcon }}{{ allGoodsData.assAchieveAmount | numberToCurrency }}</div> <div class="f3">
{{ userInfo.currencyIcon
}}{{ allGoodsData.assAchieveAmount | numberToCurrency }}
</div> </div>
</div> </div>
<div class="footer_tt" v-show="ruleForm.recAddress && ruleForm.recName && ruleForm.recPhone && ruleForm.nameList"> </div>
<div class="f2 f4">{{ $t('w_0084') }}{{ ruleForm.nameList }}{{ ruleForm.recAddress }}</div> <div
<div class="f4">{{ $t('MY_ORD_10') }}{{ ruleForm.recName }} {{ ruleForm.recPhone }}</div> class="footer_tt"
v-show="
ruleForm.recAddress &&
ruleForm.recName &&
ruleForm.recPhone &&
ruleForm.nameList
"
>
<div class="f2 f4">
{{ $t("w_0084") }}{{ ruleForm.nameList }}{{ ruleForm.recAddress }}
</div>
<div class="f4">
{{ $t("MY_ORD_10") }}{{ ruleForm.recName }}
{{ ruleForm.recPhone }}
</div>
</div> </div>
</div> </div>
<div class="footer_b"> <div class="footer_b">
<!-- 协议 --> <!-- 协议 -->
<agreement :isShow="agreementShow" ref="agree" @agree="agree"></agreement> <!-- <agreement
<div class="btn" @click="submitRegister('ruleForm')">{{ $t('w_0085') }}</div> :isShow="agreementShow"
ref="agree"
@agree="agree"
></agreement> -->
<div class="btn" @click="submitRegister('ruleForm')">
{{ $t("w_0085") }}
</div>
</div> </div>
</div> </div>
<!-- 强制阅读协议 --> <!-- 强制阅读协议 -->
@ -195,26 +323,26 @@
</template> </template>
<script> <script>
import personInfo from '@/components/personInfo.vue'; import personInfo from "@/components/personInfo.vue";
import AddAddress from '@/components/AddAddress.vue'; import AddAddress from "@/components/AddAddress.vue";
import agreement from '@/components/agreement.vue'; import agreement from "@/components/agreement.vue";
import { mapGetters } from 'vuex'; import { mapGetters } from "vuex";
import * as api from '@/api/register.js'; import * as api from "@/api/register.js";
import { setTokenMi } from '@/util/auth'; import { setTokenMi } from "@/util/auth";
import Pay from '@/components/Pay.vue'; import Pay from "@/components/Pay.vue";
import mustAgreeMent from '@/components/mustAgreeMent.vue'; import mustAgreeMent from "@/components/mustAgreeMent.vue";
export default { export default {
components: { components: {
personInfo, personInfo,
AddAddress, AddAddress,
agreement, agreement,
Pay, Pay,
mustAgreeMent mustAgreeMent,
}, },
data() { data() {
let validateRecTransType = (rule, value, callback) => { let validateRecTransType = (rule, value, callback) => {
if (this.ruleForm.transType == '' && this.isDeliveryWay) { if (this.ruleForm.transType == "" && this.isDeliveryWay) {
callback(new Error(this.$t('w_0064'))); callback(new Error(this.$t("w_0064")));
} else { } else {
callback(); callback();
} }
@ -222,39 +350,49 @@ export default {
return { return {
waresCodeList: [], waresCodeList: [],
isPay: false, isPay: false,
paramsPost: '', paramsPost: "",
isClick: 0, isClick: 0,
ruleForm: { ruleForm: {
dizhi: [], dizhi: [],
fwzx: '', fwzx: "",
upgradeMemberCode: '', upgradeMemberCode: "",
upgradeMemberName: '', upgradeMemberName: "",
postage: '', postage: "",
recName: '', recName: "",
recPhone: '', recPhone: "",
recAddress: '', recAddress: "",
deliveryWay: '', deliveryWay: "",
transType: '' transType: "",
}, },
rules: { rules: {
upgradeMemberCode: [ upgradeMemberCode: [
{ {
required: true, required: true,
validator: this.upgradeMemberCodePass, validator: this.upgradeMemberCodePass,
trigger: 'blur' trigger: "blur",
} },
],
gradeName: [
{ required: true, message: this.$t("w_0086"), trigger: "change" },
],
upgradeMemberName: [
{ required: true, message: this.$t("w_0060"), trigger: "change" },
],
recName: [
{ required: true, message: this.$t("w_0087"), trigger: "blur" },
],
recPhone: [
{ required: true, message: this.$t("w_0053"), trigger: "blur" },
],
recAddress: [
{ required: true, message: this.$t("w_0070"), trigger: "blur" },
], ],
gradeName: [{ required: true, message: this.$t('w_0086'), trigger: 'change' }],
upgradeMemberName: [{ required: true, message: this.$t('w_0060'), trigger: 'change' }],
recName: [{ required: true, message: this.$t('w_0087'), trigger: 'blur' }],
recPhone: [{ required: true, message: this.$t('w_0053'), trigger: 'blur' }],
recAddress: [{ required: true, message: this.$t('w_0070'), trigger: 'blur' }],
deliveryWay: [ deliveryWay: [
{ {
required: true, required: true,
message: this.$t('w_0062'), message: this.$t("w_0062"),
trigger: 'change' trigger: "change",
} },
], ],
// transType: [ // transType: [
// { // {
@ -263,47 +401,47 @@ export default {
// trigger: 'change', // trigger: 'change',
// }, // },
// ], // ],
transType: [{ validator: validateRecTransType }] transType: [{ validator: validateRecTransType }],
}, },
addressList: [], addressList: [],
moren: '', moren: "",
allGoodsData: [], allGoodsData: [],
allData: [], allData: [],
agreementShow: false, agreementShow: true,
countryList: [], countryList: [],
transList: [ transList: [
{ {
value: 1, value: 1,
label: this.$t('ENU_TRA_1') label: this.$t("ENU_TRA_1"),
}, },
{ {
value: 2, value: 2,
label: this.$t('ENU_TRA_2') label: this.$t("ENU_TRA_2"),
}, },
{ {
value: 3, value: 3,
label: this.$t('ENU_TRA_3') label: this.$t("ENU_TRA_3"),
} },
], ],
deliList: [], deliList: [],
bankLists: [], bankLists: [],
areaData: [], areaData: [],
regionParams: { regionParams: {
label: 'name', label: "name",
value: 'id', value: "id",
children: 'children', children: "children",
expandTrigger: 'hover' expandTrigger: "hover",
}, },
totalPrice: 0, totalPrice: 0,
totalAchive: 0, totalAchive: 0,
isLoading: '', isLoading: "",
isDeliveryWay: true, isDeliveryWay: true,
shoppingArr: '', shoppingArr: "",
totalAmont: 0 totalAmont: 0,
}; };
}, },
computed: { computed: {
...mapGetters(['userInfo']) ...mapGetters(["userInfo"]),
}, },
mounted() { mounted() {
// // // //
@ -339,11 +477,11 @@ export default {
// // // //
// // this.getMember() // // this.getMember()
// //
this.shoppingArr = JSON.parse(localStorage.getItem('allGoods')); this.shoppingArr = JSON.parse(localStorage.getItem("allGoods"));
// //
this.getCatDetail(); this.getCatDetail();
// //
api.generate().then(res => { api.generate().then((res) => {
setTokenMi(res.msg); setTokenMi(res.msg);
}); });
if (this.userInfo.pkSettleCountry == 1) { if (this.userInfo.pkSettleCountry == 1) {
@ -355,12 +493,13 @@ export default {
// name // name
upgradeMemberCodePass(rule, value, callback) { upgradeMemberCodePass(rule, value, callback) {
if (!value) { if (!value) {
callback(new Error(this.$t('w_0046'))); callback(new Error(this.$t("w_0046")));
} else { } else {
api.upgRel({ api
upgradeMemberCode: value .upgRel({
upgradeMemberCode: value,
}) })
.then(res => { .then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.ruleForm.upgradeMemberName = res.data.upgradeMemberName; this.ruleForm.upgradeMemberName = res.data.upgradeMemberName;
// this.getMember() // this.getMember()
@ -368,18 +507,20 @@ export default {
callback(); callback();
} }
}) })
.catch(err => { .catch((err) => {
callback(new Error(err)); callback(new Error(err));
}); });
} }
}, },
getCatDetail() { getCatDetail() {
api.shoppingWaresDetail({ api
.shoppingWaresDetail({
shoppingIds: this.shoppingArr, shoppingIds: this.shoppingArr,
specialArea: 13 specialArea: 13,
}).then(res => { })
.then((res) => {
this.allGoodsData = res.data; this.allGoodsData = res.data;
this.waresCodeList = res.data.orderItemsParams.map(item => { this.waresCodeList = res.data.orderItemsParams.map((item) => {
return item.waresCode; return item.waresCode;
}); });
this.allGoodsData.specialArea = 13; this.allGoodsData.specialArea = 13;
@ -409,9 +550,9 @@ export default {
}, },
setDizhi(e, val) { setDizhi(e, val) {
let arr = this.flatten(this.areaData); let arr = this.flatten(this.areaData);
let nameList = ''; let nameList = "";
arr.forEach(item => { arr.forEach((item) => {
this.ruleForm.dizhi.forEach(ctem => { this.ruleForm.dizhi.forEach((ctem) => {
if (ctem == item.id) { if (ctem == item.id) {
nameList += item.name; nameList += item.name;
} }
@ -420,29 +561,31 @@ export default {
this.ruleForm.nameList = nameList; this.ruleForm.nameList = nameList;
this.allGoodsData.recProvince = this.ruleForm.dizhi[0]; this.allGoodsData.recProvince = this.ruleForm.dizhi[0];
this.allGoodsData.recCity = this.ruleForm.dizhi[1]; this.allGoodsData.recCity = this.ruleForm.dizhi[1];
this.allGoodsData.recCounty = this.ruleForm.dizhi[2] || ''; this.allGoodsData.recCounty = this.ruleForm.dizhi[2] || "";
this.getPostAge(); this.getPostAge();
}, },
openLoading() { openLoading() {
this.isLoading = this.$loading({ this.isLoading = this.$loading({
lock: true, lock: true,
text: 'Loading', text: "Loading",
spinner: 'el-icon-loading', spinner: "el-icon-loading",
background: 'rgba(0, 0, 0, 0.7)' background: "rgba(0, 0, 0, 0.7)",
}); });
}, },
resetAll() { resetAll() {
this.ruleForm.parent = ''; this.ruleForm.parent = "";
this.ruleForm.deliveryWay = ''; this.ruleForm.deliveryWay = "";
this.ruleForm.transType = ''; this.ruleForm.transType = "";
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ruleForm.clearValidate(); this.$refs.ruleForm.clearValidate();
}); });
}, },
getUserName() { getUserName() {
api.upgRel({ api
upgradeMemberCode: this.ruleForm.upgradeMemberCode .upgRel({
}).then(res => { upgradeMemberCode: this.ruleForm.upgradeMemberCode,
})
.then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.ruleForm.upgradeMemberName = res.data.upgradeMemberName; this.ruleForm.upgradeMemberName = res.data.upgradeMemberName;
this.$forceUpdate(); this.$forceUpdate();
@ -453,8 +596,8 @@ export default {
if (val) { if (val) {
this.isPay = false; this.isPay = false;
this.$router.push({ this.$router.push({
path: '/vipCenter', path: "/vipCenter",
query: { id: 1 } query: { id: 1 },
}); });
} else { } else {
this.$confirm(this.$t("w_0090"), "", { this.$confirm(this.$t("w_0090"), "", {
@ -462,54 +605,55 @@ export default {
cancelButtonText: this.$t("ENU_P_TYPE0"), cancelButtonText: this.$t("ENU_P_TYPE0"),
type: "warning", type: "warning",
}) })
.then(_ => { .then((_) => {
this.isPay = false; this.isPay = false;
this.$router.push({ this.$router.push({
path: '/vipCenter', path: "/vipCenter",
query: { id: 1 } query: { id: 1 },
}); });
}) })
.catch(_ => {}); .catch((_) => {});
} }
}, },
// //
submitRegister(formName) { submitRegister(formName) {
let deleteList = []; let deleteList = [];
this.shoppingArr.forEach(item => { this.shoppingArr.forEach((item) => {
deleteList.push({ deleteList.push({
shoppingId: item shoppingId: item,
}); });
}); });
if (!this.agreementShow) { // if (!this.agreementShow) {
this.$message({ // this.$message({
message: this.$t('w_0091'), // message: this.$t("w_0091"),
type: 'warning' // type: "warning",
}); // });
return; // return;
} // }
if (this.isDeliveryWay && !this.ruleForm.recPhone) { if (this.isDeliveryWay && !this.ruleForm.recPhone) {
this.$message({ this.$message({
message: this.$t('w_0092'), message: this.$t("w_0092"),
type: 'warning' type: "warning",
}); });
return; return;
} }
this.$refs[formName].validate(valid => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
this.openLoading(); this.openLoading();
let obj = Object.assign({}, this.allGoodsData, this.ruleForm, { let obj = Object.assign({}, this.allGoodsData, this.ruleForm, {
deleteList: deleteList deleteList: deleteList,
}); });
api.confirmOthOrder(obj) api
.then(res => { .confirmOthOrder(obj)
.then((res) => {
this.isLoading.close(); this.isLoading.close();
if (res.code == 200) { if (res.code == 200) {
this.isPay = true; this.isPay = true;
this.paramsPost = res.data; this.paramsPost = res.data;
} }
}) })
.catch(err => { .catch((err) => {
this.isLoading.close(); this.isLoading.close();
}); });
} else { } else {
@ -525,26 +669,33 @@ export default {
}, },
flatten(arr) { flatten(arr) {
return arr.reduce((result, item) => { return arr.reduce((result, item) => {
return result.concat(item, Array.isArray(item.children) ? this.flatten(item.children) : []); return result.concat(
item,
Array.isArray(item.children) ? this.flatten(item.children) : []
);
}, []); }, []);
}, },
checkRadio() { checkRadio() {
this.$set(this.ruleForm, 'dizhi', []); this.$set(this.ruleForm, "dizhi", []);
let arr = []; let arr = [];
this.addressList.forEach(item => { this.addressList.forEach((item) => {
if (item.pkId == this.moren) { if (item.pkId == this.moren) {
this.ruleForm.recName = item.recName; this.ruleForm.recName = item.recName;
this.ruleForm.nameList = item.recArea; this.ruleForm.nameList = item.recArea;
this.ruleForm.recPhone = item.recPhone; this.ruleForm.recPhone = item.recPhone;
this.ruleForm.recAddress = item.recAddress; this.ruleForm.recAddress = item.recAddress;
arr = [item.recProvince + '', item.recCity + '', (item.recCounty || '') + '']; arr = [
item.recProvince + "",
item.recCity + "",
(item.recCounty || "") + "",
];
} }
}); });
arr = arr.filter(s => { arr = arr.filter((s) => {
return s && s.trim(); return s && s.trim();
}); });
this.$set(this.ruleForm, 'dizhi', arr); this.$set(this.ruleForm, "dizhi", arr);
this.allGoodsData.deliveryWay = this.ruleForm.deliveryWay; this.allGoodsData.deliveryWay = this.ruleForm.deliveryWay;
this.allGoodsData.transType = this.ruleForm.transType; this.allGoodsData.transType = this.ruleForm.transType;
this.allGoodsData.recProvince = this.ruleForm.dizhi[0]; this.allGoodsData.recProvince = this.ruleForm.dizhi[0];
@ -555,15 +706,17 @@ export default {
}, },
getPostAge() { getPostAge() {
let deleteList = []; let deleteList = [];
this.shoppingArr.forEach(item => { this.shoppingArr.forEach((item) => {
deleteList.push({ deleteList.push({
shoppingId: item shoppingId: item,
}); });
}); });
this.allGoodsData.deleteList = deleteList; this.allGoodsData.deleteList = deleteList;
api.queryPostage(this.allGoodsData).then(res => { api.queryPostage(this.allGoodsData).then((res) => {
this.ruleForm.postage = Number(res.data.postage).toFixed(2); this.ruleForm.postage = Number(res.data.postage).toFixed(2);
this.totalAmont = parseFloat(this.allGoodsData.priceAmount) + parseFloat(res.data.postage); this.totalAmont =
parseFloat(this.allGoodsData.priceAmount) +
parseFloat(res.data.postage);
}); });
}, },
// getMember() { // getMember() {
@ -577,32 +730,32 @@ export default {
// }) // })
// }, // },
getTransList() { getTransList() {
api.transportList().then(res => { api.transportList().then((res) => {
this.transList = res.data; this.transList = res.data;
}); });
}, },
getDeliveryList() { getDeliveryList() {
api.deliveryList().then(res => { api.deliveryList().then((res) => {
this.deliList = res.data; this.deliList = res.data;
}); });
}, },
delAds(id) { delAds(id) {
this.$confirm(this.$t('w_0088') + '?', '', { this.$confirm(this.$t("w_0088") + "?", "", {
confirmButtonText: this.$t('w_0035'), confirmButtonText: this.$t("w_0035"),
cancelButtonText: this.$t('ENU_P_TYPE0'), cancelButtonText: this.$t("ENU_P_TYPE0"),
type: 'warning' type: "warning",
}).then(() => { }).then(() => {
api.delAddress(id).then(res => { api.delAddress(id).then((res) => {
this.$message({ this.$message({
type: 'success', type: "success",
message: this.$t('w_0089') + '!' message: this.$t("w_0089") + "!",
}); });
this.getAddressList(); this.getAddressList();
}); });
}); });
}, },
getAllArea() { getAllArea() {
api.allArea().then(res => { api.allArea().then((res) => {
this.areaData = res.data; this.areaData = res.data;
}); });
}, },
@ -610,7 +763,7 @@ export default {
this.$refs.addAddress.isShowAddress(true, this.areaData, id); this.$refs.addAddress.isShowAddress(true, this.areaData, id);
}, },
setDefaultAds(id) { setDefaultAds(id) {
api.addressDefault(id).then(res => { api.addressDefault(id).then((res) => {
this.getAddressList(); this.getAddressList();
}); });
}, },
@ -622,9 +775,9 @@ export default {
this.$refs.addAddress.isShowAddress(true, this.areaData); this.$refs.addAddress.isShowAddress(true, this.areaData);
}, },
getAddressList() { getAddressList() {
api.addressList({}).then(res => { api.addressList({}).then((res) => {
this.addressList = res.data; this.addressList = res.data;
this.addressList.forEach(item => { this.addressList.forEach((item) => {
if (item.isDefault == 1) { if (item.isDefault == 1) {
this.moren = item.pkId; this.moren = item.pkId;
this.checkRadio(); this.checkRadio();
@ -636,13 +789,13 @@ export default {
// 线 // 线
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 0) { if (rowIndex % 2 == 0) {
return 'warning-row'; return "warning-row";
} else if (rowIndex % 2 == 1) { } else if (rowIndex % 2 == 1) {
return 'success-row'; return "success-row";
}
return '';
}
} }
return "";
},
},
}; };
</script> </script>

View File

@ -5,42 +5,51 @@
* @Date: 2022-09-29 10:04:55 * @Date: 2022-09-29 10:04:55
*/ */
// 引入等比适配插件 // 引入等比适配插件
const px2rem = require('postcss-px2rem') const px2rem = require("postcss-px2rem");
// 配置基本大小 // 配置基本大小
const postcss = px2rem({ const postcss = px2rem({
// 基准大小 baseSize需要和rem.js中相同 // 基准大小 baseSize需要和rem.js中相同
remUnit: 16 remUnit: 16,
}) });
// 使用等比适配插件 // 使用等比适配插件
module.exports = { module.exports = {
lintOnSave: false, lintOnSave: false,
devServer: {
port: 8866,
proxy: {
"/prod-api": {
target: "http://localhost:8080",
changeOrigin: true,
pathRewrite: {
"^/prod-api": "",
},
},
},
},
css: { css: {
loaderOptions: { loaderOptions: {
postcss: { postcss: {
plugins: [ plugins: [postcss],
postcss },
] },
}
}
}, },
configureWebpack: { configureWebpack: {
externals: { externals: {
'enUS': 'enUS', enUS: "enUS",
'zhCN': 'zhCN', zhCN: "zhCN",
'zhTC': 'zhTC', zhTC: "zhTC",
'ruRU':'ruRU', ruRU: "ruRU",
'frFR':'frFR', frFR: "frFR",
'ptPT':'ptPT', ptPT: "ptPT",
}, },
}, },
chainWebpack: config => { chainWebpack: (config) => {
config config.plugin("html").tap((args) => {
.plugin('html') args[0].title = "会员系统";
.tap(args => { return args;
args[0].title = '会员系统' });
return args },
}) };
}
}