|
|
|
@ -342,61 +342,101 @@ export default { |
|
|
|
|
}) |
|
|
|
|
.finally() |
|
|
|
|
}, |
|
|
|
|
onShowToast(t) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: t, |
|
|
|
|
icon: 'none', |
|
|
|
|
duration: 2000 |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
sureSubmit() { |
|
|
|
|
let tip_title = null |
|
|
|
|
if (!this.form.store_name) { |
|
|
|
|
tip_title = '请输入主体公司名称!' |
|
|
|
|
this.onShowToast('请输入主体公司名称!') |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if (!this.form.store_cat) { |
|
|
|
|
tip_title = '请选择主营类目体类目!' |
|
|
|
|
this.onShowToast(tip_title) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if (!this.form.store_address) { |
|
|
|
|
tip_title = '请选择公司地址!' |
|
|
|
|
this.onShowToast(tip_title) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if (!this.form.store_brand) { |
|
|
|
|
tip_title = '请输入合作品牌!' |
|
|
|
|
this.onShowToast(tip_title) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if (!this.brand_name) { |
|
|
|
|
tip_title = '请选择代理入驻!' |
|
|
|
|
this.onShowToast(tip_title) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if (!this.authorize_name) { |
|
|
|
|
tip_title = '请选择一二级授权!' |
|
|
|
|
} |
|
|
|
|
if (!this.rate_name) { |
|
|
|
|
tip_title = '请选择可否含税!' |
|
|
|
|
this.onShowToast(tip_title) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if (!this.form.user_name) { |
|
|
|
|
tip_title = '请输入联系人姓名!' |
|
|
|
|
this.onShowToast(tip_title) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if (!this.form.user_position) { |
|
|
|
|
tip_title = '请选择联系人职位!' |
|
|
|
|
this.onShowToast(tip_title) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if (!this.form.user_mobile) { |
|
|
|
|
tip_title = '请输入联系人手机号!' |
|
|
|
|
this.onShowToast(tip_title) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if (this.form.user_mobile && (!/^\+?\d[\d -]{8,12}\d/.test(this.form.user_mobile))) { |
|
|
|
|
tip_title = '手机号格式不正确!' |
|
|
|
|
this.onShowToast(tip_title) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if (!this.form.user_wx) { |
|
|
|
|
tip_title = '请输入联系人微信!' |
|
|
|
|
this.onShowToast(tip_title) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if (!this.form.user_email) { |
|
|
|
|
tip_title = '请输入联系人邮箱!' |
|
|
|
|
this.onShowToast(tip_title) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if (!this.form.store_model) { |
|
|
|
|
tip_title = '请选择仓库模式!' |
|
|
|
|
this.onShowToast(tip_title) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if (!this.send_name) { |
|
|
|
|
tip_title = '请选择周末是否发货!' |
|
|
|
|
this.onShowToast(tip_title) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if (!this.factory_name) { |
|
|
|
|
tip_title = '请选择是否自有工厂!' |
|
|
|
|
this.onShowToast(tip_title) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if (!this.offline_name) { |
|
|
|
|
tip_title = '请选择是否有线下渠道' |
|
|
|
|
this.onShowToast(tip_title) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if (!this.shop_name) { |
|
|
|
|
tip_title = '请选择是否有电商店铺!' |
|
|
|
|
this.onShowToast(tip_title) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
let plat_form = [] |
|
|
|
|
this.btnList.map(item => { |
|
|
|
@ -407,19 +447,21 @@ export default { |
|
|
|
|
this.form.store_type = plat_form |
|
|
|
|
if (plat_form.length == 0 && this.form.has_online_shop == 1) { |
|
|
|
|
tip_title = '请选择电商平台!' |
|
|
|
|
} |
|
|
|
|
if (tip_title != null) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: tip_title, |
|
|
|
|
icon: 'none', |
|
|
|
|
duration: 2000 |
|
|
|
|
}) |
|
|
|
|
this.onShowToast(tip_title) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
help.joinStore(this.form) |
|
|
|
|
.then(res => { |
|
|
|
|
if (res.status) { |
|
|
|
|
this.popShow = true |
|
|
|
|
this.form = this.$options.data().form |
|
|
|
|
this.send_name = '' |
|
|
|
|
this.factory_name = '' |
|
|
|
|
this.offline_name = '' |
|
|
|
|
this.shop_name = '' |
|
|
|
|
this.btnList.map(item => { |
|
|
|
|
item.active = false |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '入驻失败', |
|
|
|
@ -429,14 +471,6 @@ export default { |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
.finally(() => { |
|
|
|
|
this.form = this.$options.data().form |
|
|
|
|
this.send_name = '' |
|
|
|
|
this.factory_name = '' |
|
|
|
|
this.offline_name = '' |
|
|
|
|
this.shop_name = '' |
|
|
|
|
this.btnList.map(item => { |
|
|
|
|
item.active = false |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|