实名,帐号绑定,实名必填校验,实名与帐号绑定只在接单的时候进行校验
Please enter the commit message for your changes. Lines starting
This commit is contained in:
parent
3c3a7cba82
commit
338fcd9de6
|
|
@ -37,7 +37,7 @@ export default {
|
|||
// return false;
|
||||
},
|
||||
success(res) {
|
||||
if (res.data.code !== 0) {
|
||||
if (!res || !res.data || res.data.code !== 0) {
|
||||
uni.showToast({
|
||||
title: '系统开小差啦T_T,请稍后重试',
|
||||
icon: 'error'
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
},
|
||||
goToBindBank() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/my/b-account-bind'
|
||||
url: '/pages/my/withdraw'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,20 +11,28 @@
|
|||
</view>
|
||||
<view v-if="curAccountType === '1'" class="bg-white padding text-lg">
|
||||
<view>
|
||||
<view class="margin-bottom-sm">姓名</view>
|
||||
<view class="margin-bottom-sm">
|
||||
姓名<text class="margin-left-xs text-red">*</text>
|
||||
</view>
|
||||
<input type="text" placeholder="请输入开户人姓名" placeholder-style="color:#989898" v-model="formData.name">
|
||||
</view>
|
||||
<view class="margin-top">
|
||||
<view class="margin-bottom-sm">证件号码</view>
|
||||
<input type="text" placeholder="请输入证件号码" placeholder-style="color:#989898" v-model="formData.certId">
|
||||
<view class="margin-bottom-sm">
|
||||
身份证号码<text class="margin-left-xs text-red">*</text>
|
||||
</view>
|
||||
<input type="number" placeholder="请输入身份证号码" placeholder-style="color:#989898" v-model="formData.certId">
|
||||
</view>
|
||||
<view class="margin-top">
|
||||
<view class="margin-bottom-sm">手机号</view>
|
||||
<input type="text" placeholder="请输入手机号" placeholder-style="color:#989898" v-model="formData.phone">
|
||||
<view class="margin-bottom-sm">
|
||||
手机号<text class="margin-left-xs text-red">*</text>
|
||||
</view>
|
||||
<input type="number" placeholder="请输入手机号" placeholder-style="color:#989898" v-model="formData.phone">
|
||||
</view>
|
||||
<view class="margin-top">
|
||||
<view class="margin-bottom-sm">号码</view>
|
||||
<input type="text" placeholder="请输入号码" placeholder-style="color:#989898" v-model="formData.bankNum">
|
||||
<view class="margin-bottom-sm">
|
||||
银行卡号<text class="margin-left-xs text-red">*</text>
|
||||
</view>
|
||||
<input type="number" placeholder="请输入银行卡号" placeholder-style="color:#989898" v-model="formData.bankNum">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -76,17 +84,35 @@
|
|||
changAccountType(e) {
|
||||
this.curAccountType = e.currentTarget.dataset.type;
|
||||
},
|
||||
validData() {
|
||||
if (!this.formData.name || !this.formData.certId || !this.formData.phone || !this.formData.bankNum) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
async submit() {
|
||||
if (this.curAccountType === '1') {
|
||||
if (!this.validData()) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请完成必填项的填写'
|
||||
})
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
...this.formData,
|
||||
workerId: this.curUserInfo.workerId
|
||||
}
|
||||
let res = await this.$request.bindBankCard(params);
|
||||
if (res.code === 0) {
|
||||
if (res && res.code === 0) {
|
||||
uni.navigateBack({
|
||||
delta: -1
|
||||
})
|
||||
} else if (res && res.msg) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.msg
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
</view>
|
||||
<view class="cu-bar bg-white solid-top">
|
||||
<view class="action">
|
||||
身份证上传(正反面)
|
||||
身份证上传(正反面)<text class="margin-left-xs text-red">*</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
|
|
@ -47,11 +47,11 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">姓名</view>
|
||||
<view class="title">姓名<text class="margin-left-xs text-red">*</text></view>
|
||||
<input name="name" v-model="realNameInfo.name" placeholder="请输入真实姓名"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">身份证号</view>
|
||||
<view class="title">身份证号<text class="margin-left-xs text-red">*</text></view>
|
||||
<input name="idCardNum" type="idcard" v-model="realNameInfo.idCardNum" placeholder="请输入你的身份证号"></input>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<!-- 表单内容 -->
|
||||
<form @submit="submit">
|
||||
<view class="cu-form-group">
|
||||
<view class="title">服务名称</view>
|
||||
<view class="title">服务名称<text class="text-red margin-left-xs">*</text></view>
|
||||
<input name="servName" v-model="formData.servName" placeholder="请编辑上架标题(供客户搜索)"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
</view>
|
||||
<view class="solid-top">
|
||||
<view class="cu-form-group">
|
||||
<view class="title">选择类目</view>
|
||||
<view class="title">选择类目<text class="text-red margin-left-xs">*</text></view>
|
||||
<picker :mode="'multiSelector'" @change="categoryChange" @columnchange="categoryColChange"
|
||||
:value="categoryMultiIndex" :range-key="'goodsCategoryName'" :range="categoryList">
|
||||
<input disabled class="line-input radius-input"
|
||||
|
|
@ -51,18 +51,19 @@
|
|||
<input class="radius-input" @input="inputSpecs($event, index, 'deduct')"
|
||||
:value="item.deduct" placeholder="追加提成额"></input>
|
||||
</view>
|
||||
<view class="flex-sub flex margin-left-xs">
|
||||
<!-- <view class="flex-sub">
|
||||
<view class="flex-sub margin-left-xs">
|
||||
<input class="radius-input" @input="inputSpecs($event, index, 'groupPrice')"
|
||||
:value="item.groupPrice" placeholder="团购价"></input>
|
||||
</view> -->
|
||||
<!-- <view class="flex-sub margin-left-xs"> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex margin-top-xs">
|
||||
<view class="flex-sub">
|
||||
<input class="radius-input" @input="inputSpecs($event, index, 'goodsUnit')"
|
||||
:value="item.goodsUnit" placeholder="单位"></input>
|
||||
<!-- <my-uni-combox :candidates="productUnits" placeholder="请选择" v-model="formData.productUnit">
|
||||
</my-uni-combox> -->
|
||||
:value="item.goodsUnit" placeholder="规格单位"></input>
|
||||
</view>
|
||||
<view class="flex-sub margin-left-xs">
|
||||
<input class="radius-input" @input="inputSpecs($event, index, 'goodsNum')"
|
||||
:value="item.goodsNum" placeholder="库存"></input>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -71,7 +72,7 @@
|
|||
@click="showAllSpecs()"><text :class="'cuIcon-' + (isShowAllSpecs ? 'fold' : 'unfold')"></text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="bg-white"> -->
|
||||
<!-- <view class="solid-top"> -->
|
||||
<!-- <view class="padding-lr flex align-center">
|
||||
<view class="flex-twice flex justify-start align-center">
|
||||
<view style="width: 20%;">单位</view>
|
||||
|
|
@ -82,23 +83,32 @@
|
|||
优惠券+
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- <view class="padding-lr flex align-center padding-tb-xs">
|
||||
<view class="flex-sub">
|
||||
<checkbox style="transform:scale(1)" class="main-color margin-right-xs" :value="true"
|
||||
:v-model="formData.isGoldenServ" :checked="formData.isGoldenServ"></checkbox>
|
||||
<text>金牌服务</text>
|
||||
</view>
|
||||
<view class="flex-twice flex justify-start align-center">
|
||||
<!-- <view class="padding-lr flex align-center padding-tb-xs"> -->
|
||||
<!-- <view class="cu-form-group"> -->
|
||||
<!-- <checkbox style="transform:scale(1)" class="main-color margin-right-xs" :value="true"
|
||||
:v-model="formData.isGoldenServ" :checked="formData.isGoldenServ"></checkbox> -->
|
||||
<!-- <view class="title">金牌服务<text class="margin-left-xs text-red">*</text></view> -->
|
||||
<!-- <my-uni-combox :candidates="servHonorTitle" placeholder="请选择" v-model="formData.servHonorTitle"> -->
|
||||
<!-- </my-uni-combox> -->
|
||||
<!-- </view> -->
|
||||
<!-- <view class="flex-twice flex justify-start align-center">
|
||||
<view style="width: 25%;">质保期</view>
|
||||
<my-uni-combox :candidates="productProtectTimes" placeholder="请选择"
|
||||
v-model="formData.productProtectTime"></my-uni-combox>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- </view> -->
|
||||
<!-- </view> -->
|
||||
</view>
|
||||
<view class="cu-form-group solid-top justify-start">
|
||||
<!-- <checkbox style="transform:scale(1)" class="main-color margin-right-xs" :value="true"
|
||||
:v-model="formData.isGoldenServ" :checked="formData.isGoldenServ"></checkbox> -->
|
||||
<view class="title">附加服务</view>
|
||||
<my-uni-combox class="form-val-area" :candidates="servHonorTitle" placeholder="请选择" v-model="formData.servHonorTitle">
|
||||
</my-uni-combox>
|
||||
</view>
|
||||
<view class="solid-top">
|
||||
<view class="cu-form-group">
|
||||
<view class="title">上架区域</view>
|
||||
<view class="title">上架区域<text class="margin-left-xs text-red">*</text></view>
|
||||
<picker :mode="'multiSelector'" @change="regionChange" @columnchange="regionColChange"
|
||||
:value="regionMultiIndex" :range-key="'areaName'" :range="regionList">
|
||||
<input disabled class="line-input radius-input"
|
||||
|
|
@ -116,10 +126,12 @@
|
|||
</checkbox-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">区域描述</view>
|
||||
<input name="areaDesc" :value="formData.areaDesc" :v-model="formData.areaDesc"
|
||||
placeholder="请输入区域描述"></input>
|
||||
<view class="cu-bar bg-white">
|
||||
<view class="action text-black">区域描述</view>
|
||||
</view>
|
||||
<view class="padding-lr-sm padding-bottom-sm bg-white">
|
||||
<textarea name="areaDesc" style="width: 100%; height: 150rpx;" class="solid radius text-left padding-sm" v-model="formData.areaDesc"
|
||||
maxlength="-1" placeholder="如:XX区XX街道未覆盖或XX区仅服务XX街道"></textarea>
|
||||
</view>
|
||||
<!-- <view class="cu-form-group">
|
||||
<view class="title">上门费</view>
|
||||
|
|
@ -128,7 +140,7 @@
|
|||
</view> -->
|
||||
<view class="cu-bar bg-white solid-top">
|
||||
<view class="action text-black">
|
||||
商品封面图上传
|
||||
商品封面图上传<text class="margin-left-xs text-red">*</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
|
|
@ -149,7 +161,7 @@
|
|||
</view>
|
||||
<view class="cu-bar bg-white solid-top">
|
||||
<view class="action text-black">
|
||||
详情图上传
|
||||
详情图上传<text class="margin-left-xs text-red">*</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
|
|
@ -170,7 +182,7 @@
|
|||
</view>
|
||||
<view class="cu-bar bg-white solid-top">
|
||||
<view class="action text-black">
|
||||
轮播图上传
|
||||
轮播图上传<text class="margin-left-xs text-red">*</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
|
|
@ -222,7 +234,7 @@
|
|||
</view>
|
||||
</form>
|
||||
<!-- 账户及实名弹窗 -->
|
||||
<vertify-bank-bind ref="vertifyBankBind"></vertify-bank-bind>
|
||||
<!-- <vertify-bank-bind ref="vertifyBankBind"></vertify-bank-bind> -->
|
||||
<vertify-certify ref="vertifyCertify"></vertify-certify>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -274,6 +286,13 @@
|
|||
code: 5,
|
||||
name: '平方'
|
||||
}],
|
||||
servHonorTitle: [{
|
||||
code: -1,
|
||||
name: '无'
|
||||
}, {
|
||||
code: 1,
|
||||
name: '金牌服务'
|
||||
}],
|
||||
productProtectTimes: [{
|
||||
code: 1,
|
||||
name: '15天'
|
||||
|
|
@ -308,17 +327,17 @@
|
|||
},
|
||||
async checkBankAndCertify() {
|
||||
// 查询账户绑定信息
|
||||
let bankCardRes = await this.$request.getBindBankCardByWorkerId({
|
||||
workerId: this.curUserInfo.workerId
|
||||
});
|
||||
this.bankCard = bankCardRes.data;
|
||||
// let bankCardRes = await this.$request.getBindBankCardByWorkerId({
|
||||
// workerId: this.curUserInfo.workerId
|
||||
// });
|
||||
// this.bankCard = bankCardRes.data;
|
||||
// 查询实名信息
|
||||
let certifyInfoRes = await this.$request.getWorkerCertify();
|
||||
this.certifyInfo = certifyInfoRes.data;
|
||||
if (!this.bankCard || !this.bankCard.bankNum) {
|
||||
this.$refs.vertifyBankBind.showModal();
|
||||
return false;
|
||||
} else if (!this.certifyInfo || !this.certifyInfo.workerCertificationId) {
|
||||
// if (!this.bankCard || !this.bankCard.bankNum) {
|
||||
// this.$refs.vertifyBankBind.showModal();
|
||||
// return false;
|
||||
if (!this.certifyInfo || !this.certifyInfo.workerCertificationId) {
|
||||
this.$refs.vertifyCertify.showModal();
|
||||
return false;
|
||||
}
|
||||
|
|
@ -513,17 +532,65 @@
|
|||
// this.formData.video = await this.$request.uploadFile(e.tempFilePaths[0]);
|
||||
// uni.hideLoading();
|
||||
// },
|
||||
async submit() {
|
||||
let checkRes = await this.checkBankAndCertify();
|
||||
if (!checkRes) {
|
||||
return;
|
||||
validData(data) {
|
||||
let errMsg = "";
|
||||
if (!data.servName) {
|
||||
errMsg = '服务名称不能为空';
|
||||
} else if (!data.goodsStandardList || !data.goodsStandardList.length) {
|
||||
errMsg = '至少选择一个规格';
|
||||
} else if (!this.validSpecData(data.goodsStandardList)) {
|
||||
return false;
|
||||
} else if (!data.goodsAreaList || !data.goodsAreaList.length) {
|
||||
errMsg = '至少选择一个上架区域';
|
||||
} else if (!data.coverImgList || !data.coverImgList.length) {
|
||||
errMsg = '封面图不能为空'
|
||||
} else if (!data.descImgList || !data.descImgList.length) {
|
||||
errMsg = '详情图不能为空'
|
||||
} else if (!data.imgList || !data.imgList.length) {
|
||||
errMsg = '轮播图不能为空'
|
||||
}
|
||||
|
||||
if (errMsg) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: errMsg
|
||||
})
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
validSpecData(goodsStandardList) {
|
||||
let errMsg = "";
|
||||
for (let i = 0; i < goodsStandardList.length; i++) {
|
||||
let spec = goodsStandardList[i];
|
||||
if (!spec.goodsStandardName) {
|
||||
errMsg = '勾选规格的自编辑购买标题不能为空';
|
||||
} else if (!spec.goodsPrice) {
|
||||
errMsg = '勾选规格的价格不能为空';
|
||||
} else if (!spec.groupPrice) {
|
||||
errMsg = '勾选规格的团购价不能为空';
|
||||
} else if (!spec.goodsUnit) {
|
||||
errMsg = '勾选规格的规格单位不能为空';
|
||||
} else if (!spec.goodsNum) {
|
||||
errMsg = '勾选规格的库存不能为空';
|
||||
}
|
||||
if (errMsg) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: errMsg
|
||||
})
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (errMsg) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
async submit() {
|
||||
let goodsStandardList = this.formData.specsList.filter((item) => {
|
||||
if (item.checked) {
|
||||
return {
|
||||
...item,
|
||||
goodsNum: 99999
|
||||
...item
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -533,6 +600,20 @@
|
|||
return item;
|
||||
}
|
||||
});
|
||||
let data2Valid = {
|
||||
...this.formData,
|
||||
goodsStandardList: goodsStandardList,
|
||||
goodsAreaList: goodsAreaList
|
||||
}
|
||||
if (!this.validData(data2Valid)) {
|
||||
return;
|
||||
}
|
||||
|
||||
let checkRes = await this.checkBankAndCertify();
|
||||
if (!checkRes) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 0是轮播图,1是详情图
|
||||
let goodsImgsList = [];
|
||||
this.formData.imgList.forEach((url) => {
|
||||
|
|
@ -588,4 +669,8 @@
|
|||
.long-btn {
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
.form-val-area {
|
||||
flex-basis: 75% !important;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue