This commit is contained in:
parent
9a994f9526
commit
11689abdab
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<view v-if="!successful" :style="viewColor">
|
<view v-if="!successful" >
|
||||||
<form report-submit='true'>
|
<form report-submit='true'>
|
||||||
<view class='merchantsSettled'>
|
<view class='merchantsSettled'>
|
||||||
<!-- <view class="merchantBgCount">
|
<!-- <view class="merchantBgCount">
|
||||||
|
@ -15,60 +15,75 @@
|
||||||
<view class='iconfont'>3</view>
|
<view class='iconfont'>3</view>
|
||||||
</view>
|
</view>
|
||||||
<view class='navCon acea-row row-between-wrapper'>
|
<view class='navCon acea-row row-between-wrapper'>
|
||||||
<view style="margin-left: 10px;" class="on">基本信息</view>
|
<view style="margin-left: 20px;" class="on">基本信息</view>
|
||||||
<view style="margin-left: 20px;">企业资料文件</view>
|
<view style="margin-left: 20px;">企业资料文件</view>
|
||||||
<view style="margin-left: 10px;">开票及结算信</view>
|
<view style="margin-left: 10px;">开票及结算信息</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="application-record" @click="jumpToList">
|
<!-- <view class="application-record" @click="jumpToList">
|
||||||
申请记录
|
申请记录
|
||||||
<text class="iconfont icon-xiangyou"></text>
|
<text class="iconfont icon-xiangyou"></text>
|
||||||
</view>
|
</view> -->
|
||||||
<view class='list'>
|
<view class='list'>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="acea-row row-middle">
|
<view class="acea-row row-middle">
|
||||||
<text class="item-name required" >商户名称</text>
|
<text class="item-name required" >商户名称</text>
|
||||||
<input type="text" maxlength="30" placeholder="请输入商户名称" v-model="merchantData.enterprise_name" @input="validateBtn"
|
<input type="text" style="text-align: right;" maxlength="30" placeholder="请输入" v-model="shopInfo.shopName" @input="validateBtn" placeholder-class='placeholder' />
|
||||||
placeholder-class='placeholder' />
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="acea-row row-middle">
|
<view class="acea-row row-middle">
|
||||||
<text class="item-name required">商家对接编号</text>
|
<text class="item-name required">商家对接编号</text>
|
||||||
<input type="text" placeholder="请输入商家对接编号" v-model="merchantData.user_name" @input="validateBtn" placeholder-class='placeholder' />
|
<input type="text" style="text-align: right;" placeholder="请输入" v-model="shopInfo.shopId" @input="validateBtn" placeholder-class='placeholder' />
|
||||||
</view>
|
|
||||||
</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>
|
|
||||||
<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>
|
</view>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="uni-list">
|
<view class="uni-list">
|
||||||
<view class="uni-list-cell">
|
<view class="uni-list-cell">
|
||||||
<view class="uni-list-cell-db acea-row row-middle">
|
<view class="uni-list-cell-db acea-row row-middle">
|
||||||
<text class="item-name">商户分类</text>
|
<text class="item-name required">营业执照注册地址</text>
|
||||||
<picker @change="bindPickerChange" :value="index" :range="array" range-key="category_name">
|
<view class="acea-row row-middle" @click="changeRegion">
|
||||||
<input style="pointer-events:none" placeholder="请选择商户分类" type="text" readonly disabled v-model="mer_classification">
|
|
||||||
|
<input style="pointer-events:none;text-align: right;" placeholder="请选择" type="text" readonly disabled v-model="shopInfo.registerAddress">
|
||||||
|
<view class='iconfont icon-jiantou'></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<view class="acea-row row-middle">
|
||||||
|
<text class="item-name"></text>
|
||||||
|
<input type="text" style="text-align: right;" placeholder="请输入详细地址" v-model="shopInfo.registerAddressDetail" @input="validateBtn" placeholder-class='placeholder' />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<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 required">实际经营地址</text>
|
||||||
|
<view class="acea-row row-middle" @click="changeRegion2">
|
||||||
|
|
||||||
|
<input style="pointer-events:none;text-align: right;" placeholder="请选择" type="text" readonly disabled v-model="shopInfo.businessAddress">
|
||||||
|
<view class='iconfont icon-jiantou'></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<view class="acea-row row-middle">
|
||||||
|
<text class="item-name"></text>
|
||||||
|
<input type="text" style="text-align: right;" placeholder="请输入详细地址" v-model="shopInfo.businessAddressDetail" @input="validateBtn" placeholder-class='placeholder' />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<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 required">企业行业</text>
|
||||||
|
<picker @change="changeBusiness" :value="shopInfo.EnterpriseIndustry" :range="businessArray" range-key="category_name">
|
||||||
|
<input style="pointer-events:none;text-align: right;" placeholder="请选择" type="text" readonly disabled v-model="shopInfo.EnterpriseIndustry">
|
||||||
<view class='iconfont icon-jiantou'></view>
|
<view class='iconfont icon-jiantou'></view>
|
||||||
</picker>
|
</picker>
|
||||||
</view>
|
</view>
|
||||||
|
@ -79,10 +94,41 @@
|
||||||
<view class="uni-list">
|
<view class="uni-list">
|
||||||
<view class="uni-list-cell">
|
<view class="uni-list-cell">
|
||||||
<view class="uni-list-cell-db acea-row row-middle">
|
<view class="uni-list-cell-db acea-row row-middle">
|
||||||
<text class="item-name">店铺类型</text>
|
<text class="item-name required">企业类型</text>
|
||||||
|
<picker @change="changeEnterprise" :value="shopInfo.EnterpriseType" :range="enterpriseArray" range-key="category_name">
|
||||||
|
<input style="pointer-events:none;text-align: right;" placeholder="请选择" type="text" readonly disabled v-model="shopInfo.EnterpriseType">
|
||||||
|
<view class='iconfont icon-jiantou'></view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<view class="acea-row row-middle">
|
||||||
|
<text class="item-name required">企业客服电话</text>
|
||||||
|
<input type="text" style="text-align: right;" placeholder="请输入" v-model="shopInfo.EnterpriseServicePhone" @input="validateBtn" placeholder-class='placeholder' />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<view class="acea-row row-middle">
|
||||||
|
<text class="item-name required">企业邮箱</text>
|
||||||
|
<input type="text" style="text-align: right;" placeholder="请输入" v-model="shopInfo.EnterpriseEmail" @input="validateBtn" placeholder-class='placeholder' />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<view class="acea-row row-middle">
|
||||||
|
<text class="item-name required">企业对接人姓名</text>
|
||||||
|
<input type="text" style="text-align: right;" placeholder="请输入" v-model="shopInfo.EnterpriseName" @input="validateBtn" placeholder-class='placeholder' />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<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 required">店铺类型</text>
|
||||||
<text class="iconfont wenhao" @click="getAgreement">?</text>
|
<text class="iconfont wenhao" @click="getAgreement">?</text>
|
||||||
<picker @change="bindPickerChange1" :value="index1" :range="storeTypeArr" range-key="type_name">
|
<picker @change="" :value="shopInfo.shopType" :range="storeTypeArr" range-key="type_name">
|
||||||
<input style="pointer-events:none" placeholder="请选择店铺类型" type="text" disabled readonly v-model="mer_storeType">
|
<input style="pointer-events:none;text-align: right;" placeholder="请选择店铺类型" type="text" disabled readonly v-model="shopInfo.shopType">
|
||||||
<view v-if="mer_storeType" @tap.stop="mer_storeType=''" class="iconfont icon-guanbi2"></view>
|
<view v-if="mer_storeType" @tap.stop="mer_storeType=''" class="iconfont icon-guanbi2"></view>
|
||||||
<view class='iconfont icon-jiantou'></view>
|
<view class='iconfont icon-jiantou'></view>
|
||||||
</picker>
|
</picker>
|
||||||
|
@ -90,31 +136,39 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item no-border">
|
<view class="item">
|
||||||
<view class='acea-row row-middle'>
|
<view class="uni-list">
|
||||||
<text class="item-title">请上传营业执照及行业相关资质证明图片</text>
|
<view class="uni-list-cell">
|
||||||
<text class="item-desc">(图片最多可上传10张,图片格式支持JPG、PNG、JPEG)</text>
|
<view class="uni-list-cell-db acea-row row-middle">
|
||||||
<view class="upload">
|
<text class="item-name required">是否退伍军人</text>
|
||||||
<view class='pictrue' v-for="(item,index) in pics" :key="index" :data-index="index" @click="getPhotoClickIdx">
|
<radio-group @change="" >
|
||||||
<image :src='item'></image>
|
<label class="label" v-for="(itm,idx) in isFalse" :key="idx">
|
||||||
<text class='iconfont icon-guanbi1' @click.stop='DelPic(index)'></text>
|
<radio style="margin:0 10px;" :value="idx.toString()" :checked="shopInfo.isVeteran==idx">{{itm}}</radio>
|
||||||
</view>
|
</label>
|
||||||
<view class='pictrue acea-row row-center-wrapper row-column' @click='uploadpic' v-if="pics.length < 10">
|
</radio-group>
|
||||||
<text class='iconfont icon-icon25201'></text>
|
|
||||||
<view>上传图片</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item no-border">
|
<view class="item">
|
||||||
<checkbox-group @change='ChangeIsAgree'>
|
<view class="uni-list">
|
||||||
<checkbox class="checkbox" :checked="isAgree ? true : false" />已阅读并同意</checkbox-group>
|
<view class="uni-list-cell">
|
||||||
<button class="settleAgree" @click="getConfig">《入驻协议》</button>
|
<view class="uni-list-cell-db acea-row row-middle">
|
||||||
|
<text class="item-name required">是否惠美乡村店铺</text>
|
||||||
|
<radio-group @change="" >
|
||||||
|
<label class="label" v-for="(itm,idx) in isFalse" :key="idx">
|
||||||
|
<radio style="margin:0 10px;" :value="idx.toString()" :checked="shopInfo.isFlagshipStore==idx">{{itm}}</radio>
|
||||||
|
</label>
|
||||||
|
</radio-group>
|
||||||
</view>
|
</view>
|
||||||
<button class='submitBtn' :class="validate === true ? 'on':''" @click="formSubmit">提交申请</button>
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<button class='submitBtn' :class="validate === true ? 'on':''" @click="formSubmit">下一步</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<view class="settlementAgreement" v-if="showProtocol">
|
<view class="settlementAgreement" v-if="showProtocol">
|
||||||
<view class="setAgCount">
|
<view class="setAgCount">
|
||||||
<i class="icon iconfont icon-cha" @click="showProtocol = false"></i>
|
<i class="icon iconfont icon-cha" @click="showProtocol = false"></i>
|
||||||
|
@ -125,24 +179,15 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class='loadingicon acea-row row-center-wrapper' v-if="loading">
|
|
||||||
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>
|
<areaWindow ref="areaWindow" :display="display" :address="[]"
|
||||||
</view>
|
@submit="OnChangeAddress" @changeClose="changeClose" :cityShow="1"></areaWindow>
|
||||||
<Verify @success="success" :captchaType="'blockPuzzle'" :imgSize="{ width: '330px', height: '155px' }" ref="verify"></Verify>
|
<areaWindow ref="areaWindow2" :display="display2" :address="[]"
|
||||||
</view>
|
@submit="OnChangeAddress2" @changeClose="changeClose2" :cityShow="1"></areaWindow>
|
||||||
<view class="settledSuccessMain" v-else :style="viewColor">
|
|
||||||
<view class="settledSuccessful">
|
|
||||||
<image class="image" src="../static/images/settledSuccessful.svg" alt="">
|
|
||||||
<view class="title">恭喜,您的资料提交成功!</view>
|
|
||||||
<view class="info">预计15个工作日内审核完毕,平台客服会及时与您联系!</view>
|
|
||||||
<view class="goHome" hover-class="none" @click="goHome">
|
|
||||||
返回首页
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import areaWindow from '@/components/areaWindow';
|
||||||
import {
|
import {
|
||||||
create,
|
create,
|
||||||
verify,
|
verify,
|
||||||
|
@ -164,12 +209,34 @@
|
||||||
const app = getApp();
|
const app = getApp();
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
"jyf-parser": parser,
|
areaWindow,
|
||||||
Verify
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
domain: HTTP_REQUEST_URL,
|
isFalse:['是','否'],
|
||||||
|
validate: false,
|
||||||
|
display: false,
|
||||||
|
display2: false,
|
||||||
|
shopInfo:{
|
||||||
|
shopName:'',
|
||||||
|
shopId:'',
|
||||||
|
registerAddress:'',
|
||||||
|
registerAddressDetail:'',
|
||||||
|
businessAddress:'',
|
||||||
|
businessAddressDetail:'',
|
||||||
|
EnterpriseIndustry:'',
|
||||||
|
EnterpriseType:'',
|
||||||
|
EnterpriseServicePhone:'',
|
||||||
|
EnterpriseEmail:'',
|
||||||
|
EnterpriseName:'',
|
||||||
|
shopType:'',
|
||||||
|
isVeteran:0,
|
||||||
|
isFlagshipStore:0,
|
||||||
|
},
|
||||||
|
cityArray:[],
|
||||||
|
businessArray:['制造业','农业','金融业','计算机业','其他'],
|
||||||
|
enterpriseArray:['国企','民营企业','外企','其他'],
|
||||||
|
mer_storeType: '',
|
||||||
cartId: '', //购物车id
|
cartId: '', //购物车id
|
||||||
pinkId: 0, //拼团id
|
pinkId: 0, //拼团id
|
||||||
couponId: 0, //优惠券id
|
couponId: 0, //优惠券id
|
||||||
|
@ -186,7 +253,6 @@
|
||||||
phone: "",
|
phone: "",
|
||||||
classification: ''
|
classification: ''
|
||||||
},
|
},
|
||||||
validate: false,
|
|
||||||
successful: false,
|
successful: false,
|
||||||
keyCode: "",
|
keyCode: "",
|
||||||
codeVal: "",
|
codeVal: "",
|
||||||
|
@ -203,46 +269,19 @@
|
||||||
type_name: '',
|
type_name: '',
|
||||||
mer_type_id: ''
|
mer_type_id: ''
|
||||||
}],
|
}],
|
||||||
mer_storeType: '',
|
|
||||||
pics: [],
|
|
||||||
tagStyle: {
|
|
||||||
img: 'width:100%;display:block;'
|
|
||||||
},
|
|
||||||
mer_i_id: null, // 商户申请id
|
|
||||||
isType: false,
|
isType: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
|
||||||
clearTimeout(this.timer)
|
|
||||||
},
|
|
||||||
computed: configMap({sys_intention_agree:''},mapGetters(['isLogin','viewColor','keyColor'])),
|
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
if (this.isLogin) {
|
|
||||||
this.getClassfication();
|
|
||||||
this.getStoreType();
|
|
||||||
} else {
|
|
||||||
toLogin()
|
|
||||||
}
|
|
||||||
if (options.mer_i_id) {
|
|
||||||
this.mer_i_id = options.mer_i_id
|
|
||||||
uni.showLoading({
|
|
||||||
title: '获取数据中',
|
|
||||||
});
|
|
||||||
this.$nextTick(function() {
|
|
||||||
this.getGoodsDetails(options.mer_i_id)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
onShow() {},
|
onShow() {},
|
||||||
onReady() {},
|
computed: {
|
||||||
methods: {
|
addressText(){
|
||||||
getConfig() {
|
return this.shopInfo.registerAddress.map(v=>v.name).join('/');
|
||||||
this.isType = false;
|
}
|
||||||
this.showProtocol = true;
|
|
||||||
// 获取配置
|
|
||||||
this.protocol = this.sys_intention_agree
|
|
||||||
},
|
},
|
||||||
/*获取发票说明*/
|
methods: {
|
||||||
getAgreement() {
|
getAgreement() {
|
||||||
let that = this
|
let that = this
|
||||||
that.showProtocol = true;
|
that.showProtocol = true;
|
||||||
|
@ -251,321 +290,52 @@
|
||||||
that.protocol = res.data.sys_merchant_type
|
that.protocol = res.data.sys_merchant_type
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取历史提交数据详情
|
changeRegion(){
|
||||||
getGoodsDetails(id) {
|
this.display = true;
|
||||||
getGoodsDetails(id).then(res => {
|
|
||||||
let arr = Object.keys(this.merchantData)
|
|
||||||
let resData = res.data
|
|
||||||
arr.map(item => {
|
|
||||||
this.merchantData.enterprise_name = resData.mer_name
|
|
||||||
this.merchantData.user_name = resData.name
|
|
||||||
this.merchantData.phone = resData.phone
|
|
||||||
this.merchantData.classification = resData.merchant_category_id
|
|
||||||
this.merchantData.mer_type = resData.mer_type_id
|
|
||||||
})
|
|
||||||
this.pics = resData.images
|
|
||||||
this.mer_classification = this.getCategoryName(resData.merchant_category_id, this.array)
|
|
||||||
this.mer_storeType = this.getStoreTypeName(resData.mer_type_id, this.storeTypeArr)
|
|
||||||
uni.hideLoading();
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
//获取商户分类名称
|
// 关闭地址弹窗;
|
||||||
getCategoryName(id, arr) {
|
changeClose() {
|
||||||
for (let i = 0; i < arr.length; i++) {
|
this.display = false;
|
||||||
if (arr[i].merchant_category_id === id) {
|
},
|
||||||
return arr[i]['category_name']
|
changeRegion2(){
|
||||||
}
|
this.display2 = true;
|
||||||
|
},
|
||||||
|
// 关闭地址弹窗;
|
||||||
|
changeClose2() {
|
||||||
|
this.display2 = false;
|
||||||
|
},
|
||||||
|
OnChangeAddress(address){
|
||||||
|
|
||||||
|
this.shopInfo.registerAddress = address.map(v=>v.name).join('/');
|
||||||
|
},
|
||||||
|
OnChangeAddress2(address){
|
||||||
|
|
||||||
|
this.shopInfo.businessAddress = address.map(v=>v.name).join('/');
|
||||||
|
},
|
||||||
|
validateBtn(){
|
||||||
|
let {shopName,
|
||||||
|
shopId,
|
||||||
|
registerAddress,
|
||||||
|
registerAddressDetail,
|
||||||
|
businessAddress,
|
||||||
|
businessAddressDetail,
|
||||||
|
EnterpriseIndustry,
|
||||||
|
EnterpriseType,
|
||||||
|
EnterpriseServicePhone,
|
||||||
|
EnterpriseEmail,
|
||||||
|
EnterpriseName,
|
||||||
|
shopType}=this.shopInfo;
|
||||||
|
if(shopName&&shopId&&egisterAddress&®isterAddressDetail&&businessAddress&&businessAddressDetail&&EnterpriseIndustry&&EnterpriseType&&EnterpriseServicePhone&&EnterpriseEmail&&EnterpriseName&&shopType){
|
||||||
|
this.validate=true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//获取店铺类型名称
|
changeBusiness(e){
|
||||||
getStoreTypeName(id, arr) {
|
this.shopInfo.EnterpriseIndustry=this.businessArray[e.target.value];
|
||||||
for (let i = 0; i < arr.length; i++) {
|
|
||||||
if (arr[i].mer_type_id === id) {
|
|
||||||
return arr[i]['type_name']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
bindPickerChange: function(e) {
|
|
||||||
this.index = e.target.value
|
|
||||||
let idx = e.target.value
|
|
||||||
this.merchantData.classification = this.array[idx]['merchant_category_id']
|
|
||||||
this.mer_classification = this.array[idx]['category_name']
|
|
||||||
this.validateBtn()
|
|
||||||
},
|
|
||||||
bindPickerChange1: function(e) {
|
|
||||||
this.index1 = e.target.value
|
|
||||||
let idx = e.target.value
|
|
||||||
this.merchantData.mer_type = this.storeTypeArr[idx]['mer_type_id']
|
|
||||||
this.mer_storeType = this.storeTypeArr[idx]['type_name']
|
|
||||||
this.validateBtn()
|
|
||||||
},
|
|
||||||
// 获取商户分类
|
|
||||||
getClassfication: function() {
|
|
||||||
merClassifly()
|
|
||||||
.then(res => {
|
|
||||||
this.array = res.data
|
|
||||||
})
|
|
||||||
.catch(res => {
|
|
||||||
this.$util.Tips({
|
|
||||||
title: res
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 获取店铺类型
|
|
||||||
getStoreType: function() {
|
|
||||||
getStoreTypeApi()
|
|
||||||
.then(res => {
|
|
||||||
this.storeTypeArr = res.data
|
|
||||||
})
|
|
||||||
.catch(res => {
|
|
||||||
this.$util.Tips({
|
|
||||||
title: res
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 图片预览
|
|
||||||
// 获得相册 idx
|
|
||||||
getPhotoClickIdx(e) {
|
|
||||||
let _this = this;
|
|
||||||
let idx = e.currentTarget.dataset.index;
|
|
||||||
_this.imgPreview(_this.pics, idx);
|
|
||||||
},
|
|
||||||
// 图片预览
|
|
||||||
imgPreview: function(list, idx) {
|
|
||||||
// list:图片 url 数组
|
|
||||||
if (list && list.length > 0) {
|
|
||||||
uni.previewImage({
|
|
||||||
current: list[idx], // 传 Number H5端出现不兼容
|
|
||||||
urls: list
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
toggleTab(str) {
|
|
||||||
this.$refs[str].show();
|
|
||||||
},
|
|
||||||
// 首页
|
|
||||||
goHome() {
|
|
||||||
uni.switchTab({
|
|
||||||
url: '/pages/index/index'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
again() {
|
|
||||||
this.getcaptcha()
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 上传文件
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
uploadpic: function() {
|
|
||||||
let that = this;
|
|
||||||
that.$util.uploadImageOne('upload/image', function(res) {
|
|
||||||
that.pics.push(res.data.path);
|
|
||||||
that.$set(that, 'pics', that.pics);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 删除图片
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
DelPic: function(index) {
|
|
||||||
let that = this,
|
|
||||||
pic = this.pics[index];
|
|
||||||
that.pics.splice(index, 1);
|
|
||||||
that.$set(that, 'pics', that.pics);
|
|
||||||
},
|
|
||||||
getCode() {
|
|
||||||
let that = this
|
|
||||||
getCodeApi()
|
|
||||||
.then(res => {
|
|
||||||
that.keyCode = res.data.key;
|
|
||||||
})
|
|
||||||
.catch(res => {
|
|
||||||
that.$util.Tips({
|
|
||||||
title: res
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
async code(data) {
|
|
||||||
let that = this;
|
|
||||||
if (!that.merchantData.phone) return that.$util.Tips({
|
|
||||||
title: '请填写手机号码'
|
|
||||||
});
|
|
||||||
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.merchantData.phone)) return that.$util.Tips({
|
|
||||||
title: '请输入正确的手机号码'
|
|
||||||
});
|
|
||||||
await verify({
|
|
||||||
phone: that.merchantData.phone,
|
|
||||||
// key: that.codeKey,
|
|
||||||
// code: that.codeVal,
|
|
||||||
type: 'intention',
|
|
||||||
captchaType: 'blockPuzzle',
|
|
||||||
captchaVerification: data.captchaVerification
|
|
||||||
})
|
|
||||||
.then(res => {
|
|
||||||
that.$util.Tips({
|
|
||||||
title: res.msg
|
|
||||||
});
|
|
||||||
that.sendCode();
|
|
||||||
})
|
|
||||||
.catch(res => {
|
|
||||||
that.$util.Tips({
|
|
||||||
title: res
|
|
||||||
});
|
|
||||||
if (res.status == 402) {
|
|
||||||
// that.getcaptcha();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getcaptcha() {
|
|
||||||
let that = this
|
|
||||||
getCaptcha().then(data => {
|
|
||||||
that.codeUrl = data.data.captcha; //图片路径
|
|
||||||
that.codeVal = data.data.code; //图片验证码
|
|
||||||
that.codeKey = data.data.key //图片验证码key
|
|
||||||
})
|
|
||||||
that.isShowCode = true;
|
|
||||||
},
|
|
||||||
sendCode() {
|
|
||||||
if (this.disabled) return;
|
|
||||||
this.disabled = true;
|
|
||||||
let n = 60;
|
|
||||||
this.text = "剩余 " + n + "s";
|
|
||||||
const run = setInterval(() => {
|
|
||||||
n = n - 1;
|
|
||||||
if (n < 0) {
|
|
||||||
clearInterval(run);
|
|
||||||
}
|
|
||||||
this.text = "剩余 " + n + "s";
|
|
||||||
if (this.text < "剩余 " + 0 + "s") {
|
|
||||||
this.disabled = false;
|
|
||||||
this.text = "重新获取";
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
},
|
|
||||||
onConfirm(val) {
|
|
||||||
this.region = val.checkArr[0] + '-' + val.checkArr[1] + '-' + val.checkArr[2];
|
|
||||||
},
|
|
||||||
ChangeIsAgree: function(e) {
|
|
||||||
this.isAgree = !this.isAgree;
|
|
||||||
this.validateBtn();
|
this.validateBtn();
|
||||||
},
|
},
|
||||||
formSubmit: function(e) {
|
changeEnterprise(e){
|
||||||
let that = this;
|
this.shopInfo.EnterpriseType=this.enterpriseArray[e.target.value];
|
||||||
if (that.validateForm() && that.validate) {
|
this.validateBtn();
|
||||||
let requestData = {
|
|
||||||
phone: that.merchantData.phone,
|
|
||||||
mer_name: that.merchantData.enterprise_name,
|
|
||||||
name: that.merchantData.user_name,
|
|
||||||
code: that.merchantData.yanzhengma,
|
|
||||||
merchant_category_id: that.merchantData.classification,
|
|
||||||
mer_type_id: that.merchantData.mer_type,
|
|
||||||
images: that.pics
|
|
||||||
}
|
|
||||||
that.validate = false;
|
|
||||||
if (that.mer_i_id) {
|
|
||||||
updateGoodsRecord(that.mer_i_id, requestData).then(res => {
|
|
||||||
if (res.status == 200) {
|
|
||||||
title: '提交成功',
|
|
||||||
that.loading = true;
|
|
||||||
that.timer = setTimeout(() => {
|
|
||||||
that.successful = true;
|
|
||||||
that.validate = true;
|
|
||||||
}, 1000)
|
|
||||||
}
|
|
||||||
}).catch(res => {
|
|
||||||
that.validate = true;
|
|
||||||
that.$util.Tips({
|
|
||||||
title: res
|
|
||||||
});
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
create(requestData).then(data => {
|
|
||||||
if (data.status == 200) {
|
|
||||||
title: '提交成功',
|
|
||||||
that.loading = true;
|
|
||||||
this.timer = setTimeout(() => {
|
|
||||||
that.successful = true;
|
|
||||||
that.validate = true;
|
|
||||||
}, 1000)
|
|
||||||
}
|
|
||||||
|
|
||||||
}).catch(res => {
|
|
||||||
that.validate = true;
|
|
||||||
that.$util.Tips({
|
|
||||||
title: res
|
|
||||||
});
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
validateBtn: function() {
|
|
||||||
let that = this,
|
|
||||||
value = that.merchantData;
|
|
||||||
if (value.enterprise_name && value.user_name && value.phone && /^1(3|4|5|7|8|9|6)\d{9}$/i.test(value.phone) &&
|
|
||||||
value.yanzhengma && that.isAgree && value.classification) {
|
|
||||||
if (!that.isShowCode) {
|
|
||||||
that.validate = true;
|
|
||||||
} else {
|
|
||||||
if (that.codeVal) {
|
|
||||||
that.validate = true;
|
|
||||||
} else {
|
|
||||||
that.validate = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
that.validate = false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
validateForm: function() {
|
|
||||||
let that = this,
|
|
||||||
value = that.merchantData;
|
|
||||||
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) return that.$util.Tips({
|
|
||||||
title: '请选择商户分类'
|
|
||||||
});
|
|
||||||
if (!that.isAgree) return that.$util.Tips({
|
|
||||||
title: '请勾选并同意入驻协议'
|
|
||||||
});
|
|
||||||
if (that.isShowCode && !that.codeVal) return that.$util.Tips({
|
|
||||||
title: '请填写图片验证码'
|
|
||||||
});
|
|
||||||
that.validate = true;
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
jumpToList() {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pages/store/applicationRecord/index"
|
|
||||||
})
|
|
||||||
},
|
|
||||||
success(data) {
|
|
||||||
this.$refs.verify.hide();
|
|
||||||
this.code(data);
|
|
||||||
},
|
|
||||||
handleVerify() {
|
|
||||||
if (!this.merchantData.phone) return this.$util.Tips({
|
|
||||||
title: '请输入手机号'
|
|
||||||
});
|
|
||||||
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(this.merchantData.phone)) return this.$util.Tips({
|
|
||||||
title: '请输入正确的手机号码'
|
|
||||||
});
|
|
||||||
if (!this.isAgree) return this.$util.Tips({
|
|
||||||
title: '请勾选并同意入驻协议'
|
|
||||||
});
|
|
||||||
this.$refs.verify.show();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -594,7 +364,7 @@
|
||||||
color: #B2B2B2;
|
color: #B2B2B2;
|
||||||
}
|
}
|
||||||
.item-name{
|
.item-name{
|
||||||
width: 190rpx;
|
width: 240rpx;
|
||||||
}
|
}
|
||||||
.uni-list-cell {
|
.uni-list-cell {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -602,7 +372,7 @@
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #7a7a7a;
|
color: #7a7a7a;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 15px;
|
right: -16px;
|
||||||
top: 7rpx;
|
top: 7rpx;
|
||||||
}
|
}
|
||||||
.icon-guanbi2{
|
.icon-guanbi2{
|
||||||
|
@ -623,7 +393,7 @@
|
||||||
padding: 25rpx 0;
|
padding: 25rpx 0;
|
||||||
}
|
}
|
||||||
.merchantsSettled .nav .navCon {
|
.merchantsSettled .nav .navCon {
|
||||||
padding: 0 62rpx;
|
padding: 0 50rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
view{
|
view{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -668,7 +438,7 @@
|
||||||
padding-bottom: 22px;
|
padding-bottom: 22px;
|
||||||
margin: 0 15px;
|
margin: 0 15px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 240rpx;
|
top: 160rpx;
|
||||||
width: calc(100% - 30px);
|
width: calc(100% - 30px);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -731,6 +501,9 @@
|
||||||
-webkit-align-items: center;
|
-webkit-align-items: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding-left: 2px;
|
padding-left: 2px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
.acea-row.row-column {
|
.acea-row.row-column {
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
|
@ -820,7 +593,7 @@
|
||||||
color: #b4b1b4;
|
color: #b4b1b4;
|
||||||
}
|
}
|
||||||
.merchantsSettled .list .item input {
|
.merchantsSettled .list .item input {
|
||||||
width: 400rpx;
|
// width: 400rpx;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
}
|
}
|
||||||
.merchantsSettled .list .item .placeholder {
|
.merchantsSettled .list .item .placeholder {
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue