This commit is contained in:
yangtao 2024-03-29 18:33:10 +08:00
parent 11689abdab
commit a06c34fc0c
3 changed files with 166 additions and 473 deletions

View File

@ -619,7 +619,14 @@
"style": { "style": {
"navigationBarTitleText": "商家入驻" "navigationBarTitleText": "商家入驻"
} }
}, { },
{
"path": "settled/step2",
"style": {
"navigationBarTitleText": "商家入驻"
}
},
{
"path": "applicationRecord/index", "path": "applicationRecord/index",
"style": { "style": {
"navigationBarTitleText": "申请记录" "navigationBarTitleText": "申请记录"

View File

@ -1,5 +1,5 @@
<template> <template>
<view v-if="!successful" > <view v-if="!successful" :style="viewColor">
<form report-submit='true'> <form report-submit='true'>
<view class='merchantsSettled'> <view class='merchantsSettled'>
<!-- <view class="merchantBgCount"> <!-- <view class="merchantBgCount">
@ -77,6 +77,8 @@
<input type="text" style="text-align: right;" placeholder="请输入详细地址" v-model="shopInfo.businessAddressDetail" @input="validateBtn" placeholder-class='placeholder' /> <input type="text" style="text-align: right;" placeholder="请输入详细地址" v-model="shopInfo.businessAddressDetail" @input="validateBtn" placeholder-class='placeholder' />
</view> </view>
</view> </view>
</view>
<view class='list'>
<view class="item"> <view class="item">
<view class="uni-list"> <view class="uni-list">
<view class="uni-list-cell"> <view class="uni-list-cell">
@ -127,9 +129,8 @@
<view class="uni-list-cell-db acea-row row-middle"> <view class="uni-list-cell-db acea-row row-middle">
<text class="item-name required">店铺类型</text> <text class="item-name required">店铺类型</text>
<text class="iconfont wenhao" @click="getAgreement">?</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"> <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> <view class='iconfont icon-jiantou'></view>
</picker> </picker>
</view> </view>
@ -164,7 +165,7 @@
</view> </view>
</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>
</view> </view>
</form> </form>
@ -201,9 +202,7 @@
getAgreementApi getAgreementApi
} from "@/api/user"; } from "@/api/user";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import { configMap } from "@/utils";
import parser from "@/components/jyf-parser/jyf-parser"; import parser from "@/components/jyf-parser/jyf-parser";
import Verify from '@/components/verify/verify.vue';
import { toLogin } from '@/libs/login.js'; import { toLogin } from '@/libs/login.js';
import { HTTP_REQUEST_URL } from '@/config/app'; import { HTTP_REQUEST_URL } from '@/config/app';
const app = getApp(); const app = getApp();
@ -236,51 +235,27 @@
cityArray:[], cityArray:[],
businessArray:['制造业','农业','金融业','计算机业','其他'], businessArray:['制造业','农业','金融业','计算机业','其他'],
enterpriseArray:['国企','民营企业','外企','其他'], enterpriseArray:['国企','民营企业','外企','其他'],
mer_storeType: '', storeTypeArr: ['旗舰店','自营店','进口店'],
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: ''
},
successful: 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: ''
}],
isType: false, isType: false,
showProtocol: false,
}; };
}, },
onLoad(options) { onLoad(options) {
if (this.isLogin) {
} else {
toLogin()
}
}, },
onShow() {}, onShow() {},
computed: { computed: {
...mapGetters(['isLogin','viewColor']),
addressText(){ addressText(){
return this.shopInfo.registerAddress.map(v=>v.name).join('/'); return this.shopInfo.registerAddress.map(v=>v.name).join('/');
} }
}, },
methods: { methods: {
getAgreement() { getAgreement() {
let that = this let that = this
@ -325,7 +300,7 @@
EnterpriseEmail, EnterpriseEmail,
EnterpriseName, EnterpriseName,
shopType}=this.shopInfo; shopType}=this.shopInfo;
if(shopName&&shopId&&egisterAddress&&registerAddressDetail&&businessAddress&&businessAddressDetail&&EnterpriseIndustry&&EnterpriseType&&EnterpriseServicePhone&&EnterpriseEmail&&EnterpriseName&&shopType){ if(shopName&&shopId&&registerAddress&&registerAddressDetail&&businessAddress&&businessAddressDetail&&EnterpriseIndustry&&EnterpriseType&&EnterpriseServicePhone&&EnterpriseEmail&&EnterpriseName&&shopType){
this.validate=true; this.validate=true;
} }
}, },
@ -336,6 +311,15 @@
changeEnterprise(e){ changeEnterprise(e){
this.shopInfo.EnterpriseType=this.enterpriseArray[e.target.value]; this.shopInfo.EnterpriseType=this.enterpriseArray[e.target.value];
this.validateBtn(); 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 { .merchantsSettled {
// background-image: linear-gradient(var(--view-bntColor21) 0%, var(--view-bntColor22) 100%); // 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 { .merchantsSettled .nav {
// background-color: #fff; // background-color: #fff;
@ -437,8 +424,8 @@
border-radius: 12px; border-radius: 12px;
padding-bottom: 22px; padding-bottom: 22px;
margin: 0 15px; margin: 0 15px;
position: absolute; // position: absolute;
top: 160rpx; // top: 160rpx;
width: calc(100% - 30px); width: calc(100% - 30px);
} }

View File

@ -10,7 +10,7 @@
<view class='progress acea-row row-between-wrapper'> <view class='progress acea-row row-between-wrapper'>
<view class='iconfont t-color'></view> <view class='iconfont t-color'></view>
<view class='line'></view> <view class='line'></view>
<view class='iconfont'>2</view> <view class='iconfont t-color'></view>
<view class='line'></view> <view class='line'></view>
<view class='iconfont'>3</view> <view class='iconfont'>3</view>
</view> </view>
@ -27,61 +27,54 @@
<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" style="text-align: right;" maxlength="30" placeholder="请输入" v-model="merchantData.enterprise_name" @input="validateBtn" placeholder-class='placeholder' /> <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> </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" style="text-align: right;" 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> </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 required">营业执照注册地址</text> <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">
<view class="acea-row row-middle"> <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> </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 required">实际经营地址</text> <text class="item-name required">法人身份证有效期结束</text>
<picker @change="bindPickerChange" :value="index" :range="array" range-key="category_name"> <view class="acea-row row-middle" >
<input style="pointer-events:none;text-align: right;" placeholder="请选择" type="text" readonly disabled v-model="mer_classification">
<view class='iconfont icon-jiantou'></view> <input style="pointer-events:none;text-align: right;" placeholder="请选择" type="text" readonly v-model="shopInfo.businessAddress">
</picker>
</view> </view>
</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="merchantData.user_name" @input="validateBtn" placeholder-class='placeholder' />
</view> </view>
</view> </view>
<view class='list'>
<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 required">企业行业</text> <text class="item-name required">企业行业</text>
<picker @change="bindPickerChange" :value="index" :range="array" range-key="category_name"> <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="mer_classification"> <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>
@ -93,8 +86,8 @@
<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 required">企业类型</text> <text class="item-name required">企业类型</text>
<picker @change="bindPickerChange" :value="index" :range="array" range-key="category_name"> <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="mer_classification"> <input style="pointer-events:none;text-align: right;" placeholder="请选择" type="text" readonly disabled v-model="shopInfo.EnterpriseType">
<view class='iconfont icon-jiantou'></view> <view class='iconfont icon-jiantou'></view>
</picker> </picker>
</view> </view>
@ -104,19 +97,19 @@
<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" 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> </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" 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> </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" 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> </view>
<view class="item"> <view class="item">
@ -125,9 +118,8 @@
<view class="uni-list-cell-db acea-row row-middle"> <view class="uni-list-cell-db acea-row row-middle">
<text class="item-name required">店铺类型</text> <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="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="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 class='iconfont icon-jiantou'></view> <view class='iconfont icon-jiantou'></view>
</picker> </picker>
</view> </view>
@ -141,7 +133,7 @@
<text class="item-name required">是否退伍军人</text> <text class="item-name required">是否退伍军人</text>
<radio-group @change="" > <radio-group @change="" >
<label class="label" v-for="(itm,idx) in isFalse" :key="idx"> <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> </label>
</radio-group> </radio-group>
</view> </view>
@ -155,17 +147,18 @@
<text class="item-name required">是否惠美乡村店铺</text> <text class="item-name required">是否惠美乡村店铺</text>
<radio-group @change="" > <radio-group @change="" >
<label class="label" v-for="(itm,idx) in isFalse" :key="idx"> <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> </label>
</radio-group> </radio-group>
</view> </view>
</view> </view>
</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>
</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>
@ -176,24 +169,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,
@ -207,94 +191,61 @@
getAgreementApi getAgreementApi
} from "@/api/user"; } from "@/api/user";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import { configMap } from "@/utils";
import parser from "@/components/jyf-parser/jyf-parser"; import parser from "@/components/jyf-parser/jyf-parser";
import Verify from '@/components/verify/verify.vue';
import { toLogin } from '@/libs/login.js'; import { toLogin } from '@/libs/login.js';
import { HTTP_REQUEST_URL } from '@/config/app'; import { HTTP_REQUEST_URL } from '@/config/app';
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,
cartId: '', //id
pinkId: 0, //id
couponId: 0, //id
text: "获取验证码",
codeUrl: "",
disabled: false,
isAgree: false,
showProtocol: false,
isShowCode: false,
loading: false,
isFalse:['是','否'], isFalse:['是','否'],
merchantData: {
enterprise_name: "",
user_name: "",
phone: "",
classification: ''
},
validate: false, validate: false,
successful: false, display: false,
keyCode: "", display2: false,
codeVal: "", shopInfo:{
protocol: this.sys_intention_agree, shopName:'',
timer: "", shopId:'',
index: 0, registerAddress:'',
index1: 0, registerAddressDetail:'',
mer_classification: "", businessAddress:'',
array: [{ businessAddressDetail:'',
category_name: '', EnterpriseIndustry:'',
merchant_category_id: '' EnterpriseType:'',
}], EnterpriseServicePhone:'',
storeTypeArr: [{ EnterpriseEmail:'',
type_name: '', EnterpriseName:'',
mer_type_id: '' shopType:'',
}], isVeteran:0,
mer_storeType: '', isFlagshipStore:0,
pics: [],
tagStyle: {
img: 'width:100%;display:block;'
}, },
mer_i_id: null, // id cityArray:[],
businessArray:['制造业','农业','金融业','计算机业','其他'],
enterpriseArray:['国企','民营企业','外企','其他'],
storeTypeArr: ['旗舰店','自营店','进口店'],
successful: false,
isType: false, isType: false,
showProtocol: false,
}; };
}, },
beforeDestroy() {
clearTimeout(this.timer)
},
computed: configMap({sys_intention_agree:''},mapGetters(['isLogin','viewColor','keyColor'])),
onLoad(options) { onLoad(options) {
if (this.isLogin) { if (this.isLogin) {
this.getClassfication();
this.getStoreType();
} else { } else {
toLogin() 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: { ...mapGetters(['isLogin','viewColor']),
getConfig() { addressText(){
this.isType = false; return this.shopInfo.registerAddress.map(v=>v.name).join('/');
this.showProtocol = true; }
//
this.protocol = this.sys_intention_agree
}, },
/*获取发票说明*/
methods: {
getAgreement() { getAgreement() {
let that = this let that = this
that.showProtocol = true; that.showProtocol = true;
@ -303,321 +254,61 @@
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&&registerAddress&&registerAddressDetail&&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() { changeStore(e){
let that = this, this.shopInfo.shopType=this.storeTypeArr[e.target.value];
value = that.merchantData; this.validateBtn();
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() { nextStep(){
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({ 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 { .merchantsSettled {
// background-image: linear-gradient(var(--view-bntColor21) 0%, var(--view-bntColor22) 100%); // 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 { .merchantsSettled .nav {
// background-color: #fff; // background-color: #fff;
@ -719,8 +413,8 @@
border-radius: 12px; border-radius: 12px;
padding-bottom: 22px; padding-bottom: 22px;
margin: 0 15px; margin: 0 15px;
position: absolute; // position: absolute;
top: 160rpx; // top: 160rpx;
width: calc(100% - 30px); width: calc(100% - 30px);
} }
@ -787,6 +481,11 @@
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
} }
.acea-row .tips-text{
color: #e40000;
font-size:20rpx;
padding: 12rpx 12rpx 0 12rpx;
}
.acea-row.row-column { .acea-row.row-column {
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-moz-box-orient: vertical; -moz-box-orient: vertical;