parent
0347ff275e
commit
b46e36c873
5 changed files with 124 additions and 99 deletions
@ -1,87 +1,95 @@ |
||||
<template> |
||||
<el-dialog title="转派" append-to-body :modelValue="openShow" width="30%" @close="closeDialog"> |
||||
<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="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> |
||||
</el-col> |
||||
</el-row> |
||||
<el-row> |
||||
<el-col :span="24"> |
||||
<el-form-item label="处理意见" prop="resolution"> |
||||
<el-input v-model="formData.resolution" type="textarea" /> |
||||
</el-form-item> |
||||
</el-col> |
||||
</el-row> |
||||
</el-form> |
||||
|
||||
<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-option> |
||||
</el-select> |
||||
</el-form-item> |
||||
</el-col> |
||||
</el-row> |
||||
<el-row> |
||||
<el-col :span="24"> |
||||
<el-form-item label="处理意见" prop="resolution"> |
||||
<el-input v-model="formData.resolution" type="textarea" /> |
||||
</el-form-item> |
||||
</el-col> |
||||
</el-row> |
||||
</el-form> |
||||
|
||||
<template #footer> |
||||
<span class="dialog-footer"> |
||||
<el-button @click="closeDialog">取 消</el-button> |
||||
<el-button type="primary" @click="submit">确 定</el-button> |
||||
</span> |
||||
</template> |
||||
</el-dialog> |
||||
<template #footer> |
||||
<span class="dialog-footer"> |
||||
<el-button @click="closeDialog">取 消</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 |
||||
}, |
||||
props: { |
||||
showDialog: { |
||||
type: Boolean, |
||||
default: false, |
||||
}, |
||||
data() { |
||||
return { |
||||
openShow: false, |
||||
formData: { proMan: {}, resolution: null, ddtIdList: [] }, |
||||
rules: { |
||||
'proMan.userId': [{ required: true }] |
||||
}, |
||||
options: [ |
||||
{ |
||||
label: '人员一', |
||||
value: 1 |
||||
}, |
||||
{ |
||||
label: '人员二', |
||||
value: 2 |
||||
} |
||||
] |
||||
} |
||||
rowItem: { |
||||
type: Object, |
||||
default: () => ({}), |
||||
}, |
||||
mounted() { |
||||
this.openShow = this.showDialog |
||||
}, |
||||
data() { |
||||
return { |
||||
saveLoading: false, |
||||
openShow: false, |
||||
formData: { disAssignMan: null, resolution: null, ddtIdList: [] }, |
||||
rules: { |
||||
disAssignMan: [{ required: true }], |
||||
}, |
||||
options: [], |
||||
}; |
||||
}, |
||||
mounted() { |
||||
this.openShow = this.showDialog; |
||||
this.getRoleUserList(); |
||||
}, |
||||
methods: { |
||||
getRoleUserList() { |
||||
getRoleUserList({ current: 1, size: 9999999 }).then(res => { |
||||
this.options = res.data.data.records; |
||||
}); |
||||
}, |
||||
methods: { |
||||
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); |
||||
// } |
||||
// }); |
||||
// } |
||||
// }); |
||||
}, |
||||
closeDialog() { |
||||
this.openShow = false |
||||
this.$emit('closeDialog'); |
||||
submit() { |
||||
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.$emit('closeDialog'); |
||||
}, |
||||
}, |
||||
}; |
||||
</script> |
||||
<style lang="scss" scoped></style> |
||||
<style lang="scss" scoped></style> |
||||
|
||||
Loading…
Reference in new issue