提交 3f0f5f9f authored 作者: 宋雄's avatar 宋雄

完成雇员管理

上级 e5f16ac2
......@@ -22,8 +22,7 @@
</a-col>
<a-col :span="12">
<a-form-model-item label="所属小区" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="community">
<!-- <j-popup v-model="model.communityCode" placeholder="请选择所属小区" icon="home" code="demo" field="name" orgFields="name" destFields="name" :multi="false"/> -->
<a-select style="width: 100%" v-model="model.community" placeholder="请选择所属小区" labelInValue>
<a-select style="width: 100%" mode="multiple" v-model="model.community" placeholder="请选择所属小区">
<a-select-option v-for="item in communityList" :key="item.communityCode" :value="item.communityCode">{{item.communityName}}</a-select-option>
</a-select>
</a-form-model-item>
......@@ -82,7 +81,7 @@
employeeName: '',
employeePhone: '',
employeeDuties: '',
community: {},
community: [],
employeeStatus: '1',
employeeAvatar: ''
},
......@@ -166,9 +165,10 @@
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
method = 'put';
}
httpAction(httpurl,{...this.model, communityCode: this.model.community.key, communityName: this.model.community.label},method).then((res)=>{
let communityCodes = this.model.community.join(',')
httpAction(httpurl,{...this.model, communityCodes},method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
......
......@@ -58,7 +58,7 @@
<span :style="{'color': record.employeeStatus === '1' ? 'green' : 'red'}">{{record.employeeStatus === '1' ? '在职' : '离职'}}</span>
</span>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit({...record, community: {key: record.communityCode, label: record.communityName}})">编辑</a>
<a @click="handleEdit({...record, community: record.communityCodes.split(',')})">编辑</a>
<a-divider type="vertical"/>
<a-dropdown>
......@@ -67,7 +67,7 @@
</a>
<a-menu slot="overlay">
<a-menu-item>
<a href="javascript:;" @click="handleDetail({...record, community: {key: record.communityCode, label: record.communityName}})">详情</a>
<a href="javascript:;" @click="handleDetail({...record, community: record.communityCodes.split(',')})">详情</a>
</a-menu-item>
<a-menu-item>
......@@ -116,8 +116,8 @@
},
{
title: '所属小区',
dataIndex: 'communityName',
key: 'communityName',
dataIndex: 'communityNames',
key: 'communityNames',
align: 'center'
},
{
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论