update 会后管理流程
This commit is contained in:
+46
-1
@@ -310,6 +310,36 @@ const savePermissionApply = (params) => postAction('/process/esPermissionApplyFl
|
|||||||
// 权限申请流程业务数据
|
// 权限申请流程业务数据
|
||||||
const getPermissionApplyDataById = (params) => getAction('/espermissionapply/processEsPermissionApply/queryByProjectId', params)
|
const getPermissionApplyDataById = (params) => getAction('/espermissionapply/processEsPermissionApply/queryByProjectId', params)
|
||||||
|
|
||||||
|
/* 标准宣贯流程 */
|
||||||
|
// 生成项目id
|
||||||
|
const getStandardPromotionProjectId = (params) => getAction('/esinspect/esDeclareFlowController/getProjectId', params)
|
||||||
|
// 详情信息
|
||||||
|
const getStandardPromotionDetail = (params) => getAction('/esinspect/esDeclareFlowController/queryDetailByProjectId', params)
|
||||||
|
// 发起
|
||||||
|
const startStandardPromotion = (params) => postAction('/esinspect/esDeclareFlowController/flowStart', params)
|
||||||
|
// 保存
|
||||||
|
const saveStandardPromotion = (params) => postAction('/esinspect/esDeclareFlowController/flowSave', params)
|
||||||
|
// 权限申请流程业务数据
|
||||||
|
const getStandardPromotionDataById = (params) => getAction('/esdeclare/processEsDeclare/queryByProjectId', params)
|
||||||
|
// 联络人管理-根据部门ids获取联络人
|
||||||
|
const getLiaisonList = (params) => getAction('/laws/system/lawsContactManage/queryByDepartIds', params)
|
||||||
|
|
||||||
|
/* 会后管理流程 */
|
||||||
|
// 生成项目id
|
||||||
|
const getPostMeetingManageProjectId = (params) => getAction('/process/meetingManageFlow/getProjectId', params)
|
||||||
|
// 详情信息
|
||||||
|
const getPostMeetingManageDetail = (params) => getAction('/process/meetingManageFlow/queryDetailByProjectId', params)
|
||||||
|
// 发起
|
||||||
|
const startPostMeetingManage = (params) => postAction('/process/meetingManageFlow/flowStart', params)
|
||||||
|
// 审批
|
||||||
|
const approvalPostMeetingManage = (params) => postAction('/process/meetingManageFlow/flowApproval', params)
|
||||||
|
// 转办
|
||||||
|
const transferPostMeetingManage = (params) => getAction('/process/meetingManageFlow/flowTransfer', params)
|
||||||
|
// 保存
|
||||||
|
const savePostMeetingManage = (params) => postAction('/process/meetingManageFlow/flowSave', params)
|
||||||
|
// 权限申请流程业务数据
|
||||||
|
const getPostMeetingManageDataById = (params) => getAction('/meetingmanage/processMeetingManage/queryByProjectId', params)
|
||||||
|
|
||||||
export {
|
export {
|
||||||
getProcessNodeList,
|
getProcessNodeList,
|
||||||
|
|
||||||
@@ -465,5 +495,20 @@ export {
|
|||||||
approvalPermissionApply,
|
approvalPermissionApply,
|
||||||
transferPermissionApply,
|
transferPermissionApply,
|
||||||
savePermissionApply,
|
savePermissionApply,
|
||||||
getPermissionApplyDataById
|
getPermissionApplyDataById,
|
||||||
|
|
||||||
|
getStandardPromotionProjectId,
|
||||||
|
getStandardPromotionDetail,
|
||||||
|
startStandardPromotion,
|
||||||
|
saveStandardPromotion,
|
||||||
|
getStandardPromotionDataById,
|
||||||
|
getLiaisonList,
|
||||||
|
|
||||||
|
getPostMeetingManageProjectId,
|
||||||
|
getPostMeetingManageDetail,
|
||||||
|
startPostMeetingManage,
|
||||||
|
approvalPostMeetingManage,
|
||||||
|
transferPostMeetingManage,
|
||||||
|
savePostMeetingManage,
|
||||||
|
getPostMeetingManageDataById
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ export const ProcessKey = {
|
|||||||
// 标准宣贯流程
|
// 标准宣贯流程
|
||||||
STANDARD_PROMOTION: { text: 'standard_declare', value: 'standard_declare' },
|
STANDARD_PROMOTION: { text: 'standard_declare', value: 'standard_declare' },
|
||||||
// 会后管理流程
|
// 会后管理流程
|
||||||
POST_MEETING_MANAGE: { text: 'permission_apply_process', value: 'permission_apply_process' }
|
POST_MEETING_MANAGE: { text: 'meeting_manage', value: 'meeting_manage' }
|
||||||
}
|
}
|
||||||
|
|
||||||
// 标准性质
|
// 标准性质
|
||||||
@@ -305,13 +305,13 @@ export const PermissionApply = new EsEnums({
|
|||||||
|
|
||||||
// 标准宣贯流程
|
// 标准宣贯流程
|
||||||
export const StandardPromotion = new EsEnums({
|
export const StandardPromotion = new EsEnums({
|
||||||
initiate: { text: '发起并归档', value: 'initiator_start', btn: 6 }
|
initiate: { text: '发起并归档', value: 'initiator_start', btn: 7 }
|
||||||
})
|
})
|
||||||
|
|
||||||
// 会后管理流程
|
// 会后管理流程
|
||||||
export const PostMeetingManage = new EsEnums({
|
export const PostMeetingManage = new EsEnums({
|
||||||
initiate: { text: '法规工程师发起', value: 'initiator_start', btn: 6 },
|
initiate: { text: '法规工程师发起', value: 'engineer_start', btn: 12 },
|
||||||
leaderApproval: { text: '参会人员上传材料', value: 'leader_approval', btn: 7 }
|
attendeesUploadMaterials: { text: '参会人员上传材料', value: 'meeting_upload', btn: 15 }
|
||||||
})
|
})
|
||||||
|
|
||||||
// 项目评估结果类型
|
// 项目评估结果类型
|
||||||
|
|||||||
+3
-1
@@ -207,7 +207,9 @@ export default {
|
|||||||
if (res.success) {
|
if (res.success) {
|
||||||
const data = res.result || {}
|
const data = res.result || {}
|
||||||
this.formInfo = data
|
this.formInfo = data
|
||||||
this.$refs.baseInfoForm.initData(data)
|
this.$nextTick(() => {
|
||||||
|
this.$refs.baseInfoForm.initData(data)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// 如果是待办进来,就获取详情数据
|
// 如果是待办进来,就获取详情数据
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
@change="event => event.target.value = event.target.value.trim()"
|
@change="event => event.target.value = event.target.value.trim()"
|
||||||
:maxLength="50"
|
:maxLength="50"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
v-decorator="['userIdDictText', validatorRules.applicant]" />
|
v-decorator="['userDictText', validatorRules.applicant]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
@@ -316,7 +316,7 @@ export default {
|
|||||||
this.formInfo = data
|
this.formInfo = data
|
||||||
this.baseInfoForm.setFieldsValue({
|
this.baseInfoForm.setFieldsValue({
|
||||||
expirationDate: data.expirationDate,
|
expirationDate: data.expirationDate,
|
||||||
userIdDictText: data.userIdDictText,
|
userDictText: data.userDictText,
|
||||||
standardNumbers: data.standardNumbers,
|
standardNumbers: data.standardNumbers,
|
||||||
applyDetail: data.applyDetail
|
applyDetail: data.applyDetail
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<internal-detail-page :title="pageTitle" :content-padding="0">
|
<internal-detail-page :title="pageTitle" :content-padding="0" :loading="loading">
|
||||||
<!-- 标题右侧tab -->
|
<!-- 标题右侧tab -->
|
||||||
<template v-slot:titleRightCustom>
|
<template v-slot:titleRightCustom>
|
||||||
<div class="table-operator-tab">
|
<div class="table-operator-tab">
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
@change="event => event.target.value = event.target.value.trim()"
|
@change="event => event.target.value = event.target.value.trim()"
|
||||||
:maxLength="50"
|
:maxLength="50"
|
||||||
:disabled="disabled || processDisabled"
|
:disabled="disabled || processDisabled"
|
||||||
v-decorator="['processName', validatorRules.processName]" />
|
v-decorator="['prcName', validatorRules.processName]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
@@ -36,8 +36,8 @@
|
|||||||
<a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')"
|
<a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:disabled="disabled || processDisabled"
|
:disabled="disabled || processDisabled"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD hh:mm:ss"
|
||||||
v-decorator="['expirationDate']" />
|
v-decorator="['dueTime']" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
:maxLength="500"
|
:maxLength="500"
|
||||||
:rows="4"
|
:rows="4"
|
||||||
:disabled="disabled || processDisabled"
|
:disabled="disabled || processDisabled"
|
||||||
v-decorator="['processExplain']" />
|
v-decorator="['prcMes']" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
<!-- 业务基本信息 -->
|
<!-- 业务基本信息 -->
|
||||||
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
|
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
|
||||||
|
|
||||||
<base-info-form :disabled="currentNode > 1" :current-node="currentNode"/>
|
<base-info-form ref="baseInfoForm" :disabled="currentNode !== PostMeetingManage.initiate.value" :current-node="currentNode"/>
|
||||||
|
|
||||||
<!-- 流程审批信息 -->
|
<!-- 流程审批信息 -->
|
||||||
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
|
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
|
||||||
@@ -66,38 +66,58 @@
|
|||||||
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
|
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
|
||||||
:maxLength="500"
|
:maxLength="500"
|
||||||
:rows="4"
|
:rows="4"
|
||||||
v-decorator="['remarks', validatorRules.remarks]" />
|
v-decorator="['commitText', validatorRules.remarks]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<!--附件-->
|
<!--附件-->
|
||||||
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('businessSupport.questionAnswer.attach')">
|
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('businessSupport.questionAnswer.attach')">
|
||||||
<j-upload v-decorator="['file']" return-id />
|
<j-upload v-decorator="['commitFile']" return-id />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
<!-- 人员信息 -->
|
<!-- 人员信息 -->
|
||||||
<div v-if="switchValue === 'user'" class="detail-page-scroll-content p-0">
|
<div v-show="switchValue === 'user'" class="detail-page-scroll-content p-0">
|
||||||
<process-detail-list :url="url">
|
<process-detail-list :process-key="processKey">
|
||||||
<personnel-info slot="personnelInfo" :data="personnelInfoData" :currentNode="currentNode"></personnel-info>
|
<template #personnelInfo>
|
||||||
|
<personnel-info ref="personnelInfo" :data="personnelInfoData" :current-node="currentNodeName" />
|
||||||
|
</template>
|
||||||
</process-detail-list>
|
</process-detail-list>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="detail-page-bottom-operate-box">
|
<div class="detail-page-bottom-operate-box">
|
||||||
<a-button type="primary" :loading="loading" @click="handleSave" ghost><i class="iconfont icon-save" />{{ $t('preservation') }}</a-button>
|
<!--未参加-->
|
||||||
<a-button type="primary" :loading="loading" @click="handleSubmit" icon="upload">{{ $t('submit') }}</a-button>
|
<a-button v-if="1 & btn" type="primary" :loading="loading" @click="handleUncommitted" ghost icon="arrow-up">{{ $t('turnTo') }}</a-button>
|
||||||
<a-button type="primary" :loading="loading" @click="handleAgree" icon="check-circle">{{ $t('agree') }}</a-button>
|
<!--转办-->
|
||||||
|
<a-button v-if="2 & btn" type="primary" :loading="loading" @click="handleTurnTo" ghost icon="arrow-up">{{ $t('turnTo') }}</a-button>
|
||||||
|
<!--保存-->
|
||||||
|
<a-button v-if="4 & btn" type="primary" :loading="loading" @click="handleSave" ghost><i class="iconfont icon-save" />{{ $t('preservation') }}</a-button>
|
||||||
|
<!--提交-->
|
||||||
|
<a-button v-if="8 & btn" type="primary" :loading="loading" @click="handleSubmit" icon="upload">{{ $t('submit') }}</a-button>
|
||||||
</div>
|
</div>
|
||||||
|
<!--转办选人-->
|
||||||
|
<user-select-modal ref="userSelectModal" check-required @change="continueTurnTo" />
|
||||||
</internal-detail-page>
|
</internal-detail-page>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import '@assets/less/common.less'
|
||||||
import PersonnelInfo from '@comp/PersonnelInfo'
|
import PersonnelInfo from '@comp/PersonnelInfo'
|
||||||
import ProcessDetailList from '@comp/ProcessDetailList'
|
import ProcessDetailList from '@comp/ProcessDetailList'
|
||||||
import InternalDetailPage from '@comp/InternalDetailPage'
|
import InternalDetailPage from '@comp/InternalDetailPage'
|
||||||
import BaseInfoForm from '@views/workCenter/postMeetingManageProcess/modules/BaseInfoForm'
|
import BaseInfoForm from '@views/workCenter/postMeetingManageProcess/modules/BaseInfoForm'
|
||||||
|
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
|
||||||
|
import UserSelectModal from '@comp/selection/UserSelectModal'
|
||||||
|
import { PostMeetingManage, ProcessKey } from '@/enums/commonEnums'
|
||||||
|
import {
|
||||||
|
approvalPostMeetingManage,
|
||||||
|
getPostMeetingManageDataById,
|
||||||
|
getPostMeetingManageDetail,
|
||||||
|
getPostMeetingManageProjectId, savePostMeetingManage, startPostMeetingManage, transferPostMeetingManage
|
||||||
|
} from '@api/workCenter'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PostMeetingManageProcess',
|
name: 'PostMeetingManageProcess',
|
||||||
components: { BaseInfoForm, PersonnelInfo, ProcessDetailList, InternalDetailPage },
|
components: { UserSelectModal, BaseInfoForm, PersonnelInfo, ProcessDetailList, InternalDetailPage },
|
||||||
|
mixins: [WorkCenterMixin],
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
@@ -119,8 +139,17 @@ export default {
|
|||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
sm: { span: 22 }
|
sm: { span: 22 }
|
||||||
},
|
},
|
||||||
currentNode: '1',
|
// 流程key
|
||||||
personnelInfoData: [], // 人员信息数据
|
processKey: ProcessKey.POST_MEETING_MANAGE.value,
|
||||||
|
// 当前流程信息
|
||||||
|
PostMeetingManage,
|
||||||
|
info: {},
|
||||||
|
formInfo: {},
|
||||||
|
currentNode: '',
|
||||||
|
currentNodeName: '',
|
||||||
|
// 项目id
|
||||||
|
projectId: '',
|
||||||
|
btn: 0,
|
||||||
validatorRules: {
|
validatorRules: {
|
||||||
// 流程名称
|
// 流程名称
|
||||||
processName: {
|
processName: {
|
||||||
@@ -144,8 +173,9 @@ export default {
|
|||||||
validateTrigger: 'blur'
|
validateTrigger: 'blur'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 流程表单
|
||||||
processInfoForm: this.$form.createForm(this),
|
processInfoForm: this.$form.createForm(this),
|
||||||
baseInfoForm: this.$form.createForm(this),
|
// 流程审批信息表单
|
||||||
approvalInfoForm: this.$form.createForm(this),
|
approvalInfoForm: this.$form.createForm(this),
|
||||||
url: {
|
url: {
|
||||||
list: '' // 人员信息右侧表的分页查询接口
|
list: '' // 人员信息右侧表的分页查询接口
|
||||||
@@ -154,27 +184,280 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
pageTitle () {
|
pageTitle () {
|
||||||
return this.$t('flowCenter') + this.$route.meta.title
|
return this.$t('flowCenter') + this.$route.meta.title + '(' + this.nodeTitle + ')'
|
||||||
|
},
|
||||||
|
// 节点标题
|
||||||
|
nodeTitle () {
|
||||||
|
return this.$route.query.taskName || PostMeetingManage.initiate.text
|
||||||
},
|
},
|
||||||
processDisabled () {
|
processDisabled () {
|
||||||
return +this.currentNode > 1
|
return this.currentNode !== PostMeetingManage.initiate.value
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created () {
|
||||||
|
const { projectId, nodeId, taskName } = this.$route.query
|
||||||
|
// 发起、草稿进来没有nodeId,就默认发起节点
|
||||||
|
this.currentNode = nodeId || PostMeetingManage.initiate.value
|
||||||
|
this.currentNodeName = taskName || PostMeetingManage.initiate.text
|
||||||
|
this.projectId = projectId
|
||||||
|
this.btn = PostMeetingManage.propertyOfValue('btn', this.currentNode) || 0
|
||||||
|
// 如果有nodeId,但是匹配不到任何节点,就是是增加的审批节点
|
||||||
|
if (nodeId && !PostMeetingManage.keyOfValue(nodeId)) {
|
||||||
|
// 审批和同意按钮
|
||||||
|
this.btn = 8
|
||||||
|
}
|
||||||
|
// 查询人员信息
|
||||||
|
this.getPersonInfoStructure(this.processKey, () => {
|
||||||
|
this.initPersonInfoData(this.currentNode === PostMeetingManage.initiate.value)
|
||||||
|
})
|
||||||
|
// 如果是待办进来,就获取详情数据
|
||||||
|
if (this.$route.query.projectId) {
|
||||||
|
this.loadPage()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 如果是新建进来,就获取项目id
|
||||||
|
this.getProjectId()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
switchChange (value) {
|
/**
|
||||||
this.switchValue = value
|
* 获取项目id
|
||||||
|
*/
|
||||||
|
getProjectId () {
|
||||||
|
this.loading = true
|
||||||
|
// 否则就是创建一个新的流程
|
||||||
|
getPostMeetingManageProjectId().then(res => {
|
||||||
|
if (res) {
|
||||||
|
this.projectId = res + ''
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handleSave () {
|
/**
|
||||||
// if (this.loading) return
|
* 获取页面详情
|
||||||
|
*/
|
||||||
|
loadPage () {
|
||||||
|
const { projectId, taskId } = this.$route.query
|
||||||
|
this.loading = true
|
||||||
|
// 获取业务数据
|
||||||
|
getPostMeetingManageDataById({ projectId: this.projectId }).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
const data = res.result || {}
|
||||||
|
// 保存并回显表单信息
|
||||||
|
this.formInfo = data
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.baseInfoForm.initData(data)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
getPostMeetingManageDetail({
|
||||||
|
projectId,
|
||||||
|
taskId
|
||||||
|
}).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
const data = res.result || {}
|
||||||
|
const processAll = data.processAll || {}
|
||||||
|
const processApprovalRecord = data.processApprovalRecord || {}
|
||||||
|
this.info = data
|
||||||
|
// 页面回显
|
||||||
|
this.processInfoForm && this.processInfoForm.setFieldsValue({
|
||||||
|
prcName: processAll.prcName,
|
||||||
|
dueTime: processAll.dueTime,
|
||||||
|
prcMes: processAll.prcMes
|
||||||
|
})
|
||||||
|
this.approvalInfoForm && this.approvalInfoForm.setFieldsValue({
|
||||||
|
commitText: processApprovalRecord.commitText,
|
||||||
|
commitFile: processApprovalRecord.commitFile
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取人员信息
|
||||||
|
getPersonInfo (isValidate = true) {
|
||||||
|
let personnelObj = {}
|
||||||
|
const funName = isValidate ? 'getDataObjVerify' : 'getDataObj'
|
||||||
|
// 节点1:所有的人员信息
|
||||||
|
if (this.currentNode === PostMeetingManage.initiate.value) {
|
||||||
|
// 人员信息的数据, 处理成对象
|
||||||
|
personnelObj = this.$refs.personnelInfo[funName]()
|
||||||
|
if (!personnelObj) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
// List拆成数组
|
||||||
|
for (const key in personnelObj) {
|
||||||
|
if (personnelObj[key] && key.includes('List')) {
|
||||||
|
personnelObj[key] = personnelObj[key].split(',')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return personnelObj
|
||||||
|
},
|
||||||
|
// 获取页面参数
|
||||||
|
async getPageParams (isValidate = true) {
|
||||||
|
const params = {}
|
||||||
|
// 收集所有表单信息
|
||||||
|
let formDataList = []
|
||||||
|
if (isValidate) {
|
||||||
|
formDataList = await this.validateFormList(this.processInfoForm, this.approvalInfoForm)
|
||||||
|
formDataList[2] = await this.$refs.baseInfoForm.getDataValidate()
|
||||||
|
} else {
|
||||||
|
formDataList = [
|
||||||
|
this.processInfoForm.getFieldsValue(),
|
||||||
|
this.approvalInfoForm.getFieldsValue(),
|
||||||
|
this.$refs.baseInfoForm.getData()
|
||||||
|
]
|
||||||
|
}
|
||||||
|
// 收集人员信息
|
||||||
|
const getPersonInfo = this.getPersonInfo(isValidate)
|
||||||
|
if (!getPersonInfo) {
|
||||||
|
throw new Error('user')
|
||||||
|
}
|
||||||
|
|
||||||
|
// 开始处理信息
|
||||||
|
// 流程信息
|
||||||
|
params.processAll = Object.assign({}, this.info.processAll, formDataList[0], {
|
||||||
|
projectId: this.projectId,
|
||||||
|
taskId: this.$route.query.taskId
|
||||||
|
})
|
||||||
|
|
||||||
|
// 处理其他参数
|
||||||
|
params.map = Object.assign({}, getPersonInfo)
|
||||||
|
|
||||||
|
// 流程审批信息
|
||||||
|
params.processApprovalRecord = Object.assign({}, this.info.processApprovalRecord, formDataList[1], {
|
||||||
|
projectId: this.projectId
|
||||||
|
})
|
||||||
|
|
||||||
|
// 流程业务信息
|
||||||
|
params.processMeetingManage = Object.assign({}, formDataList[2], {
|
||||||
|
projectId: this.projectId,
|
||||||
|
id: this.formInfo.id
|
||||||
|
})
|
||||||
|
|
||||||
|
return params
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 转办弹框
|
||||||
|
*/
|
||||||
|
handleTurnTo () {
|
||||||
|
this.$refs.userSelectModal.open()
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 转办
|
||||||
|
*/
|
||||||
|
continueTurnTo (userId) {
|
||||||
|
if (this.loading) return
|
||||||
|
this.loading = true
|
||||||
|
const params = {
|
||||||
|
taskId: this.$route.query.taskId,
|
||||||
|
userId
|
||||||
|
}
|
||||||
|
transferPostMeetingManage(params).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message)
|
||||||
|
this.goBack()
|
||||||
|
} else {
|
||||||
|
this.$message.warn(res.message)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*/
|
||||||
|
handleSave () {
|
||||||
|
if (this.loading) return
|
||||||
|
this.loading = true
|
||||||
|
this.getPageParams(false).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
return savePostMeetingManage(res)
|
||||||
|
}).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message)
|
||||||
|
this.goBack()
|
||||||
|
} else {
|
||||||
|
this.$message.warn(res.message)
|
||||||
|
}
|
||||||
|
}).catch((err) => {
|
||||||
|
console.log(err)
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 提交
|
||||||
|
*/
|
||||||
handleSubmit () {
|
handleSubmit () {
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
this.currentNode = +this.currentNode + 1 + ''
|
// 发起流程并且没有被驳回,调发起接口,否则调审批接口
|
||||||
|
if (!(this.currentNode === PostMeetingManage.initiate.value && this.$route.query.taskId)) {
|
||||||
|
this.handleAgree()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.loading = true
|
||||||
|
this.getPageParams().then(res => {
|
||||||
|
console.log(res)
|
||||||
|
return startPostMeetingManage(res)
|
||||||
|
}).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message)
|
||||||
|
this.goBack()
|
||||||
|
} else {
|
||||||
|
this.$message.warn(res.message)
|
||||||
|
}
|
||||||
|
}).catch((err) => {
|
||||||
|
this.switchChange(err.message)
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 同意
|
||||||
|
*/
|
||||||
handleAgree () {
|
handleAgree () {
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
this.currentNode = +this.currentNode + 1 + ''
|
this.loading = true
|
||||||
|
this.getPageParams().then(res => {
|
||||||
|
res.map.pass = true
|
||||||
|
return approvalPostMeetingManage(res)
|
||||||
|
}).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message)
|
||||||
|
this.goBack()
|
||||||
|
} else {
|
||||||
|
this.$message.warn(res.message)
|
||||||
|
}
|
||||||
|
}).catch((err) => {
|
||||||
|
this.switchChange(err.message)
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 验证所有表单
|
||||||
|
* @param formList - 多个需要校验的表单实例
|
||||||
|
*/
|
||||||
|
validateFormList (...formList) {
|
||||||
|
const promiseList = []
|
||||||
|
for (const form of formList) {
|
||||||
|
promiseList.push(
|
||||||
|
new Promise((resolve, reject) => {
|
||||||
|
form.validateFields((err, val) => {
|
||||||
|
if (!err) {
|
||||||
|
resolve(val)
|
||||||
|
} else {
|
||||||
|
reject(err)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
)
|
||||||
|
}
|
||||||
|
return Promise.all(promiseList).catch(() => {
|
||||||
|
throw new Error('base')
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
|
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
|
||||||
<div class="collapsible-panel-form">
|
<div class="collapsible-panel-form">
|
||||||
<div class="form-flex-box collapsible-panel-form-content collapsible-content-no-head">
|
<div class="form-flex-box">
|
||||||
<!-- 分标委名称 -->
|
<!-- 分标委名称 -->
|
||||||
<div class="box-title-text form-flex-item">
|
<div class="box-title-text form-flex-item">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
@@ -10,9 +10,10 @@
|
|||||||
{{ $t('workCenter.postMeetingManageProcess.subStandardizationCommitteeName') }}
|
{{ $t('workCenter.postMeetingManageProcess.subStandardizationCommitteeName') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="item-model" prop="subStandardizationCommitteeName">
|
<a-form-model-item class="item-model" prop="standardizationFirstId">
|
||||||
<a-select v-model="formInline.subStandardizationCommitteeName"
|
<a-select v-model="formInline.standardizationFirstId"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
|
@change="changeSubStandardizationCommitteeList"
|
||||||
:placeholder="$t('pleaseSelect')+$t('workCenter.postMeetingManageProcess.subStandardizationCommitteeName')">
|
:placeholder="$t('pleaseSelect')+$t('workCenter.postMeetingManageProcess.subStandardizationCommitteeName')">
|
||||||
<a-select-option v-for="item in subStandardizationCommitteeList" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
|
<a-select-option v-for="item in subStandardizationCommitteeList" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
@@ -25,8 +26,8 @@
|
|||||||
{{ $t('workCenter.postMeetingManageProcess.workGroupName') }}
|
{{ $t('workCenter.postMeetingManageProcess.workGroupName') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="item-model" prop="workGroupName">
|
<a-form-model-item class="item-model" prop="standardizationSecondId">
|
||||||
<a-select v-model="formInline.workGroupName"
|
<a-select v-model="formInline.standardizationSecondId"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:placeholder="$t('pleaseSelect')+$t('workCenter.postMeetingManageProcess.workGroupName')">
|
:placeholder="$t('pleaseSelect')+$t('workCenter.postMeetingManageProcess.workGroupName')">
|
||||||
<a-select-option v-for="item in workGroupList" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
|
<a-select-option v-for="item in workGroupList" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
|
||||||
@@ -40,13 +41,13 @@
|
|||||||
{{ $t('workCenter.postMeetingManageProcess.standardNumber') }}
|
{{ $t('workCenter.postMeetingManageProcess.standardNumber') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="item-model" prop="standardNumber">
|
<a-form-model-item class="item-model" prop="standardNo">
|
||||||
<standard-selection source="1"
|
<standard-selection source="1"
|
||||||
:disabledSourceSearch="true"
|
:disabledSourceSearch="true"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:placeholder="$t('pleaseSelect')+$t('workCenter.postMeetingManageProcess.standardNumber')"
|
:placeholder="$t('pleaseSelect')+$t('workCenter.postMeetingManageProcess.standardNumber')"
|
||||||
@nameChange="changeStandardName"
|
@nameChange="changeStandardName"
|
||||||
v-model="formInline.standardNumber" />
|
v-model="formInline.standardNo" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
<!-- 标准名称 -->
|
<!-- 标准名称 -->
|
||||||
@@ -71,9 +72,10 @@
|
|||||||
{{ $t('workCenter.postMeetingManageProcess.meetingName') }}
|
{{ $t('workCenter.postMeetingManageProcess.meetingName') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="item-model" prop="meetingName">
|
<a-form-model-item class="item-model" prop="name">
|
||||||
<a-input v-model="formInline.meetingName"
|
<a-input v-model="formInline.name"
|
||||||
:maxLength="50"
|
:maxLength="50"
|
||||||
|
:disabled="disabled"
|
||||||
:placeholder="$t('pleaseEnter')+$t('workCenter.postMeetingManageProcess.meetingName')" />
|
:placeholder="$t('pleaseEnter')+$t('workCenter.postMeetingManageProcess.meetingName')" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
@@ -85,23 +87,23 @@
|
|||||||
{{ $t('workCenter.postMeetingManageProcess.attendanceDate') }}
|
{{ $t('workCenter.postMeetingManageProcess.attendanceDate') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="item-model" prop="attendanceDate">
|
<a-form-model-item class="item-model" prop="participationTime">
|
||||||
<j-date date-format="YYYY-MM-DD" style="width: 100%" showType="day" :disabled="disabled"
|
<j-date date-format="YYYY-MM-DD" style="width: 100%" showType="day" :disabled="disabled"
|
||||||
:placeholder="$t('pleaseSelect') + $t('workCenter.postMeetingManageProcess.attendanceDate')"
|
:placeholder="$t('pleaseSelect') + $t('workCenter.postMeetingManageProcess.attendanceDate')"
|
||||||
v-model="formInline.attendanceDate" />
|
v-model="formInline.participationTime" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
<!-- 相关材料 -->
|
<!-- 相关材料 -->
|
||||||
<div class="box-title-text form-flex-item" v-if="currentNode === '2'">
|
<div class="box-title-text form-flex-item" v-if="isAttendeesUploadMaterials">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span class="title-text-text" :title="$t('workCenter.postMeetingManageProcess.relevantData')">
|
<span class="title-text-text" :title="$t('workCenter.postMeetingManageProcess.relevantData')">
|
||||||
{{ $t('workCenter.postMeetingManageProcess.relevantData') }}
|
{{ $t('workCenter.postMeetingManageProcess.relevantData') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="item-model" prop="relevantData">
|
<a-form-model-item class="item-model" prop="relevantData">
|
||||||
<a-button type="primary" class="button-text" @click="clickButtonToUpload" :disabled="disabled">
|
<a-button type="primary" class="button-text" @click="clickButtonToUpload">
|
||||||
{{
|
{{
|
||||||
(formInline.relevantData === 'null' || formInline.relevantData === '' || formInline.relevantData === null || formInline.relevantData === undefined)
|
(formInline.fileIds === 'null' || formInline.fileIds === '' || formInline.fileIds === null || formInline.fileIds === undefined)
|
||||||
? $t('uploadFile.clickUpload')
|
? $t('uploadFile.clickUpload')
|
||||||
: $t('uploadFile.viewUploadedFiles')
|
: $t('uploadFile.viewUploadedFiles')
|
||||||
}}
|
}}
|
||||||
@@ -111,7 +113,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 上传 -->
|
<!-- 上传 -->
|
||||||
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false"></upload-file>
|
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false" :disabled="disabled"></upload-file>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -119,6 +121,7 @@
|
|||||||
import UploadFile from '@comp/UploadFile'
|
import UploadFile from '@comp/UploadFile'
|
||||||
import StandardSelection from '@comp/selection/StandardSelection'
|
import StandardSelection from '@comp/selection/StandardSelection'
|
||||||
import { queryTreeList } from '@api/businessSupport'
|
import { queryTreeList } from '@api/businessSupport'
|
||||||
|
import { PostMeetingManage } from '@/enums/commonEnums'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'BaseInfoForm',
|
name: 'BaseInfoForm',
|
||||||
@@ -139,13 +142,15 @@ export default {
|
|||||||
formInline: {},
|
formInline: {},
|
||||||
// 操作类型
|
// 操作类型
|
||||||
operationType: null,
|
operationType: null,
|
||||||
|
// 分标委-工作组树结构
|
||||||
|
treeData: [],
|
||||||
// 分标委
|
// 分标委
|
||||||
subStandardizationCommitteeList: [],
|
subStandardizationCommitteeList: [],
|
||||||
// 工作组
|
// 工作组
|
||||||
workGroupList: [],
|
workGroupList: [],
|
||||||
rules: {
|
rules: {
|
||||||
// 分标委名称
|
// 分标委名称
|
||||||
subStandardizationCommitteeName: [
|
standardizationFirstId: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t('workCenter.postMeetingManageProcess.subStandardizationCommitteeName') + this.$t('cannotEmpty'),
|
message: this.$t('workCenter.postMeetingManageProcess.subStandardizationCommitteeName') + this.$t('cannotEmpty'),
|
||||||
@@ -153,7 +158,7 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
// 会议名称
|
// 会议名称
|
||||||
meetingName: [
|
name: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t('workCenter.postMeetingManageProcess.meetingName') + this.$t('cannotEmpty'),
|
message: this.$t('workCenter.postMeetingManageProcess.meetingName') + this.$t('cannotEmpty'),
|
||||||
@@ -161,7 +166,7 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
// 参会日期
|
// 参会日期
|
||||||
attendanceDate: [
|
participationTime: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t('workCenter.postMeetingManageProcess.attendanceDate') + this.$t('cannotEmpty'),
|
message: this.$t('workCenter.postMeetingManageProcess.attendanceDate') + this.$t('cannotEmpty'),
|
||||||
@@ -171,6 +176,16 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
// 是否第一个节点
|
||||||
|
isBaseInfo () {
|
||||||
|
return this.currentNode === PostMeetingManage.initiate.value
|
||||||
|
},
|
||||||
|
// 是否第二个节点
|
||||||
|
isAttendeesUploadMaterials () {
|
||||||
|
return this.currentNode === PostMeetingManage.attendeesUploadMaterials.value
|
||||||
|
}
|
||||||
|
},
|
||||||
created () {
|
created () {
|
||||||
// 分标委、工作组下拉
|
// 分标委、工作组下拉
|
||||||
this.initWorkList()
|
this.initWorkList()
|
||||||
@@ -183,45 +198,49 @@ export default {
|
|||||||
queryTreeList().then(res => {
|
queryTreeList().then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
for (const item of res.result.children) {
|
this.treeData = res.result.children || []
|
||||||
this.subStandardizationCommitteeList.push(item)
|
this.subStandardizationCommitteeList.push(...this.treeData)
|
||||||
if (item.children && item.children.length) {
|
|
||||||
this.workGroupList.push(...item.children)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 联动二级
|
||||||
|
changeSubStandardizationCommitteeList (id) {
|
||||||
|
this.$set(this.formInline, 'standardizationSecondId', undefined)
|
||||||
|
const findNode = this.treeData.find(item => item.id === id)
|
||||||
|
this.workGroupList = findNode.children
|
||||||
|
},
|
||||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||||
initData (data) {
|
initData (data) {
|
||||||
this.data = data
|
this.model = Object.assign({}, data)
|
||||||
// 给表单赋值
|
// 给表单赋值
|
||||||
// this.formInline =
|
this.formInline = {
|
||||||
|
...data
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 外层要获取数据
|
// 外层要获取数据
|
||||||
getData () {
|
getData () {
|
||||||
// 把数据抛出,在线编辑不知道要不要抛
|
return { ...this.formInline }
|
||||||
const data = {}
|
|
||||||
data.formInline = this.formInline
|
|
||||||
return data
|
|
||||||
},
|
},
|
||||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
// 获取数据并验证
|
||||||
getDataValidate (callback) {
|
getDataValidate () {
|
||||||
this.$refs.ruleForm.validate(valid => {
|
return new Promise((resolve, reject) => {
|
||||||
if (valid) {
|
this.$refs.ruleForm.validate(valid => {
|
||||||
const data = {}
|
if (valid) {
|
||||||
data.formInline = this.formInline
|
const data = { ...this.formInline }
|
||||||
callback(data)
|
resolve(data)
|
||||||
}
|
} else {
|
||||||
|
reject(new Error('base'))
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 选择标准带出名称
|
// 选择标准带出名称
|
||||||
changeStandardName (val) {
|
changeStandardName (val) {
|
||||||
this.formInline.esName = val
|
this.formInline.standardName = val
|
||||||
},
|
},
|
||||||
// 点击点击上传按钮
|
// 点击点击上传按钮
|
||||||
clickButtonToUpload (item) {
|
clickButtonToUpload () {
|
||||||
this.$refs.uploadFile.open(item.fileId)
|
this.$refs.uploadFile.open(this.formInline.fileIds)
|
||||||
// this.uploadName = item.dbFieldName
|
// this.uploadName = item.dbFieldName
|
||||||
},
|
},
|
||||||
// 文件上传改变后的回调
|
// 文件上传改变后的回调
|
||||||
@@ -233,7 +252,8 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
/** 赋值给当前对应的表单文件 */
|
/** 赋值给当前对应的表单文件 */
|
||||||
this.form.file = attIdList.join(',')
|
this.$set(this.formInline, 'fileIds', attIdList.join(','))
|
||||||
|
// this.formInline.attachment = attIdList.join(',')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -241,8 +261,5 @@ export default {
|
|||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
@import '~@assets/less/common.less';
|
@import '~@assets/less/common.less';
|
||||||
.collapsible-content-no-head {
|
|
||||||
border-top: 1px solid #E5E6EB;
|
|
||||||
border-radius: 8px 8px 8px 8px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<internal-detail-page :title="pageTitle" :content-padding="0">
|
<internal-detail-page :title="pageTitle" :content-padding="0" :loading="loading">
|
||||||
<!--基本信息-->
|
<!--基本信息-->
|
||||||
<div class="detail-page-scroll-content" v-show="switchValue === 'base'">
|
<div class="detail-page-scroll-content" v-show="switchValue === 'base'">
|
||||||
<!-- 流程信息 -->
|
<!-- 流程信息 -->
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
@change="event => event.target.value = event.target.value.trim()"
|
@change="event => event.target.value = event.target.value.trim()"
|
||||||
:maxLength="50"
|
:maxLength="50"
|
||||||
:disabled="disabled || processDisabled"
|
:disabled="disabled || processDisabled"
|
||||||
v-decorator="['processName', validatorRules.processName]" />
|
v-decorator="['prcName', validatorRules.processName]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
@@ -22,8 +22,8 @@
|
|||||||
<a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')"
|
<a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:disabled="disabled || processDisabled"
|
:disabled="disabled || processDisabled"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD hh:mm:ss"
|
||||||
v-decorator="['expirationDate']" />
|
v-decorator="['dueTime']" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
:maxLength="500"
|
:maxLength="500"
|
||||||
:rows="4"
|
:rows="4"
|
||||||
:disabled="disabled || processDisabled"
|
:disabled="disabled || processDisabled"
|
||||||
v-decorator="['processExplain']" />
|
v-decorator="['prcMes']" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -41,8 +41,7 @@
|
|||||||
|
|
||||||
<!-- 业务基本信息 -->
|
<!-- 业务基本信息 -->
|
||||||
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
|
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
|
||||||
|
<base-info-form :disabled="disabled" ref="baseInfoForm"/>
|
||||||
<base-info-form/>
|
|
||||||
|
|
||||||
<!-- 流程审批信息 -->
|
<!-- 流程审批信息 -->
|
||||||
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
|
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
|
||||||
@@ -52,26 +51,37 @@
|
|||||||
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
|
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
|
||||||
:maxLength="500"
|
:maxLength="500"
|
||||||
:rows="4"
|
:rows="4"
|
||||||
v-decorator="['remarks', validatorRules.remarks]" />
|
v-decorator="['commitText', validatorRules.remarks]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<!--附件-->
|
<!--附件-->
|
||||||
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('businessSupport.questionAnswer.attach')">
|
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('businessSupport.questionAnswer.attach')">
|
||||||
<j-upload v-decorator="['file']" return-id />
|
<j-upload v-decorator="['commitFile']" return-id />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="detail-page-bottom-operate-box">
|
<div class="detail-page-bottom-operate-box">
|
||||||
<a-button type="primary" :loading="loading" @click="handleSave" ghost><i class="iconfont icon-save" />{{ $t('preservation') }}</a-button>
|
<!--取消-->
|
||||||
<a-button type="primary" :loading="loading" @click="handleSubmit" icon="upload">{{ $t('submit') }}</a-button>
|
<a-button v-if="1 & btn" type="primary" :loading="loading" ghost @click="handleCancel">{{ $t('cancel') }}</a-button>
|
||||||
<a-button type="primary" :loading="loading" @click="handleAgree" icon="check-circle">{{ $t('agree') }}</a-button>
|
<!--保存-->
|
||||||
|
<a-button v-if="2 & btn" type="primary" :loading="loading" @click="handleSave" ghost><i class="iconfont icon-save" />{{ $t('preservation') }}</a-button>
|
||||||
|
<!--提交-->
|
||||||
|
<a-button v-if="4 & btn" type="primary" :loading="loading" @click="handleSubmit" icon="upload">{{ $t('submit') }}</a-button>
|
||||||
</div>
|
</div>
|
||||||
</internal-detail-page>
|
</internal-detail-page>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import '@assets/less/common.less'
|
||||||
import InternalDetailPage from '@comp/InternalDetailPage'
|
import InternalDetailPage from '@comp/InternalDetailPage'
|
||||||
import BaseInfoForm from '@views/workCenter/standardPromotionProcess/modules/BaseInfoForm'
|
import BaseInfoForm from '@views/workCenter/standardPromotionProcess/modules/BaseInfoForm'
|
||||||
|
import { ProcessKey, StandardPromotion } from '@/enums/commonEnums'
|
||||||
|
import {
|
||||||
|
getStandardPromotionDataById, getStandardPromotionDetail,
|
||||||
|
getStandardPromotionProjectId,
|
||||||
|
saveStandardPromotion,
|
||||||
|
startStandardPromotion
|
||||||
|
} from '@api/workCenter'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandardPromotionProcess',
|
name: 'StandardPromotionProcess',
|
||||||
@@ -80,7 +90,6 @@ export default {
|
|||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
switchValue: 'base',
|
switchValue: 'base',
|
||||||
disabled: false,
|
|
||||||
labelCol: {
|
labelCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
sm: { span: 4 }
|
sm: { span: 4 }
|
||||||
@@ -97,8 +106,17 @@ export default {
|
|||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
sm: { span: 22 }
|
sm: { span: 22 }
|
||||||
},
|
},
|
||||||
currentNode: '1',
|
// 流程key
|
||||||
personnelInfoData: [], // 人员信息数据
|
processKey: ProcessKey.STANDARD_PROMOTION.value,
|
||||||
|
// 当前流程信息
|
||||||
|
StandardPromotion,
|
||||||
|
info: {},
|
||||||
|
formInfo: {},
|
||||||
|
currentNode: '',
|
||||||
|
currentNodeName: '',
|
||||||
|
// 项目id
|
||||||
|
projectId: '',
|
||||||
|
btn: 0,
|
||||||
validatorRules: {
|
validatorRules: {
|
||||||
// 流程名称
|
// 流程名称
|
||||||
processName: {
|
processName: {
|
||||||
@@ -122,37 +140,222 @@ export default {
|
|||||||
validateTrigger: 'blur'
|
validateTrigger: 'blur'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 流程表单
|
||||||
processInfoForm: this.$form.createForm(this),
|
processInfoForm: this.$form.createForm(this),
|
||||||
baseInfoForm: this.$form.createForm(this),
|
// 流程审批信息表单
|
||||||
approvalInfoForm: this.$form.createForm(this),
|
approvalInfoForm: this.$form.createForm(this)
|
||||||
url: {
|
|
||||||
list: '' // 人员信息右侧表的分页查询接口
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
pageTitle () {
|
pageTitle () {
|
||||||
return this.$t('flowCenter') + this.$route.meta.title
|
return this.$t('flowCenter') + this.$route.meta.title + '(' + this.nodeTitle + ')'
|
||||||
},
|
},
|
||||||
|
// 节点标题
|
||||||
|
nodeTitle () {
|
||||||
|
return this.$route.query.taskName || StandardPromotion.initiate.text
|
||||||
|
},
|
||||||
|
// 禁用业务表单
|
||||||
|
disabled () {
|
||||||
|
return !this.isInitiate
|
||||||
|
},
|
||||||
|
// 流程信息禁用
|
||||||
processDisabled () {
|
processDisabled () {
|
||||||
return +this.currentNode > 1
|
return this.currentNode !== StandardPromotion.initiate.value
|
||||||
|
},
|
||||||
|
// 是否发起节点(节点1)
|
||||||
|
isInitiate () {
|
||||||
|
return this.currentNode === StandardPromotion.initiate.value
|
||||||
}
|
}
|
||||||
|
// leaderApproval
|
||||||
|
// standardApproval
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
const { projectId, nodeId, taskName } = this.$route.query
|
||||||
|
// 发起、草稿进来没有nodeId,就默认发起节点
|
||||||
|
this.currentNode = nodeId || StandardPromotion.initiate.value
|
||||||
|
this.currentNodeName = taskName || StandardPromotion.initiate.text
|
||||||
|
this.projectId = projectId
|
||||||
|
this.btn = StandardPromotion.propertyOfValue('btn', this.currentNode) || 0
|
||||||
|
// 如果有nodeId,但是匹配不到任何节点,就是是增加的审批节点
|
||||||
|
if (nodeId && !StandardPromotion.keyOfValue(nodeId)) {
|
||||||
|
// 提交按钮
|
||||||
|
this.btn = 4
|
||||||
|
}
|
||||||
|
// 如果是待办进来,就获取详情数据
|
||||||
|
if (this.$route.query.projectId) {
|
||||||
|
this.loadPage()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 如果是新建进来,就获取项目id
|
||||||
|
this.getProjectId()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
switchChange (value) {
|
/**
|
||||||
this.switchValue = value
|
* 获取项目id
|
||||||
|
*/
|
||||||
|
getProjectId () {
|
||||||
|
this.loading = true
|
||||||
|
// 否则就是创建一个新的流程
|
||||||
|
getStandardPromotionProjectId().then(res => {
|
||||||
|
if (res) {
|
||||||
|
this.projectId = res + ''
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handleSave () {
|
/**
|
||||||
// if (this.loading) return
|
* 获取页面详情
|
||||||
|
*/
|
||||||
|
loadPage () {
|
||||||
|
const { projectId, taskId } = this.$route.query
|
||||||
|
this.loading = true
|
||||||
|
// 获取业务数据
|
||||||
|
getStandardPromotionDataById({ projectId: this.projectId }).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
const data = res.result || {}
|
||||||
|
// 保存并回显表单信息
|
||||||
|
this.formInfo = data
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.baseInfoForm.initData(data)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 获取流程数据
|
||||||
|
getStandardPromotionDetail({
|
||||||
|
projectId,
|
||||||
|
taskId
|
||||||
|
}).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
const data = res.result || {}
|
||||||
|
const processAll = data.processAll || {}
|
||||||
|
const processApprovalRecord = data.processApprovalRecord || {}
|
||||||
|
this.info = data
|
||||||
|
// 页面回显
|
||||||
|
this.processInfoForm && this.processInfoForm.setFieldsValue({
|
||||||
|
prcName: processAll.prcName,
|
||||||
|
dueTime: processAll.dueTime,
|
||||||
|
prcMes: processAll.prcMes
|
||||||
|
})
|
||||||
|
this.approvalInfoForm && this.approvalInfoForm.setFieldsValue({
|
||||||
|
commitText: processApprovalRecord.commitText,
|
||||||
|
commitFile: processApprovalRecord.commitFile
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取页面参数
|
||||||
|
async getPageParams (isValidate = true) {
|
||||||
|
const params = {}
|
||||||
|
// 收集所有表单信息
|
||||||
|
let formDataList = []
|
||||||
|
if (isValidate) {
|
||||||
|
formDataList = await this.validateFormList(this.processInfoForm, this.approvalInfoForm)
|
||||||
|
formDataList[2] = await this.$refs.baseInfoForm.getDataValidate()
|
||||||
|
} else {
|
||||||
|
formDataList = [
|
||||||
|
this.processInfoForm.getFieldsValue(),
|
||||||
|
this.approvalInfoForm.getFieldsValue(),
|
||||||
|
this.$refs.baseInfoForm.getData()
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
// 开始处理信息
|
||||||
|
// 流程信息
|
||||||
|
params.processAll = Object.assign({}, this.info.processAll, formDataList[0], {
|
||||||
|
projectId: this.projectId,
|
||||||
|
taskId: this.$route.query.taskId
|
||||||
|
})
|
||||||
|
|
||||||
|
// 处理其他参数
|
||||||
|
params.map = Object.assign({}, {
|
||||||
|
initiator: this.$store.getters.userInfo.id
|
||||||
|
})
|
||||||
|
|
||||||
|
// 流程审批信息
|
||||||
|
params.processApprovalRecord = Object.assign({}, this.info.processApprovalRecord, formDataList[1], {
|
||||||
|
projectId: this.projectId
|
||||||
|
})
|
||||||
|
|
||||||
|
// 业务信息
|
||||||
|
params.processEsDeclare = Object.assign({}, formDataList[2], {
|
||||||
|
projectId: this.projectId,
|
||||||
|
id: this.formInfo.id
|
||||||
|
})
|
||||||
|
|
||||||
|
return params
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*/
|
||||||
|
handleSave () {
|
||||||
|
if (this.loading) return
|
||||||
|
this.loading = true
|
||||||
|
this.getPageParams(false).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
return saveStandardPromotion(res)
|
||||||
|
}).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message)
|
||||||
|
this.goBack()
|
||||||
|
} else {
|
||||||
|
this.$message.warn(res.message)
|
||||||
|
}
|
||||||
|
}).catch((err) => {
|
||||||
|
console.log(err)
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 提交
|
||||||
|
*/
|
||||||
handleSubmit () {
|
handleSubmit () {
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
this.currentNode = +this.currentNode + 1 + ''
|
this.loading = true
|
||||||
|
this.getPageParams().then(res => {
|
||||||
|
console.log(res)
|
||||||
|
return startStandardPromotion(res)
|
||||||
|
}).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message)
|
||||||
|
this.goBack()
|
||||||
|
} else {
|
||||||
|
this.$message.warn(res.message)
|
||||||
|
}
|
||||||
|
}).catch((err) => {
|
||||||
|
console.log(err)
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handleAgree () {
|
/**
|
||||||
if (this.loading) return
|
* 验证所有表单
|
||||||
this.currentNode = +this.currentNode + 1 + ''
|
* @param formList - 多个需要校验的表单实例
|
||||||
|
*/
|
||||||
|
validateFormList (...formList) {
|
||||||
|
const promiseList = []
|
||||||
|
for (const form of formList) {
|
||||||
|
promiseList.push(
|
||||||
|
new Promise((resolve, reject) => {
|
||||||
|
form.validateFields((err, val) => {
|
||||||
|
if (!err) {
|
||||||
|
resolve(val)
|
||||||
|
} else {
|
||||||
|
reject(err)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
)
|
||||||
|
}
|
||||||
|
return Promise.all(promiseList).catch(() => {
|
||||||
|
throw new Error('base')
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleCancel () {
|
||||||
|
this.goBack()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
|
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
|
||||||
<div class="collapsible-panel-form">
|
<div class="collapsible-panel-form">
|
||||||
<div class="form-flex-box collapsible-panel-form-content collapsible-content-no-head">
|
<div class="form-flex-box">
|
||||||
<!-- 紧急程度 -->
|
<!-- 紧急程度 -->
|
||||||
<div class="box-title-text form-flex-item">
|
<div class="box-title-text form-flex-item">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
@@ -10,13 +10,13 @@
|
|||||||
{{ $t('workCenter.standardPromotionProcess.urgency') }}
|
{{ $t('workCenter.standardPromotionProcess.urgency') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="item-model" prop="urgency">
|
<a-form-model-item class="item-model" prop="emergencyDegree">
|
||||||
<j-dict-select-tag :disabled="disabled"
|
<j-dict-select-tag :disabled="disabled"
|
||||||
v-model="formInline.urgency"
|
v-model="formInline.emergencyDegree"
|
||||||
:placeholder="$t('pleaseSelect')+$t('workCenter.standardPromotionProcess.urgency')"
|
:placeholder="$t('pleaseSelect')+$t('workCenter.standardPromotionProcess.urgency')"
|
||||||
:triggerChange="false"
|
:triggerChange="false"
|
||||||
type="radio"
|
type="radio"
|
||||||
dictCode="yn" />
|
dictCode="emergency_degree" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
<!-- 企标编号 -->
|
<!-- 企标编号 -->
|
||||||
@@ -27,13 +27,13 @@
|
|||||||
{{ $t('workCenter.standardPromotionProcess.esNumber') }}
|
{{ $t('workCenter.standardPromotionProcess.esNumber') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="item-model" prop="esNumber">
|
<a-form-model-item class="item-model" prop="standardNo">
|
||||||
<standard-selection source="3"
|
<standard-selection source="3" type="radio"
|
||||||
:disabledSourceSearch="true"
|
:disabledSourceSearch="true"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:placeholder="$t('pleaseSelect')+$t('workCenter.standardPromotionProcess.esNumber')"
|
:placeholder="$t('pleaseSelect')+$t('workCenter.standardPromotionProcess.esNumber')"
|
||||||
@nameChange="changeStandardName"
|
@nameChange="changeStandardName"
|
||||||
v-model="formInline.esNumber" />
|
v-model="formInline.standardNo" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
<!-- 企标名称 -->
|
<!-- 企标名称 -->
|
||||||
@@ -43,9 +43,9 @@
|
|||||||
{{ $t('workCenter.standardPromotionProcess.esName') }}
|
{{ $t('workCenter.standardPromotionProcess.esName') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="item-model" prop="esName">
|
<a-form-model-item class="item-model" prop="standardName">
|
||||||
<a-input disabled
|
<a-input disabled
|
||||||
v-model="formInline.esName"
|
v-model="formInline.standardName"
|
||||||
:maxLength="50"
|
:maxLength="50"
|
||||||
:placeholder="$t('pleaseEnter')+$t('workCenter.standardPromotionProcess.esName')" />
|
:placeholder="$t('pleaseEnter')+$t('workCenter.standardPromotionProcess.esName')" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
@@ -58,9 +58,10 @@
|
|||||||
{{ $t('workCenter.standardPromotionProcess.promoter') }}
|
{{ $t('workCenter.standardPromotionProcess.promoter') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="item-model" prop="promoter">
|
<a-form-model-item class="item-model" prop="declareUser">
|
||||||
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardPromotionProcess.promoter')"
|
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.standardPromotionProcess.promoter')"
|
||||||
v-model="formInline.promoter"
|
v-model="formInline.declareUser"
|
||||||
|
:name-str="formInline.declareUserDictText"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
type="radio" />
|
type="radio" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
@@ -73,8 +74,8 @@
|
|||||||
{{ $t('workCenter.standardPromotionProcess.mainDeliveryDepart') }}
|
{{ $t('workCenter.standardPromotionProcess.mainDeliveryDepart') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="item-model" prop="mainDeliveryDepart">
|
<a-form-model-item class="item-model" prop="mainDepart">
|
||||||
<a-input v-model="formInline.mainDeliveryDepart"
|
<a-input v-model="formInline.mainDepart"
|
||||||
:maxLength="50"
|
:maxLength="50"
|
||||||
:placeholder="$t('pleaseEnter')+$t('workCenter.standardPromotionProcess.mainDeliveryDepart')" />
|
:placeholder="$t('pleaseEnter')+$t('workCenter.standardPromotionProcess.mainDeliveryDepart')" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
@@ -87,8 +88,8 @@
|
|||||||
{{ $t('workCenter.standardPromotionProcess.subject') }}
|
{{ $t('workCenter.standardPromotionProcess.subject') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="item-model" prop="subject">
|
<a-form-model-item class="item-model" prop="declareTopic">
|
||||||
<a-input v-model="formInline.subject"
|
<a-input v-model="formInline.declareTopic"
|
||||||
:maxLength="50"
|
:maxLength="50"
|
||||||
:placeholder="$t('pleaseEnter')+$t('workCenter.standardPromotionProcess.subject')" />
|
:placeholder="$t('pleaseEnter')+$t('workCenter.standardPromotionProcess.subject')" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
@@ -101,10 +102,10 @@
|
|||||||
{{ $t('workCenter.standardPromotionProcess.promotionDate') }}
|
{{ $t('workCenter.standardPromotionProcess.promotionDate') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="item-model" prop="promotionDate">
|
<a-form-model-item class="item-model" prop="declareDate">
|
||||||
<j-date date-format="YYYY-MM-DD" style="width: 100%" showType="day" :disabled="disabled"
|
<j-date date-format="YYYY-MM-DD" style="width: 100%" showType="day" :disabled="disabled"
|
||||||
:placeholder="$t('pleaseSelect') + $t('workCenter.standardPromotionProcess.promotionDate')"
|
:placeholder="$t('pleaseSelect') + $t('workCenter.standardPromotionProcess.promotionDate')"
|
||||||
v-model="formInline.promotionDate" />
|
v-model="formInline.declareDate" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
<!-- 参宣单位 -->
|
<!-- 参宣单位 -->
|
||||||
@@ -115,13 +116,14 @@
|
|||||||
{{ $t('workCenter.standardPromotionProcess.participatingUnits') }}
|
{{ $t('workCenter.standardPromotionProcess.participatingUnits') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="item-model" prop="participatingUnits">
|
<a-form-model-item class="item-model" prop="attendUnit">
|
||||||
<j-select-depart
|
<j-select-depart
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
v-model="formInline.participatingUnits"
|
v-model="formInline.attendUnit"
|
||||||
:multi="true"
|
:multi="true"
|
||||||
:placeholder="$t('pleaseSelect') + $t('workCenter.standardPromotionProcess.participatingUnits')"
|
:placeholder="$t('pleaseSelect') + $t('workCenter.standardPromotionProcess.participatingUnits')"
|
||||||
:backDepart="true"
|
:backDepart="true"
|
||||||
|
@change="changeParticipatingUnits"
|
||||||
:treeOpera="true">>
|
:treeOpera="true">>
|
||||||
</j-select-depart>
|
</j-select-depart>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
@@ -134,9 +136,9 @@
|
|||||||
{{ $t('workCenter.standardPromotionProcess.contactPerson') }}
|
{{ $t('workCenter.standardPromotionProcess.contactPerson') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="item-model" prop="contactPerson">
|
<a-form-model-item class="item-model" prop="initiator">
|
||||||
<a-input disabled
|
<a-input disabled
|
||||||
v-model="formInline.contactPerson"
|
v-model="formInline.initiator"
|
||||||
:maxLength="50"
|
:maxLength="50"
|
||||||
:placeholder="$t('pleaseEnter')+$t('workCenter.standardPromotionProcess.contactPerson')" />
|
:placeholder="$t('pleaseEnter')+$t('workCenter.standardPromotionProcess.contactPerson')" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
@@ -149,24 +151,24 @@
|
|||||||
{{ $t('workCenter.standardPromotionProcess.content') }}
|
{{ $t('workCenter.standardPromotionProcess.content') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="item-model" prop="content">
|
<a-form-model-item class="item-model" prop="declareContent">
|
||||||
<a-textarea :maxLength="500"
|
<a-textarea :maxLength="500"
|
||||||
:placeholder="$t('pleaseSelect')+$t('workCenter.standardPromotionProcess.content')"
|
:placeholder="$t('pleaseSelect')+$t('workCenter.standardPromotionProcess.content')"
|
||||||
:rows="4"
|
:rows="4"
|
||||||
v-model="formInline.content" />
|
v-model="formInline.declareContent" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
<!-- 附件 -->
|
<!-- 宣贯材料 -->
|
||||||
<div class="box-title-text form-flex-item">
|
<div class="box-title-text form-flex-item">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span class="title-text-text" :title="$t('workCenter.standardPromotionProcess.promotionalMaterials')">
|
<span class="title-text-text" :title="$t('workCenter.standardPromotionProcess.promotionalMaterials')">
|
||||||
{{ $t('workCenter.standardPromotionProcess.promotionalMaterials') }}
|
{{ $t('workCenter.standardPromotionProcess.promotionalMaterials') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="item-model" prop="promotionalMaterials">
|
<a-form-model-item class="item-model" prop="declareFile">
|
||||||
<a-button type="primary" class="button-text" @click="clickButtonToUpload" :disabled="disabled">
|
<a-button type="primary" class="button-text" @click="clickButtonToUpload" style="width: 100%;">
|
||||||
{{
|
{{
|
||||||
(formInline.promotionalMaterials === 'null' || formInline.promotionalMaterials === '' || formInline.promotionalMaterials === null || formInline.promotionalMaterials === undefined)
|
(formInline.declareFile === 'null' || formInline.declareFile === '' || formInline.declareFile === null || formInline.declareFile === undefined)
|
||||||
? $t('uploadFile.clickUpload')
|
? $t('uploadFile.clickUpload')
|
||||||
: $t('uploadFile.viewUploadedFiles')
|
: $t('uploadFile.viewUploadedFiles')
|
||||||
}}
|
}}
|
||||||
@@ -176,7 +178,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 上传 -->
|
<!-- 上传 -->
|
||||||
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false"></upload-file>
|
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false" :disabled="disabled"></upload-file>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -184,6 +186,7 @@
|
|||||||
import StandardSelection from '@comp/selection/StandardSelection'
|
import StandardSelection from '@comp/selection/StandardSelection'
|
||||||
import UserSelection from '@comp/selection/UserSelection'
|
import UserSelection from '@comp/selection/UserSelection'
|
||||||
import UploadFile from '@comp/UploadFile'
|
import UploadFile from '@comp/UploadFile'
|
||||||
|
import { getLiaisonList } from '@api/workCenter'
|
||||||
export default {
|
export default {
|
||||||
name: 'BaseInfoForm',
|
name: 'BaseInfoForm',
|
||||||
components: { UploadFile, UserSelection, StandardSelection },
|
components: { UploadFile, UserSelection, StandardSelection },
|
||||||
@@ -197,6 +200,8 @@ export default {
|
|||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
formInline: {},
|
formInline: {},
|
||||||
|
// 当前数据
|
||||||
|
model: {},
|
||||||
// 操作类型
|
// 操作类型
|
||||||
operationType: null,
|
operationType: null,
|
||||||
rules: {
|
rules: {
|
||||||
@@ -238,34 +243,36 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||||
initData (data) {
|
initData (data) {
|
||||||
this.data = data
|
this.model = Object.assign({}, data)
|
||||||
// 给表单赋值
|
// 给表单赋值
|
||||||
// this.formInline =
|
this.formInline = {
|
||||||
|
...data
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 外层要获取数据
|
// 外层要获取数据
|
||||||
getData () {
|
getData () {
|
||||||
// 把数据抛出,在线编辑不知道要不要抛
|
return { ...this.formInline }
|
||||||
const data = {}
|
|
||||||
data.formInline = this.formInline
|
|
||||||
return data
|
|
||||||
},
|
},
|
||||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
// 获取数据并验证
|
||||||
getDataValidate (callback) {
|
getDataValidate () {
|
||||||
this.$refs.ruleForm.validate(valid => {
|
return new Promise((resolve, reject) => {
|
||||||
if (valid) {
|
this.$refs.ruleForm.validate(valid => {
|
||||||
const data = {}
|
if (valid) {
|
||||||
data.formInline = this.formInline
|
const data = { ...this.formInline }
|
||||||
callback(data)
|
resolve(data)
|
||||||
}
|
} else {
|
||||||
|
reject(new Error('base'))
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 选择标准带出名称
|
// 选择标准带出名称
|
||||||
changeStandardName (val) {
|
changeStandardName (val) {
|
||||||
this.formInline.esName = val
|
this.formInline.standardName = val
|
||||||
},
|
},
|
||||||
// 点击点击上传按钮
|
// 点击点击上传按钮
|
||||||
clickButtonToUpload (item) {
|
clickButtonToUpload () {
|
||||||
this.$refs.uploadFile.open(item.fileId)
|
this.$refs.uploadFile.open(this.formInline.declareFile)
|
||||||
// this.uploadName = item.dbFieldName
|
// this.uploadName = item.dbFieldName
|
||||||
},
|
},
|
||||||
// 文件上传改变后的回调
|
// 文件上传改变后的回调
|
||||||
@@ -277,7 +284,17 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
/** 赋值给当前对应的表单文件 */
|
/** 赋值给当前对应的表单文件 */
|
||||||
this.form.file = attIdList.join(',')
|
this.$set(this.formInline, 'declareFile', attIdList.join(','))
|
||||||
|
// this.formInline.attachment = attIdList.join(',')
|
||||||
|
},
|
||||||
|
// 选择参宣单位,回显联络人
|
||||||
|
changeParticipatingUnits (val) {
|
||||||
|
getLiaisonList({ deptIds: val }).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
const data = res.result || ''
|
||||||
|
this.$set(this.formInline, 'initiator', data)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -285,8 +302,5 @@ export default {
|
|||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
@import '~@assets/less/common.less';
|
@import '~@assets/less/common.less';
|
||||||
.collapsible-content-no-head {
|
|
||||||
border-top: 1px solid #E5E6EB;
|
|
||||||
border-radius: 8px 8px 8px 8px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user