update 征求意见流程

add 外部其他流程vue文件
This commit is contained in:
赵霄
2023-11-20 09:03:15 +08:00
parent 0109b04736
commit 00390ab502
10 changed files with 882 additions and 14 deletions
+14 -1
View File
@@ -182,6 +182,10 @@ export const ProcessKey = {
FB_ENTRY_CHANGE: { text: 'fb-entry-change', value: 'fb-entry-change' },
// 征求意见流程
CONSULTATION: { text: 'fb-standard-consultation', value: 'fb-standard-consultation' },
// 项目合规评估流程
PROJECT_COMPLIANCE_EVALUATION: { text: '', value: '' },
// 未符合项跟踪流程
NO_MATCH_TRACKING: { text: '', value: '' },
// 法规合规评估流程
REGULATORY_COMPLIANCE_ASSESSMENT: { text: 'fb-standard-compliance-assessment', value: 'fb-standard-compliance-assessment' },
// 法规采购流程
@@ -257,4 +261,13 @@ export const SolicitOpinions = {
accept: { text: '采纳', value: '1' },
partialAdoption: { text: '部分采纳', value: '2' },
reject: { text: '不采纳', value: '3' }
}
}
// 法规采购流程节点
export const ProcurementProcessNodes = new EsEnums({
initiate: { text: '发起人申请', value: 'Activity_0fmr3id', btn: ['save', 'submit'] },
sponsorLeaderApproval: { text: '发起人主管级领导审批', value: 'Activity_1fr1x5i', btn: ['return', 'save', 'agree', 'reject'] },
standardLeaderApproval: { text: '标准化主管级领导审批', value: 'Activity_06jy4oo', btn: ['return', 'save', 'agree', 'reject'] },
standardSuperiorLeaderApproval: { text: '标准化主管级上一级领导审批', value: 'Activity_1u5337a', btn: ['return', 'save', 'agree', 'reject'] },
regulatoryEngineerConfirmation: { text: '法规工程师确认', value: 'Activity_1q01zfq', btn: ['return', 'save', 'agree', 'reject'] }
})
+6 -2
View File
@@ -5,7 +5,8 @@ import { USER_INFO } from '../store/mutation-types'
export const WorkCenterMixin = {
data () {
return {
personnelInfoData: [] // 需要传给PersonnelInfo的数据
personnelInfoData: [], // 需要传给PersonnelInfo的数据
switchValue: 'base',
}
},
methods: {
@@ -64,6 +65,9 @@ export const WorkCenterMixin = {
setTimeout(() => {
this.$router.go(-1)
}, 700)
}
},
switchChange (value) {
this.switchValue = value
},
}
}
+4 -4
View File
@@ -29,19 +29,19 @@ export default {
},
{ // 项目合规评估流程
title: this.$t('workCenter.newProcess.projectComplianceAssessmentProcess'),
path: ''
path: '/workCenter/ProjectComplianceEvaluationProcess'
},
{ // 未符合项跟踪流程
title: this.$t('workCenter.newProcess.noMatchTrackingProcess'),
path: ''
path: '/workCenter/NoMatchTrackingProcess'
},
{ // 法规合规评估流程
title: this.$t('workCenter.newProcess.regulatoryComplianceAssessmentProcess'),
path: ''
path: '/workCenter/StandardComplianceProcess'
},
{ // 法规采购流程
title: this.$t('workCenter.newProcess.regulatoryProcurementProcess'),
path: ''
path: '/workCenter/StandardProcurementProcess'
}
]
},
@@ -0,0 +1,172 @@
<template>
<internal-detail-page :content-padding="0" :title="pageTitle" :loading="loading">
<!-- 标题右侧tab -->
<template v-slot:titleRightCustom>
<div class="table-operator-tab">
<!--基础信息-->
<a class="switch-item" :class="switchValue === 'base' ? 'table-operator-tab-active' : ''"
@click="switchChange('base')">{{ $t('workCenter.basicInformation') }}
</a>
<!--人员信息-->
<a class="switch-item" :class="switchValue === 'user' ? 'table-operator-tab-active' : ''"
@click="switchChange('user')">{{ $t('workCenter.personalInformation') }}
</a>
</div>
</template>
<!--基本信息-->
<div class="detail-page-scroll-content" v-show="switchValue === 'base'">
<!--流程信息-->
<div class="process-part-title">{{ $t('processInformation') }}</div>
<a-form :form="processInfoForm">
<a-row>
<a-col :span="12">
<!--流程名称-->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')">
<a-input :placeholder="$t('pleaseEnter') + $t('processName')"
@change="event => event.target.value = event.target.value.trim()"
:maxLength="50"
disabled
v-decorator="['processName']" />
</a-form-item>
</a-col>
<a-col :span="12">
<!--截止日期-->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('expirationDate')">
<a-date-picker class="box-input"
:placeholder="$t('pleaseSelect') + $t('expirationDate')"
:getCalendarContainer="(trigger) => trigger.parentNode"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
v-decorator="['processDueDate']"
:disabled="disabled"
style="width: 100%" />
</a-form-item>
</a-col>
</a-row>
<!--流程说明-->
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('processExplain')">
<a-input :placeholder="$t('pleaseEnter') + $t('processExplain')"
@change="event => event.target.value = event.target.value.trim()"
:maxLength="500"
type="textarea"
:disabled="disabled"
v-decorator="['processDescription']" />
</a-form-item>
</a-form>
<!--流程审批信息-->
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
<a-form :form="approvalInfoForm">
<!--备注-->
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('remarks')">
<a-input :placeholder="$t('pleaseEnter') + $t('remarks')"
@change="event => event.target.value = event.target.value.trim()"
:maxLength="500"
type="textarea"
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 />
</a-form-item>
</a-form>
</div>
<!--人员信息-->
<div class="detail-page-scroll-content p-0" v-show="switchValue === 'user'">
<process-detail-list>
<template #personnelInfo>
<personnel-info ref="personnelInfo" :data="personnelInfoData" />
</template>
</process-detail-list>
</div>
<!--底部按钮-->
<div 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') }}
</a-button>
<!--保存 发起节点审批节点都存在-->
<a-button type="primary" :loading="loading" ghost v-if="btnList.includes('save')" @click="handleSave">
<i class="iconfont icon-save" />{{ $t('preservation') }}
</a-button>
<!--提交 发起节点存在-->
<a-button type="primary" :loading="loading" @click="handleSubmit" v-if="btnList.includes('submit')" icon="upload">
{{ $t('submit') }}
</a-button>
<!--同意 审批节点存在-->
<a-button type="primary" :loading="loading" icon="check-circle" v-if="btnList.includes('agree')" @click="handleAgree">
{{ $t('agree') }}
</a-button>
<!--驳回 审批节点存在-->
<a-button type="primary" :loading="loading" icon="close-circle" v-if="btnList.includes('reject')" @click="handleReject">
{{ $t('reject') }}
</a-button>
</div>
</internal-detail-page>
</template>
<script>
import PersonnelInfo from '../../../components/PersonnelInfo'
import InternalDetailPage from '../../../components/InternalDetailPage'
import ProcessDetailList from '../../../components/ProcessDetailList'
import { WorkCenterMixin } from '../../../mixins/WorkCenterMixin'
import { ProcessKey } from '../../../enums/commonEnums'
export default {
name: 'NoMatchTrackingProcess',
components: { ProcessDetailList, InternalDetailPage, PersonnelInfo },
mixins: [WorkCenterMixin],
computed: {
pageTitle () {
return `${this.$t('flowCenter')}${this.$route.meta.title}`
}
},
data () {
return {
loading: false,
btnList: [],
disabled: false,
// 流程信息表单
processInfoForm: this.$form.createForm(this),
processInfo: {},
// 审批信息的表单
approvalInfoForm: this.$form.createForm(this),
approvalInfo: {},
labelCol: {
xs: { span: 24 },
sm: { span: 4 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 20 }
},
longLabelCol: {
xs: { span: 24 },
sm: { span: 2 }
},
longWrapperCol: {
xs: { span: 24 },
sm: { span: 22 }
},
validatorRules: {
// 备注
handleText: {
rules: [{ required: false, message: this.$t('pleaseEnter') + this.$t('remarks') }],
validateTrigger: 'blur'
}
}
}
},
created () {
this.getPersonInfoStructure(ProcessKey.NO_MATCH_TRACKING.value)
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
</style>
@@ -0,0 +1,172 @@
<template>
<internal-detail-page :content-padding="0" :title="pageTitle" :loading="loading">
<!-- 标题右侧tab -->
<template v-slot:titleRightCustom>
<div class="table-operator-tab">
<!--基础信息-->
<a class="switch-item" :class="switchValue === 'base' ? 'table-operator-tab-active' : ''"
@click="switchChange('base')">{{ $t('workCenter.basicInformation') }}
</a>
<!--人员信息-->
<a class="switch-item" :class="switchValue === 'user' ? 'table-operator-tab-active' : ''"
@click="switchChange('user')">{{ $t('workCenter.personalInformation') }}
</a>
</div>
</template>
<!--基本信息-->
<div class="detail-page-scroll-content" v-show="switchValue === 'base'">
<!--流程信息-->
<div class="process-part-title">{{ $t('processInformation') }}</div>
<a-form :form="processInfoForm">
<a-row>
<a-col :span="12">
<!--流程名称-->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')">
<a-input :placeholder="$t('pleaseEnter') + $t('processName')"
@change="event => event.target.value = event.target.value.trim()"
:maxLength="50"
disabled
v-decorator="['processName']" />
</a-form-item>
</a-col>
<a-col :span="12">
<!--截止日期-->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('expirationDate')">
<a-date-picker class="box-input"
:placeholder="$t('pleaseSelect') + $t('expirationDate')"
:getCalendarContainer="(trigger) => trigger.parentNode"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
v-decorator="['processDueDate']"
:disabled="disabled"
style="width: 100%" />
</a-form-item>
</a-col>
</a-row>
<!--流程说明-->
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('processExplain')">
<a-input :placeholder="$t('pleaseEnter') + $t('processExplain')"
@change="event => event.target.value = event.target.value.trim()"
:maxLength="500"
type="textarea"
:disabled="disabled"
v-decorator="['processDescription']" />
</a-form-item>
</a-form>
<!--流程审批信息-->
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
<a-form :form="approvalInfoForm">
<!--备注-->
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('remarks')">
<a-input :placeholder="$t('pleaseEnter') + $t('remarks')"
@change="event => event.target.value = event.target.value.trim()"
:maxLength="500"
type="textarea"
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 />
</a-form-item>
</a-form>
</div>
<!--人员信息-->
<div class="detail-page-scroll-content p-0" v-show="switchValue === 'user'">
<process-detail-list>
<template #personnelInfo>
<personnel-info ref="personnelInfo" :data="personnelInfoData" />
</template>
</process-detail-list>
</div>
<!--底部按钮-->
<div 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') }}
</a-button>
<!--保存 发起节点审批节点都存在-->
<a-button type="primary" :loading="loading" ghost v-if="btnList.includes('save')" @click="handleSave">
<i class="iconfont icon-save" />{{ $t('preservation') }}
</a-button>
<!--提交 发起节点存在-->
<a-button type="primary" :loading="loading" @click="handleSubmit" v-if="btnList.includes('submit')" icon="upload">
{{ $t('submit') }}
</a-button>
<!--同意 审批节点存在-->
<a-button type="primary" :loading="loading" icon="check-circle" v-if="btnList.includes('agree')" @click="handleAgree">
{{ $t('agree') }}
</a-button>
<!--驳回 审批节点存在-->
<a-button type="primary" :loading="loading" icon="close-circle" v-if="btnList.includes('reject')" @click="handleReject">
{{ $t('reject') }}
</a-button>
</div>
</internal-detail-page>
</template>
<script>
import PersonnelInfo from '../../../components/PersonnelInfo'
import InternalDetailPage from '../../../components/InternalDetailPage'
import ProcessDetailList from '../../../components/ProcessDetailList'
import { WorkCenterMixin } from '../../../mixins/WorkCenterMixin'
import { ProcessKey } from '../../../enums/commonEnums'
export default {
name: 'ProjectComplianceEvaluationProcess',
components: { ProcessDetailList, InternalDetailPage, PersonnelInfo },
mixins: [WorkCenterMixin],
computed: {
pageTitle () {
return `${this.$t('flowCenter')}${this.$route.meta.title}`
}
},
data () {
return {
loading: false,
btnList: [],
disabled: false,
// 流程信息表单
processInfoForm: this.$form.createForm(this),
processInfo: {},
// 审批信息的表单
approvalInfoForm: this.$form.createForm(this),
approvalInfo: {},
labelCol: {
xs: { span: 24 },
sm: { span: 4 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 20 }
},
longLabelCol: {
xs: { span: 24 },
sm: { span: 2 }
},
longWrapperCol: {
xs: { span: 24 },
sm: { span: 22 }
},
validatorRules: {
// 备注
handleText: {
rules: [{ required: false, message: this.$t('pleaseEnter') + this.$t('remarks') }],
validateTrigger: 'blur'
}
}
}
},
created () {
this.getPersonInfoStructure(ProcessKey.PROJECT_COMPLIANCE_EVALUATION.value)
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
</style>
@@ -0,0 +1,172 @@
<template>
<internal-detail-page :content-padding="0" :title="pageTitle" :loading="loading">
<!-- 标题右侧tab -->
<template v-slot:titleRightCustom>
<div class="table-operator-tab">
<!--基础信息-->
<a class="switch-item" :class="switchValue === 'base' ? 'table-operator-tab-active' : ''"
@click="switchChange('base')">{{ $t('workCenter.basicInformation') }}
</a>
<!--人员信息-->
<a class="switch-item" :class="switchValue === 'user' ? 'table-operator-tab-active' : ''"
@click="switchChange('user')">{{ $t('workCenter.personalInformation') }}
</a>
</div>
</template>
<!--基本信息-->
<div class="detail-page-scroll-content" v-show="switchValue === 'base'">
<!--流程信息-->
<div class="process-part-title">{{ $t('processInformation') }}</div>
<a-form :form="processInfoForm">
<a-row>
<a-col :span="12">
<!--流程名称-->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')">
<a-input :placeholder="$t('pleaseEnter') + $t('processName')"
@change="event => event.target.value = event.target.value.trim()"
:maxLength="50"
disabled
v-decorator="['processName']" />
</a-form-item>
</a-col>
<a-col :span="12">
<!--截止日期-->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('expirationDate')">
<a-date-picker class="box-input"
:placeholder="$t('pleaseSelect') + $t('expirationDate')"
:getCalendarContainer="(trigger) => trigger.parentNode"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
v-decorator="['processDueDate']"
:disabled="disabled"
style="width: 100%" />
</a-form-item>
</a-col>
</a-row>
<!--流程说明-->
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('processExplain')">
<a-input :placeholder="$t('pleaseEnter') + $t('processExplain')"
@change="event => event.target.value = event.target.value.trim()"
:maxLength="500"
type="textarea"
:disabled="disabled"
v-decorator="['processDescription']" />
</a-form-item>
</a-form>
<!--流程审批信息-->
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
<a-form :form="approvalInfoForm">
<!--备注-->
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('remarks')">
<a-input :placeholder="$t('pleaseEnter') + $t('remarks')"
@change="event => event.target.value = event.target.value.trim()"
:maxLength="500"
type="textarea"
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 />
</a-form-item>
</a-form>
</div>
<!--人员信息-->
<div class="detail-page-scroll-content p-0" v-show="switchValue === 'user'">
<process-detail-list>
<template #personnelInfo>
<personnel-info ref="personnelInfo" :data="personnelInfoData" />
</template>
</process-detail-list>
</div>
<!--底部按钮-->
<div 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') }}
</a-button>
<!--保存 发起节点审批节点都存在-->
<a-button type="primary" :loading="loading" ghost v-if="btnList.includes('save')" @click="handleSave">
<i class="iconfont icon-save" />{{ $t('preservation') }}
</a-button>
<!--提交 发起节点存在-->
<a-button type="primary" :loading="loading" @click="handleSubmit" v-if="btnList.includes('submit')" icon="upload">
{{ $t('submit') }}
</a-button>
<!--同意 审批节点存在-->
<a-button type="primary" :loading="loading" icon="check-circle" v-if="btnList.includes('agree')" @click="handleAgree">
{{ $t('agree') }}
</a-button>
<!--驳回 审批节点存在-->
<a-button type="primary" :loading="loading" icon="close-circle" v-if="btnList.includes('reject')" @click="handleReject">
{{ $t('reject') }}
</a-button>
</div>
</internal-detail-page>
</template>
<script>
import PersonnelInfo from '../../../components/PersonnelInfo'
import InternalDetailPage from '../../../components/InternalDetailPage'
import ProcessDetailList from '../../../components/ProcessDetailList'
import { WorkCenterMixin } from '../../../mixins/WorkCenterMixin'
import { ProcessKey } from '../../../enums/commonEnums'
export default {
name: 'StandardComplianceProcess',
components: { ProcessDetailList, InternalDetailPage, PersonnelInfo },
mixins: [WorkCenterMixin],
computed: {
pageTitle () {
return `${this.$t('flowCenter')}${this.$route.meta.title}`
}
},
data () {
return {
loading: false,
btnList: [],
disabled: false,
// 流程信息表单
processInfoForm: this.$form.createForm(this),
processInfo: {},
// 审批信息的表单
approvalInfoForm: this.$form.createForm(this),
approvalInfo: {},
labelCol: {
xs: { span: 24 },
sm: { span: 4 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 20 }
},
longLabelCol: {
xs: { span: 24 },
sm: { span: 2 }
},
longWrapperCol: {
xs: { span: 24 },
sm: { span: 22 }
},
validatorRules: {
// 备注
handleText: {
rules: [{ required: false, message: this.$t('pleaseEnter') + this.$t('remarks') }],
validateTrigger: 'blur'
}
}
}
},
created () {
this.getPersonInfoStructure(ProcessKey.NO_MATCH_TRACKING.value)
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
</style>
@@ -85,18 +85,18 @@
<!--标准文本-->
<a-form-item :label="$t('workCenter.standardConsultationProcess.standardText')"
:class="{'add-required': basicServiceInfoDisabled}">
<div class="box-title-text">
<div class="box-title-text" v-if="!basicServiceInfoDisabled">
<a-input class="box-input disabled-white-input"
v-decorator="['standardTextFileName', validatorRules.standardText]"
readonly
disabled
v-if="!basicServiceInfoDisabled"
:placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.standardText')" />
<a-button type="primary" class="button-box" @click="chooseStandardText" v-if="!basicServiceInfoDisabled">
<a-button type="primary" class="button-box" @click="chooseStandardText">
{{ this.$t('workCenter.standardConsultationProcess.selectText') }}
</a-button>
<file-echo :file-ids="basicServiceInfo.standardTextFileId" v-if="basicServiceInfoDisabled" />
</div>
<file-echo :file-ids="basicServiceInfo.standardTextFileId" v-else />
</a-form-item>
</div>
<div class="form-flex-item custom-flex-form-item">
@@ -760,6 +760,10 @@ export default {
}
},
created () {
// 获取人员信息数据
this.getPersonInfoStructure(ProcessKey.CONSULTATION.value, () => {
this.initPersonInfoData(this.currentNode.indexOf(ConsultationProcess.initiate.value) === 0)
})
// 有流程id或者草稿id点进来的
if (this.$route.query.processInstanceId || this.$route.query.draftId) {
this.currentNode = this.$route.query.nodeId
@@ -768,8 +772,7 @@ export default {
// 找不到这个节点默认使用审批节点页面及按钮,发起除外
this.nodeEnumsKey = this.currentNode ? ConsultationProcess.keyOfValue(this.currentNode) || 'regulatoryEngineerApproval' : 'initiate'
this.btnList = ConsultationProcess[this.nodeEnumsKey].btn
// 获取人员信息数据
this.getPersonInfoStructure(ProcessKey.CONSULTATION.value)
},
methods: {
initProcessDetailData () {
@@ -1058,6 +1061,7 @@ export default {
* 驳回
*/
handleReject () {
this.validatorRules.handleText.rules[0].required = true
const formData = this.dealFormData()
if (!formData) {
return
@@ -473,7 +473,9 @@ export default {
this.initDomesticStandardForm()
}
// 获取人员信息
this.getPersonInfoStructure(ProcessKey.FB_ENTRY_CHANGE.value)
this.getPersonInfoStructure(ProcessKey.FB_ENTRY_CHANGE.value, () => {
this.initPersonInfoData(this.currentNode === FGEntryChangeProcessNode.initiate.value)
})
this.getSourceOptions()
},
methods: {
@@ -0,0 +1,266 @@
<template>
<internal-detail-page :content-padding="0" :title="pageTitle" :loading="loading">
<!-- 标题右侧tab -->
<template v-slot:titleRightCustom>
<div class="table-operator-tab">
<!--基础信息-->
<a class="switch-item" :class="switchValue === 'base' ? 'table-operator-tab-active' : ''"
@click="switchChange('base')">{{ $t('workCenter.basicInformation') }}
</a>
<!--人员信息-->
<a class="switch-item" :class="switchValue === 'user' ? 'table-operator-tab-active' : ''"
@click="switchChange('user')">{{ $t('workCenter.personalInformation') }}
</a>
</div>
</template>
<!--基本信息-->
<div class="detail-page-scroll-content" v-show="switchValue === 'base'">
<!--流程信息-->
<div class="process-part-title">{{ $t('processInformation') }}</div>
<a-form :form="processInfoForm">
<a-row>
<a-col :span="12">
<!--流程名称-->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')">
<a-input :placeholder="$t('pleaseEnter') + $t('processName')"
@change="event => event.target.value = event.target.value.trim()"
:maxLength="50"
disabled
v-decorator="['processName']" />
</a-form-item>
</a-col>
<a-col :span="12">
<!--截止日期-->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('expirationDate')">
<a-date-picker class="box-input"
:placeholder="$t('pleaseSelect') + $t('expirationDate')"
:getCalendarContainer="(trigger) => trigger.parentNode"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
v-decorator="['processDueDate']"
:disabled="disabled"
style="width: 100%" />
</a-form-item>
</a-col>
</a-row>
<!--流程说明-->
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('processExplain')">
<a-input :placeholder="$t('pleaseEnter') + $t('processExplain')"
@change="event => event.target.value = event.target.value.trim()"
:maxLength="500"
type="textarea"
:disabled="disabled"
v-decorator="['processDescription']" />
</a-form-item>
</a-form>
<!--业务基本信息-->
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
<div class="table-operator">
<!-- 新增-->
<a-button icon="plus" type="primary" @click="handleAdd">{{ $t('newlyAdded') }}</a-button>
<!-- 批量删除-->
<a-button type="primary" icon="delete" ghost @click="batchDel">{{ $t('batchDelete') }}</a-button>
<div>
<j-table
:can-drag="true"
:scroll="{x: '100%'}"
ref="table"
:rowKey="(record, index) => {return index}"
:columns="columns"
:dataSource="dataSource"
:pagination="false"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:loading="loading"
:operation-list="operationList"
@operationClick="operationClick">
</j-table>
</div>
</div>
<!--流程审批信息-->
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
<a-form :form="approvalInfoForm">
<!--备注-->
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('remarks')">
<a-input :placeholder="$t('pleaseEnter') + $t('remarks')"
@change="event => event.target.value = event.target.value.trim()"
:maxLength="500"
type="textarea"
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 />
</a-form-item>
</a-form>
</div>
<!--人员信息-->
<div class="detail-page-scroll-content p-0" v-show="switchValue === 'user'">
<process-detail-list>
<template #personnelInfo>
<personnel-info ref="personnelInfo" :data="personnelInfoData" />
</template>
</process-detail-list>
</div>
<!--底部按钮-->
<div 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') }}
</a-button>
<!--保存 发起节点审批节点都存在-->
<a-button type="primary" :loading="loading" ghost v-if="btnList.includes('save')" @click="handleSave">
<i class="iconfont icon-save" />{{ $t('preservation') }}
</a-button>
<!--提交 发起节点存在-->
<a-button type="primary" :loading="loading" @click="handleSubmit" v-if="btnList.includes('submit')" icon="upload">
{{ $t('submit') }}
</a-button>
<!--同意 审批节点存在-->
<a-button type="primary" :loading="loading" icon="check-circle" v-if="btnList.includes('agree')" @click="handleAgree">
{{ $t('agree') }}
</a-button>
<!--驳回 审批节点存在-->
<a-button type="primary" :loading="loading" icon="close-circle" v-if="btnList.includes('reject')" @click="handleReject">
{{ $t('reject') }}
</a-button>
</div>
<!--表格新增编辑表单-->
<table-form-modal ref="modalForm" />
</internal-detail-page>
</template>
<script>
import InternalDetailPage from '../../../components/InternalDetailPage'
import { WorkCenterMixin } from '../../../mixins/WorkCenterMixin'
import PersonnelInfo from '../../../components/PersonnelInfo'
import ProcessDetailList from '../../../components/ProcessDetailList'
import { ProcessKey, ProcurementProcessNodes } from '../../../enums/commonEnums'
import JTable from '../../../components/jero/JTable'
import TableFormModal from './modules/TableFormModal'
export default {
name: 'StandardProcurementProcess',
components: { JTable, ProcessDetailList, PersonnelInfo, InternalDetailPage, TableFormModal },
mixins: [WorkCenterMixin],
computed: {
pageTitle () {
return `${this.$t('flowCenter')}${this.$route.meta.title}`
}
},
data () {
return {
loading: false,
btnList: [],
disabled: false,
// 流程信息表单
processInfoForm: this.$form.createForm(this),
processInfo: {},
// 审批信息的表单
approvalInfoForm: this.$form.createForm(this),
approvalInfo: {},
labelCol: {
xs: { span: 24 },
sm: { span: 4 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 20 }
},
longLabelCol: {
xs: { span: 24 },
sm: { span: 2 }
},
longWrapperCol: {
xs: { span: 24 },
sm: { span: 22 }
},
validatorRules: {
// 备注
handleText: {
rules: [{ required: false, message: this.$t('pleaseEnter') + this.$t('remarks') }],
validateTrigger: 'blur'
}
},
columns: [
{ // 标准编号
title: this.$t('standardNumber'),
width: 180,
dataIndex: 'standardNumber'
},
{ // 标准名称
title: this.$t('standardName'),
width: 180,
dataIndex: 'standardName'
},
{ // 采购理由
title: this.$t('standardName'),
width: 380,
dataIndex: 'purchaseReason'
},
// 操作
{
title: this.$t('operation'),
fixed: 'right',
width: 150,
scopedSlots: { customRender: 'action' }
}
],
operationList: [
{ // 编辑
text: this.$t('edit'),
clickEvent: 'handleEdit'
},
{ // 删除
text: this.$t('delete'),
clickEvent: 'handleDelete'
}
],
dataSource: [{ id: 1 }],
selectedRowKeys: [],
currentNode: ''
}
},
created () {
if (this.$route.query.processInstanceId || this.$route.query.draftId) {
this.currentNode = this.$route.query.nodeId
} else {
this.currentNode = ProcurementProcessNodes.initiate.value
}
this.btnList = ProcurementProcessNodes.propertyOfValue('btn', this.currentNode)
this.getPersonInfoStructure(ProcessKey.LEGAL_PROCUREMENT.value)
},
methods: {
onSelectChange (selectedRowKeys) {
this.selectedRowKeys = selectedRowKeys
},
/**
* 循环操作按钮的操作
* @param operation
* @param record
*/
operationClick (operation, record) {
this[operation.clickEvent](record)
},
handleAdd () {
this.$refs.modalForm.add()
},
batchDel () {
},
handleEdit (record) {
this.$refs.modalForm.edit(record)
}
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
</style>
@@ -0,0 +1,63 @@
<template>
<j-modal
:title="title"
:maskClosable="false"
:width="width"
:visible="visible"
:confirm-loading="confirmLoading"
switchFullscreen
@ok="handleOk"
@cancel="handleCancel">
<a-spin :spinning="confirmLoading">
</a-spin>
</j-modal>
</template>
<script>
export default {
name: 'TableFormModal',
data () {
return {
title: this.$t('operation'),
width: 600,
visible: false,
confirmLoading: false,
form: this.$form.createForm(this),
labelCol: {
xs: { span: 24 },
sm: { span: 6 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 }
},
model: {}
}
},
methods: {
add () {
this.title = this.$t('newlyAdded')
this.visible = true
},
edit (record) {
this.title = this.$t('edit')
this.visible = true
},
handleOk() {
},
handleCancel() {
this.close()
},
close() {
this.visible = false
this.form.resetFields()
this.model = {}
}
}
}
</script>
<style scoped lang="less">
</style>