[update] 企标流程联调

This commit is contained in:
lideqin
2023-11-01 15:43:17 +08:00
parent e25bbfbc5c
commit d8a44a4ae6
12 changed files with 301 additions and 136 deletions
@@ -98,7 +98,7 @@
<!-- 人员信息 -->
<div v-show="switchValue === 'user'" class="detail-page-scroll-content p-0">
<process-detail-list :url="url">
<process-detail-list>
<personnel-info slot="personnelInfo" ref="personnelInfo" :data="personnelInfoData" :currentNode="currentNode + ''"></personnel-info>
</process-detail-list>
</div>
@@ -184,35 +184,40 @@ const personData = [
id: 3,
nodeName: '工作组/所联络人填写企标',
nodeRoleName: '工作组/所联络人',
canChoose: false
canChoose: false,
fieldName: 'workGroupUserList'
},
{
id: 4,
nodeName: '收集联络人主管级领导审批',
nodeRoleName: '联络人主管级领导',
canChoose: false,
chooseType: 'checkbox'
chooseType: 'checkbox',
fieldName: 'collectUserLeader'
},
{
id: 5,
nodeName: '各部门联络人汇总',
nodeRoleName: '各部门联络人',
canChoose: false,
chooseType: 'checkbox'
chooseType: 'checkbox',
fieldName: 'contactUserList'
},
{
id: 6,
nodeName: '联络人主管级上一级领导审批',
nodeRoleName: '联络人主管级上一级领导',
canChoose: false,
chooseType: 'checkbox'
chooseType: 'checkbox',
fieldName: 'contactUserLeaderLeader'
},
{
id: 7,
nodeName: '标准化工程师归档',
nodeRoleName: '标准化工程师',
canChoose: false,
chooseType: 'radio'
chooseType: 'radio',
fieldName: 'standardEngineer'
}
]
@@ -245,6 +250,25 @@ export default {
// 没有taskId说明是新建进来的,初始化人员信息
this.personnelInfoData = personData
}
// 初始化节点
const taskName = this.$route.query.taskName
if (taskName) {
if (taskName === '标准化工程师发起') {
this.currentNode = 1
} else if (taskName === '各部所联络人 填写/下发任务') {
this.currentNode = 2
} else if (taskName === '工作组/所联络人填写企标') {
this.currentNode = 3
} else if (taskName === '收集联络人主管级领导审批') {
this.currentNode = 4
} else if (taskName === '各部所联络人汇总') {
this.currentNode = 5
} else if (taskName === '联络人主管级上一级领导审批') {
this.currentNode = 6
} else {
this.currentNode = 7
}
}
// 如果是查看进入的,不可编辑,不可操作
if (this.$route.query.onlyLook) {
this.onlyLook = this.$route.query.onlyLook
@@ -311,37 +335,52 @@ export default {
if (res.success) {
this.model = res.result
this.$nextTick(() => {
// 初始化流程信息
this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes'))
// 初始化流程信息,节点1没有制修订计划说明,其余节点都有制修订计划说明
if (this.currentNode === 1) {
this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes'))
} else {
this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes', 'processDescription'))
}
// 初始化流程审批信息,todo:需要判断是不是草稿进来的,草稿进来的才回显审批信息
// this.approvalInfoForm.setFieldsValue(pick(this.model[0], 'commitText', 'commitFile'))
})
const taskName = this.$route.query.taskName
if (taskName) {
if (taskName === '标准化工程师发起') {
this.currentNode = 1
} else if (taskName === '各部所联络人填写/下发任务') {
this.currentNode = 2
} else if (taskName === '工作组/所联络人填写企标') {
this.currentNode = 3
} else if (taskName === '收集联络人主管级领导审批') {
this.currentNode = 4
} else if (taskName === '各部所联络人汇总') {
this.currentNode = 5
} else if (taskName === '联络人主管级上一级领导审批') {
this.currentNode = 6
} else {
this.currentNode = 7
}
}
// 初始化人员信息
if (this.currentNode === 1) {
this.personnelInfoData = personData
this.personnelInfoData = personData.map(item => {
if (item.fieldName) {
return {
...item,
user: this.model.flowUser[item.fieldName],
user_dictText: this.model.flowUser[item.fieldName + '_dictText']
}
} else {
return item
}
})
} else {
this.personnelInfoData = personData.map(item => {
return { ...item, canChoose: false, fieldName: undefined }
if (item.fieldName) {
return { ...item, user: this.model.flowUser[item.fieldName], userList: this.model.flowUser[item.fieldName + '_dictText'], canChoose: false }
} else {
return item
}
})
}
this.$refs.baseInfoFormRef.initData(this.model.dataList)
// 初始化业务基本信息
if (this.currentNode === 1) {
// 节点1需要回显数据
this.$refs.baseInfoFormRef.initData(this.model)
} else if (this.currentNode === 2) {
// 节点2草稿情况下需要回显数据 todo
} else if (this.currentNode === 3) {
// 节点3草稿回显所有 todo ,待办进来回显表格数据
this.$refs.baseInfoFormRef.initTableData()
} else if ([4, 5, 6, 7].includes(this.currentNode)) {
// 节点4,5,6,7回显数据
this.$refs.baseInfoFormRef.initData(this.model)
}
} else {
this.$message.warning(res.message)
}
})
},
@@ -418,6 +457,7 @@ export default {
activelyReportSave(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
}
@@ -432,7 +472,7 @@ export default {
const personnelInfo = this.$refs.personnelInfo.stepsData
const personnelObj = {}
for (const item of personnelInfo) {
if (item.fieldName) {
if (item.fieldName && item.canChoose) {
personnelObj[item.fieldName] = item.user
}
}
@@ -457,6 +497,7 @@ export default {
activelyReportApproval(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
}
@@ -485,6 +526,7 @@ export default {
activelyReportTurnTo(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
}
@@ -517,6 +559,7 @@ export default {
activelyReportAgree(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
}
@@ -538,6 +581,7 @@ export default {
activelyReportAgree(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
}
@@ -558,6 +602,7 @@ export default {
activelyReportReject(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
}
@@ -566,6 +611,9 @@ export default {
})
}
})
},
goBack () {
this.$router.go(-1)
}
}
}
@@ -133,11 +133,21 @@ export default {
initData (data) {
this.data = data
// 给表单赋值
// this.formInline =
// 给表格赋值
// this.$nextTick(() => {
// this.$refs.tableRef.dataSource =
// })
if (data.dataList[0].distributeFlag + '' === '0') {
// 不下发联络人
this.formInline = { distributeFlag: data.dataList[0].distributeFlag }
// 给表格赋值
this.$nextTick(() => {
this.$refs.tableRef.initData(data)
})
} else {
// 下发联络人,没有表格
this.formInline = {
distributeFlag: data.dataList[0].distributeFlag,
workGroupUserList: data.flowUser.workGroupUserList,
contactUserLeaderLeader: data.flowUser.contactUserLeaderLeader
}
}
},
// 外层要获取数据
getData () {
@@ -11,13 +11,13 @@
{{ $t('workCenter.revisionPlanActivelyReport.contactsSupervisorLevelLeaders') }}
</span>
</div>
<a-form-model-item class="item-model" prop="contactsSupervisorLevelLeaders">
<a-form-model-item class="item-model" prop="collectUserLeader">
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.revisionPlanActivelyReport.contactsSupervisorLevelLeaders')"
v-model="formInline.contactsSupervisorLevelLeaders"
v-model="formInline.collectUserLeader"
:disabled="disabled"
filedName="contactsSupervisorLevelLeaders"
filedName="collectUserLeader"
@nameChange="userSelectNameChange"
:nameStr="formInline.contactsSupervisorLevelLeaders_dictText"
:nameStr="formInline.collectUserLeader_dictText"
type="radio" />
</a-form-model-item>
</div>
@@ -55,7 +55,7 @@ export default {
formInline: {},
rules: {
// 收集联络人主管级领导
contactsSupervisorLevelLeaders: [
collectUserLeader: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.contactsSupervisorLevelLeaders') + this.$t('cannotEmpty'),
@@ -76,11 +76,16 @@ export default {
initData (data) {
this.data = data
// 给表单赋值
// this.formInline =
this.formInline = { collectUserLeader: data.flowUser.collectUserLeader }
// 给表格赋值
// this.$nextTick(() => {
// this.$refs.tableRef.dataSource =
// })
this.$nextTick(() => {
this.$refs.tableRef.initData(data)
})
},
initTableData (data) {
this.$nextTick(() => {
this.$refs.tableRef.initData(data)
})
},
// 外层要获取数据
getData () {
@@ -53,7 +53,9 @@ export default {
initData (data) {
this.data = data
// 给表单赋值
// this.formInline =
this.formInline = {
processDescription: data.common.processDescription
}
},
// 外层要获取数据
getData () {
@@ -277,6 +277,13 @@ export default {
}
},
methods: {
initData (data) {
this.data = data
// 给表格赋值
this.$nextTick(() => {
this.dataSource = data.dataList
})
},
// 企标编号,企标名称跳转详情,原企标
handleGoDetailOld (record) {
this.$openPageNewSheet({