This commit is contained in:
parent
11689abdab
commit
a06c34fc0c
|
@ -619,7 +619,14 @@
|
|||
"style": {
|
||||
"navigationBarTitleText": "商家入驻"
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"path": "settled/step2",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商家入驻"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "applicationRecord/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "申请记录"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view v-if="!successful" >
|
||||
<view v-if="!successful" :style="viewColor">
|
||||
<form report-submit='true'>
|
||||
<view class='merchantsSettled'>
|
||||
<!-- <view class="merchantBgCount">
|
||||
|
@ -77,6 +77,8 @@
|
|||
<input type="text" style="text-align: right;" placeholder="请输入详细地址" v-model="shopInfo.businessAddressDetail" @input="validateBtn" placeholder-class='placeholder' />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='list'>
|
||||
<view class="item">
|
||||
<view class="uni-list">
|
||||
<view class="uni-list-cell">
|
||||
|
@ -127,9 +129,8 @@
|
|||
<view class="uni-list-cell-db acea-row row-middle">
|
||||
<text class="item-name required">店铺类型</text>
|
||||
<text class="iconfont wenhao" @click="getAgreement">?</text>
|
||||
<picker @change="" :value="shopInfo.shopType" :range="storeTypeArr" range-key="type_name">
|
||||
<picker @change="changeStore" :value="shopInfo.shopType" :range="storeTypeArr" range-key="type_name">
|
||||
<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 class='iconfont icon-jiantou'></view>
|
||||
</picker>
|
||||
</view>
|
||||
|
@ -164,7 +165,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<button class='submitBtn' :class="validate === true ? 'on':''" @click="formSubmit">下一步</button>
|
||||
<button class='submitBtn' :disabled="!validate" :class="validate === true ? 'on':''" @click="nextStep">下一步</button>
|
||||
</view>
|
||||
</view>
|
||||
</form>
|
||||
|
@ -201,9 +202,7 @@
|
|||
getAgreementApi
|
||||
} from "@/api/user";
|
||||
import { mapGetters } from "vuex";
|
||||
import { configMap } from "@/utils";
|
||||
import parser from "@/components/jyf-parser/jyf-parser";
|
||||
import Verify from '@/components/verify/verify.vue';
|
||||
import { toLogin } from '@/libs/login.js';
|
||||
import { HTTP_REQUEST_URL } from '@/config/app';
|
||||
const app = getApp();
|
||||
|
@ -236,51 +235,27 @@
|
|||
cityArray:[],
|
||||
businessArray:['制造业','农业','金融业','计算机业','其他'],
|
||||
enterpriseArray:['国企','民营企业','外企','其他'],
|
||||
mer_storeType: '',
|
||||
cartId: '', //购物车id
|
||||
pinkId: 0, //拼团id
|
||||
couponId: 0, //优惠券id
|
||||
text: "获取验证码",
|
||||
codeUrl: "",
|
||||
disabled: false,
|
||||
isAgree: false,
|
||||
showProtocol: false,
|
||||
isShowCode: false,
|
||||
loading: false,
|
||||
merchantData: {
|
||||
enterprise_name: "",
|
||||
user_name: "",
|
||||
phone: "",
|
||||
classification: ''
|
||||
},
|
||||
storeTypeArr: ['旗舰店','自营店','进口店'],
|
||||
successful: false,
|
||||
keyCode: "",
|
||||
codeVal: "",
|
||||
protocol: this.sys_intention_agree,
|
||||
timer: "",
|
||||
index: 0,
|
||||
index1: 0,
|
||||
mer_classification: "",
|
||||
array: [{
|
||||
category_name: '',
|
||||
merchant_category_id: ''
|
||||
}],
|
||||
storeTypeArr: [{
|
||||
type_name: '',
|
||||
mer_type_id: ''
|
||||
}],
|
||||
isType: false,
|
||||
showProtocol: false,
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
if (this.isLogin) {
|
||||
|
||||
} else {
|
||||
toLogin()
|
||||
}
|
||||
},
|
||||
onShow() {},
|
||||
computed: {
|
||||
...mapGetters(['isLogin','viewColor']),
|
||||
addressText(){
|
||||
return this.shopInfo.registerAddress.map(v=>v.name).join('/');
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
getAgreement() {
|
||||
let that = this
|
||||
|
@ -325,7 +300,7 @@
|
|||
EnterpriseEmail,
|
||||
EnterpriseName,
|
||||
shopType}=this.shopInfo;
|
||||
if(shopName&&shopId&&egisterAddress&®isterAddressDetail&&businessAddress&&businessAddressDetail&&EnterpriseIndustry&&EnterpriseType&&EnterpriseServicePhone&&EnterpriseEmail&&EnterpriseName&&shopType){
|
||||
if(shopName&&shopId&®isterAddress&®isterAddressDetail&&businessAddress&&businessAddressDetail&&EnterpriseIndustry&&EnterpriseType&&EnterpriseServicePhone&&EnterpriseEmail&&EnterpriseName&&shopType){
|
||||
this.validate=true;
|
||||
}
|
||||
},
|
||||
|
@ -336,6 +311,15 @@
|
|||
changeEnterprise(e){
|
||||
this.shopInfo.EnterpriseType=this.enterpriseArray[e.target.value];
|
||||
this.validateBtn();
|
||||
},
|
||||
changeStore(e){
|
||||
this.shopInfo.shopType=this.storeTypeArr[e.target.value];
|
||||
this.validateBtn();
|
||||
},
|
||||
nextStep(){
|
||||
uni.navigateTo({
|
||||
url:'/pages/store/settled/step2'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -384,7 +368,10 @@
|
|||
}
|
||||
.merchantsSettled {
|
||||
// background-image: linear-gradient(var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
|
||||
height: 140vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
grid-gap: 32rpx;
|
||||
padding-bottom: 40rpx;
|
||||
}
|
||||
.merchantsSettled .nav {
|
||||
// background-color: #fff;
|
||||
|
@ -437,8 +424,8 @@
|
|||
border-radius: 12px;
|
||||
padding-bottom: 22px;
|
||||
margin: 0 15px;
|
||||
position: absolute;
|
||||
top: 160rpx;
|
||||
// position: absolute;
|
||||
// top: 160rpx;
|
||||
width: calc(100% - 30px);
|
||||
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<view class='progress acea-row row-between-wrapper'>
|
||||
<view class='iconfont t-color'></view>
|
||||
<view class='line'></view>
|
||||
<view class='iconfont'>2</view>
|
||||
<view class='iconfont t-color'></view>
|
||||
<view class='line'></view>
|
||||
<view class='iconfont'>3</view>
|
||||
</view>
|
||||
|
@ -27,61 +27,54 @@
|
|||
<view class='list'>
|
||||
<view class="item">
|
||||
<view class="acea-row row-middle">
|
||||
<text class="item-name required" >商户名称</text>
|
||||
<input type="text" style="text-align: right;" maxlength="30" placeholder="请输入" v-model="merchantData.enterprise_name" @input="validateBtn" placeholder-class='placeholder' />
|
||||
<text class="item-name required" >法人名称</text>
|
||||
<input type="text" style="text-align: right;" maxlength="30" placeholder="请输入" v-model="shopInfo.shopName" @input="validateBtn" placeholder-class='placeholder' />
|
||||
</view>
|
||||
<view class="acea-row row-middle">
|
||||
<text class="tips-text" >法人名称</text>
|
||||
</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="merchantData.user_name" @input="validateBtn" placeholder-class='placeholder' />
|
||||
<text class="item-name required">法人身份证号</text>
|
||||
<input type="text" style="text-align: right;" placeholder="请输入" v-model="shopInfo.shopId" @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="bindPickerChange" :value="index" :range="array" range-key="category_name">
|
||||
<input style="pointer-events:none;text-align: right;" placeholder="请选择" type="text" readonly disabled v-model="mer_classification">
|
||||
<view class='iconfont icon-jiantou'></view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text class="item-name required">法人身份证有效期开始</text>
|
||||
<view class="acea-row row-middle">
|
||||
<text class="item-name"></text>
|
||||
<input type="text" style="text-align: right;" placeholder="请输入详细地址" v-model="merchantData.user_name" @input="validateBtn" placeholder-class='placeholder' />
|
||||
|
||||
<input style="pointer-events:none;text-align: right;" placeholder="请选择" type="text" readonly v-model="shopInfo.registerAddress">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</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="bindPickerChange" :value="index" :range="array" range-key="category_name">
|
||||
<input style="pointer-events:none;text-align: right;" placeholder="请选择" type="text" readonly disabled v-model="mer_classification">
|
||||
<view class='iconfont icon-jiantou'></view>
|
||||
</picker>
|
||||
<text class="item-name required">法人身份证有效期结束</text>
|
||||
<view class="acea-row row-middle" >
|
||||
|
||||
<input style="pointer-events:none;text-align: right;" placeholder="请选择" type="text" readonly v-model="shopInfo.businessAddress">
|
||||
</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="merchantData.user_name" @input="validateBtn" placeholder-class='placeholder' />
|
||||
</view>
|
||||
</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 required">企业行业</text>
|
||||
<picker @change="bindPickerChange" :value="index" :range="array" range-key="category_name">
|
||||
<input style="pointer-events:none;text-align: right;" placeholder="请选择" type="text" readonly disabled v-model="mer_classification">
|
||||
<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>
|
||||
</picker>
|
||||
</view>
|
||||
|
@ -93,8 +86,8 @@
|
|||
<view class="uni-list-cell">
|
||||
<view class="uni-list-cell-db acea-row row-middle">
|
||||
<text class="item-name required">企业类型</text>
|
||||
<picker @change="bindPickerChange" :value="index" :range="array" range-key="category_name">
|
||||
<input style="pointer-events:none;text-align: right;" placeholder="请选择" type="text" readonly disabled v-model="mer_classification">
|
||||
<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>
|
||||
|
@ -104,19 +97,19 @@
|
|||
<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="merchantData.phone" @input="validateBtn" placeholder-class='placeholder' />
|
||||
<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="merchantData.phone" @input="validateBtn" placeholder-class='placeholder' />
|
||||
<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="merchantData.phone" @input="validateBtn" placeholder-class='placeholder' />
|
||||
<input type="text" style="text-align: right;" placeholder="请输入" v-model="shopInfo.EnterpriseName" @input="validateBtn" placeholder-class='placeholder' />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
|
@ -125,9 +118,8 @@
|
|||
<view class="uni-list-cell-db acea-row row-middle">
|
||||
<text class="item-name required">店铺类型</text>
|
||||
<text class="iconfont wenhao" @click="getAgreement">?</text>
|
||||
<picker @change="bindPickerChange1" :value="index1" :range="storeTypeArr" range-key="type_name">
|
||||
<input style="pointer-events:none;text-align: right;" placeholder="请选择店铺类型" type="text" disabled readonly v-model="mer_storeType">
|
||||
<view v-if="mer_storeType" @tap.stop="mer_storeType=''" class="iconfont icon-guanbi2"></view>
|
||||
<picker @change="changeStore" :value="shopInfo.shopType" :range="storeTypeArr" range-key="type_name">
|
||||
<input style="pointer-events:none;text-align: right;" placeholder="请选择店铺类型" type="text" disabled readonly v-model="shopInfo.shopType">
|
||||
<view class='iconfont icon-jiantou'></view>
|
||||
</picker>
|
||||
</view>
|
||||
|
@ -141,7 +133,7 @@
|
|||
<text class="item-name required">是否退伍军人</text>
|
||||
<radio-group @change="" >
|
||||
<label class="label" v-for="(itm,idx) in isFalse" :key="idx">
|
||||
<radio :value="idx.toString()" checked="">{{itm}}</radio>
|
||||
<radio style="margin:0 10px;" :value="idx.toString()" :checked="shopInfo.isVeteran==idx">{{itm}}</radio>
|
||||
</label>
|
||||
</radio-group>
|
||||
</view>
|
||||
|
@ -155,17 +147,18 @@
|
|||
<text class="item-name required">是否惠美乡村店铺</text>
|
||||
<radio-group @change="" >
|
||||
<label class="label" v-for="(itm,idx) in isFalse" :key="idx">
|
||||
<radio :value="idx.toString()" checked="">{{itm}}</radio>
|
||||
<radio style="margin:0 10px;" :value="idx.toString()" :checked="shopInfo.isFlagshipStore==idx">{{itm}}</radio>
|
||||
</label>
|
||||
</radio-group>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<button class='submitBtn' :class="validate === true ? 'on':''" @click="formSubmit">下一步</button>
|
||||
<button class='submitBtn' :disabled="!validate" :class="validate === true ? 'on':''" @click="nextStep">下一步</button>
|
||||
</view>
|
||||
</view>
|
||||
</form>
|
||||
|
||||
<view class="settlementAgreement" v-if="showProtocol">
|
||||
<view class="setAgCount">
|
||||
<i class="icon iconfont icon-cha" @click="showProtocol = false"></i>
|
||||
|
@ -176,24 +169,15 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='loadingicon acea-row row-center-wrapper' v-if="loading">
|
||||
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>
|
||||
</view>
|
||||
<Verify @success="success" :captchaType="'blockPuzzle'" :imgSize="{ width: '330px', height: '155px' }" ref="verify"></Verify>
|
||||
</view>
|
||||
<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>
|
||||
|
||||
<areaWindow ref="areaWindow" :display="display" :address="[]"
|
||||
@submit="OnChangeAddress" @changeClose="changeClose" :cityShow="1"></areaWindow>
|
||||
<areaWindow ref="areaWindow2" :display="display2" :address="[]"
|
||||
@submit="OnChangeAddress2" @changeClose="changeClose2" :cityShow="1"></areaWindow>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import areaWindow from '@/components/areaWindow';
|
||||
import {
|
||||
create,
|
||||
verify,
|
||||
|
@ -207,94 +191,61 @@
|
|||
getAgreementApi
|
||||
} from "@/api/user";
|
||||
import { mapGetters } from "vuex";
|
||||
import { configMap } from "@/utils";
|
||||
import parser from "@/components/jyf-parser/jyf-parser";
|
||||
import Verify from '@/components/verify/verify.vue';
|
||||
import { toLogin } from '@/libs/login.js';
|
||||
import { HTTP_REQUEST_URL } from '@/config/app';
|
||||
const app = getApp();
|
||||
export default {
|
||||
components: {
|
||||
"jyf-parser": parser,
|
||||
Verify
|
||||
areaWindow,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
domain: HTTP_REQUEST_URL,
|
||||
cartId: '', //购物车id
|
||||
pinkId: 0, //拼团id
|
||||
couponId: 0, //优惠券id
|
||||
text: "获取验证码",
|
||||
codeUrl: "",
|
||||
disabled: false,
|
||||
isAgree: false,
|
||||
showProtocol: false,
|
||||
isShowCode: false,
|
||||
loading: false,
|
||||
isFalse:['是','否'],
|
||||
merchantData: {
|
||||
enterprise_name: "",
|
||||
user_name: "",
|
||||
phone: "",
|
||||
classification: ''
|
||||
},
|
||||
validate: false,
|
||||
successful: false,
|
||||
keyCode: "",
|
||||
codeVal: "",
|
||||
protocol: this.sys_intention_agree,
|
||||
timer: "",
|
||||
index: 0,
|
||||
index1: 0,
|
||||
mer_classification: "",
|
||||
array: [{
|
||||
category_name: '',
|
||||
merchant_category_id: ''
|
||||
}],
|
||||
storeTypeArr: [{
|
||||
type_name: '',
|
||||
mer_type_id: ''
|
||||
}],
|
||||
mer_storeType: '',
|
||||
pics: [],
|
||||
tagStyle: {
|
||||
img: 'width:100%;display:block;'
|
||||
display: false,
|
||||
display2: false,
|
||||
shopInfo:{
|
||||
shopName:'',
|
||||
shopId:'',
|
||||
registerAddress:'',
|
||||
registerAddressDetail:'',
|
||||
businessAddress:'',
|
||||
businessAddressDetail:'',
|
||||
EnterpriseIndustry:'',
|
||||
EnterpriseType:'',
|
||||
EnterpriseServicePhone:'',
|
||||
EnterpriseEmail:'',
|
||||
EnterpriseName:'',
|
||||
shopType:'',
|
||||
isVeteran:0,
|
||||
isFlagshipStore:0,
|
||||
},
|
||||
mer_i_id: null, // 商户申请id
|
||||
cityArray:[],
|
||||
businessArray:['制造业','农业','金融业','计算机业','其他'],
|
||||
enterpriseArray:['国企','民营企业','外企','其他'],
|
||||
storeTypeArr: ['旗舰店','自营店','进口店'],
|
||||
successful: false,
|
||||
isType: false,
|
||||
showProtocol: false,
|
||||
};
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearTimeout(this.timer)
|
||||
},
|
||||
computed: configMap({sys_intention_agree:''},mapGetters(['isLogin','viewColor','keyColor'])),
|
||||
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() {},
|
||||
onReady() {},
|
||||
methods: {
|
||||
getConfig() {
|
||||
this.isType = false;
|
||||
this.showProtocol = true;
|
||||
// 获取配置
|
||||
this.protocol = this.sys_intention_agree
|
||||
computed: {
|
||||
...mapGetters(['isLogin','viewColor']),
|
||||
addressText(){
|
||||
return this.shopInfo.registerAddress.map(v=>v.name).join('/');
|
||||
}
|
||||
},
|
||||
/*获取发票说明*/
|
||||
|
||||
methods: {
|
||||
getAgreement() {
|
||||
let that = this
|
||||
that.showProtocol = true;
|
||||
|
@ -303,321 +254,61 @@
|
|||
that.protocol = res.data.sys_merchant_type
|
||||
})
|
||||
},
|
||||
// 获取历史提交数据详情
|
||||
getGoodsDetails(id) {
|
||||
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();
|
||||
})
|
||||
changeRegion(){
|
||||
this.display = true;
|
||||
},
|
||||
//获取商户分类名称
|
||||
getCategoryName(id, arr) {
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
if (arr[i].merchant_category_id === id) {
|
||||
return arr[i]['category_name']
|
||||
}
|
||||
// 关闭地址弹窗;
|
||||
changeClose() {
|
||||
this.display = false;
|
||||
},
|
||||
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&®isterAddress&®isterAddressDetail&&businessAddress&&businessAddressDetail&&EnterpriseIndustry&&EnterpriseType&&EnterpriseServicePhone&&EnterpriseEmail&&EnterpriseName&&shopType){
|
||||
this.validate=true;
|
||||
}
|
||||
},
|
||||
//获取店铺类型名称
|
||||
getStoreTypeName(id, arr) {
|
||||
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;
|
||||
changeBusiness(e){
|
||||
this.shopInfo.EnterpriseIndustry=this.businessArray[e.target.value];
|
||||
this.validateBtn();
|
||||
},
|
||||
formSubmit: function(e) {
|
||||
let that = this;
|
||||
if (that.validateForm() && that.validate) {
|
||||
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
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
changeEnterprise(e){
|
||||
this.shopInfo.EnterpriseType=this.enterpriseArray[e.target.value];
|
||||
this.validateBtn();
|
||||
},
|
||||
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;
|
||||
}
|
||||
changeStore(e){
|
||||
this.shopInfo.shopType=this.storeTypeArr[e.target.value];
|
||||
this.validateBtn();
|
||||
},
|
||||
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() {
|
||||
nextStep(){
|
||||
uni.navigateTo({
|
||||
url: "/pages/store/applicationRecord/index"
|
||||
url:'/pages/store/settled/step2'
|
||||
})
|
||||
},
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -666,7 +357,10 @@
|
|||
}
|
||||
.merchantsSettled {
|
||||
// background-image: linear-gradient(var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
|
||||
height: 140vh;
|
||||
height: 125vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
grid-gap: 32rpx;
|
||||
}
|
||||
.merchantsSettled .nav {
|
||||
// background-color: #fff;
|
||||
|
@ -719,8 +413,8 @@
|
|||
border-radius: 12px;
|
||||
padding-bottom: 22px;
|
||||
margin: 0 15px;
|
||||
position: absolute;
|
||||
top: 160rpx;
|
||||
// position: absolute;
|
||||
// top: 160rpx;
|
||||
width: calc(100% - 30px);
|
||||
|
||||
}
|
||||
|
@ -787,6 +481,11 @@
|
|||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.acea-row .tips-text{
|
||||
color: #e40000;
|
||||
font-size:20rpx;
|
||||
padding: 12rpx 12rpx 0 12rpx;
|
||||
}
|
||||
.acea-row.row-column {
|
||||
-webkit-box-orient: vertical;
|
||||
-moz-box-orient: vertical;
|
||||
|
|
Loading…
Reference in New Issue