[update] 联调企标计划立项变更流程,画企标复审流程页面

This commit is contained in:
lideqin
2023-10-26 18:05:45 +08:00
parent bf7ee2cfe6
commit f5a9177f5b
12 changed files with 1108 additions and 27 deletions
-3
View File
@@ -20,8 +20,6 @@ const enterprisePlanApprovalReject = (params) => postAction('/process/es/initCha
const enterprisePlanApprovalDetermine = (params) => postAction('', params)
// 节点一的提交————发起流程
const enterprisePlanApproval = (params) => postAction('/process/es/initChange/start', params)
// 其他节点的提交
const enterprisePlanApprovalSubmit = (params) => postAction('', params)
// 保存
const enterprisePlanApprovalSave = (params) => postAction('/process/es/initChange/save', params)
// 根据三个编号和年代号获取企标编号
@@ -99,7 +97,6 @@ export {
enterprisePlanApprovalReject,
enterprisePlanApprovalDetermine,
enterprisePlanApproval,
enterprisePlanApprovalSubmit,
enterprisePlanApprovalSave,
getEnStandardNo,
getProcessDataById,
+9
View File
@@ -165,6 +165,15 @@ module.exports = {
proposingDepartment: '提出部门',
introducer: '提出人'
},
// 企标复审流程
enStandardRecheck: {
recheckDate: '复审日期',
recheck: '复审',
standGood: '继续有效',
revise: '修订',
annul: '废止',
sealSave: '封存'
},
// 流程配置
processConfig: {
processType: '流程类型',
+9
View File
@@ -165,6 +165,15 @@ module.exports = {
proposingDepartment: '提出部门',
introducer: '提出人'
},
// 企标复审流程
enStandardRecheck: {
recheckDate: '复审日期',
recheck: '复审',
standGood: '继续有效',
revise: '修订',
annul: '废止',
sealSave: '封存'
},
// 流程配置
processConfig: {
processType: '流程类型',
+8
View File
@@ -103,3 +103,11 @@ export const TypeOfClauseItem = {
TABLE: { text: '表格', value: 'TABLE' },
IMG: { text: '图片', value: 'IMG' }
}
// 企标复审-复审
export const Recheck = {
STAND_GOOD: { text: '继续有效', value: '1' },
REVISE: { text: '修订', value: '2' },
ANNUL: { text: '废止', value: '1' },
SEAL_SAVE: { text: '封存', value: '1' }
}
@@ -53,7 +53,7 @@
<!-- 业务基本信息 -->
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
<!-- 节点1主起草人发起 -->
<main-drafter-init-base-info v-if="currentNode === 1" ref="baseInfoRef"></main-drafter-init-base-info>
<main-drafter-init-base-info v-if="currentNode === 1" ref="baseInfoRef" @processNameChange="processNameChange"></main-drafter-init-base-info>
<!-- 节点2相关人员校对 -->
<!-- 节点3起草人主管级领导审批 -->
<!-- 节点4标准化审批 -->
@@ -122,7 +122,7 @@ import {
enStandardChangeAgree,
enStandardChangeReject,
enStandardChangeTurnTo,
getProcessDataById
enStandardChangeGetDataById
} from '@/api/workCenter'
import MainDrafterInitBaseInfo from './modules/MainDrafterInitBaseInfo'
import ApproveBaseInfo from './modules/ApproveBaseInfo'
@@ -257,7 +257,7 @@ export default {
methods: {
// 根据流程id获取数据并回显
getProcessData (processId) {
getProcessDataById({ processInstanceId: processId }).then(res => {
enStandardChangeGetDataById({ processInstanceId: processId }).then(res => {
if (res.success) {
this.model = res.result
this.$nextTick(() => {
@@ -347,12 +347,72 @@ export default {
default: false
}
},
watch: {
// 企标编号监视
'formInline.enStandardNo' (value) {
this.$emit('processNameChange', (value || '') + '-' + (this.formInline.enStandardName || '') + '-' + '企标更改')
},
// 企标名称监视
'formInline.enStandardName' (value) {
this.$emit('processNameChange', (this.formInline.enStandardNo || '') + '-' + (value || '') + '-' + '企标更改')
}
},
data () {
return {
StandardSource,
standardSystemOptions: [], // 标准体系下拉框数据
partNameOptions: [], // 零部件名称下拉框数据
formInline: {}
formInline: {},
rules: {
// 企标编号
enStandardNo: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 标准等级分类
enStandardClassification: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.standardGradeClassification') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 标准体系
enStandardSystem: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.standardSystem') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 发布日期
releaseDate: [
{
required: true,
message: this.$t('workCenter.enStandardChange.releaseDate') + this.$t('cannotEmpty'),
trigger: ['change', 'blur']
}
],
// 实施日期
materialDate: [
{
required: true,
message: this.$t('workCenter.enStandardChange.materialDate') + this.$t('cannotEmpty'),
trigger: ['change', 'blur']
}
],
// 零部件名称
componentName: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.partName') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
}
}
},
mounted () {
@@ -381,6 +441,25 @@ export default {
// 选完企标编号了,需要回显内容
listChange (value) {
console.log(value)
// 企标名称
this.formInline.enStandardName = value[0].standardName
// 标准等级分类
// this.formInline.enStandardClassification = value[0].
// 标准体系
// 标准英文名称
// 发布日期
// 实施日期
// 是否试行
// 试行周期
// 零部件名称
// 主起草人
// 主起草单位
// 标准适用范围
// 代替标准号
// 引用标准
// 关联文件
// 采标程度
// 采用国际标准号
},
// 选择用户得到用户名
userSelectNameChange (value, fieldName) {
@@ -1,6 +1,6 @@
<template>
<div>
<base-info-form ref="baseInfoForm" :disabled="disabled"></base-info-form>
<base-info-form ref="baseInfoForm" :disabled="disabled" @processNameChange="processNameChange"></base-info-form>
<!-- 标准文本 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
@@ -164,6 +164,10 @@ export default {
}
})
},
// 企标编号和名称修改触发流程名称的修改
processNameChange (value) {
this.$emit('processNameChange', value)
},
// 新增修改单
handleAdd () {
// 不知道左侧要预览哪个文件
@@ -257,8 +257,7 @@ import {
enterprisePlanApprovalDetermine,
enterprisePlanApprovalSave,
enterprisePlanApproval,
getProcessDataById,
enterprisePlanApprovalSubmit
getProcessDataById
} from '@/api/workCenter'
import ApprovalBaseInfo from './modules/ApprovalBaseInfo'
import FinishTimeChangeBaseInfo from './modules/FinishTimeChangeBaseInfo'
@@ -278,7 +277,8 @@ const approvalPersonalInfo = [ // 人员信息的数据
nodeName: '主起草人发起',
nodeRoleName: '发起人',
canChoose: false,
userList: Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')'
userList: Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')',
fieldName: 'createUser'
},
{
id: 2,
@@ -592,7 +592,7 @@ export default {
if (this.formInline.applicationCategory === ApplicationCategory.INITIATION.value) {
this.personnelInfoData = approvalPersonalInfo.map(item => {
if (item.fieldName) {
return { ...item, userList: this.model.flowUserInfoVO[item.fieldName + '_dictText'], canChoose: false }
return { ...item, user: this.model.flowUserInfoVO[item.fieldName], userList: this.model.flowUserInfoVO[item.fieldName + '_dictText'], canChoose: false }
} else {
return item
}
@@ -601,14 +601,14 @@ export default {
this.personnelInfoData = changePersonalInfo.map(item => {
console.log(item)
if (item.fieldName) {
return { ...item, userList: this.model.flowUserInfoVO[item.fieldName + '_dictText'], canChoose: false }
return { ...item, user: this.model.flowUserInfoVO[item.fieldName], userList: this.model.flowUserInfoVO[item.fieldName + '_dictText'], canChoose: false }
} else {
return item
}
})
}
// 初始化业务基本信息中组件内容
if (this.model[0].applicationCategory === ApplicationCategory.INITIATION.value) {
if (this.formInline.applicationCategory === ApplicationCategory.INITIATION.value) {
// 是立项
this.$nextTick(() => {
this.$nextTick(() => {
@@ -617,16 +617,16 @@ export default {
this.$refs.approvalBaseInfo.formInline = param
})
})
} else if (this.model[0].applicationCategory === ApplicationCategory.CHANGE.value &&
(this.model[0].projectType === ProjectType.COMPLETE_TIME_CHANGE.value ||
this.model[0].projectType === ProjectType.WORK_TERMINATE.value)) {
} else if (this.formInline.applicationCategory === ApplicationCategory.CHANGE.value &&
(this.formInline.projectType === ProjectType.COMPLETE_TIME_CHANGE.value ||
this.formInline.projectType === ProjectType.WORK_TERMINATE.value)) {
// 是完成时间变更或工作终止的变更
this.$nextTick(() => {
this.$refs.changeBaseInfo.dataSource = this.model.dataList
})
} else if (this.model[0].applicationCategory === ApplicationCategory.CHANGE.value &&
(this.model[0].projectType === ProjectType.RESPONSIBLE_DEPT_CHANGE.value ||
this.model[0].projectType === ProjectType.MERGE.value)) {
} else if (this.formInline.applicationCategory === ApplicationCategory.CHANGE.value &&
(this.formInline.projectType === ProjectType.RESPONSIBLE_DEPT_CHANGE.value ||
this.formInline.projectType === ProjectType.MERGE.value)) {
// 是责任部门变更或合并变更
this.$nextTick(() => {
this.$nextTick(() => {
@@ -673,6 +673,8 @@ export default {
personnelObj[item.fieldName] = item.user
}
}
// 发起人设置为当前登录人
personnelObj.createUser = Vue.ls.get(USER_INFO).id
// 业务基础信息组件中的数据
let arr = []
// 业务基本信息-立项表单
@@ -759,7 +761,7 @@ export default {
this.loading = false
})
},
// 节点一时候的提交,发起立项变更申请
// 节点一时候的提交,发起立项变更申请,有taskId就是驳回后的提交
handleStart () {
if (this.loading) return
// 人员信息的数据, 处理成对象
@@ -770,6 +772,8 @@ export default {
personnelObj[item.fieldName] = item.user
}
}
// 发起人设置为当前登录人
personnelObj.createUser = Vue.ls.get(USER_INFO).id
// 校验是否填了所有能填的人员信息
if (!Object.values(personnelObj).every(v => !!v)) {
this.$message.warning(this.$t('pleaseEnterPersonnelInfo'))
@@ -859,7 +863,14 @@ export default {
param.commonVO = { ...values, ...approvalValues } // 流程信息和流程审批信息
param.dataList = arr
param.flowUserInfoVO = personnelObj
enterprisePlanApproval(param).then(res => {
let func
if (this.$route.query.taskId) {
// 有taskId说明是驳回的提交
func = enterprisePlanApprovalAgree
} else {
func = enterprisePlanApproval
}
func(param).then(res => {
if (res.success) {
this.$message.success(res.message)
} else {
@@ -881,7 +892,7 @@ export default {
this.loading = true
const param = Object.assign({}, values, approvalValues)
param.taskId = this.$route.query.taskId
enterprisePlanApprovalSubmit(param).then(res => {
enterprisePlanApprovalAgree(param).then(res => {
if (res.success) {
this.$message.success(res.message)
} else {
@@ -927,8 +938,9 @@ export default {
this.approvalInfoForm.validateFields((err, values) => {
if (!err) {
this.loading = true
const param = Object.assign({}, values)
param.taskId = this.$route.query.taskId
const param = {}
param.commonVO = Object.assign({}, values)
param.commonVO.taskId = this.$route.query.taskId
enterprisePlanApprovalAgree(param).then(res => {
if (res.success) {
this.$message.success(res.message)
@@ -952,8 +964,9 @@ export default {
this.approvalInfoForm.validateFields((err, values) => {
if (!err) {
this.loading = true
const param = Object.assign({}, values)
param.taskId = this.$route.query.id
const param = {}
param.commonVO = Object.assign({}, values)
param.commonVO.taskId = this.$route.query.taskId
enterprisePlanApprovalReject(param).then(res => {
if (res.success) {
this.$message.success(res.message)
@@ -0,0 +1,466 @@
<template>
<internal-detail-page :title="pageTitle" :content-padding="0">
<!-- 标题右侧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('basicInformation') }}
</a>
<a class="switch-item" :class="switchValue === 'user' ? 'table-operator-tab-active' : ''"
@click="switchChange('user')">{{ $t('personalInformation') }}
</a>
</div>
</template>
<!-- 基础信息 -->
<div v-show="switchValue === 'base'" class="detail-page-scroll-content">
<!-- 流程信息 -->
<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()"
disabled
:maxLength="50"
v-decorator="['processName', validatorRules.processName]" />
</a-form-item>
</a-col>
<a-col :span="12">
<!-- 截止日期 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('expirationDate')">
<a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')"
style="width: 100%"
:disabled="disabled"
value-format="YYYY-MM-DD"
v-decorator="['deadlineDate']" />
</a-form-item>
</a-col>
<a-col :span="24">
<!-- 流程说明 -->
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('processExplain')">
<a-textarea :placeholder="$t('pleaseEnter') + $t('processExplain')"
:maxLength="500"
:rows="4"
:disabled="disabled"
v-decorator="['processDescription']" />
</a-form-item>
</a-col>
</a-row>
</a-form>
<!-- 业务基本信息 -->
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
<!-- 节点1发起人发起 -->
<!-- 是联络人发起 -->
<contact-init-base-info v-if="currentNode === 1 && initRole === 'contact'" ref="baseInfoRef"></contact-init-base-info>
<!-- 是标准化发起 -->
<standardization-init-base-info v-if="currentNode === 1 && initRole === 'standardization'" ref="baseInfoRef"></standardization-init-base-info>
<!-- 节点2起草人填写意见 -->
<drafter-enter-option-base-info v-if="currentNode === 2" ref="baseInfoRef"></drafter-enter-option-base-info>
<!-- 节点3起草人部长审批 -->
<!-- 节点4标准化审批 -->
<!-- 流程审批信息 -->
<div class="process-part-title" v-if="!onlyLook">{{ $t('processApprovalInformation') }}</div>
<a-form :form="approvalInfoForm" v-if="!onlyLook">
<!--备注-->
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('remarks')">
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
:maxLength="500"
:rows="4"
v-decorator="['remarks', validatorRules.remarks]" />
</a-form-item>
<!--附件-->
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('businessSupport.questionAnswer.attach')">
<j-upload v-decorator="['attachment']" return-id />
</a-form-item>
</a-form>
</div>
<!-- 人员信息 -->
<div v-show="switchValue === 'user'" class="detail-page-scroll-content p-0">
<process-detail-list :url="url">
<personnel-info slot="personnelInfo" ref="personnelInfo" :data="personnelInfoData" :currentNode="currentNode + ''"></personnel-info>
</process-detail-list>
</div>
<!-- 操作按钮 -->
<div class="detail-page-bottom-operate-box" v-if="!onlyLook">
<!-- 发起节点 -->
<template v-if="currentNode === 1">
<!-- 保存 -->
<a-button type="primary" ghost :loading="loading" @click="handleSave"><i class="iconfont icon-save"></i> {{ $t('preservation') }}</a-button>
<!-- 提交 -->
<a-button type="primary" :loading="loading" @click="handleStart" icon="upload">{{ $t('submit') }}</a-button>
</template>
<!-- 节点2起草人填写意见 -->
<template v-else-if="currentNode === 2">
<!-- 转办 -->
<a-button type="primary" ghost :loading="loading" @click="handleTurnTo" icon="arrow-up">{{ $t('turnTo') }}</a-button>
<!-- 保存 -->
<a-button type="primary" ghost :loading="loading" @click="handleSave"><i class="iconfont icon-save"></i> {{ $t('preservation') }}</a-button>
<!-- 提交 -->
<a-button type="primary" :loading="loading" @click="handleSubmit" icon="upload">{{ $t('submit') }}</a-button>
</template>
<template v-else>
<!-- 转办 -->
<a-button type="primary" ghost :loading="loading" @click="handleTurnTo" icon="arrow-up">{{ $t('turnTo') }}</a-button>
<!-- 保存 -->
<a-button type="primary" ghost :loading="loading" @click="handleSave"><i class="iconfont icon-save"></i> {{ $t('preservation') }}</a-button>
<!-- 同意 -->
<a-button type="primary" :loading="loading" @click="handleAgree" icon="check-circle">{{ $t('agree') }}</a-button>
<!-- 驳回 -->
<a-button type="primary" :loading="loading" @click="handleReject" icon="close-circle">{{ $t('reject') }}</a-button>
</template>
</div>
<!-- 选人弹框 -->
<user-select-modal ref="userSelectModal" type="radio" @change="userSelectModalChange"></user-select-modal>
</internal-detail-page>
</template>
<script>
import InternalDetailPage from '@/components/InternalDetailPage'
import ProcessDetailList from '@/components/ProcessDetailList'
import PersonnelInfo from '@/components/PersonnelInfo'
import UserSelectModal from '@/components/selection/UserSelectModal'
import { USER_INFO } from '@/store/mutation-types'
import Vue from 'vue'
import pick from 'lodash.pick'
import {
enStandardRecheckGetDataById,
enStandardRecheckSave,
enStandardRecheckApproval,
enStandardRecheckTurnTo,
enStandardRecheckAgree,
enStandardRecheckReject
} from '@/api/workCenter'
import ContactInitBaseInfo from './modules/ContactInitBaseInfo'
import StandardizationInitBaseInfo from './modules/StandardizationInitBaseInfo'
import DrafterEnterOptionBaseInfo from './modules/DrafterEnterOptionBaseInfo'
// 人员信息
const personalInfo = [ // 人员信息的数据
{
id: 1,
nodeName: '发起人发起',
nodeRoleName: '发起人',
canChoose: false,
userList: Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')'
},
{ // 自动带出,可编辑
id: 2,
nodeName: '起草人填写意见',
nodeRoleName: '起草人',
canChoose: true,
chooseType: 'radio',
fieldName: ''
},
{
id: 3,
nodeName: '起草人部长审批',
nodeRoleName: '起草人部长',
canChoose: true,
chooseType: 'radio',
fieldName: ''
},
{
id: 4,
nodeName: '标准化审批',
nodeRoleName: '标准化',
canChoose: true,
chooseType: 'radio',
fieldName: ''
}
]
export default {
name: 'EnterpriseStandardRecheckFlow',
components: {
DrafterEnterOptionBaseInfo,
StandardizationInitBaseInfo,
ContactInitBaseInfo,
InternalDetailPage,
ProcessDetailList,
PersonnelInfo,
UserSelectModal
},
computed: {
pageTitle () {
return this.$t('flowCenter') + this.$route.meta.title
}
},
mounted () {
if (this.$route.query.processId) {
this.currentNode = 2 // todo: 先设置一个假数据,后端还不能返回当前节点
// 有流程id说明是从流程中心来的,需要初始化数据
this.getProcessData(this.$route.query.processId)
}
if (this.currentNode === 1) {
this.personnelInfoData = personalInfo
this.disabled = false
// 是节点1的话还需要设置是联络人发起还是标准化发起 ??
// this.initRole =
} else {
this.personnelInfoData = personalInfo.map(item => {
return { ...item, canChoose: false, fieldName: undefined }
})
this.disabled = true
}
// 如果是查看进入的,不可编辑,不可操作
if (this.$route.query.onlyLook) {
this.onlyLook = this.$route.query.onlyLook
this.disabled = this.$route.query.onlyLook
}
},
data () {
return {
loading: false,
switchValue: 'base', // 头部tab选中值
disabled: false,
onlyLook: false, // 是否仅查看
currentNode: 2, // 当前节点
initRole: 'standardization', // 发起角色,发起的时候角色不一样表单不一样,contact联络人发起,standardization标准化发起
model: [],
processInfoForm: this.$form.createForm(this),
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: {
// 流程名称
processName: {
rules: [
{ required: true, message: this.$t('pleaseEnter') + this.$t('processName') }
],
validateTrigger: 'blur'
},
remarks: {
rules: [
{ required: false, message: this.$t('pleaseEnter') + this.$t('remarks') }
],
validateTrigger: 'blur'
}
},
formInline: {},
approvalInfoForm: this.$form.createForm(this), // 审批信息表单
personnelInfoData: [],
url: {
list: '' // 人员信息的右侧表格获取接口
}
}
},
methods: {
// 根据流程id获取数据并回显
getProcessData (processId) {
enStandardRecheckGetDataById({ processInstanceId: processId }).then(res => {
if (res.success) {
this.model = res.result
this.$nextTick(() => {
// 初始化流程信息
this.processInfoForm.setFieldsValue(pick(this.model[0], 'processName', 'deadlineDate', 'processDescription'))
// 初始化流程审批信息,todo:需要判断是不是草稿进来的,草稿进来的才回显审批信息
// this.approvalInfoForm.setFieldsValue(pick(this.model[0], 'remarks', 'attachment'))
})
// 初始化业务基本信息的申请类型和项目类别
this.formInline.applicationCategory = this.model[0].applicationCategory
this.formInline.projectType = this.model[0].projectType
// 初始化人员信息 todo: 发起人还没处理
this.personnelInfoData = personalInfo.map(item => {
if (item.fieldName) {
return { ...item, userList: this.model[0][item.fieldName + '_dictText'], canChoose: false }
} else {
return item
}
})
// 初始化业务基本信息中组件内容
} else {
this.$message.warning(res.message)
}
})
},
// 头部tab改变
switchChange (value) {
this.switchValue = value
},
// 业务基本信息组件中获取到流程名称改变后的值
processNameChange (value) {
const param = { processName: value }
this.$nextTick(() => {
this.processInfoForm.setFieldsValue(pick(param, 'processName'))
})
},
// 保存
handleSave () {
// 有任意一项填了即可
// 流程信息表单
const processInfoForm = this.processInfoForm.getFieldsValue()
// 流程审批信息
const approvalInfoForm = this.approvalInfoForm.getFieldsValue()
// 人员信息的数据, 处理成对象
const personnelInfo = this.$refs.personnelInfo.stepsData
const personnelObj = {}
for (const item of personnelInfo) {
if (item.fieldName) {
personnelObj[item.fieldName] = item.user
}
}
// 需要传给后端的数据
const arr = []
// 业务基本信息
const baseInfo = this.$refs.baseInfoRef.getData()
const param = { ...processInfoForm, ...baseInfo.formInline, ...approvalInfoForm, ...personnelObj }
const flag = Object.values(param).some(v => !!v || v === 0)
if (!flag) {
// 提示至少填写一项
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
return
}
if (baseInfo.dataSource && baseInfo.dataSource.length > 0) {
for (const item of baseInfo.dataSource) {
arr.push({ ...item, ...param })
}
} else {
arr.push(param)
}
this.loading = true
// 保存到草稿
enStandardRecheckSave(arr).then(res => {
if (res.success) {
this.$message.success(res.message)
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
},
// 节点一时候的提交
handleStart () {
if (this.loading) return
// 人员信息的数据, 处理成对象
const personnelInfo = this.$refs.personnelInfo.stepsData
const personnelObj = {}
for (const item of personnelInfo) {
if (item.fieldName) {
personnelObj[item.fieldName] = item.user
}
}
// 校验是否填了所有能填的人员信息
if (!Object.values(personnelObj).every(v => !!v)) {
this.$message.warning(this.$t('pleaseEnterPersonnelInfo'))
return
}
// 流程信息的校验
this.processInfoForm.validateFields((err, values) => {
// 流程审批信息的校验
this.approvalInfoForm.validateFields((approvalErr, approvalValues) => {
this.$refs.baseInfoRef.getDataValidate(data => {
if (!err && !approvalErr && data) {
const arr = [] // 需要传给后端的数据
enStandardRecheckApproval(arr).then(res => {
if (res.success) {
this.$message.success(res.message)
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
}
})
})
})
},
// 转办
handleTurnTo () {
if (this.loading) return
// 点击显示选人组件
this.$refs.userSelectModal.open()
},
// 转办选完人的回调
userSelectModalChange (userIds) {
this.approvalInfoForm.validateFields((err, values) => {
if (!err) {
this.loading = true
const param = Object.assign({}, values)
param.userId = userIds
param.taskId = this.$route.query.taskId
enStandardRecheckTurnTo(param).then(res => {
if (res.success) {
this.$message.success(res.message)
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
}
})
},
// 同意
handleAgree () {
if (this.loading) return
this.approvalInfoForm.validateFields((err, values) => {
if (!err) {
this.loading = true
const param = Object.assign({}, values)
param.taskId = this.$route.query.taskId
enStandardRecheckAgree(param).then(res => {
if (res.success) {
this.$message.success(res.message)
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
}
})
},
// 驳回
handleReject () {
if (this.loading) return
this.validatorRules.remarks.rules[0].required = true
if (!this.approvalInfoForm.getFieldValue('remarks')) {
this.$message.warning(this.$t('pleaseEnterRemarks'))
}
this.$nextTick(() => {
this.approvalInfoForm.validateFields((err, values) => {
if (!err) {
this.loading = true
const param = Object.assign({}, values)
param.taskId = this.$route.query.id
enStandardRecheckReject(param).then(res => {
if (res.success) {
this.$message.success(res.message)
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
this.validatorRules.remarks.rules[0].required = false
})
}
})
})
}
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
</style>
@@ -0,0 +1,179 @@
<template>
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
<div class="collapsible-panel-form">
<div class="form-flex-box collapsible-panel-form-content collapsible-content-no-head">
<!-- 企标编号 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum')">
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') }}
</span>
</div>
<a-form-model-item class="item-model" prop="enStandardNo">
<standard-selection :source="StandardSource.ENTERPRISE.value"
:disabled="disabled"
:disabledSourceSearch="true"
type="radio"
v-model="formInline.enStandardNo"
@listChange="listChange" />
</a-form-model-item>
</div>
<!-- 企标名称 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')">
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') }}
</span>
</div>
<a-form-model-item class="item-model" prop="enStandardName">
<a-input class="box-input"
v-model="formInline.enStandardName"
:maxLength="50"
disabled
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')" />
</a-form-model-item>
</div>
<!-- 主起草人 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.principalDrafter')">
{{ $t('workCenter.enterpriseInitChangePlan.principalDrafter') }}
</span>
</div>
<a-form-model-item class="item-model" prop="mainDraftingUser">
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.principalDrafter')"
v-model="formInline.mainDraftingUser"
:disabled="disabled"
filedName="mainDraftingUser"
@nameChange="userSelectNameChange"
:nameStr="formInline.mainDraftingUser_dictText"
type="radio" />
</a-form-model-item>
</div>
<!-- 主起草单位 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.mainDraftUnit')">
{{ $t('workCenter.enterpriseInitChangePlan.mainDraftUnit') }}
</span>
</div>
<a-form-model-item class="item-model" prop="mainDraftingUnit">
<j-select-depart v-model="formInline.mainDraftingUnit"
:disabled="disabled"
:backDepart="true" />
</a-form-model-item>
</div>
<!-- 发布日期 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enStandardChange.releaseDate')">
{{ $t('workCenter.enStandardChange.releaseDate') }}
</span>
</div>
<a-form-model-item class="item-model" prop="releaseDate">
<a-date-picker
v-model="formInline.releaseDate"
:showTime="false"
disabled
value-format="YYYY-MM-DD">
</a-date-picker>
</a-form-model-item>
</div>
<!-- 实施日期 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enStandardChange.materialDate')">
{{ $t('workCenter.enStandardChange.materialDate') }}
</span>
</div>
<a-form-model-item class="item-model" prop="materialDate">
<a-date-picker
v-model="formInline.materialDate"
:showTime="false"
disabled
value-format="YYYY-MM-DD">
</a-date-picker>
</a-form-model-item>
</div>
<!-- 复审日期 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enStandardRecheck.recheckDate')">
{{ $t('workCenter.enStandardRecheck.recheckDate') }}
</span>
</div>
<a-form-model-item class="item-model" prop="recheckDate">
<a-date-picker
v-model="formInline.recheckDate"
:showTime="false"
disabled
value-format="YYYY-MM-DD">
</a-date-picker>
</a-form-model-item>
</div>
</div>
</div>
</a-form-model>
</template>
<script>
import { StandardSource } from '@/enums/commonEnums'
import StandardSelection from '@/components/selection/StandardSelection'
import UserSelection from '@/components/selection/UserSelection'
export default {
name: 'ContactInitBaseInfo',
components: { StandardSelection, UserSelection },
props: {
disabled: {
type: Boolean,
required: false,
default: false
}
},
data () {
return {
StandardSource,
formInline: {},
rules: {
// 企标编号
enStandardNo: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
}
}
},
methods: {
// 选完企标编号了,需要回显内容,返回流程名称
listChange (value) {
console.log(value)
// 企标名称
this.formInline.enStandardName = value[0].standardName
// 主起草人
// 主起草部门
// 发布日期
// 实施日期
// 复审日期
this.$emit('processNameChange', (this.formInline.enStandardNo || '') + '-' + (this.formInline.enStandardName || '') + '-' + '复审')
},
// 选择用户得到用户名
userSelectNameChange (value, fieldName) {
this.formInline[fieldName + '_dictText'] = value
}
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
.collapsible-content-no-head {
border-top: 1px solid #E5E6EB;
border-radius: 8px 8px 8px 8px;
}
</style>
@@ -0,0 +1,193 @@
<template>
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
<div class="collapsible-panel-form">
<div class="form-flex-box collapsible-panel-form-content collapsible-content-no-head">
<!-- 企标编号 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum')">
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') }}
</span>
</div>
<a-form-model-item class="item-model" prop="enStandardNo">
<standard-selection :source="StandardSource.ENTERPRISE.value"
disabled
:disabledSourceSearch="true"
type="radio"
v-model="formInline.enStandardNo" />
</a-form-model-item>
</div>
<!-- 企标名称 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')">
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') }}
</span>
</div>
<a-form-model-item class="item-model" prop="enStandardName">
<a-input class="box-input"
v-model="formInline.enStandardName"
:maxLength="50"
disabled
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')" />
</a-form-model-item>
</div>
<!-- 主起草人 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.principalDrafter')">
{{ $t('workCenter.enterpriseInitChangePlan.principalDrafter') }}
</span>
</div>
<a-form-model-item class="item-model" prop="mainDraftingUser">
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.principalDrafter')"
v-model="formInline.mainDraftingUser"
disabled
filedName="mainDraftingUser"
:nameStr="formInline.mainDraftingUser_dictText"
type="radio" />
</a-form-model-item>
</div>
<!-- 主起草单位 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.mainDraftUnit')">
{{ $t('workCenter.enterpriseInitChangePlan.mainDraftUnit') }}
</span>
</div>
<a-form-model-item class="item-model" prop="mainDraftingUnit">
<j-select-depart v-model="formInline.mainDraftingUnit"
disabled
:backDepart="true" />
</a-form-model-item>
</div>
<!-- 发布日期 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enStandardChange.releaseDate')">
{{ $t('workCenter.enStandardChange.releaseDate') }}
</span>
</div>
<a-form-model-item class="item-model" prop="releaseDate">
<a-date-picker
v-model="formInline.releaseDate"
:showTime="false"
disabled
value-format="YYYY-MM-DD">
</a-date-picker>
</a-form-model-item>
</div>
<!-- 实施日期 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enStandardChange.materialDate')">
{{ $t('workCenter.enStandardChange.materialDate') }}
</span>
</div>
<a-form-model-item class="item-model" prop="materialDate">
<a-date-picker
v-model="formInline.materialDate"
:showTime="false"
disabled
value-format="YYYY-MM-DD">
</a-date-picker>
</a-form-model-item>
</div>
<!-- 复审日期 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enStandardRecheck.recheckDate')">
{{ $t('workCenter.enStandardRecheck.recheckDate') }}
</span>
</div>
<a-form-model-item class="item-model" prop="recheckDate">
<a-date-picker
v-model="formInline.recheckDate"
:showTime="false"
disabled
value-format="YYYY-MM-DD">
</a-date-picker>
</a-form-model-item>
</div>
<!-- 复审 -->
<div class="box-title-text form-flex-item form-flex-item-long">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enStandardRecheck.recheck')">
{{ $t('workCenter.enStandardRecheck.recheck') }}
</span>
</div>
<a-form-model-item class="item-model" prop="recheck">
<a-radio-group v-model="formInline.recheck">
<!-- 继续有效 -->
<a-radio :value="Recheck.STAND_GOOD.value">
{{ $t('workCenter.enStandardRecheck.standGood') }}
</a-radio>
<!-- 修订 -->
<a-radio :value="Recheck.REVISE.value">
{{ $t('workCenter.enStandardRecheck.revise') }}
</a-radio>
<!-- 废止 -->
<a-radio :value="Recheck.ANNUL.value">
{{ $t('workCenter.enStandardRecheck.annul') }}
</a-radio>
<!-- 封存 -->
<a-radio :value="Recheck.SEAL_SAVE.value">
{{ $t('workCenter.enStandardRecheck.sealSave') }}
</a-radio>
</a-radio-group>
</a-form-model-item>
</div>
</div>
</div>
</a-form-model>
</template>
<script>
import { Recheck, StandardSource } from '@/enums/commonEnums'
import StandardSelection from '@/components/selection/StandardSelection'
import UserSelection from '@/components/selection/UserSelection'
export default {
name: 'DrafterEnterOptionBaseInfo',
components: { StandardSelection, UserSelection },
props: {
disabled: {
type: Boolean,
required: false,
default: false
}
},
data () {
return {
Recheck,
StandardSource,
formInline: {},
rules: {
// 复审
recheck: [
{
required: true,
message: this.$t('workCenter.enStandardRecheck.recheck') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
}
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
.collapsible-content-no-head {
border-top: 1px solid #E5E6EB;
border-radius: 8px 8px 8px 8px;
}
.form-flex-item-long {
width: 100% !important;
}
</style>
@@ -0,0 +1,124 @@
<template>
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
<div class="collapsible-panel-form">
<div class="form-flex-box collapsible-panel-form-content collapsible-content-no-head">
<!-- 企标编号 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum')">
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') }}
</span>
</div>
<a-form-model-item class="item-model" prop="enStandardNo">
<standard-selection :source="StandardSource.ENTERPRISE.value"
:disabled="disabled"
:disabledSourceSearch="true"
type="radio"
v-model="formInline.enStandardNo"
@listChange="listChange" />
</a-form-model-item>
</div>
<!-- 企标名称 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')">
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') }}
</span>
</div>
<a-form-model-item class="item-model" prop="enStandardName">
<a-input class="box-input"
v-model="formInline.enStandardName"
:maxLength="50"
disabled
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')" />
</a-form-model-item>
</div>
<!-- 联络人 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.revisionPlanActivelyReport.contactPerson')">
{{ $t('workCenter.revisionPlanActivelyReport.contactPerson') }}
</span>
</div>
<a-form-model-item class="item-model" prop="contactPerson">
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.revisionPlanActivelyReport.contactPerson')"
v-model="formInline.contactPerson"
:disabled="disabled"
filedName="contactPerson"
@nameChange="userSelectNameChange"
:nameStr="formInline.contactPerson_dictText"
type="radio" />
</a-form-model-item>
</div>
</div>
</div>
</a-form-model>
</template>
<script>
import { StandardSource } from '@/enums/commonEnums'
import StandardSelection from '@/components/selection/StandardSelection'
import UserSelection from '@/components/selection/UserSelection'
export default {
name: 'StandardizationInitBaseInfo',
components: { StandardSelection, UserSelection },
props: {
disabled: {
type: Boolean,
required: false,
default: false
}
},
data () {
return {
StandardSource,
formInline: {},
rules: {
// 企标编号
enStandardNo: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 联络人
contactPerson: [
{
required: true,
message: this.$t('workCenter.revisionPlanActivelyReport.contactPerson') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
}
}
},
methods: {
// 选完企标编号了,需要回显内容,返回流程名称
listChange (value) {
console.log(value)
// 企标名称
this.formInline.enStandardName = value[0].standardName
// 主起草人赋值给联络人
// this.formInline.contactPerson = value[0].
this.$emit('processNameChange', (this.formInline.enStandardNo || '') + '-' + (this.formInline.enStandardName || '') + '-' + '复审')
},
// 选择用户得到用户名
userSelectNameChange (value, fieldName) {
this.formInline[fieldName + '_dictText'] = value
}
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
.collapsible-content-no-head {
border-top: 1px solid #E5E6EB;
border-radius: 8px 8px 8px 8px;
}
</style>