|
|
|
|
@ -8,10 +8,8 @@ |
|
|
|
|
v-model="form" |
|
|
|
|
v-model:page="page" |
|
|
|
|
ref="crud" |
|
|
|
|
@row-del="rowDel" |
|
|
|
|
@search-change="searchChange" |
|
|
|
|
@search-reset="searchReset" |
|
|
|
|
@selection-change="selectionChange" |
|
|
|
|
@current-change="currentChange" |
|
|
|
|
@size-change="sizeChange" |
|
|
|
|
@refresh-change="refreshChange" |
|
|
|
|
@ -22,13 +20,23 @@ |
|
|
|
|
</template> |
|
|
|
|
<template #menu="{ row }"> |
|
|
|
|
<el-button type="text" @click="handleView(row)">详情</el-button> |
|
|
|
|
<el-button type="text" @click="handleEdit(row)">修改</el-button> |
|
|
|
|
<el-button type="text" v-if="row.status == 1" @click="checkRow(row)">审核</el-button> |
|
|
|
|
<el-button type="text" @click="deleteRow(row)">删除</el-button> |
|
|
|
|
<el-button type="text" v-if="row.approvalStatus == 1" @click="handleEdit(row)" |
|
|
|
|
>修改</el-button |
|
|
|
|
> |
|
|
|
|
<el-button type="text" v-if="row.approvalStatus == 1" @click="checkRow(row)" |
|
|
|
|
>审核</el-button |
|
|
|
|
> |
|
|
|
|
<el-button type="text" v-if="row.approvalStatus == 1" @click="deleteRow(row)" |
|
|
|
|
>删除</el-button |
|
|
|
|
> |
|
|
|
|
</template> |
|
|
|
|
<!-- 项目开始时间 --> |
|
|
|
|
<template #projectStartTime="scope"> |
|
|
|
|
{{ scope.row.projectStartTime ? scope.row.projectStartTime.substring(0, 10) : '' }} |
|
|
|
|
</template> |
|
|
|
|
<template #projectDesiredEnd="scope"> |
|
|
|
|
{{ scope.row.projectDesiredEnd ? scope.row.projectDesiredEnd.substring(0, 10) : '' }} |
|
|
|
|
</template> |
|
|
|
|
<template #userName="{ row }">{{ row.projectHead.userName }}</template> |
|
|
|
|
<template #touchingMan="{ row }">{{ row.touchingMan.userName }}</template> |
|
|
|
|
<template #tsName="{ row }">{{ row.touchingDept.tsName }}</template> |
|
|
|
|
<!-- 列表嵌套表格 --> |
|
|
|
|
<template #expand="{ row }"> |
|
|
|
|
<el-table :data="row.stoneList"> |
|
|
|
|
@ -85,29 +93,20 @@ |
|
|
|
|
</avue-crud> |
|
|
|
|
<!-- 新增弹窗 --> |
|
|
|
|
<add-dialog |
|
|
|
|
v-if="addDialogVisible" |
|
|
|
|
:title="title" |
|
|
|
|
:visible="addDialogVisible" |
|
|
|
|
:add-form="addForm" |
|
|
|
|
@close="addDialogVisible = false" |
|
|
|
|
@submit-form="submitForm" |
|
|
|
|
:rowItem="rowItem" |
|
|
|
|
@close="closeDialog" |
|
|
|
|
></add-dialog> |
|
|
|
|
<!-- 审核弹窗 --> |
|
|
|
|
<el-dialog v-model="checkDialog" title="审核" append-to-body width="30%"> |
|
|
|
|
<el-form ref="checkForm" :model="checkForm" :rules="checkRules" label-width="80px"> |
|
|
|
|
<el-form-item label="审核结果" prop="checkResult"> |
|
|
|
|
<el-radio-group v-model="checkForm.checkResult"> |
|
|
|
|
<el-radio label="1">通过</el-radio> |
|
|
|
|
<el-radio label="2">不通过</el-radio> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<template #footer> |
|
|
|
|
<span class="dialog-footer"> |
|
|
|
|
<el-button @click="checkDialog = false">取 消</el-button> |
|
|
|
|
<el-button type="primary" @click="submitCheck">确 定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</template> |
|
|
|
|
</el-dialog> |
|
|
|
|
<review |
|
|
|
|
v-if="checkDialog" |
|
|
|
|
:showDialog="checkDialog" |
|
|
|
|
@closeDialog="closeDialog" |
|
|
|
|
:rowItem="rowItem" |
|
|
|
|
></review> |
|
|
|
|
|
|
|
|
|
<!-- 执行/核查/核准弹窗 --> |
|
|
|
|
<el-dialog append-to-body :title="subTitle" v-model="executeDialog"> |
|
|
|
|
<el-form :model="executeForm" :rules="executeRules" ref="executeForm" label-width="100"> |
|
|
|
|
@ -259,9 +258,9 @@ import { |
|
|
|
|
delProcess, |
|
|
|
|
} from '../../api/flowManagement/index'; |
|
|
|
|
import AddDialog from './addDialog.vue'; |
|
|
|
|
|
|
|
|
|
import review from './review.vue'; |
|
|
|
|
export default { |
|
|
|
|
components: { AddDialog }, |
|
|
|
|
components: { AddDialog, review }, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
// 状态 |
|
|
|
|
@ -271,7 +270,6 @@ export default { |
|
|
|
|
addDialogVisible: false, // 新增弹窗显隐控制 |
|
|
|
|
title: '新增', |
|
|
|
|
loading: false, |
|
|
|
|
title: '新增', |
|
|
|
|
checkDialog: false, |
|
|
|
|
subTitle: '执行', |
|
|
|
|
detailForm: {}, |
|
|
|
|
@ -292,7 +290,7 @@ export default { |
|
|
|
|
form: {}, |
|
|
|
|
existingFiles: [], // 已有附件列表 |
|
|
|
|
addForm: {}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
page: { |
|
|
|
|
pageSize: 10, |
|
|
|
|
currentPage: 1, |
|
|
|
|
@ -322,7 +320,7 @@ export default { |
|
|
|
|
addBtn: false, |
|
|
|
|
labelWidth: 120, |
|
|
|
|
menu: true, |
|
|
|
|
menuWidth: 200, |
|
|
|
|
menuWidth: 190, |
|
|
|
|
dialogWidth: 600, |
|
|
|
|
dialogClickModal: false, |
|
|
|
|
searchEnter: true, |
|
|
|
|
@ -346,74 +344,66 @@ export default { |
|
|
|
|
{ |
|
|
|
|
label: '单据号', |
|
|
|
|
prop: 'paCode', |
|
|
|
|
span: 24, |
|
|
|
|
labelWidth: 140, |
|
|
|
|
overflow: true, |
|
|
|
|
search: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '项目名称', |
|
|
|
|
prop: 'projectName', |
|
|
|
|
span: 24, |
|
|
|
|
labelWidth: 140, |
|
|
|
|
overflow: true, |
|
|
|
|
search: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '项目负责人', |
|
|
|
|
prop: 'projectHead', |
|
|
|
|
span: 24, |
|
|
|
|
labelWidth: 140, |
|
|
|
|
overflow: true, |
|
|
|
|
search: true, |
|
|
|
|
searchLabelWidth: 100, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '项目开始时间', |
|
|
|
|
prop: 'projectStartTime', |
|
|
|
|
span: 24, |
|
|
|
|
labelWidth: 140, |
|
|
|
|
overflow: true, |
|
|
|
|
search: false, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '项目预期结束时间', |
|
|
|
|
prop: 'projectDesiredEnd', |
|
|
|
|
span: 24, |
|
|
|
|
labelWidth: 140, |
|
|
|
|
overflow: true, |
|
|
|
|
search: false, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '制单人', |
|
|
|
|
prop: 'touchingMan', |
|
|
|
|
span: 24, |
|
|
|
|
labelWidth: 140, |
|
|
|
|
overflow: true, |
|
|
|
|
search: false, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '制单部门', |
|
|
|
|
prop: 'touchingDept', |
|
|
|
|
span: 24, |
|
|
|
|
labelWidth: 140, |
|
|
|
|
|
|
|
|
|
overflow: true, |
|
|
|
|
search: false, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '制单时间', |
|
|
|
|
prop: 'touchingTime', |
|
|
|
|
span: 24, |
|
|
|
|
labelWidth: 140, |
|
|
|
|
|
|
|
|
|
overflow: true, |
|
|
|
|
search: false, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '状态', |
|
|
|
|
prop: 'approvalStatus', |
|
|
|
|
span: 24, |
|
|
|
|
labelWidth: 140, |
|
|
|
|
|
|
|
|
|
overflow: true, |
|
|
|
|
search: false, |
|
|
|
|
type: 'select', |
|
|
|
|
dicUrl: '/blade-system/dict/dictionary?code=flow_status', |
|
|
|
|
props: { |
|
|
|
|
label: 'dictValue', |
|
|
|
|
value: 'dictKey', |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
@ -422,79 +412,27 @@ export default { |
|
|
|
|
}, |
|
|
|
|
mounted() {}, |
|
|
|
|
methods: { |
|
|
|
|
insertEvent() { |
|
|
|
|
// 插入一行 |
|
|
|
|
this.addForm.stoneList.push({}); |
|
|
|
|
}, |
|
|
|
|
openDialog() { |
|
|
|
|
// 添加新的里程碑行 |
|
|
|
|
const newRow = { |
|
|
|
|
status: 3, |
|
|
|
|
statusTitle: '待执行', |
|
|
|
|
checkMan: null, |
|
|
|
|
checkResult: 0, |
|
|
|
|
checkResultTitle: '未核查', |
|
|
|
|
checkTime: null, |
|
|
|
|
delayDate: false, |
|
|
|
|
delayTime: null, |
|
|
|
|
evaluate: null, |
|
|
|
|
evolve: '', |
|
|
|
|
executeResult: 0, |
|
|
|
|
executeResultTitle: '无', |
|
|
|
|
grade: 0, |
|
|
|
|
gradeMan: null, |
|
|
|
|
gradeTitle: '未评价', |
|
|
|
|
keyValue: Date.now(), |
|
|
|
|
lastPlan: '', |
|
|
|
|
milestoneMan: { |
|
|
|
|
accountId: null, |
|
|
|
|
userId: null, |
|
|
|
|
userName: '', |
|
|
|
|
}, |
|
|
|
|
milestoneMemo: '', |
|
|
|
|
milestoneNode: '', |
|
|
|
|
milestonePlan: '', |
|
|
|
|
okTime: null, |
|
|
|
|
outputMaterial: '', |
|
|
|
|
paIndex: (this.addForm.stoneList?.length || 0) + 1, |
|
|
|
|
pmId: this.addForm.paId, |
|
|
|
|
score: null, |
|
|
|
|
updateMan: null, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
if (!this.addForm.stoneList) { |
|
|
|
|
this.addForm.stoneList = []; |
|
|
|
|
closeDialog(type) { |
|
|
|
|
this.checkDialog = false; |
|
|
|
|
this.addDialogVisible = false |
|
|
|
|
if (type) { |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
} |
|
|
|
|
this.addForm.stoneList.push(newRow); |
|
|
|
|
this.$message.success('插入成功'); |
|
|
|
|
}, |
|
|
|
|
handleAdd() { |
|
|
|
|
this.title = '新增'; |
|
|
|
|
this.addForm = { |
|
|
|
|
bsBasicClass: { |
|
|
|
|
bcId: '', |
|
|
|
|
}, |
|
|
|
|
touchingDept: { |
|
|
|
|
tsId: '', |
|
|
|
|
}, |
|
|
|
|
projectHead: { |
|
|
|
|
userId: '', |
|
|
|
|
}, |
|
|
|
|
projectSupportMan: { |
|
|
|
|
userId: '', |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
this.rowItem = {} |
|
|
|
|
this.addDialogVisible = true; |
|
|
|
|
}, |
|
|
|
|
// 查看详情 |
|
|
|
|
handleView(row) { |
|
|
|
|
this.title = '详情'; |
|
|
|
|
this.addForm = row; |
|
|
|
|
this.rowItem = row; |
|
|
|
|
this.addDialogVisible = true; |
|
|
|
|
}, |
|
|
|
|
// 修改 |
|
|
|
|
handleEdit(row) { |
|
|
|
|
this.addForm = row; |
|
|
|
|
this.rowItem = row; |
|
|
|
|
this.title = '修改'; |
|
|
|
|
this.addDialogVisible = true; |
|
|
|
|
}, |
|
|
|
|
@ -511,12 +449,6 @@ export default { |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 新增/编辑确定 |
|
|
|
|
submitForm() { |
|
|
|
|
this.loading = true; |
|
|
|
|
this.addDialogVisible = false; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 审核立项 |
|
|
|
|
checkRow(row) { |
|
|
|
|
@ -533,7 +465,7 @@ export default { |
|
|
|
|
}; |
|
|
|
|
updateProcess(query).then(res => { |
|
|
|
|
this.checkDialog = false; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
@ -601,21 +533,9 @@ export default { |
|
|
|
|
}) |
|
|
|
|
.catch(() => {}); |
|
|
|
|
}, |
|
|
|
|
delTable(index) { |
|
|
|
|
this.$confirm('确定删除该条数据么?', '提示', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
this.addForm.stoneList.splice(index, 1); |
|
|
|
|
this.$message.success('删除成功'); |
|
|
|
|
}) |
|
|
|
|
.catch(() => {}); |
|
|
|
|
}, |
|
|
|
|
searchReset() { |
|
|
|
|
this.query = {}; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
}, |
|
|
|
|
searchChange(params, done) { |
|
|
|
|
this.query = params; |
|
|
|
|
@ -625,9 +545,11 @@ export default { |
|
|
|
|
}, |
|
|
|
|
currentChange(currentPage) { |
|
|
|
|
this.page.currentPage = currentPage; |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
}, |
|
|
|
|
sizeChange(pageSize) { |
|
|
|
|
this.page.pageSize = pageSize; |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
}, |
|
|
|
|
refreshChange() { |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
|