业务员签约
This commit is contained in:
@@ -26,23 +26,23 @@
|
||||
<block v-if="list.length > 0">
|
||||
<view class="log-flex" v-for="(item, index) in list" :key="index">
|
||||
<view class="log-flex-item">
|
||||
<label>类 型</label>
|
||||
<label>类 型:</label>
|
||||
<view class="log-flex-val nowrap">{{item.type}}</view>
|
||||
</view>
|
||||
<view class="log-flex-item">
|
||||
<label>服务费</label>
|
||||
<label>金 额:</label>
|
||||
<view class="log-flex-val nowrap">{{item.perf}}</view>
|
||||
</view>
|
||||
<view class="log-flex-item">
|
||||
<label>客 户</label>
|
||||
<label>客 户:</label>
|
||||
<view class="log-flex-val nowrap">{{item.nick_name || '-'}}</view>
|
||||
</view>
|
||||
<view class="log-flex-item">
|
||||
<label>推荐人</label>
|
||||
<label>推荐人:</label>
|
||||
<view class="log-flex-val nowrap">{{item.parent_name || '-'}}</view>
|
||||
</view>
|
||||
<view class="log-flex-item">
|
||||
<label>时 间</label>
|
||||
<label>时 间:</label>
|
||||
<view class="log-flex-val nowrap">{{item.created_at}}</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -202,12 +202,12 @@
|
||||
display: flex;
|
||||
label{
|
||||
color: gray;
|
||||
width: 100rpx;
|
||||
width: 140rpx;
|
||||
}
|
||||
}
|
||||
&-val{
|
||||
text-align: right;
|
||||
width: calc(100% - 100rpx);
|
||||
width: calc(100% - 140rpx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
},
|
||||
created() {
|
||||
report(this.$Route.query.id).then(res => {
|
||||
let { title, total, veidoos, created_at, isAnswer } = res;
|
||||
let { title, total, veidoos, created_at, isAnswer, isSign } = res;
|
||||
this.isAnswer = isAnswer;
|
||||
this.title = title;
|
||||
this.total = total;
|
||||
@@ -91,8 +91,23 @@
|
||||
this.accuracy = (veidoos.count.accuracy).substring(0, (veidoos.count.accuracy).length - 1);
|
||||
this.allTotal = veidoos.allTotal;
|
||||
this.wrong = veidoos.wrong;
|
||||
if(!isSign && isAnswer){
|
||||
uni.showModal({
|
||||
title : '提示',
|
||||
content : '恭喜您通过了业务员考试,是否立即签约?',
|
||||
cancelColor : '#446EFE',
|
||||
cancelText : '去签约',
|
||||
confirmText : '稍后签',
|
||||
success : ModalRes => {
|
||||
if(ModalRes.cancel){
|
||||
this.$Router.pushTab({
|
||||
name: 'Work'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : "none"
|
||||
|
||||
@@ -12,7 +12,11 @@
|
||||
</view>
|
||||
<view class="info-flex">
|
||||
<label>昵称</label>
|
||||
<input class="info-input" maxlength="8" v-model="nickname" type="text" placeholder="昵称" @blur="onNickname">
|
||||
<input class="info-input" maxlength="8" v-model="nickname" type="text" placeholder="昵称" disabled @blur="onNickname">
|
||||
</view>
|
||||
<view class="info-flex">
|
||||
<label>通讯地址</label>
|
||||
<input class="info-input" v-model="sign.address" type="text" placeholder="输入通讯地址" :disabled="sign.isSign" @blur="onAddress">
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -28,6 +32,10 @@
|
||||
url : '',
|
||||
path: ''
|
||||
}, // 上传头像
|
||||
sign : {
|
||||
isSign : false,
|
||||
address : ''
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -40,12 +48,13 @@
|
||||
title: '加载中...'
|
||||
})
|
||||
info().then(res => {
|
||||
let { nickname, avatar} = res
|
||||
let { nickname, avatar, sign } = res
|
||||
this.nickname = nickname
|
||||
this.avatar = {
|
||||
url : avatar,
|
||||
path: ''
|
||||
}
|
||||
this.sign = sign
|
||||
uni.hideLoading()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
@@ -58,6 +67,10 @@
|
||||
onNickname(e){
|
||||
this.updInfo('nickname', this.nickname)
|
||||
},
|
||||
// 更新通讯地址
|
||||
onAddress(e){
|
||||
this.updInfo('address', this.sign.address)
|
||||
},
|
||||
// 更新资料
|
||||
updInfo(key, val){
|
||||
uni.showLoading({
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="block open-interest">
|
||||
<view class="title">仅需两步即可成为业务员</view>
|
||||
<view class="title">仅需三步即可成为业务员</view>
|
||||
<view class="open-interest-block">
|
||||
<image class="open-interest-icon" :src="isCertification ? require('@/static/icons/work_icon_25.png'): require('@/static/icons/work_icon_24.png')"></image>
|
||||
<view class="open-interest-text">
|
||||
@@ -43,6 +43,14 @@
|
||||
</view>
|
||||
<button class="open-interest-btn" size="mini" :disabled="isAnswer" @click="$Router.pushTab({name: 'CollegeTest'})">{{isAnswer ? '已通过': '去考试'}}</button>
|
||||
</view>
|
||||
<view class="open-interest-block">
|
||||
<image class="open-interest-icon" :src="sign.isSign ? require('@/static/icons/work_icon_25.png'): require('@/static/icons/work_icon_27.png')"></image>
|
||||
<view class="open-interest-text">
|
||||
<view class="open-interest-title">业务员签约</view>
|
||||
<view class="open-interest-submit">完成业务员在线签约</view>
|
||||
</view>
|
||||
<button class="open-interest-btn" size="mini" :disabled="sign.isSign" @click="onSign">{{sign.isSign ? '已签约': '去签约'}}</button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 提示信息 -->
|
||||
<u-popup :show="privilegeShow" mode="center" bgColor="transparent">
|
||||
@@ -198,7 +206,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { index, rights } from '@/apis/interfaces/work.js'
|
||||
import { index, rights, sign } from '@/apis/interfaces/work.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -216,7 +224,12 @@
|
||||
orderCount : {},
|
||||
// 权益说明
|
||||
privilegeShow : false,
|
||||
privilegeText : ''
|
||||
privilegeText : '',
|
||||
// 签约状态
|
||||
sign : {
|
||||
isSign : false,
|
||||
address : ""
|
||||
}
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
@@ -227,6 +240,41 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 签约
|
||||
onSign(){
|
||||
if(!this.isCertification){
|
||||
uni.showToast({
|
||||
title: '暂未实名认证,无法签约,请完成实名认证',
|
||||
icon : 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if(this.sign.address == ''){
|
||||
uni.showToast({
|
||||
title: '暂时无法签约,请前往个人中心我的信息完善通讯地址信息后重试',
|
||||
icon : 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
uni.showLoading({
|
||||
title : '获取签约地址',
|
||||
mask : true
|
||||
})
|
||||
sign().then(res => {
|
||||
uni.hideLoading()
|
||||
this.$Router.push({
|
||||
name : 'ESign',
|
||||
params : {
|
||||
url: res.sign_url
|
||||
}
|
||||
})
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 显示业务员权益
|
||||
onToast(val){
|
||||
this.privilegeText = val.content
|
||||
@@ -241,18 +289,21 @@
|
||||
Promise.all([rights(), index()]).then(res => {
|
||||
let rightsData = res[0],
|
||||
indexData = res[1]
|
||||
let { nickname, avatar, business_orders_count, isCertification, certification, isManager, isAnswer, identity } = indexData
|
||||
|
||||
let { nickname, avatar, business_orders_count, isCertification, certification, isManager, isAnswer, identity, sign } = indexData
|
||||
this.rightsArr = rightsData
|
||||
this.userInfo = {
|
||||
nickname,
|
||||
avatar
|
||||
}
|
||||
this.isCertification = isCertification
|
||||
this.certification = certification
|
||||
this.isManager = isManager
|
||||
this.isAnswer = isAnswer
|
||||
this.orderCount = business_orders_count
|
||||
this.identity = identity
|
||||
this.certification = certification
|
||||
this.isManager = isManager
|
||||
this.isAnswer = isAnswer
|
||||
this.orderCount = business_orders_count
|
||||
this.identity = identity
|
||||
this.sign = sign
|
||||
|
||||
uni.hideLoading()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
|
||||
Reference in New Issue
Block a user