change - 员工关联多班组

main
yinq 5 months ago
parent 312fdff7ff
commit 2d60281f13

@ -191,7 +191,7 @@
</el-select>
</el-form-item>
<el-form-item label="班组名称" prop="teamCode">
<el-select v-model="form.teamCode" placeholder="请选择班组名称">
<el-select v-model="form.teamCode" placeholder="请选择班组名称" multiple>
<el-option
v-for="item in teamMembersList"
:key="item.teamCode"
@ -300,9 +300,6 @@ export default {
],
staffName: [
{ required: true, message: '员工名称不能为空', trigger: 'blur' }
],
teamCode: [
{ required: true, message: '班组编号不能为空', trigger: 'blur' }
]
},
columns: [
@ -404,6 +401,9 @@ export default {
this.reset()
const objId = row.objId || this.ids
getBaseStaffInfo(objId).then(response => {
if (response.data.teamCode && typeof response.data.teamCode === 'string') {
response.data.teamCode = response.data.teamCode.split(',');
}
this.form = response.data
this.open = true
this.title = '修改员工信息'
@ -413,6 +413,7 @@ export default {
submitForm() {
this.$refs['form'].validate(valid => {
if (valid) {
this.form.teamCode = this.form.teamCode.toString();
if (this.form.objId != null) {
updateBaseStaffInfo(this.form).then(response => {
this.$modal.msgSuccess('修改成功')
@ -431,8 +432,9 @@ export default {
},
/** 删除按钮操作 */
handleDelete(row) {
const objIds = row.objId || this.codes
this.$modal.confirm('是否确认删除员工编号为"' + objIds + '"的数据项?').then(function() {
const objNames = row.objId || this.codes
const objIds = row.objId || this.ids
this.$modal.confirm('是否确认删除员工编号为"' + objNames + '"的数据项?').then(function() {
return delBaseStaffInfo(objIds)
}).then(() => {
this.getList()

Loading…
Cancel
Save