parent
99f678e3f4
commit
904b72d358
|
|
@ -10,6 +10,25 @@
|
|||
<text class="iconfont icon-xiangyou"></text>
|
||||
</view>
|
||||
<view class='list'>
|
||||
<view class="item">
|
||||
<view class="uni-list">
|
||||
<view class="uni-list-cell">
|
||||
<view class="uni-list-cell-db acea-row row-middle">
|
||||
<text class="item-name">入驻类别</text>
|
||||
<picker
|
||||
@change="changeMerchantType"
|
||||
:value="merchant_type_index"
|
||||
:range="merchant_type_list"
|
||||
range-key="title"
|
||||
:disabled="default_merchant_type !== ''">
|
||||
<input placeholder="请选择商户类别" type="text" disabled readonly v-model="merchant_type_title">
|
||||
<view v-if="merchant_type_title" class="iconfont icon-guanbi2"></view>
|
||||
<view class='iconfont icon-jiantou'></view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="acea-row row-middle">
|
||||
<text class="item-name">管理员</text>
|
||||
|
|
@ -28,42 +47,42 @@
|
|||
</view>
|
||||
<view class="item">
|
||||
<view class="acea-row row-middle">
|
||||
<text class="item-name">品牌名称</text>
|
||||
<input type="text" maxlength="30" placeholder="请输入品牌名称" v-model="merchantData.enterprise_name" @input="validateBtn"
|
||||
<text class="item-name">商户名称</text>
|
||||
<input type="text" maxlength="30" placeholder="请输入商户名称" v-model="merchantData.enterprise_name" @input="validateBtn"
|
||||
placeholder-class='placeholder' />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<!--<view class="item">
|
||||
<view class="acea-row row-middle">
|
||||
<text class="item-name">负责人姓名</text>
|
||||
<input type="text" placeholder="请输入负责人姓名" v-model="merchantData.user_name" @input="validateBtn" placeholder-class='placeholder' />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
</view>-->
|
||||
<!--<view class="item">
|
||||
<view class="acea-row row-middle">
|
||||
<text class="item-name">负责人电话</text>
|
||||
<input type="text" placeholder="请输入负责人电话" v-model="merchantData.phone" @input="validateBtn" placeholder-class='placeholder' />
|
||||
</view>
|
||||
</view>-->
|
||||
<!--<view class="item rel">
|
||||
<view class="acea-row row-middle">
|
||||
<text class="item-name">验证码</text>
|
||||
<input type="text" placeholder="填写验证码" v-model="merchantData.yanzhengma" @input="validateBtn" class="codeIput"
|
||||
placeholder-class='placeholder' />
|
||||
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="handleVerify">
|
||||
{{ text }}
|
||||
</button>
|
||||
</view>
|
||||
<!--<view class="item rel">-->
|
||||
<!-- <view class="acea-row row-middle">-->
|
||||
<!-- <text class="item-name">验证码</text>-->
|
||||
<!-- <input type="text" placeholder="填写验证码" v-model="merchantData.yanzhengma" @input="validateBtn" class="codeIput"-->
|
||||
<!-- placeholder-class='placeholder' />-->
|
||||
<!-- <button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="handleVerify">-->
|
||||
<!-- {{ text }}-->
|
||||
<!-- </button>-->
|
||||
<!-- </view>-->
|
||||
<!--</view>-->
|
||||
<view class="item" v-if="isShowCode">
|
||||
</view>-->
|
||||
<!--<view class="item" v-if="isShowCode">
|
||||
<view class="acea-row row-middle">
|
||||
<text class="item-name">验证码</text>
|
||||
<input type="text" placeholder="请输入验证码" class="codeIput" v-model="codeVal" @input="validateBtn"
|
||||
placeholder-class='placeholder' />
|
||||
<view class="imageCode" @click="again"><image :src="codeUrl" /></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item" v-if="![1,3,4,5,6,7].includes(Number(merchant_type))">
|
||||
</view>-->
|
||||
<!--<view class="item" v-if="![1,3,4,5,6,7].includes(Number(merchant_type))">
|
||||
<view class="uni-list">
|
||||
<view class="uni-list-cell">
|
||||
<view class="uni-list-cell-db acea-row row-middle">
|
||||
|
|
@ -75,8 +94,8 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item" v-if="![1,3,4,5,6,7].includes(Number(merchant_type))">
|
||||
</view>-->
|
||||
<!--<view class="item" v-if="![1,3,4,5,6,7].includes(Number(merchant_type))">
|
||||
<view class="uni-list">
|
||||
<view class="uni-list-cell">
|
||||
<view class="uni-list-cell-db acea-row row-middle">
|
||||
|
|
@ -90,22 +109,22 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item" v-if="[0,1].includes(Number(merchant_type))">
|
||||
</view>-->
|
||||
<!--<view class="item" v-if="[0,1].includes(Number(merchant_type))">
|
||||
<view class="uni-list">
|
||||
<view class="uni-list-cell">
|
||||
<view class="uni-list-cell-db acea-row row-middle">
|
||||
<text class="item-name">商户类型</text>
|
||||
<picker @change="changeSubType" :value="sub_type_index" :range="subTypeList" range-key="title">
|
||||
<input placeholder="请选择店铺类型" type="text" disabled readonly v-model="sub_type_title">
|
||||
<input placeholder="请选择商户类型" type="text" disabled readonly v-model="sub_type_title">
|
||||
<view v-if="sub_type_title" @tap.stop="sub_type_title=''" class="iconfont icon-guanbi2"></view>
|
||||
<view class='iconfont icon-jiantou'></view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item no-border">
|
||||
</view>-->
|
||||
<!--<view class="item no-border">
|
||||
<view class='acea-row row-middle'>
|
||||
<text class="item-title">请上传营业执照及行业相关资质证明图片</text>
|
||||
<text class="item-desc">(图片最多可上传10张,图片格式支持JPG、PNG、JPEG)</text>
|
||||
|
|
@ -120,12 +139,12 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!--<view class="item no-border">-->
|
||||
<!-- <checkbox-group @change='ChangeIsAgree'>-->
|
||||
<!-- <checkbox class="checkbox" :checked="isAgree ? true : false" />已阅读并同意</checkbox-group>-->
|
||||
<!-- <button class="settleAgree" @click="getConfig">《入驻协议》</button>-->
|
||||
<!--</view>-->
|
||||
</view>-->
|
||||
<!--<view class="item no-border">
|
||||
<checkbox-group @change='ChangeIsAgree'>
|
||||
<checkbox class="checkbox" :checked="isAgree ? true : false" />已阅读并同意</checkbox-group>
|
||||
<button class="settleAgree" @click="getConfig">《入驻协议》</button>
|
||||
</view>-->
|
||||
<button class='submitBtn' :class="validate === true ? 'on':''" @click="formSubmit">提交申请</button>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -143,8 +162,13 @@
|
|||
<view class='loadingicon acea-row row-center-wrapper' v-if="loading">
|
||||
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>
|
||||
</view>
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||
<Verify @success="success" :captchaType="'blockPuzzle'" :imgSize="{ width: '330px', height: '155px' }" ref="verify"></Verify>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 授权登录 -->
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authClose"></authorize>
|
||||
</view>
|
||||
<view class="settledSuccessMain" v-else :style="viewColor">
|
||||
<view class="settledSuccessful">
|
||||
|
|
@ -157,6 +181,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { manageIsEligible,create, verify, merClassifly, getGoodsDetails, updateGoodsRecord, getStoreTypeApi} from '@/api/store.js';
|
||||
import {getCaptcha, getAgreementApi, searchUser} from "@/api/user";
|
||||
|
|
@ -176,12 +201,14 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
// 登录相关
|
||||
isAuto: false, //没有授权的不会自动授权
|
||||
isShowAuth: false,//是否隐藏授权
|
||||
|
||||
domain: HTTP_REQUEST_URL,
|
||||
cartId: '', //购物车id
|
||||
pinkId: 0, //拼团id
|
||||
couponId: 0, //优惠券id
|
||||
isAuto: false, //没有授权的不会自动授权
|
||||
isShowAuth: false, //是否隐藏授权
|
||||
text: "获取验证码",
|
||||
codeUrl: "",
|
||||
disabled: false,
|
||||
|
|
@ -229,7 +256,8 @@
|
|||
isType: false,
|
||||
// 代理邀请入驻
|
||||
agent_id: 0,
|
||||
merchant_type: 0,
|
||||
merchant_type: '',
|
||||
default_merchant_type: '',
|
||||
pageTitle: '',
|
||||
// 商户子类型
|
||||
subTypeList: [{
|
||||
|
|
@ -237,7 +265,21 @@
|
|||
value: ''
|
||||
}],
|
||||
sub_type_index: 0,
|
||||
sub_type_title: ''
|
||||
sub_type_title: '',
|
||||
// 商户类别选择 仅未指定类别时有效
|
||||
merchant_type_index: '',
|
||||
merchant_type_title: '',
|
||||
merchant_type_list: [
|
||||
{ title: '联盟商家', value: 0},
|
||||
{ title: '酒道馆', value: 1},
|
||||
{ title: '供应商', value: 2},
|
||||
{ title: '烟酒店', value: 3},
|
||||
{ title: '超市', value: 4},
|
||||
{ title: '省公司门店', value: 5},
|
||||
{ title: '城市会客厅', value: 6},
|
||||
{ title: '惠民健康体检馆', value: 7},
|
||||
],
|
||||
|
||||
|
||||
};
|
||||
},
|
||||
|
|
@ -247,26 +289,28 @@
|
|||
computed: configMap({sys_intention_agree:''},mapGetters(['isLogin','uid','viewColor','keyColor'])),
|
||||
onLoad(options) {
|
||||
let _this = this;
|
||||
// 二维码参数获取
|
||||
if(options.scene){
|
||||
console.log('转换前参数:',options.scene)
|
||||
let scene = _this.$util.getUrlParams(decodeURIComponent(options.scene));
|
||||
// console.log("接收参数",scene)
|
||||
_this.agent_id = scene.aid || 0;
|
||||
_this.merchant_type = scene.mt || 0;
|
||||
_this.default_merchant_type = _this.merchant_type
|
||||
// 商户类别:0=普通商户,1=酒道馆,2=供应商,3=烟酒店,4=超市,5=省公司门店,6=城市会客厅
|
||||
_this.pageTitle = _this.$util.getMerchantTypeText( _this.merchant_type);
|
||||
uni.setNavigationBarTitle({
|
||||
title: _this.pageTitle + '申请入驻'
|
||||
})
|
||||
}
|
||||
// 登录处理
|
||||
if (this.isLogin) {
|
||||
this.getClassfication();
|
||||
this.getStoreType();
|
||||
this.getSubTypeList();
|
||||
this.init();
|
||||
} else {
|
||||
this.isAuto = true;
|
||||
this.isShowAuth = true
|
||||
}
|
||||
// 申请信息编辑
|
||||
if (options.mer_i_id) {
|
||||
this.mer_i_id = options.mer_i_id
|
||||
uni.showLoading({
|
||||
|
|
@ -284,29 +328,53 @@
|
|||
watch: {
|
||||
'manage_search':{
|
||||
handler(val) {
|
||||
let _this = this;
|
||||
searchUser({ id_and_phone: _this.manage_search}).then(res => {
|
||||
_this.manage_info = res.data;
|
||||
_this.merchantData.manage_uid = res.data.uid;
|
||||
}).catch(err => {});
|
||||
this.manageUserSearch();
|
||||
},
|
||||
deep: false
|
||||
},
|
||||
'merchantData.manage_uid':{
|
||||
handler(val) {
|
||||
let _this = this;
|
||||
let params = {
|
||||
manage_uid: _this.merchantData.manage_uid,
|
||||
mer_intention_id: _this.mer_i_id
|
||||
};
|
||||
manageIsEligible(params).then(res => {
|
||||
_this.manage_eligible = res.data;
|
||||
}).catch(err => {});
|
||||
this.manageIsEligibleHandle();
|
||||
},
|
||||
deep: false
|
||||
}
|
||||
},
|
||||
'merchant_type':{
|
||||
handler(val) {
|
||||
this.manageIsEligibleHandle();
|
||||
},
|
||||
deep: false
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 授权回调
|
||||
onLoadFun() {
|
||||
if(this.isLogin){
|
||||
this.isShowAuth = false;
|
||||
this.init();
|
||||
}
|
||||
},
|
||||
// 授权关闭
|
||||
authClose(e) {
|
||||
this.isShowAuth = e
|
||||
},
|
||||
// 初始化
|
||||
init(){
|
||||
this.getClassfication();
|
||||
this.getStoreType();
|
||||
this.getSubTypeList();
|
||||
this.manageUserSearch();
|
||||
this.$set(this, 'manage_search', this.uid);
|
||||
if(this.merchant_type != ''){
|
||||
let merchantTypeList = Object.assign({}, this.merchant_type_list);
|
||||
for (const item of Object.values(merchantTypeList)) {
|
||||
if(Number(this.merchant_type) === Number(item.value)){
|
||||
this.merchant_type_title = item.title || '';
|
||||
this.validateBtn();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
getConfig() {
|
||||
this.isType = false;
|
||||
this.showProtocol = true;
|
||||
|
|
@ -419,14 +487,6 @@
|
|||
});
|
||||
}
|
||||
},
|
||||
// 授权回调
|
||||
onLoadFun: function() {
|
||||
this.isShowAuth = false;
|
||||
},
|
||||
// 授权关闭
|
||||
authColse: function(e) {
|
||||
this.isShowAuth = e
|
||||
},
|
||||
toggleTab(str) {
|
||||
this.$refs[str].show();
|
||||
},
|
||||
|
|
@ -592,31 +652,33 @@
|
|||
validateBtn: function() {
|
||||
let that = this,
|
||||
value = that.merchantData;//value.yanzhengma &&
|
||||
if (value.enterprise_name && value.user_name && value.phone && /^1(3|4|5|7|8|9|6)\d{9}$/i.test(value.phone) && that.isAgree && (value.classification || [1,3,4,5,6,7].includes(Number(this.merchant_type)))) {
|
||||
if (!that.isShowCode) {
|
||||
that.validate = true;
|
||||
} else {
|
||||
if (that.codeVal) {
|
||||
that.validate = true;
|
||||
} else {
|
||||
that.validate = false;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
that.validate = false;
|
||||
}
|
||||
// if (value.enterprise_name && value.user_name && value.phone && /^1(3|4|5|7|8|9|6)\d{9}$/i.test(value.phone) && that.isAgree && (value.classification || [1,3,4,5,6,7].includes(Number(this.merchant_type)))) {
|
||||
// if (!that.isShowCode) {
|
||||
// that.validate = true;
|
||||
// } else {
|
||||
// if (that.codeVal) {
|
||||
// that.validate = true;
|
||||
// } else {
|
||||
// that.validate = false;
|
||||
// }
|
||||
// }
|
||||
// }else{
|
||||
// that.validate = false;
|
||||
// }
|
||||
|
||||
that.validate = Number(this.merchantData.manage_uid) > 0 && this.merchant_type !== '';
|
||||
},
|
||||
validateForm: function() {
|
||||
let that = this,
|
||||
value = that.merchantData;
|
||||
if (!value.manage_uid) return that.$util.Tips({title: '请设置管理员'});
|
||||
else if (value.manage_uid && !that.manage_eligible.is_eligible) return that.$util.Tips({title: '请设置有效管理员'});
|
||||
if (!value.enterprise_name) return that.$util.Tips({title: '请输入企业名称'});
|
||||
if (!value.user_name) return that.$util.Tips({title: '请输入姓名'});
|
||||
if (!value.phone) return that.$util.Tips({title: '请输入手机号'});
|
||||
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(value.phone)) return that.$util.Tips({title: '请输入正确的手机号码'});
|
||||
// if (!value.enterprise_name) return that.$util.Tips({title: '请输入企业名称'});
|
||||
// if (!value.user_name) return that.$util.Tips({title: '请输入姓名'});
|
||||
// if (!value.phone) return that.$util.Tips({title: '请输入手机号'});
|
||||
// if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(value.phone)) return that.$util.Tips({title: '请输入正确的手机号码'});
|
||||
// if (!value.yanzhengma) return that.$util.Tips({title: '请填写验证码'});
|
||||
if (!value.classification && ![1,3,4,5,6,7].includes(Number(this.merchant_type))) return that.$util.Tips({title: '请选择商户分类'});
|
||||
// if (!value.classification && ![1,3,4,5,6,7].includes(Number(this.merchant_type))) return that.$util.Tips({title: '请选择商户分类'});
|
||||
if (!that.isAgree) return that.$util.Tips({title: '请勾选并同意入驻协议'});
|
||||
if (that.isShowCode && !that.codeVal) return that.$util.Tips({title: '请填写图片验证码'});
|
||||
|
||||
|
|
@ -676,8 +738,35 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// 管理员搜索
|
||||
manageUserSearch(){
|
||||
let _this = this;
|
||||
searchUser({ id_and_phone: _this.manage_search}).then(res => {
|
||||
_this.manage_info = res.data;
|
||||
_this.merchantData.manage_uid = res.data.uid;
|
||||
_this.validateBtn();
|
||||
}).catch(err => {});
|
||||
},
|
||||
// 管理员是否有效
|
||||
manageIsEligibleHandle(){
|
||||
let _this = this;
|
||||
let params = {
|
||||
manage_uid: _this.merchantData.manage_uid,
|
||||
mer_intention_id: _this.mer_i_id,
|
||||
merchant_type: _this.merchant_type
|
||||
};
|
||||
manageIsEligible(params).then(res => {
|
||||
_this.manage_eligible = res.data;
|
||||
}).catch(err => {});
|
||||
},
|
||||
// 切换商户类别
|
||||
changeMerchantType(e){
|
||||
this.merchant_type_index = e.detail.value || e.target.value;
|
||||
let info = this.merchant_type_list[this.merchant_type_index] || {};
|
||||
this.merchant_type = info.value || 0;
|
||||
this.merchant_type_title = info.title || '';
|
||||
this.validateBtn();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -780,8 +869,9 @@
|
|||
line-height: 0;
|
||||
}
|
||||
.merchantsSettled {
|
||||
background-image: linear-gradient(var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
|
||||
height: 140vh;
|
||||
background-image: linear-gradient(#e93423 0%, var(--view-bntColor22) 100%);
|
||||
//height: 140vh;
|
||||
min-height: 100vh!important;
|
||||
}
|
||||
.merchantsSettled .merchantBg {
|
||||
width: 750rpx;
|
||||
|
|
|
|||
Loading…
Reference in New Issue