diff --git a/src/views/flowManagement/addDialog.vue b/src/views/flowManagement/addDialog.vue
index eef2b3e..7f4a602 100644
--- a/src/views/flowManagement/addDialog.vue
+++ b/src/views/flowManagement/addDialog.vue
@@ -206,7 +206,7 @@
align="center"
:width="isDetail ? '120' : ''"
label="里程碑负责人"
- prop="milestoneMan"
+ prop="milestoneMemo"
>
*里程碑负责人
@@ -215,14 +215,15 @@
- {{ scope.row.milestoneNode }}
+ {{
+ scope.row.milestoneNode ? scope.row.milestoneNode.substring(0, 10) : ''
+ }}
@@ -302,7 +305,12 @@
label="执行类型"
prop="executeType"
:width="isDetail ? '120' : ''"
- >
+ >
+
+
+ {{ scope.row.executeTypeText }}
+
+
+ >
+
+ 未核查
+ 已核查
+ 已核准
+
+
+ >
+
+ >
+
+ {{ scope.row.gradeTitle == '待评价' ? '' : scope.row.gradeMan }}
+
+
@@ -392,6 +411,7 @@ export default {
},
data() {
return {
+ loadingShow:false,
formError: '',
addRules: {
projectName: [{ required: true, message: '请填写项目名称', trigger: ['blur', 'submit'] }],
@@ -440,7 +460,7 @@ export default {
milestonePlan: [
{ required: true, message: '请填写里程碑计划', trigger: ['blur', 'submit'] },
],
- milestoneMan: [
+ milestoneMemo: [
{ required: true, message: '请选择里程碑负责人', trigger: ['change', 'submit'] },
],
outputMaterial: [
@@ -457,6 +477,7 @@ export default {
addForm: {
stoneList: [],
},
+ executeResultList: [], // 执行类型
};
},
computed: {
@@ -472,9 +493,26 @@ export default {
this.getDeplList();
if (this.title === '详情' || this.title === '修改') {
this.getDetails();
+ this.getExecuteResultList();
}
},
methods: {
+ executeTypeFn(type) {
+ const item = this.executeResultList.find(item => item.dictKey === type);
+ return item ? item.dictValue : '';
+ },
+ getExecuteTypeText(type) {
+ const item = this.executeResultList.find(item => item.dictKey === type);
+ console.log('item', item);
+ return item ? item.dictValue : '';
+ },
+
+ handleStoneListChange(index, row, type) {
+ if (type === 'milestoneMemo') {
+ let sel = this.memberList.filter(item => item.id == row.milestoneMemo)[0];
+ this.addForm.stoneList[index].milestoneMan = sel.realName;
+ }
+ },
handleChange(type) {
// 制单部门
if (type == 'touchingDeptId') {
@@ -506,11 +544,22 @@ export default {
this.projectType = res.data.data;
});
},
+ // 获取执行类型字典
+ getExecuteResultList() {
+ getDictionary({ code: 'flow_project_executeResult' }).then(res => {
+ this.executeResultList = res.data.data;
+ });
+ },
// 获取详情数据
getDetails() {
getProcessDetail(this.rowItem.id).then(res => {
console.log(res.data.data, 'res');
this.addForm = res.data.data;
+ const records = res.data.data;
+ this.addForm.stoneList = records.stoneList.map(item => {
+ item.executeTypeText = this.getExecuteTypeText(item.executeType);
+ return item;
+ });
// 安全地处理 memberName 回显
if (res.data.data.memberName) {
this.addForm.memberName = String(res.data.data.memberName)
@@ -537,13 +586,12 @@ export default {
// 插入里程碑行
handleOpenDialog() {
const newRow = {
- id: 0,
+ id: null,
fmProjectApplication: {},
attachList: [], // 附件列表默认空数组
paId: 0,
paIndex: `${(this.addForm.stoneList?.length || 0) + 1}`,
milestonePlan: '',
- milestoneMan: '',
outputMaterial: '',
milestoneNode: '',
milestoneMemo: '',
@@ -610,6 +658,7 @@ export default {
});
return;
}
+ this.loadingShow = true
const submitData = this.formatSubmitData(this.addForm);
submitData.projectStartTime = submitData.projectStartTime + ' 00:00:00';
submitData.projectDesiredEnd = submitData.projectDesiredEnd + ' 00:00:00';
@@ -617,13 +666,19 @@ export default {
updateProcess({ ...submitDat, approvalStatus: 1 }).then(res => {
this.$message.success('修改成功');
this.handleClose(true);
- });
+ this.loadingShow = false
+ }).catch(err=>{
+ this.loadingShow = false
+ })
return;
} else {
addProcess({ ...submitData, approvalStatus: 1 }).then(res => {
this.$message.success('提交成功');
this.handleClose(true);
- });
+ this.loadingShow = false
+ }).catch(err=>{
+ this.loadingShow = false
+ })
}
});
},
diff --git a/src/views/flowManagement/managementOfKeyTasks.vue b/src/views/flowManagement/managementOfKeyTasks.vue
index 1f5b39f..88e3d92 100644
--- a/src/views/flowManagement/managementOfKeyTasks.vue
+++ b/src/views/flowManagement/managementOfKeyTasks.vue
@@ -58,7 +58,11 @@
{{ scope.row.milestoneNode ? scope.row.milestoneNode.substring(0, 10) : '' }}
-
+
+
+ {{ scope.row.executeTypeText }}
+
+
-
+
+
+ {{ scope.row.gradeTitle == '待评价' ? '' : scope.row.gradeMan }}
+
+
-
执行
-
核查
-
核准
@@ -300,10 +302,15 @@ export default {
this.getExecuteResult();
},
methods: {
+ getExecuteTypeText(type) {
+ const item = this.executeResultList.find(item => item.dictKey === type);
+ console.log('item', item);
+ return item ? item.dictValue : '';
+ },
// 获取执行类型 flow_project_executeResult
getExecuteResult() {
getDictionary({ code: 'flow_project_executeResult' }).then(res => {
- this.executeResultList = res.data;
+ this.executeResultList = res.data.data;
});
},
// 核查结果 flow_project_checkResult
@@ -458,7 +465,17 @@ export default {
this.loading = true;
getProcessList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(
res => {
- this.data = res.data.data.records;
+ // this.data = res.data.data.records;
+ const records = res.data.data.records;
+ this.data = records.map(item => {
+ if (item.stoneList && Array.isArray(item.stoneList)) {
+ item.stoneList = item.stoneList.map(stone => ({
+ ...stone,
+ executeTypeText: this.getExecuteTypeText(stone.executeType),
+ }));
+ }
+ return item;
+ });
this.loading = false;
this.page.total = res.data.data.total;
}
diff --git a/src/views/flowManagement/milestoneDialog.vue b/src/views/flowManagement/milestoneDialog.vue
index 4bb5af2..d14f5f5 100644
--- a/src/views/flowManagement/milestoneDialog.vue
+++ b/src/views/flowManagement/milestoneDialog.vue
@@ -47,6 +47,7 @@
-
+
@@ -222,6 +223,7 @@ export default {
},
data() {
return {
+ loadingShow: false,
openShow: false,
memberList: [],
executeForm: {},
@@ -239,12 +241,20 @@ export default {
this.openShow = this.showDialog;
this.executeForm = this.rowItem;
console.log(this.detailForm, 'title');
+ this.detailForm.checkResult = null;
this.subTitle = this.title;
console.log(this.rowItem, 'rowItem');
this.getRoleUserList();
this.getExecuteResult();
},
methods: {
+ executeTypeChange() {
+ this.detailForm.delayTime = '';
+ },
+ handleUserChange() {
+ this.detailForm.checkMan =
+ this.memberList.find(item => item.id === this.detailForm.userId)?.realName || '';
+ },
getExecuteResult() {
getDictionary({ code: 'flow_project_executeResult' }).then(res => {
this.executeResultList = res.data.data;
@@ -263,9 +273,9 @@ export default {
submit() {
this.$refs.executeForm.validate(valid => {
if (valid) {
+ this.loadingShow = true;
// this.executeDialog = false;
if (this.title == '执行') {
- this.executeForm.delayTime = this.executeForm.delayTime + ' 00:00:00';
let query_ = {
...this.detailForm,
fmProjectApplication: {
@@ -275,11 +285,17 @@ export default {
};
query_.checkResult = 1;
query_.fmProjectApplication.approvalStatus = 4;
- console.log(query_, 'query_');
- projectExecute(query_).then(res => {
- this.$message.success('操作成功!');
- this.closeDialog();
- });
+ query_.fmProjectApplication.delayTime =
+ query_.fmProjectApplication.delayTime + ' 00:00:00';
+ projectExecute(query_)
+ .then(res => {
+ this.$message.success('操作成功!');
+ this.closeDialog();
+ this.loadingShow = false;
+ })
+ .catch(err => {
+ this.loadingShow = false;
+ });
}
if (this.title == '核查') {
let query_ = {
@@ -289,17 +305,22 @@ export default {
},
// attachList: this.existingFiles,
};
- if (query_.checkResult == 2) {
- query_.fmProjectApplication.approvalStatus = 6;
- }
- if (query_.checkResult == 3) {
- query_.fmProjectApplication.approvalStatus = 5;
- }
+ // if (query_.checkResult == 2) {
+ // query_.fmProjectApplication.approvalStatus = 6;
+ // }
+ // if (query_.checkResult == 3) {
+ // query_.fmProjectApplication.approvalStatus = 5;
+ // }
console.log(query_, '核查query_');
- projectCheck(query_).then(res => {
- this.$message.success('操作成功!');
- this.closeDialog();
- });
+ projectCheck(query_)
+ .then(res => {
+ this.$message.success('操作成功!');
+ this.closeDialog();
+ this.loadingShow = false;
+ })
+ .catch(err => {
+ this.loadingShow = false;
+ });
}
if (this.title == '核准') {
let query_ = {
@@ -314,20 +335,34 @@ export default {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
- }).then(() => {
- // return removePersonAbility(row.id);
- query_.fmProjectApplication.approvalStatus = 7;
- projectApprove(query_).then(res => {
+ })
+ .then(() => {
+ // return removePersonAbility(row.id);
+ // query_.fmProjectApplication.approvalStatus = 7;
+ projectApprove(query_)
+ .then(res => {
+ this.$message.success('操作成功!');
+ this.closeDialog();
+ this.loadingShow = false;
+ })
+ .catch(err => {
+ this.loadingShow = false;
+ });
+ })
+ .catch(() => {
+ this.loadingShow = false;
+ });
+ } else {
+ // query_.fmProjectApplication.approvalStatus = 8;
+ projectApprove(query_)
+ .then(res => {
this.$message.success('操作成功!');
this.closeDialog();
+ this.loadingShow = false;
+ })
+ .catch(err => {
+ this.loadingShow = false;
});
- });
- } else {
- query_.fmProjectApplication.approvalStatus = 8;
- projectApprove(query_).then(res => {
- this.$message.success('操作成功!');
- this.closeDialog();
- });
}
}
}