[update] 未符合项跟踪流程查看详情
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<internal-detail-page :content-padding="0" :title="pageTitle" :loading="loading">
|
||||
<!-- 标题右侧tab -->
|
||||
<template v-slot:titleRightCustom>
|
||||
<template v-slot:titleRightCustom v-if="!isLook">
|
||||
<div class="table-operator-tab">
|
||||
<!--基础信息-->
|
||||
<a class="switch-item" :class="switchValue === 'base' ? 'table-operator-tab-active' : ''"
|
||||
@@ -25,7 +25,7 @@
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('processName')"
|
||||
:maxLength="50"
|
||||
:disabled="disabledProcessInfo"
|
||||
:disabled="disabledProcessInfo || isLook"
|
||||
v-decorator="['processName', validatorRules.processName]" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -38,7 +38,7 @@
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
v-decorator="['processDueDate']"
|
||||
:disabled="disabledProcessInfo"
|
||||
:disabled="disabledProcessInfo || isLook"
|
||||
style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -48,7 +48,7 @@
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('processExplain')"
|
||||
:maxLength="500"
|
||||
type="textarea"
|
||||
:disabled="disabledProcessInfo"
|
||||
:disabled="disabledProcessInfo || isLook"
|
||||
:rows="4"
|
||||
v-decorator="['processDescription']" />
|
||||
</a-form-item>
|
||||
@@ -62,7 +62,7 @@
|
||||
<div class="form-flex-item custom-flex-form-item">
|
||||
<a-form-item :label="$t('projectLibrary.vehicleItemLibrary.standardNumberStandardName')">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('projectLibrary.vehicleItemLibrary.standardNumberStandardName')"
|
||||
:maxLength="50"
|
||||
:maxLength="50" :disabled="isLook"
|
||||
v-decorator="['standardNumberOrName', validatorRules.standardNumberOrName]" />
|
||||
</a-form-item>
|
||||
</div>
|
||||
@@ -73,6 +73,7 @@
|
||||
v-decorator="['projectId']"
|
||||
show-search
|
||||
allowClear
|
||||
:disabled="isLook"
|
||||
:filter-option="filterOption">
|
||||
<a-select-option v-for="item in projectSelectOptions" :key="item.id">{{ item.projectName }}</a-select-option>
|
||||
</a-select>
|
||||
@@ -82,6 +83,7 @@
|
||||
<div class="form-flex-item custom-flex-form-item">
|
||||
<a-form-item :label="$t('workCenter.standardConsultationProcess.designEngineer')">
|
||||
<user-selection v-decorator="['engineerId', validatorRules.engineerId]"
|
||||
:disabled="isLook"
|
||||
:name-str="businessInfo.engineerId_dictText"
|
||||
:placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.designEngineer')"
|
||||
@nameChange="handleDesignEngineerNameChange" />
|
||||
@@ -89,7 +91,7 @@
|
||||
</div>
|
||||
|
||||
<!--按条件查询-->
|
||||
<a-button type="primary" class="form-search-btn" @click="selectStandard">
|
||||
<a-button type="primary" class="form-search-btn" @click="selectStandard" :disabled="isLook">
|
||||
{{ $t('workCenter.noMatchTracking.queryByCondition') }}
|
||||
</a-button>
|
||||
</div>
|
||||
@@ -104,7 +106,7 @@
|
||||
:pagination="false"
|
||||
:scroll="{x: '100%'}"
|
||||
:extra-form="extraForm"
|
||||
:all-disabled="expandTableDisabled">
|
||||
:all-disabled="expandTableDisabled || isLook">
|
||||
<!--跳转标准详情-->
|
||||
<template v-slot:detail="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
@@ -124,11 +126,12 @@
|
||||
:maxLength="500"
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
:disabled="isLook"
|
||||
v-decorator="['handleText', validatorRules.handleText]" />
|
||||
</a-form-item>
|
||||
<!--附件-->
|
||||
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('businessSupport.questionAnswer.attach')">
|
||||
<j-upload v-decorator="['handleFile']" return-id multiple />
|
||||
<j-upload v-decorator="['handleFile']" return-id multiple :disabled="isLook" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</div>
|
||||
@@ -143,7 +146,7 @@
|
||||
</div>
|
||||
|
||||
<!--底部按钮-->
|
||||
<div class="detail-page-bottom-operate-box">
|
||||
<div v-if="!isLook" class="detail-page-bottom-operate-box">
|
||||
<!--转办 审批节点存在-->
|
||||
<a-button type="primary" :loading="loading" ghost icon="arrow-up" v-if="btnList.includes('return')" @click="handleTurnTo">
|
||||
{{ $t('turnTo') }}
|
||||
@@ -178,7 +181,12 @@ import PersonnelInfo from '../../../components/PersonnelInfo'
|
||||
import InternalDetailPage from '../../../components/InternalDetailPage'
|
||||
import ProcessDetailList from '../../../components/ProcessDetailList'
|
||||
import { WorkCenterMixin } from '../../../mixins/WorkCenterMixin'
|
||||
import { ProcessKey, NoMatchTrackingNodes, StandardSource } from '../../../enums/commonEnums'
|
||||
import {
|
||||
ProcessKey,
|
||||
NoMatchTrackingNodes,
|
||||
StandardSource,
|
||||
ProcessType
|
||||
} from '../../../enums/commonEnums'
|
||||
import UserSelection from '../../../components/selection/UserSelection'
|
||||
import NoMatchItemSelectDrawer from './modules/NoMatchItemSelectDrawer'
|
||||
import { getCarTypeProjectList } from '../../../api/projectLibraryApi'
|
||||
@@ -186,7 +194,12 @@ import {
|
||||
saveNoMatchTrackingProcess,
|
||||
queryNoMatchTrackingProcess,
|
||||
initialNoMatchTrackingProcess,
|
||||
submitNoMatchTrackingProcess, processTransfer, agreeNoMatchTrackingProcess, rejectNoMatchTrackingProcess
|
||||
submitNoMatchTrackingProcess,
|
||||
processTransfer,
|
||||
agreeNoMatchTrackingProcess,
|
||||
rejectNoMatchTrackingProcess,
|
||||
saveSnapShot,
|
||||
getLookData
|
||||
} from '../../../api/workCenter'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import UserSelectModal from '../../../components/selection/UserSelectModal'
|
||||
@@ -348,7 +361,8 @@ export default {
|
||||
]
|
||||
},
|
||||
projectSelectOptions: [], // 项目下拉数据
|
||||
disabledBtnClick: false
|
||||
disabledBtnClick: false,
|
||||
isLook: false // 是否是查看
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -377,19 +391,30 @@ export default {
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.getPersonInfoStructure(ProcessKey.NO_MATCH_TRACKING.value, () => {
|
||||
this.initDict()
|
||||
if (this.$route.query.processInstanceId || this.$route.query.draftId) {
|
||||
this.currentNode = this.$route.query.nodeId || NoMatchTrackingNodes.initial.value
|
||||
this.initPersonInfoData(this.currentNode === NoMatchTrackingNodes.initial.value)
|
||||
this.initProcessInfo()
|
||||
} else {
|
||||
this.currentNode = NoMatchTrackingNodes.initial.value
|
||||
this.initPersonInfoData(this.currentNode === NoMatchTrackingNodes.initial.value)
|
||||
}
|
||||
// 如果节点不是固定节点,就默认显示审批节点的信息
|
||||
this.btnList = NoMatchTrackingNodes.propertyOfValue('btn', this.currentNode) || NoMatchTrackingNodes.regulatoryEngineer.btn
|
||||
})
|
||||
if (this.$route.query.isLook + '' === '1') {
|
||||
// 是查看
|
||||
this.isLook = true
|
||||
// 设置当前节点
|
||||
this.currentNode = this.$route.query.nodeId
|
||||
// 人员信息全部不可选
|
||||
this.initPersonInfoData(false)
|
||||
// 查询数据
|
||||
this.initProcessInfo()
|
||||
} else {
|
||||
this.getPersonInfoStructure(ProcessKey.NO_MATCH_TRACKING.value, () => {
|
||||
this.initDict()
|
||||
if (this.$route.query.processInstanceId || this.$route.query.draftId) {
|
||||
this.currentNode = this.$route.query.nodeId || NoMatchTrackingNodes.initial.value
|
||||
this.initPersonInfoData(this.currentNode === NoMatchTrackingNodes.initial.value)
|
||||
this.initProcessInfo()
|
||||
} else {
|
||||
this.currentNode = NoMatchTrackingNodes.initial.value
|
||||
this.initPersonInfoData(this.currentNode === NoMatchTrackingNodes.initial.value)
|
||||
}
|
||||
// 如果节点不是固定节点,就默认显示审批节点的信息
|
||||
this.btnList = NoMatchTrackingNodes.propertyOfValue('btn', this.currentNode) || NoMatchTrackingNodes.regulatoryEngineer.btn
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
@@ -409,15 +434,23 @@ export default {
|
||||
*/
|
||||
initProcessInfo () {
|
||||
this.loading = true
|
||||
const params = {
|
||||
taskId: this.$route.query.taskId
|
||||
}
|
||||
if (this.$route.query.draftId) {
|
||||
params.draftId = this.$route.query.draftId
|
||||
let params = {}
|
||||
let func
|
||||
if (this.isLook) {
|
||||
params.snapshotId = this.$route.query.snapshotId
|
||||
func = getLookData
|
||||
} else {
|
||||
params.processInstanceId = this.$route.query.processInstanceId
|
||||
params = {
|
||||
taskId: this.$route.query.taskId
|
||||
}
|
||||
if (this.$route.query.draftId) {
|
||||
params.draftId = this.$route.query.draftId
|
||||
} else {
|
||||
params.processInstanceId = this.$route.query.processInstanceId
|
||||
}
|
||||
func = queryNoMatchTrackingProcess
|
||||
}
|
||||
queryNoMatchTrackingProcess(params).then(res => {
|
||||
func(params).then(res => {
|
||||
if (res.success) {
|
||||
const { result = {} } = res
|
||||
// 草稿从json里取得
|
||||
@@ -497,6 +530,29 @@ export default {
|
||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
)
|
||||
},
|
||||
// 保存快照
|
||||
saveParamJsonStr () {
|
||||
// 流程信息表单
|
||||
const processInfoForm = Object.assign(this.processInfo, this.processInfoForm.getFieldsValue())
|
||||
// 流程审批信息
|
||||
const approvalInfoForm = Object.assign(this.approvalInfo, this.approvalInfoForm.getFieldsValue())
|
||||
// 人员信息的数据, 处理成对象
|
||||
const personnelObj = this.$refs.personnelInfo.getDataObj()
|
||||
const params = { ...processInfoForm, ...approvalInfoForm }
|
||||
params.infoJsonStr = JSON.stringify({
|
||||
processInfo: processInfoForm,
|
||||
approvalInfo: approvalInfoForm,
|
||||
userInfoMap: personnelObj,
|
||||
dataSource: this.dataSource
|
||||
})
|
||||
params.taskId = this.$route.query.taskId
|
||||
params.prcType = ProcessType.NO_MATCH_TRACKING.value
|
||||
saveSnapShot(params).then(res => {
|
||||
if (!res.success) {
|
||||
console.log(res.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 转办
|
||||
*/
|
||||
@@ -654,9 +710,13 @@ export default {
|
||||
} else {
|
||||
submitFunc = submitNoMatchTrackingProcess
|
||||
}
|
||||
submitFunc(formData).then(res => {
|
||||
submitFunc(formData).then(async res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
if (!(this.currentNode === NoMatchTrackingNodes.initial.value && (!this.$route.query.processInstanceId || this.$route.query.draftId))) {
|
||||
// 保存快照
|
||||
await this.saveParamJsonStr()
|
||||
}
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
@@ -684,9 +744,11 @@ export default {
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
agreeNoMatchTrackingProcess(formData).then(res => {
|
||||
agreeNoMatchTrackingProcess(formData).then(async res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
// 保存快照
|
||||
await this.saveParamJsonStr()
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
@@ -712,9 +774,11 @@ export default {
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
rejectNoMatchTrackingProcess(formData).then(res => {
|
||||
rejectNoMatchTrackingProcess(formData).then(async res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
// 保存快照
|
||||
await this.saveParamJsonStr()
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
|
||||
Reference in New Issue
Block a user