登录保存商户信息
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;
|
||||
|
||||
Reference in New Issue
Block a user