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