登录保存商户信息
This commit is contained in:
@@ -3,14 +3,14 @@
|
||||
<view class="content">
|
||||
<view>
|
||||
<view>
|
||||
员工姓名
|
||||
<text style="color: red;">*</text>员工姓名
|
||||
</view>
|
||||
<input type="text" v-model="datas.formData.name" placeholder="请填写员工名称" />
|
||||
<hr />
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
手机号
|
||||
<text style="color: red;">*</text>手机号
|
||||
</view>
|
||||
<input type="text" v-model="datas.formData.phone" placeholder="请填写手机号" />
|
||||
<hr />
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
<view>
|
||||
<view>
|
||||
员工编号
|
||||
<text style="color: red;">*</text>员工编号
|
||||
</view>
|
||||
<input type="text" v-model="datas.formData.code" placeholder="请填写员工编号" />
|
||||
<hr />
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
<view>
|
||||
<view>
|
||||
员工账号
|
||||
<text style="color: red;">*</text>员工账号
|
||||
</view>
|
||||
<input type="text" v-model="datas.formData.account" placeholder="请填写员工账号,建议使用手机号" />
|
||||
<hr />
|
||||
@@ -57,7 +57,7 @@
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
角色
|
||||
<text style="color: red;">*</text> 角色
|
||||
</view>
|
||||
<view @tap="show=true" style="height: 50rpx;font-size: 28rpx;color: #999999;">{{datas.rolesdata }}</view>
|
||||
<hr />
|
||||
@@ -78,9 +78,11 @@
|
||||
<view class="bottomBotton" @tap="sumbitEvent">
|
||||
保存
|
||||
</view>
|
||||
<view class="bottomBotton2" @tap="toUrl">
|
||||
<!-- <view class="bottomBotton2" @tap="toUrl">
|
||||
取消
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- 消息提示 -->
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
<!-- 角色选择器 -->
|
||||
<up-picker :show="show" @confirm="confirm" @cancel="show = false" :columns="columns"></up-picker>
|
||||
<!-- 弹窗 -->
|
||||
@@ -149,6 +151,15 @@
|
||||
}
|
||||
|
||||
function sumbitEvent() {
|
||||
// 效验
|
||||
if(!datas.formData.name||!datas.formData.phone||!datas.formData.code||!datas.formData.account){
|
||||
currentInstance.ctx.$refs.uToastRef.show({
|
||||
message: "请填写必填项",
|
||||
type: 'default',
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
let rolesId = datas.rolesList.filter(ele => ele.name == datas.rolesdata)
|
||||
if (rolesId.length == 0) {
|
||||
currentInstance.ctx.$refs.message.open()
|
||||
@@ -166,7 +177,7 @@
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...datas.formData
|
||||
}).then(res => {
|
||||
toUrl()
|
||||
go.back()
|
||||
})
|
||||
}
|
||||
|
||||
@@ -195,12 +206,14 @@
|
||||
go.to('PAGES_STAFF')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
<style>
|
||||
page {
|
||||
background-color: #f9f9f9;
|
||||
padding: 32rpx 28rpx;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="less">
|
||||
|
||||
|
||||
.h7 {
|
||||
margin: 32rpx 0;
|
||||
|
||||
BIN
pageStaff/bg.png
Normal file
BIN
pageStaff/bg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.0 KiB |
@@ -3,7 +3,7 @@
|
||||
<li v-for="item in datas.list " :key="item.id">
|
||||
<view class="">
|
||||
<view class="">
|
||||
<span style="font-size: 28rpx;color: #333333; ">{{item.name}}</span>
|
||||
<span style="font-size: 28rpx;color: #333333; ">{{item.name}} </span>
|
||||
<span style="font-size: 24rpx;color: #999; ">{{item.code}}</span>
|
||||
</view>
|
||||
<view class="" style="font-size: 24rpx;color: #666666;">
|
||||
@@ -25,7 +25,12 @@
|
||||
</view>
|
||||
</view>
|
||||
</li>
|
||||
<li style="background-color: rgba(0,0,0,0);"></li>
|
||||
</ul>
|
||||
<view v-if="datas.list.length==0" style="text-align: center;">
|
||||
<image src="./bg.png" style="width: 325rpx;height: 335rpx;" mode=""></image>
|
||||
<view style="font-size: 28rpx;color: #999;">暂无员工</view>
|
||||
</view>
|
||||
<view class="bottomBotton" @tap="toUrl">
|
||||
添加员工
|
||||
</view>
|
||||
@@ -41,6 +46,9 @@
|
||||
watch,
|
||||
onMounted
|
||||
} from 'vue';
|
||||
import {
|
||||
onShow
|
||||
} from '@dcloudio/uni-app';
|
||||
import go from '@/commons/utils/go.js';
|
||||
import {
|
||||
rolesGet,
|
||||
@@ -53,7 +61,7 @@
|
||||
// 删除员工id
|
||||
rolesId: ""
|
||||
})
|
||||
onMounted(() => {
|
||||
onShow(() => {
|
||||
getList()
|
||||
})
|
||||
|
||||
@@ -94,14 +102,18 @@
|
||||
function getList() {
|
||||
rolesGet({
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
page: 1,
|
||||
page: 0,
|
||||
size: 100
|
||||
}).then((res) => {
|
||||
datas.list = res.content
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped>
|
||||
* {
|
||||
padding: 0;
|
||||
@@ -110,9 +122,7 @@
|
||||
outline: none;
|
||||
}
|
||||
|
||||
page {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
|
||||
ul,
|
||||
li {
|
||||
@@ -133,7 +143,7 @@
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 96rpx;
|
||||
|
||||
|
||||
}
|
||||
|
||||
>view:first-child {
|
||||
|
||||
Reference in New Issue
Block a user