班组bug
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-10-31 15:47:16
|
||||
* @LastEditTime: 2025-11-27 14:49:34
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -25,6 +25,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="班组名称" prop="name">
|
||||
<el-input
|
||||
:disabled="nameDisable"
|
||||
v-model="dataForm.name"
|
||||
clearable
|
||||
placeholder="请输入班组名称" />
|
||||
@@ -78,6 +79,7 @@
|
||||
<el-form-item label="生产班组" prop="isProduction">
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
@change="setIsProduction"
|
||||
v-model="dataForm.isProduction"
|
||||
placeholder="请选择是否为生产班组">
|
||||
<el-option
|
||||
@@ -109,6 +111,7 @@ import {
|
||||
updateGroup,
|
||||
getGroup,
|
||||
getCode,
|
||||
updateIsProduction,
|
||||
} from '@/api/group/groupSetting';
|
||||
|
||||
export default {
|
||||
@@ -139,6 +142,7 @@ export default {
|
||||
remark: undefined,
|
||||
},
|
||||
setData: true,
|
||||
nameDisable: false, //班组被使用时,班组名称不能修改
|
||||
leaderArr: [],
|
||||
options: [
|
||||
{
|
||||
@@ -157,9 +161,7 @@ export default {
|
||||
name: [
|
||||
{ required: true, message: '班组名称不能为空', trigger: 'blur' },
|
||||
],
|
||||
deptId: [
|
||||
{ required: true, message: '部门不能为空', trigger: 'blur' },
|
||||
],
|
||||
deptId: [{ required: true, message: '部门不能为空', trigger: 'blur' }],
|
||||
leaderId: [
|
||||
{ required: true, message: '组长不能为空', trigger: 'change' },
|
||||
],
|
||||
@@ -191,6 +193,40 @@ export default {
|
||||
},
|
||||
setDataForm() {
|
||||
this.$refs.deptSelect.setID(this.dataForm.deptId);
|
||||
this.nameDisable = false;
|
||||
updateIsProduction(this.dataForm.id).then(({ data }) => {
|
||||
if (data) {
|
||||
this.$notify({
|
||||
title: '警告',
|
||||
message: '当前班组仍参与排班计划或正在执行工单。班组名称不能修改',
|
||||
type: 'warning',
|
||||
});
|
||||
this.nameDisable = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
setIsProduction() {
|
||||
// 修改的提交
|
||||
if (this.dataForm.id && this.nameDisable) {
|
||||
this.$confirm(
|
||||
'当前班组仍参与排班计划或正在执行工单。<br/>修改<strong> 是否是生产班组 </strong>不会自动更新排班内容,可能导致排班信息与班组属性不一致,请注意核查!<br/>是否确认修改是否是生产班组?',
|
||||
'修改是否是生产班组',
|
||||
{
|
||||
dangerouslyUseHTMLString: true,
|
||||
confirmButtonText: '确认修改',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
.then(() => {})
|
||||
.catch((res) => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消',
|
||||
});
|
||||
this.dataForm.isProduction = !this.dataForm.isProduction;
|
||||
});
|
||||
}
|
||||
},
|
||||
setLeaderName(val) {
|
||||
this.leaderArr.map((item) => {
|
||||
|
||||
Reference in New Issue
Block a user