增加平台平台店铺入驻申请页面,未选择入驻类型时选择品牌商将先进入该页面,提交信息后跳转至原供应链页面

This commit is contained in:
donqi 2022-08-23 20:22:21 +08:00
parent a5910fbf5a
commit 99b0390f89
9 changed files with 424 additions and 46 deletions

View File

@ -13,8 +13,8 @@ export default {
})
let userInfo = _this.getCurUserInfo();
// request 触发前拼接 url
// args.url = 'https://www.opsoul.com' + args.url;
args.url = 'http://127.0.0.1:80' + args.url;
args.url = 'https://www.opsoul.com' + args.url;
// args.url = 'http://127.0.0.1:80' + args.url;
// args.url = 'http://192.168.2.42:80' + args.url;
if (!args.data) {

View File

@ -44,10 +44,17 @@
});
if (res && res.code === 0) {
this.hideModal();
let curUserInfo = this.$request.getCurUserInfo();
if (typeCode === 1) {
if (curUserInfo && curUserInfo.storeStatus == 1) {
uni.navigateTo({
url: '/pages/index/index?menuCode=supplyChainPage'
})
} else {
uni.navigateTo({
url: '/pages/my/apply-shop'
})
}
} else if (typeCode === 0) {
uni.navigateTo({
url: '/pages/my/master-settled-info'

View File

@ -58,6 +58,8 @@
"path": "master-settled-info"
}, {
"path": "certification"
}, {
"path": "apply-shop"
}]
}],
"globalStyle": {

View File

@ -268,7 +268,8 @@
categoryMultiIndex: [0, 0, 0],
chosenCategory: [],
bankCard: null,
certifyInfo: null
certifyInfo: null,
hasNotice: false
}
},
onShow() {
@ -295,14 +296,17 @@
//
let certifyInfoRes = await this.$request.getWorkerCertify();
this.certifyInfo = certifyInfoRes.data;
if ((!this.bankCard || !this.bankCard.bankNum) && this.curUserInfo.status != -1) {
let res = true;
if (!this.bankCard || !this.bankCard.bankNum) {
this.$refs.vertifyBankBind.showModal();
return false;
} else if (!this.certifyInfo || !this.certifyInfo.workerCertificationId) {
this.$refs.vertifyCertify.showModal();
return false;
res = false;
}
return true;
if (!this.certifyInfo || this.certifyInfo.status !== 1) {
this.$refs.vertifyCertify.showModal();
res = false;
}
return res;
},
async loadMasterOrderPage(params = {}) {
params.pageSize = this.$globalData.initPageSize;
@ -511,25 +515,24 @@
})
},
async takeTask(e, task) {
if (!this.hasNotice) {
let checkRes = await this.checkBankAndCertify();
this.hasNotice = true;
if (!checkRes) {
return;
}
}
if (this.curUserInfo.status !== 0 || this.curUserInfo.type !== 0) {
//
e.currentTarget.dataset.modal = e.currentTarget.dataset.certifyModal;
} else {
//
let res = await this.$request.updateOrder({
workerId: this.curUserInfo.workerId,
id: task.orderMasterId
id: task.orderMasterId,
orderStatus: 1
});
if (res && res.code === 0) {
e.currentTarget.dataset.modal = e.currentTarget.dataset.takeModal;
this.reloadMasterOrderPage();
}
}
this.showModal(e, task);
},
contactCustomer(e) {

View File

@ -81,6 +81,9 @@
</view>
</view>
</view>
<!-- 账户及实名弹窗 -->
<vertify-bank-bind ref="vertifyBankBind"></vertify-bank-bind>
<vertify-certify ref="vertifyCertify"></vertify-certify>
</view>
</template>
@ -100,7 +103,10 @@
showTakeSuccessModal: false,
specColumnHeaders: ['商品规格', '购买量'],
specValFields: ['standardName', 'standardNum'],
curUserInfo: {}
curUserInfo: {},
bankCard: null,
certifyInfo: null,
hasNotice: false
}
},
onLoad(options) {
@ -119,20 +125,45 @@
this.order = servDetailRes.data;
this.takeCertify = await this.$api.data('takeCertify');
},
async checkBankAndCertify() {
//
let bankCardRes = await this.$request.getBindBankCardByWorkerId({
workerId: this.curUserInfo.workerId
});
this.bankCard = bankCardRes.data;
//
let certifyInfoRes = await this.$request.getWorkerCertify();
this.certifyInfo = certifyInfoRes.data;
let res = true;
if (!this.bankCard || !this.bankCard.bankNum) {
this.$refs.vertifyBankBind.showModal();
res = false;
}
if (!this.certifyInfo || this.certifyInfo.status !== 1) {
this.$refs.vertifyCertify.showModal();
res = false;
}
return res;
},
async takeTask(e) {
if (this.curUserInfo.status !== 0 || this.curUserInfo.type !== 0) {
//
e.currentTarget.dataset.modal = e.currentTarget.dataset.certifyModal;
} else {
if (!this.hasNotice) {
let checkRes = await this.checkBankAndCertify();
this.hasNotice = true;
if (!checkRes) {
return;
}
}
//
let res = await this.$request.updateOrder({
workerId: this.curUserInfo.workerId,
id: this.order.orderMasterId
id: this.order.orderMasterId,
orderStatus: 1
});
if (res && res.code === 0) {
e.currentTarget.dataset.modal = e.currentTarget.dataset.takeModal;
}
}
this.showModal(e);
},
showModal(e) {

View File

@ -5,7 +5,7 @@
<!-- 个人信息栏 -->
<view class="flex justify-between padding-bottom align-center solid-bottom">
<view class="flex justify-start align-center">
<view class="cu-avatar round"
<view class="cu-avatar round" @click="test"
:style="'width: 120rpx; height: 120rpx; background-image:url(' + curUserInfo.bannerUrl + ');'">
</view>
<view class="margin-lr-sm">
@ -167,6 +167,9 @@
this.loadData();
},
methods: {
test() {
},
async authLogin() {
// userInfo
// let res = await this.$request.storageExistUser();

327
pages/my/apply-shop.vue Normal file
View File

@ -0,0 +1,327 @@
<template>
<view class="margin-bottom-lg bg-white">
<!-- 顶部操作条 -->
<cu-custom :bgColor="'bg-main-color'" :isBack="true">
<block slot="backText">返回</block>
<block slot="content">平台店铺入驻申请</block>
</cu-custom>
<view class="padding description">
欢迎注册平台店铺平台店铺是以城市团长城市业务员城市代理商为配套的联合经营体业务经营开展
包含绑客拓客流量引入物业洽谈驻点业务推荐分销等等系列经营为师傅店铺引流订单师傅
作为服务商入驻为平台店铺服务方按平台业务分成的方式开展与经营方平台方进行公平合作入驻服务商
师傅经营商必须以诚挚合作为前提遵守平台规则不得损害合作的各方利益实现与业务团体持续经营协同互惠
</view>
<view class="padding bg-white">
<radio-group @change="changeOperatorType">
<view class="flex justify-between align-center">
<view class="flex justify-start">
<view class="cu-avatar round middle-avatar bg-main-color">
<text class="cuIcon-peoplefill"></text>
</view>
<view class="margin-lr flex-column-around">
<view>我是<text class="text-main-color">专业师傅</text></view>
<view>申请服务店铺</view>
</view>
</view>
<radio class="main-color" value="personalShop" />
</view>
<view class="flex justify-between align-center margin-top-sm">
<view class="flex justify-start">
<view class="cu-avatar round middle-avatar bg-main-color">
<text class="cuIcon-shopfill"></text>
</view>
<view class="margin-lr flex-column-around">
<view>我是<text class="text-main-color">配件耗材商</text></view>
<view>申请商品店铺</view>
</view>
</view>
<radio class="main-color" value="shop" />
</view>
<view class="flex justify-between align-center margin-top-sm">
<view class="flex justify-start">
<view class="cu-avatar round middle-avatar bg-main-color">
<text class="cuIcon-group_fill"></text>
</view>
<view class="margin-lr flex-column-around">
<view>我是<text class="text-main-color">服务商</text>有师傅团队</view>
<view>申请服务店铺公司执照</view>
</view>
</view>
<radio class="main-color" value="company" />
</view>
<view class="flex justify-between align-center margin-top-sm">
<view class="flex justify-start">
<view class="cu-avatar round middle-avatar bg-main-color">
<text class="cuIcon-deliver_fill"></text>
</view>
<view class="margin-lr flex-column-around">
<view>我有<text class="text-main-color">业务及师傅团队</text>能城市运营及服务
申请独立运营年费2-5万不等</view>
</view>
</view>
<radio class="main-color" value="city" />
</view>
</radio-group>
</view>
<view class="padding-sm bg-white">
<view class="solid radius padding-bottom">
<view class="text-xl text-black text-center">
<text class="float-info padding-lr bg-white">申请资料</text>
</view>
<form @submit="submit">
<view class="cu-form-group">
<view class="title">店铺名称</view>
<input name="shopName" placeholder="请输入店铺名称"></input>
</view>
<view class="cu-form-group">
<view class="title">申请人</view>
<input name="name" placeholder="请输入申请人姓名" v-model="formData.name"></input>
</view>
<view class="cu-form-group">
<view class="title">联系电话</view>
<input name="phone" type="number" placeholder="请输入手机号" v-model="formData.phone"></input>
</view>
<view class="cu-form-group">
<view class="title">入驻城市</view>
<!-- <picker :mode="'multiSelector'" @change="regionChange" @columnchange="regionColChange" :value="multiIndex" :range-key="'areaName'" :range="areaList">
<view class="picker">
{{formData.area && formData.area.length ? formData.area[0].areaName + '-' + formData.area[1].areaName : '请选择'}}
</view>
</picker> -->
<input name="city" placeholder="请输入入驻城市" v-model="formData.city"></input>
</view>
<view class="margin">
<button class="bg-main-color long-btn" form-type="submit">提交</button>
</view>
</form>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
curUserInfo: {},
areaList: [],
multiIndex: [0, 0],
countDownNum: 0,
formData: {
operatorType: '',
agreeContract: false,
area: null
},
}
},
onLoad() {
this.loadData();
},
methods: {
loadData() {
this.curUserInfo = this.$request.getCurUserInfo();
this.loadAreaList();
},
changeOperatorType(e) {
this.formData.operatorType = e.detail.value;
},
changeAgreeContract() {
this.formData.agreeContract = !this.formData.agreeContract;
},
showContract() {
uni.navigateTo({
url: '/pages/my/contract'
})
},
async loadAreaList() {
let areaList = await this.$request.areaListByStep();
areaList = areaList.data;
let col1Code = areaList[0].areaCode;
let subAreaList = await this.$request.areaListByStep({
parentCode: col1Code
});
subAreaList = subAreaList.data;
// let col2Code = subAreaList[0].areaCode;
// let subSubAreaList = await this.$request.areaListByStep({ parentCode: col2Code });
// subSubAreaList = subSubAreaList.data;
this.areaList.push(areaList);
this.areaList.push(subAreaList);
// this.areaList.push(subSubAreaList);
},
regionChange(e) {
this.multiIndex = e.detail.value;
let chosenArea = [];
for (let i = 0; i < this.areaList.length; i++) {
chosenArea.push(this.areaList[i][this.multiIndex[i]]);
}
this.formData.area = chosenArea;
},
async regionColChange(e) {
let colObj = e.detail;
if (colObj.column == 0) {
let subSubAreaList = [];
//
let subAreaList = await this.$request.areaListByStep({
parentCode: this.areaList[0][colObj.value].areaCode
});
subAreaList = subAreaList.data;
this.areaList.pop();
this.areaList.push(subAreaList);
this.multiIndex = [colObj.value, 0];
}
},
startCountDownNum() {
this.countDownNum = 180;
let t = setInterval(() => {
this.countDownNum -= 1;
if (this.countDownNum === 0) {
clearInterval(t);
}
}, 1000);
},
async sendVertifyCode() {
if (this.$validate.validContactNum(this.formData.phone)) {
let res = await this.$request.sendVertifyCode({
to: this.formData.phone
});
if (res && res.code === 0) {
uni.showToast({
icon: 'none',
title: '验证码已发送'
})
this.startCountDownNum();
} else if (res && res.msg) {
uni.showToast({
icon: 'none',
title: res.msg
})
} else {
uni.showToast({
icon: 'none',
title: '验证码发送失败'
})
}
} else {
uni.showToast({
icon: 'none',
title: '请正确输入手机号码'
})
}
},
validateForm(confirmFormData) {
let formInfoValid = Boolean(confirmFormData.name) &&
Boolean(confirmFormData.phone) &&
Boolean(confirmFormData.area) &&
Boolean(confirmFormData.code);
if (!formInfoValid) {
uni.showToast({
title: '请填写完整信息',
icon: 'none',
mask: true
})
} else if (!confirmFormData.agreeContract) {
uni.showToast({
title: '请阅读并同意合同书',
icon: 'none',
mask: true
})
formInfoValid = false;
}
return formInfoValid;
},
async submit(e) {
let res = await this.$request.updateWorker({
storeStatus: 1
});
if (res && res.code === 0) {
uni.navigateTo({
url: '/pages/index/index?menuCode=supplyChainPage'
})
} else {
uni.showToast({
icon: 'error'
})
}
// let formData = {
// ...e.detail.value,
// ...this.formData,
// city: this.formData.area && this.formData.area.length ? this.formData.area[this.formData.area.length - 1].areaId : null,
// customerId: this.curUserInfo.customerId
// }
// let formValid = this.validateForm(formData);
// if (formValid) {
// let res = await this.$request.addCustomerPlace(formData);
// if (res && res.code === 0) {
// await this.$request.refreshCurUserCache();
// uni.navigateBack({
// delta: -1
// })
// uni.showToast({
// title: '',
// icon: 'success',
// duration: 2000
// })
// } else if (res && res.msg) {
// uni.showToast({
// title: res.msg,
// icon: 'none',
// duration: 2000
// })
// } else {
// uni.showToast({
// title: '',
// icon: 'error',
// duration: 2000
// })
// }
// }
}
}
}
</script>
<style scoped>
.description {
line-height: 200%;
color: #676666;
}
.middle-avatar {
min-width: 100rpx;
min-height: 100rpx;
}
.middle-avatar [class*="cuIcon-"] {
font-size: 53rpx !important;
}
radio-group {
display: unset;
}
.first-avatar {
background-image: linear-gradient(45deg, #Ff9700, #Ed1c24);
color: #ffffff;
}
.second-avatar {
background-image: linear-gradient(45deg, #0081ff, #1cbbb4);
color: #ffffff;
}
.third-avatar {
background-image: linear-gradient(45deg, #Ec008c, #6739b6);
color: #ffffff;
}
.float-info {
display: inline-block;
position: relative;
top: -18rpx;
z-index: 1;
}
.radius {
border-radius: 37rpx;
}
</style>

View File

@ -725,7 +725,7 @@
//
let certifyInfoRes = await this.$request.getWorkerCertify();
this.certifyInfo = certifyInfoRes.data;
if ((!this.bankCard || !this.bankCard.bankNum) && this.curUserInfo.status != -1) {
if (!this.bankCard || !this.bankCard.bankNum) {
this.$refs.vertifyBankBind.showModal();
return false;
} else if (!this.certifyInfo || !this.certifyInfo.workerCertificationId) {

View File

@ -60,3 +60,8 @@ radio.main-color.checked .uni-radio-input {
.border-main-color {
border-color: #0081ff !important;
}
.cu-avatar.bg-main-color {
background-color: #0081ff;
color: #ffffff;
}