流程管理问题修改

dev-scheduling
zhangdi 1 month ago
parent 3209439410
commit 4ec5a693b5
  1. 155
      src/views/flowManagement/addDialog.vue
  2. 2
      src/views/flowManagement/managementOfKeyTasks.vue
  3. 2
      src/views/orderManagement/components/allocation/allocationDetails.vue

@ -112,20 +112,6 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="成员名称:" prop="memberName"> <el-form-item label="成员名称:" prop="memberName">
<!-- <el-select
:disabled="isDetail"
v-model="addForm.memberName"
multiple
placeholder="请选择成员名称"
clearable
filterable
>
<el-option
v-for="item in memberList"
:label="item.realName"
:value="item.id"
></el-option>
</el-select> -->
<jhSelect <jhSelect
:value="addForm.memberName" :value="addForm.memberName"
@input="val => (addForm.memberName = val)" @input="val => (addForm.memberName = val)"
@ -150,18 +136,6 @@
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="项目支持人:" prop="projectSupportMan"> <el-form-item label="项目支持人:" prop="projectSupportMan">
<!-- <el-select
:disabled="isDetail"
v-model="addForm.projectSupportMan"
clearable
filterable
>
<el-option
v-for="item in memberList"
:label="item.realName"
:value="item.id"
></el-option>
</el-select> -->
<jhSelect <jhSelect
:value="addForm.projectSupportMan" :value="addForm.projectSupportMan"
@input="val => (addForm.projectSupportMan = val)" @input="val => (addForm.projectSupportMan = val)"
@ -226,10 +200,15 @@
border border
@select="selectChange" @select="selectChange"
class="table_project" class="table_project"
:cell-class-name="tableCellClassName"
> >
<el-table-column type="selection"></el-table-column> <el-table-column type="selection"></el-table-column>
<el-table-column type="index" width="80" label="序号"></el-table-column> <el-table-column type="index" width="80" label="序号"></el-table-column>
<el-table-column align="center" :width="isDetail ? '120' : ''" label="里程碑计划"> <el-table-column
align="center"
:width="isDetail || isStatusEdit ? '120' : ''"
label="里程碑计划"
>
<template #header> <template #header>
<span><i style="color: red">*</i>里程碑计划</span> <span><i style="color: red">*</i>里程碑计划</span>
</template> </template>
@ -253,7 +232,7 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
:width="isDetail ? '120' : ''" :width="isDetail || isStatusEdit ? '120' : ''"
label="里程碑负责人" label="里程碑负责人"
prop="milestoneMemo" prop="milestoneMemo"
> >
@ -307,7 +286,7 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
:width="isDetail ? '120' : ''" :width="isDetail || isStatusEdit ? '120' : ''"
label="里程碑输出物" label="里程碑输出物"
prop="outputMaterial" prop="outputMaterial"
> >
@ -334,7 +313,7 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
:width="isDetail ? '180' : ''" :width="isDetail || isStatusEdit ? '180' : ''"
label="里程碑节点" label="里程碑节点"
prop="milestoneNode" prop="milestoneNode"
> >
@ -365,7 +344,7 @@
</el-table-column> </el-table-column>
<!-- 详情页专属列 --> <!-- 详情页专属列 -->
<el-table-column <el-table-column
v-if="isDetail" v-if="isDetail || isStatusEdit"
align="center" align="center"
label="执行类型" label="执行类型"
prop="executeType" prop="executeType"
@ -376,18 +355,18 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
v-if="isDetail" v-if="isDetail || isStatusEdit"
align="center" align="center"
label="延期时间" label="延期时间"
prop="delayTime" prop="delayTime"
:width="isDetail ? '120' : ''" :width="isDetail || isStatusEdit ? '120' : ''"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
v-if="isDetail" v-if="isDetail || isStatusEdit"
align="center" align="center"
label="核查结果" label="核查结果"
prop="checkResult" prop="checkResult"
:width="isDetail ? '120' : ''" :width="isDetail || isStatusEdit ? '120' : ''"
> >
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.checkResult === 0">未核查</span> <span v-if="scope.row.checkResult === 0">未核查</span>
@ -396,40 +375,45 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
v-if="isDetail" v-if="isDetail || isStatusEdit"
align="center" align="center"
label="核查人" label="核查人"
prop="checkMan" prop="checkMan"
:width="isDetail ? '120' : ''" :width="isDetail || isStatusEdit ? '120' : ''"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
v-if="isDetail" v-if="isDetail || isStatusEdit"
align="center" align="center"
label="评价等级" label="评价等级"
prop="gradeTitle" prop="gradeTitle"
:width="isDetail ? '120' : ''" :width="isDetail || isStatusEdit ? '120' : ''"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
v-if="isDetail" v-if="isDetail || isStatusEdit"
align="center" align="center"
label="评价人" label="评价人"
prop="gradeMan" prop="gradeMan"
:width="isDetail ? '120' : ''" :width="isDetail || isStatusEdit ? '120' : ''"
> >
<template #default="scope"> <template #default="scope">
{{ scope.row.gradeTitle == '待评价' ? '' : scope.row.gradeMan }} {{ scope.row.gradeTitle == '待评价' ? '' : scope.row.gradeMan }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
v-if="isDetail" v-if="isDetail || isStatusEdit"
width="200" width="200"
align="center" align="center"
label="业务领导评价" label="业务领导评价"
prop="evaluate" prop="evaluate"
:width="isDetail ? '120' : ''" :width="isDetail || isStatusEdit ? '120' : ''"
></el-table-column> ></el-table-column>
<el-table-column v-if="isDetail" align="center" label="附件" :width="isDetail ? '120' : ''"> <el-table-column
v-if="isDetail || isStatusEdit"
align="center"
label="附件"
:width="isDetail || isStatusEdit ? '120' : ''"
>
<el-button type="text">附件</el-button> <el-button type="text">附件</el-button>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -445,11 +429,10 @@
</template> </template>
<script> <script>
import { addProcess, getProcessDetail, getDeplList } from '@/api/flowManagement/index'; import { addProcess, getProcessDetail, getDeplList,updateProcess } from '@/api/flowManagement/index';
import { getRoleUserList } from '@/api/processManagement/taskDispatch'; import { getRoleUserList } from '@/api/processManagement/taskDispatch';
import { getDictionary } from '@/api/system/dict'; import { getDictionary } from '@/api/system/dict';
import jhSelect from '@/components/jh-select/index.vue'; import jhSelect from '@/components/jh-select/index.vue';
import { vi } from 'element-plus/es/locales.mjs';
export default { export default {
name: 'AddDialog', name: 'AddDialog',
components: { jhSelect }, components: { jhSelect },
@ -547,11 +530,14 @@ export default {
isDetail() { isDetail() {
return this.title === '详情'; return this.title === '详情';
}, },
//
isStatusEdit() {
return (this.rowItem.approvalStatus != 8 && this.approvalStatus != 1)&&(this.title=='修改');
},
}, },
mounted() { mounted() {
this.openShow = this.visible; this.openShow = this.visible;
this.getDeplLists(); this.getDeplLists();
// this.getRoleUserList();
this.getDictionary(); this.getDictionary();
if (this.title === '详情' || this.title === '修改') { if (this.title === '详情' || this.title === '修改') {
@ -560,6 +546,13 @@ export default {
} }
}, },
methods: { methods: {
//
tableCellClassName({ row, column, rowIndex, columnIndex }) {
if (row.checkResult == 1 || row.checkResult == 2) {
return 'highlight-row';
}
return '';
},
executeTypeFn(type) { executeTypeFn(type) {
const item = this.executeResultList.find(item => item.dictKey === type); const item = this.executeResultList.find(item => item.dictKey === type);
return item ? item.dictValue : ''; return item ? item.dictValue : '';
@ -578,14 +571,7 @@ export default {
if (!val) { if (!val) {
row.milestoneMan = ''; row.milestoneMan = '';
} }
// val item
// jhSelect label () UI
// milestoneMan submit milestoneMan /
} }
// if (type === 'milestoneMemo') {
// let sel = this.memberList.filter(item => item.id == row.milestoneMemo)[0];
// row.milestoneMan = item.realName;
// }
}, },
// //
deptChange() { deptChange() {
@ -598,36 +584,19 @@ export default {
this.addForm.projectHead = item.realName; this.addForm.projectHead = item.realName;
} }
}, },
handleChange(value, item) {
// //
// if (type == 'touchingDeptId') {
// let sel = this.deplList.filter(item => item.id == this.addForm.touchingDeptId)[0];
// this.addForm.touchingDept = sel.deptName;
// }
// //
// if (type == 'projectHeadId') {
// let sel = this.memberList.filter(item => item.id == this.addForm.projectHeadId)[0];
// this.addForm.projectHead = sel.realName;
// }
},
// //
getDeplLists() { getDeplLists() {
getDeplList().then(res => { getDeplList().then(res => {
let data = res.data.data let data = res.data.data;
data.forEach(item => { data.forEach(item => {
if (item.deptName == '热表分厂') { if (item.deptName == '热表分厂') {
console.log(item.children, 'item.deptName'); console.log(item.children, 'item.deptName');
this.deplList = item.children||[]; this.deplList = item.children || [];
} }
}); });
}); });
}, },
//
getRoleUserList() {
getRoleUserList({ size: 999999, current: 1 }).then(res => {
this.memberList = res.data.data.records;
});
},
// getDictionary // getDictionary
getDictionary() { getDictionary() {
getDictionary({ code: 'flow_project_type' }).then(res => { getDictionary({ code: 'flow_project_type' }).then(res => {
@ -757,8 +726,8 @@ export default {
const submitData = this.formatSubmitData(this.addForm); const submitData = this.formatSubmitData(this.addForm);
submitData.projectStartTime = submitData.projectStartTime + ' 00:00:00'; submitData.projectStartTime = submitData.projectStartTime + ' 00:00:00';
submitData.projectDesiredEnd = submitData.projectDesiredEnd + ' 00:00:00'; submitData.projectDesiredEnd = submitData.projectDesiredEnd + ' 00:00:00';
if (this.title === '详情') { if (this.title === '修改') {
updateProcess({ ...submitDat, approvalStatus: 1 }) updateProcess({ ...submitData, approvalStatus: this.isStatusEdit ? this.rowItem.approvalStatus : 1, })
.then(res => { .then(res => {
this.$message.success('修改成功'); this.$message.success('修改成功');
this.handleClose(true); this.handleClose(true);
@ -769,7 +738,32 @@ export default {
}); });
return; return;
} else { } else {
addProcess({ ...submitData, approvalStatus: 1 }) if (this.isStatusEdit) {
this.$confirm('确定要保存修改过的数据吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
addProcess({
...submitData,
approvalStatus: this.isStatusEdit ? this.rowItem.approvalStatus : 1,
})
.then(res => {
this.$message.success('提交成功');
this.handleClose(true);
this.loadingShow = false;
})
.catch(err => {
this.loadingShow = false;
});
})
.catch(() => {});
} else {
addProcess({
...submitData,
approvalStatus: this.isStatusEdit ? this.rowItem.approvalStatus : 1,
})
.then(res => { .then(res => {
this.$message.success('提交成功'); this.$message.success('提交成功');
this.handleClose(true); this.handleClose(true);
@ -779,6 +773,7 @@ export default {
this.loadingShow = false; this.loadingShow = false;
}); });
} }
}
}); });
}, },
}, },
@ -819,4 +814,10 @@ export default {
padding: 0 !important; padding: 0 !important;
line-height: 50px !important; line-height: 50px !important;
} }
/* 高亮行样式 */
:deep(.highlight-row) {
background-color: rgba(40, 167, 69, 0.5) !important; /* 浅绿色背景,可根据需求修改 */
// color: #67c23a;
}
</style> </style>

@ -20,7 +20,7 @@
</template> </template>
<template #menu="{ row }"> <template #menu="{ row }">
<el-button type="text" @click="handleView(row)">详情</el-button> <el-button type="text" @click="handleView(row)">详情</el-button>
<el-button type="text" v-if="row.approvalStatus == 1" @click="handleEdit(row)" <el-button type="text" v-if="row.approvalStatus != 8" @click="handleEdit(row)"
>修改</el-button >修改</el-button
> >
<el-button type="text" v-if="row.approvalStatus == 1" @click="checkRow(row)" <el-button type="text" v-if="row.approvalStatus == 1" @click="checkRow(row)"

@ -225,7 +225,7 @@ export default {
{ {
label: '主制部门', label: '主制部门',
prop: 'prtmdept', prop: 'prtmdept',
search: true, search: false,
sortable: true, sortable: true,
width: 120, width: 120,
span: 12, span: 12,

Loading…
Cancel
Save