Commit c6e099a2 authored by 杨硕's avatar 杨硕

商家改为多选

parent 1759cfb5
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="search" style="border-bottom: 14px solid #f4f4f4"> <div class="search" style="border-bottom: 14px solid #f4f4f4">
<el-form v-show="showSearch" ref="queryForm" style="padding: 0 0 0 10px" class="formClass" :model="queryParams" :inline="true" label-width="auto"> <el-form v-show="showSearch" ref="queryForm" style="padding: 0 0 0 10px" class="formClass" :model="queryParams" :inline="true" label-width="auto">
<el-form-item label="所属商家:" prop="deptId"> <el-form-item label="所属商家:" prop="deptId">
<el-select v-model="queryParams.deptId" :disabled="!queryShop" filterable placeholder="请选择所属商家" style="width: 100%"> <el-select v-model="queryParams.deptId" filterable placeholder="请选择所属商家" style="width: 100%">
<el-option <el-option
v-for="(item,index) in deptList" v-for="(item,index) in deptList"
:key="index" :key="index"
...@@ -273,7 +273,7 @@ ...@@ -273,7 +273,7 @@
<el-row v-if="form.identity !== '1'"> <el-row v-if="form.identity !== '1'">
<el-col :span="24"> <el-col :span="24">
<el-form-item label="所属商家:" prop="deptId"> <el-form-item label="所属商家:" prop="deptId">
<el-select v-model="form.deptId" :disabled="!queryShop" filterable placeholder="所属商家" style="width: 100%"> <el-select v-model="form.deptId" multiple :disabled="!queryShop" filterable placeholder="所属商家" style="width: 100%">
<el-option <el-option
v-for="(item,index) in deptList" v-for="(item,index) in deptList"
:key="index" :key="index"
...@@ -877,6 +877,8 @@ export default { ...@@ -877,6 +877,8 @@ export default {
this.isUnitAdmin = flag this.isUnitAdmin = flag
this.open = true this.open = true
this.form = row this.form = row
const depIds = row.deptIdPrepares.split(',')
this.form.deptId = depIds.map(item => Number(item))
this.title = '修改代言人' this.title = '修改代言人'
}, },
/** 重置密码按钮操作 */ /** 重置密码按钮操作 */
...@@ -909,6 +911,7 @@ export default { ...@@ -909,6 +911,7 @@ export default {
submitForm() { submitForm() {
this.$refs['form'].validate(valid => { this.$refs['form'].validate(valid => {
if (valid) { if (valid) {
this.form.deptIdPrepares = this.form.deptId.join(',')
if (this.form.businessId !== undefined) { if (this.form.businessId !== undefined) {
updateSysuser(this.form).then(response => { updateSysuser(this.form).then(response => {
this.$message({ this.$message({
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true"> <el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true">
<el-form-item label="所属商家:" prop="unitId"> <el-form-item label="所属商家:" prop="unitId">
<el-select v-model="queryParams.unitId" :disabled="!queryShop" filterable placeholder="请选择所属商家" style="width: 100%"> <el-select v-model="queryParams.unitId" filterable placeholder="请选择所属商家" style="width: 100%">
<el-option <el-option
v-for="(item,index) in deptList" v-for="(item,index) in deptList"
:key="index" :key="index"
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<div class="search" style="border-bottom: 14px solid #f4f4f4"> <div class="search" style="border-bottom: 14px solid #f4f4f4">
<el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true"> <el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true">
<el-form-item label="所属商家:" prop="unitId"> <el-form-item label="所属商家:" prop="unitId">
<el-select v-model="queryParams.unitId" :disabled="!queryShop" clearable filterable placeholder="请选择所属商家" style="width: 100%"> <el-select v-model="queryParams.unitId" clearable filterable placeholder="请选择所属商家" style="width: 100%">
<el-option <el-option
v-for="(item,index) in deptList" v-for="(item,index) in deptList"
:key="index" :key="index"
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<div class="search" style="border-bottom: 14px solid #f4f4f4"> <div class="search" style="border-bottom: 14px solid #f4f4f4">
<el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true"> <el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true">
<el-form-item label="所属商家:" prop="unitId"> <el-form-item label="所属商家:" prop="unitId">
<el-select v-model="queryParams.unitId" :disabled="!queryShop" filterable placeholder="请选择所属商家" style="width: 100%"> <el-select v-model="queryParams.unitId" filterable placeholder="请选择所属商家" style="width: 100%">
<el-option <el-option
v-for="(item,index) in deptList" v-for="(item,index) in deptList"
:key="index" :key="index"
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<div class="search" style="border-bottom: 14px solid #f4f4f4"> <div class="search" style="border-bottom: 14px solid #f4f4f4">
<el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true"> <el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true">
<el-form-item label="所属商家:" prop="unitId"> <el-form-item label="所属商家:" prop="unitId">
<el-select v-model="queryParams.unitId" :disabled="!queryShop" filterable placeholder="请选择所属商家" style="width: 100%"> <el-select v-model="queryParams.unitId" filterable placeholder="请选择所属商家" style="width: 100%">
<el-option <el-option
v-for="(item,index) in deptList" v-for="(item,index) in deptList"
:key="index" :key="index"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment