|
|
|
|
@ -1,14 +1,16 @@ |
|
|
|
|
<template> |
|
|
|
|
<el-dialog title="转派" append-to-body :modelValue="openShow" width="30%" @close="closeDialog"> |
|
|
|
|
|
|
|
|
|
<el-form ref="form" :model="formData" :rules="rules" label-width="80px" class="vd-form-row"> |
|
|
|
|
<el-row> |
|
|
|
|
<el-col :span="24"> |
|
|
|
|
<el-form-item label="调度员" prop="proMan.userId"> |
|
|
|
|
<!-- <all-user v-model="formData.proMan.userId" /> --> |
|
|
|
|
<el-select v-model="formData.proMan.userId" placeholder="请选择" clearable filterable> |
|
|
|
|
<el-option v-for="item in options" :key="item.value" :label="item.label" |
|
|
|
|
:value="item.value"> |
|
|
|
|
<el-form-item label="调度员" prop="disAssignMan"> |
|
|
|
|
<el-select v-model="formData.disAssignMan" placeholder="请选择" clearable filterable> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in options" |
|
|
|
|
:key="item.id" |
|
|
|
|
:label="item.realName" |
|
|
|
|
:value="item.id" |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
@ -26,62 +28,68 @@ |
|
|
|
|
<template #footer> |
|
|
|
|
<span class="dialog-footer"> |
|
|
|
|
<el-button @click="closeDialog">取 消</el-button> |
|
|
|
|
<el-button type="primary" @click="submit">确 定</el-button> |
|
|
|
|
<el-button type="primary" @click="submit" :loading="saveLoading">确 定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</template> |
|
|
|
|
</el-dialog> |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
|
import { setDispatch, getRoleUserList } from '@/api/processManagement/taskDispatch'; |
|
|
|
|
|
|
|
|
|
import { disTechnician } from '@/api/productionManagement/WIPChange.js'; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
props: { |
|
|
|
|
showDialog: { |
|
|
|
|
type: Boolean, |
|
|
|
|
default: false |
|
|
|
|
default: false, |
|
|
|
|
}, |
|
|
|
|
rowItem: { |
|
|
|
|
type: Object, |
|
|
|
|
default: () => ({}), |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
saveLoading: false, |
|
|
|
|
openShow: false, |
|
|
|
|
formData: { proMan: {}, resolution: null, ddtIdList: [] }, |
|
|
|
|
formData: { disAssignMan: null, resolution: null, ddtIdList: [] }, |
|
|
|
|
rules: { |
|
|
|
|
'proMan.userId': [{ required: true }] |
|
|
|
|
disAssignMan: [{ required: true }], |
|
|
|
|
}, |
|
|
|
|
options: [ |
|
|
|
|
{ |
|
|
|
|
label: '人员一', |
|
|
|
|
value: 1 |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '人员二', |
|
|
|
|
value: 2 |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
options: [], |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
this.openShow = this.showDialog |
|
|
|
|
this.openShow = this.showDialog; |
|
|
|
|
this.getRoleUserList(); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
getRoleUserList() { |
|
|
|
|
getRoleUserList({ current: 1, size: 9999999 }).then(res => { |
|
|
|
|
this.options = res.data.data.records; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
submit() { |
|
|
|
|
// this.$refs.form.validate((valid) => { |
|
|
|
|
// if (valid) { |
|
|
|
|
// this.formData.assignType = false; |
|
|
|
|
// this.$ajax |
|
|
|
|
// .post('dsDisTasking/disTechnician', this.formData) |
|
|
|
|
// .then((res) => { |
|
|
|
|
// if (this.$ifAjax(res)) { |
|
|
|
|
// this.$message.success(this.$t('craft.alreadyAssign')); |
|
|
|
|
// this.cancel(true); |
|
|
|
|
// } |
|
|
|
|
// }); |
|
|
|
|
// } |
|
|
|
|
// }); |
|
|
|
|
this.$refs.form.validate(valid => { |
|
|
|
|
if (valid) { |
|
|
|
|
let query = { |
|
|
|
|
ddtIdList: [this.rowItem.id], |
|
|
|
|
resolution: this.formData.resolution, |
|
|
|
|
disAssignMan: this.formData.disAssignMan, |
|
|
|
|
}; |
|
|
|
|
disTechnician(query).then(res => { |
|
|
|
|
this.$message.success('操作成功'); |
|
|
|
|
this.closeDialog(); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
closeDialog() { |
|
|
|
|
this.openShow = false |
|
|
|
|
this.openShow = false; |
|
|
|
|
this.$emit('closeDialog'); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
<style lang="scss" scoped></style> |