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

完成雇员管理

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