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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
| <template>
| <div class='addclerk_page'>
| <NavTop title="添加店员" @click-left="backlast"></NavTop>
| <div class="content">
| <div class="must-has-box">
| <van-field v-model="formData.name" label="店员姓名" placeholder="请输入店员姓名" />
| <van-field v-model="formData.mblNo" label="店员手机号" placeholder="请输入店员手机号" />
| </div>
| <div class='tips'>
| 该手机号作为登录用户名,密码将通过短信发送至手机
| </div>
| <div class="must-has-box">
| <van-field v-model="formData.email" label="联系邮箱" placeholder="请输入联系邮箱" />
| </div>
| <Button class='save_btn' @click="savePassworde">保存</Button>
| </div>
| </div>
| </template>
|
| <script>
| import { Cell, CellGroup,Toast ,Field } from "vant";
| export default {
| name:'shopassistant',
| components: {
| Cell,
| CellGroup,
| Field,
| },
| data() {
| return {
| formData:{
| mblNo:"",
| name:"",
| email:""
| }
| };
| },
| created() {
|
| },
| mounted() {
|
| },
| methods: {
| backlast(){ this.$router.go(-1);},
| savePassworde(){
| if(!this.formData.mblNo){
| Toast.fail('请输入手机号');
| return false
| }
| if(!this.formData.name){
| Toast.fail('请输入姓名');
| return false
| }
| if(!this.formData.email){
| Toast.fail('请输入邮箱');
| return false
| }
| this.$api.post('/store/addStoreClient',this.formData).then(res=>{
| Toast.success({
| message:'添加成功',
| onClose:()=>{
| this.$router.go(-1)
| }
| })
| })
| }
| }
| };
| </script>
|
| <style scoped lang="less">
| .addclerk_page{
| background-color: #FAFAFC;
| height: 100vh;
| padding-top: 44px;
| .content {
| box-sizing: border-box;
| padding: 16px 16px 21px;
| .tit-class {
| text-align: left;
| color: #333;
| font-size: 14px;
| margin-left: 12px;
| }
| .maybe-has-box {
| margin-bottom: 12px;
| }
| .must-has-box {
| border-radius: 8px;
| background: #fff;
| .iconfont {
| font-size: 18px;
| }
| }
| }
| .tips{
| color: #999999;
| font-size: 12px;
| margin-bottom: 20px;
| text-align: left;
| }
| .save_btn{
| margin-top: 40px;
| }
| .van-field{
| border-radius: 8px;
| }
| }
| </style>
|
|