addcommiss.vue
2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<template>
<view class="container">
<image src="../../static/beijing.png" class="background" mode=""></image>
<view class="content">
<!-- 内容 -->
<view style="padding:15px;color:white;font-size:18px;font-weight:600;width:100%;background-color:#1F1F1F;">添加专员</view>
<view style="width:100%;display: flex;padding: 10px;">
<text style="color: white;font-weight: 600;">专员ID:</text>
<view style="margin-left: 10px;">
<input type="text" placeholder="请输入专员ID" style="color: white;" v-model="model.CommissionerUserId"/>
</view>
</view>
<view style="width: 100%; margin-top: 20px; font-weight: bold; color: #f8e2aa !important;display: flex;justify-content: space-between;">
<text style="padding: 5px 0px 5px 20px;" @click="Exsit">取消</text>
<text style="padding: 5px 20px 5px 0px;" @click="Submit">确定</text>
</view>
</view>
</view>
</template>
<script>
export default{
data(){
return{
model:{
// 销售专员ID
CommissionerUserId:0,
// 销售经理ID
ManagerUserId:0
}
}
},
onShow() {
},
methods:{
// 取消返回上一级
Exsit(){
uni.navigateBack({
})
},
// 提交
Submit(){
let jsonstorage=uni.getStorageSync('userinfo').data
this.model.ManagerUserId=jsonstorage.id
if(this.model.CommissionerUserId==0){
uni.showToast({
title:'请输入销售专员ID',
icon:'none'
})
}else{
this.API.BindingSpecialist(this.model).then(res=>{
console.log('返回数据',res)
if(res.data.code==200){
uni.showToast({
title:'添加专员成功',
icon:'success'
})
uni.navigateBack({
})
}else {
uni.showToast({
title:res.data.message,
icon:'none'
})
}
})
}
}
}
}
</script>
<style>
/* 背景图片 */
.background {
width: 100%;
height: 100%;
position: fixed;
/* border-radius:50% 50% 0 0 ; */
background-size: 100% 100%;
z-index: -1;
}
</style>