bug
This commit is contained in:
parent
db25cf1b23
commit
cd43e4f48a
@ -157,6 +157,7 @@
|
||||
:value="item.dutyId+''"
|
||||
></el-option>
|
||||
<el-option
|
||||
v-if="form.roleId == 12"
|
||||
label="油站站长"
|
||||
:value="12+''"
|
||||
></el-option>
|
||||
|
@ -13,7 +13,7 @@
|
||||
clearable
|
||||
placeholder="全部"
|
||||
>
|
||||
<el-option v-for="item in staffList" :key="item.id" :label="item.realName" :value="item.id">
|
||||
<el-option v-for="item in staffList" :key="item.id" :label="item.realName" :value="item.id+''">
|
||||
<span style="float: left">{{ item.realName }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.mobile }}</span>
|
||||
</el-option>
|
||||
@ -123,10 +123,10 @@
|
||||
@sort-change="handleSortChange">
|
||||
<el-table-column label="ID" prop="id" align="center" width="60"/>
|
||||
<el-table-column label="方案名称" prop="name" align="center"/>
|
||||
<el-table-column label="员工角色" prop="dutyName" align="center">
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.staff_role" :value="scope.row.staffRoleGroup"/>-->
|
||||
<!-- </template>-->
|
||||
<el-table-column label="员工角色" prop="staffRoleGroup" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.staffRoleGroup ? getStaffDuty(roleList,scope.row.staffRoleGroup) : "--"}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="提成来源" prop="commissionSource" align="center" />
|
||||
<el-table-column label="满足条件" prop="meetCondition" align="center" width="260">
|
||||
@ -213,13 +213,16 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="角色组" prop="staffRoleGroup">
|
||||
<el-select v-model="form.staffRoleGroup" placeholder="请选择所属角色">
|
||||
<el-select v-model="staffRoleGroup" multiple
|
||||
collapse-tags placeholder="请选择所属角色"
|
||||
@change="getCheckbox">
|
||||
<el-option
|
||||
v-for="item in roleList"
|
||||
:key="item.dutyId+''"
|
||||
v-for="(item,index) in roleList"
|
||||
:key="index"
|
||||
:label="item.dutyName"
|
||||
:value="item.dutyId+''"
|
||||
:value="item.dutyId"
|
||||
></el-option>
|
||||
<!-- :value="item.dutyId"-->
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -347,6 +350,7 @@ export default {
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
roleList:[],
|
||||
staffRoleGroup:[],
|
||||
// 表单校验
|
||||
rules: {
|
||||
name: [
|
||||
@ -382,6 +386,20 @@ export default {
|
||||
this.getStaffList();
|
||||
},
|
||||
methods:{
|
||||
getStaffDuty(list,ids){
|
||||
let id = ids.split(",")
|
||||
let name = ""
|
||||
let dutyName = ""
|
||||
list.forEach(item => {
|
||||
id.forEach(i => {
|
||||
if (item.dutyId=i){
|
||||
name = item.dutyName
|
||||
}
|
||||
dutyName += name +","
|
||||
})
|
||||
})
|
||||
return name
|
||||
},
|
||||
getStaffList(){
|
||||
queryStaffs().then( response => {
|
||||
this.staffList = response.data;
|
||||
@ -391,6 +409,7 @@ export default {
|
||||
getDuty(){
|
||||
listDuty().then(response => {
|
||||
this.roleList = response.data
|
||||
console.log(response.data)
|
||||
})
|
||||
},
|
||||
// 点击标签页
|
||||
@ -425,7 +444,9 @@ export default {
|
||||
},
|
||||
|
||||
getCheckbox(){
|
||||
this.form.commissionSource = this.commissionSource.toString()
|
||||
console.log(this.staffRoleGroup)
|
||||
// this.form.commissionSource = this.commissionSource.toString()
|
||||
this.form.staffRoleGroup = this.staffRoleGroup.toString()
|
||||
},
|
||||
// 查询列表
|
||||
getList() {
|
||||
@ -453,6 +474,7 @@ export default {
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.resetForm("form");
|
||||
this.staffRoleGroup = []
|
||||
if (this.activeName == 'oil'){
|
||||
this.form = {
|
||||
type:'orderAmount',
|
||||
@ -484,6 +506,9 @@ export default {
|
||||
this.form.royaltyRate = this.form.royaltyRate.slice(0,this.form.royaltyRate.length-1)
|
||||
this.open = true;
|
||||
this.title = "编辑提成方案";
|
||||
if (response.data.staffRoleGroup){
|
||||
this.staffRoleGroup = response.data.staffRoleGroup.split(",");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@ -524,8 +549,9 @@ export default {
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.form.royaltyRate = this.form.royaltyRate + this.select
|
||||
this.form.staffRoleGroup = this.staffRoleGroup.toString()
|
||||
if (this.form.id) {
|
||||
this.form.royaltyRate = this.form.royaltyRate + this.select
|
||||
updateCommission(this.form).then(response => {
|
||||
if (response.data==1){
|
||||
this.$modal.msgSuccess("提成方案更新成功");
|
||||
@ -536,7 +562,6 @@ export default {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.form.royaltyRate = this.form.royaltyRate + this.select
|
||||
addCommission(this.form).then(response => {
|
||||
if (response.data==1) {
|
||||
this.$modal.msgSuccess("提成方案新增成功");
|
||||
@ -573,7 +598,7 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
.app-container{
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
height: 100%;
|
||||
background: #f6f8f9;
|
||||
}
|
||||
.clearfix{
|
||||
|
@ -2125,6 +2125,7 @@
|
||||
},
|
||||
// 选择员工信息
|
||||
chooseStaff(data){
|
||||
console.log(data,"qusnv")
|
||||
this.staff = data;
|
||||
this.map.staffId = this.staff.id;
|
||||
this.dialogVisible = false
|
||||
@ -2489,6 +2490,7 @@
|
||||
this.updateRefuelMoney();
|
||||
this.map.refuelMoney = JSON.stringify(this.refuelMoney)
|
||||
this.map.couponId = this.useCouponIds
|
||||
this.map.staffId = this.staff.id
|
||||
|
||||
let _this = this;
|
||||
if (this.payType=="APPLET_CODE"){
|
||||
|
@ -63,7 +63,7 @@
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="anniu" v-if="oilOrder.orderStatus=='paid' && oilOrder.remark" @click="gocomment()">
|
||||
<view class="anniu" v-if="oilOrder.orderStatus=='paid' && oilOrder.remark==null || oilOrder.orderStatus=='paid' && oilOrder.remark==''" @click="gocomment()">
|
||||
<text>去评价</text>
|
||||
</view>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user