员工折扣百分比管理
This commit is contained in:
@@ -6,14 +6,12 @@
|
|||||||
<text style="color: red;">*</text>员工姓名
|
<text style="color: red;">*</text>员工姓名
|
||||||
</view>
|
</view>
|
||||||
<input type="text" v-model="datas.formData.name" placeholder="请填写员工名称" />
|
<input type="text" v-model="datas.formData.name" placeholder="请填写员工名称" />
|
||||||
<hr />
|
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view>
|
<view>
|
||||||
<text style="color: red;">*</text>手机号
|
<text style="color: red;">*</text>手机号
|
||||||
</view>
|
</view>
|
||||||
<input type="text" v-model="datas.formData.phone" placeholder="请填写手机号" />
|
<input type="text" v-model="datas.formData.phone" placeholder="请填写手机号" />
|
||||||
<hr />
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view>
|
<view>
|
||||||
@@ -21,7 +19,6 @@
|
|||||||
<text style="color: red;">*</text>员工编号
|
<text style="color: red;">*</text>员工编号
|
||||||
</view>
|
</view>
|
||||||
<input type="text" v-model="datas.formData.code" placeholder="请填写员工编号" />
|
<input type="text" v-model="datas.formData.code" placeholder="请填写员工编号" />
|
||||||
<hr />
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view>
|
<view>
|
||||||
@@ -29,14 +26,12 @@
|
|||||||
<text style="color: red;">*</text>员工账号
|
<text style="color: red;">*</text>员工账号
|
||||||
</view>
|
</view>
|
||||||
<input type="text" v-model="datas.formData.account" placeholder="请填写员工账号,建议使用手机号" />
|
<input type="text" v-model="datas.formData.account" placeholder="请填写员工账号,建议使用手机号" />
|
||||||
<hr />
|
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view>
|
<view>
|
||||||
登录密码
|
登录密码
|
||||||
</view>
|
</view>
|
||||||
<input type="text" v-model="datas.formData.password" placeholder="请输入登录密码,不填写默认123456" />
|
<input type="text" v-model="datas.formData.password" placeholder="请输入登录密码,不填写默认123456" />
|
||||||
<hr />
|
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view>
|
<view>
|
||||||
@@ -46,21 +41,21 @@
|
|||||||
<up-radio label="折扣" name="1"></up-radio>
|
<up-radio label="折扣" name="1"></up-radio>
|
||||||
<up-radio style="margin: 18px 10px;" label="金额" name="0"></up-radio>
|
<up-radio style="margin: 18px 10px;" label="金额" name="0"></up-radio>
|
||||||
</up-radio-group>
|
</up-radio-group>
|
||||||
<hr />
|
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view>
|
<view>
|
||||||
最低优惠折扣
|
最低优惠折扣
|
||||||
</view>
|
</view>
|
||||||
<input type="text" v-model="datas.formData.maxDiscountAmount" placeholder="0" />
|
<input v-if="datas.formData.discountType==1" @blur="maxdisinput" type="number"
|
||||||
<hr />
|
v-model="datas.formData.maxDiscountAmount" placeholder="请输入最低优惠折扣" />
|
||||||
|
<input v-if="datas.formData.discountType==0" type="number" v-model="datas.formData.maxDiscountAmount"
|
||||||
|
placeholder="请输入最低优惠折扣" />
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view>
|
<view>
|
||||||
<text style="color: red;">*</text> 角色
|
<text style="color: red;">*</text> 角色
|
||||||
</view>
|
</view>
|
||||||
<view @tap="show=true" style="height: 50rpx;font-size: 28rpx;color: #999999;">{{datas.rolesdata }}</view>
|
<view @tap="show=true" style="height: 50rpx;font-size: 28rpx;color: #999999;">{{datas.rolesdata }}</view>
|
||||||
<hr />
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="h7">员工权限设置</view>
|
<view class="h7">员工权限设置</view>
|
||||||
@@ -117,7 +112,8 @@
|
|||||||
let datas = reactive({
|
let datas = reactive({
|
||||||
formData: {
|
formData: {
|
||||||
permissions: [],
|
permissions: [],
|
||||||
maxDiscountAmount:0
|
maxDiscountAmount: 0,
|
||||||
|
discountType:0
|
||||||
},
|
},
|
||||||
rolesList: [],
|
rolesList: [],
|
||||||
columns: [],
|
columns: [],
|
||||||
@@ -145,7 +141,8 @@
|
|||||||
tbPlussShopStaffDetail(id).then(res => {
|
tbPlussShopStaffDetail(id).then(res => {
|
||||||
datas.formData = res
|
datas.formData = res
|
||||||
if (datas.rolesList) {
|
if (datas.rolesList) {
|
||||||
datas.rolesdata = datas.rolesList.filter(ele => ele.id == res.roleId)[0].name
|
let rolefilter = datas.rolesList.filter(ele => ele.id == res.roleId)
|
||||||
|
datas.rolesdata = rolefilter[0].name
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -187,6 +184,15 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function maxdisinput(d) {
|
||||||
|
let num = d.detail.value * 1
|
||||||
|
if (num >= 1) {
|
||||||
|
datas.formData.maxDiscountAmount = 0.99
|
||||||
|
}else{
|
||||||
|
datas.formData.maxDiscountAmount = d.detail.value.substring(0,4)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function getrolesEvent() {
|
function getrolesEvent() {
|
||||||
getroles().then((res) => {
|
getroles().then((res) => {
|
||||||
datas.rolesList = res.content
|
datas.rolesList = res.content
|
||||||
@@ -212,14 +218,13 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
|
||||||
|
|
||||||
.h7 {
|
.h7 {
|
||||||
margin: 32rpx 0;
|
margin: 32rpx 0;
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
|
width: 400rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
@@ -234,6 +239,7 @@
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
|
border-bottom: 1px solid #999999;
|
||||||
|
|
||||||
>input {
|
>input {
|
||||||
padding: 24rpx 0;
|
padding: 24rpx 0;
|
||||||
|
|||||||
@@ -12,14 +12,14 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<view style="display: flex;justify-content: center;align-items: center;">
|
<view style="display: flex;justify-content: center;align-items: center;">
|
||||||
<span style="font-size: 28rpx;color: #999999;">是否启用</span>
|
<span style="font-size: 28rpx;color: #999999;">是否启用</span>
|
||||||
<up-switch :activeValue="1" :inactiveValue="0" v-model="item.status" size="18"
|
<up-switch :activeValue="1" :inactiveValue="0" v-model="item.status" size="18"
|
||||||
@change="switch2Change($event,item)"></up-switch>
|
@change="switch2Change($event,item)"></up-switch>
|
||||||
</view>
|
</view>
|
||||||
<view class="df">
|
<view class="df">
|
||||||
<up-button size="small" style="border-radius: 28rpx 28rpx 28rpx 28rpx;"
|
<up-button size="small" shape="circle" style="border-radius: 28rpx 28rpx 28rpx 28rpx;"
|
||||||
@tap="datas.show = true;datas.rolesId=item.id" text="删除"></up-button>
|
@tap="datas.show = true;datas.rolesId=item.id" text="删除"></up-button>
|
||||||
<up-button type="primary" plain size="small"
|
<up-button type="primary" shape="circle" plain size="small"
|
||||||
style="border-radius: 28rpx 28rpx 28rpx 28rpx;margin-left: 16rpx;" @tap="toUrl(item)"
|
style="border-radius: 28rpx 28rpx 28rpx 28rpx;margin-left: 16rpx;" @tap="toUrl(item)"
|
||||||
text="编辑"></up-button>
|
text="编辑"></up-button>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -180,7 +180,7 @@
|
|||||||
birthDay: '',
|
birthDay: '',
|
||||||
balance: '',
|
balance: '',
|
||||||
integral: '',
|
integral: '',
|
||||||
isVip: false,
|
isVip: true,
|
||||||
level: 1,
|
level: 1,
|
||||||
sex: 1
|
sex: 1
|
||||||
})
|
})
|
||||||
@@ -202,16 +202,19 @@
|
|||||||
|
|
||||||
|
|
||||||
onLoad(params => {
|
onLoad(params => {
|
||||||
console.log(params,'调试111')
|
|
||||||
if (params.id) {
|
if (params.id) {
|
||||||
let items = params
|
let items = params
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title: '编辑用户'
|
title: '编辑用户'
|
||||||
})
|
})
|
||||||
items.phone = items.telephone
|
// userForm = items
|
||||||
items.sex = items.sex == '男' ? 1 : 2
|
userForm.nickName=items.nickName
|
||||||
userForm = items
|
userForm.birthDay=items.birthDay
|
||||||
|
userForm.id=items.id
|
||||||
|
userForm.phone = items.telephone
|
||||||
|
userForm.sex = items.sex == '男' ? 1 : 2
|
||||||
option.type = 'edit'
|
option.type = 'edit'
|
||||||
|
console.log(userForm,'调试111')
|
||||||
} else {
|
} else {
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title: '新增用户'
|
title: '新增用户'
|
||||||
@@ -236,6 +239,7 @@
|
|||||||
status:1,
|
status:1,
|
||||||
levelConsume:0,
|
levelConsume:0,
|
||||||
shopId: uni.getStorageSync("shopId"),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
|
sex:userForm.sex==1?1:2
|
||||||
}
|
}
|
||||||
if (res) {
|
if (res) {
|
||||||
if (option.type == 'add') {
|
if (option.type == 'add') {
|
||||||
@@ -252,6 +256,7 @@
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
page {
|
page {
|
||||||
background: #F9F9F9;
|
background: #F9F9F9;
|
||||||
|
height: 100vh;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user