update 企标稽查计划

This commit is contained in:
danshihao
2023-11-21 11:37:37 +08:00
parent afa76d0f29
commit 1c9cdf249a
9 changed files with 406 additions and 146 deletions
+28 -4
View File
@@ -146,7 +146,7 @@ const toDoTurnTo = (params) => postAction('', params)
// 已发-强制撤回
const compulsoryWithdrawal = (params) => postAction('', params)
/*标准法规入库/变更流程*/
/* 标准法规入库/变更流程 */
// 发起
const initiateStandardECProcess = (params) => postAction('/process/fb/processFbEntryChange/startProcess', params)
// 保存
@@ -160,7 +160,7 @@ const agreeStandardECProcess = (params) => postAction('/process/fb/processFbEntr
// 驳回
const rejectStandardECProcess = (params) => postAction('/process/fb/processFbEntryChange/reject', params)
/*标准征求意见流程*/
/* 标准征求意见流程 */
// 获取标准被拆分的列表
const querySpitFileByStandardNumber = (params) => getAction('/laws/standard/common/getSplitsByStandardNumber', params)
// 获取标准条款号
@@ -180,7 +180,7 @@ const agreeConsultationProcess = (params) => postAction('/process/fb/processFbSt
// 驳回
const rejectConsultationProcess = (params) => postAction('/process/fb/processFbStandardConsultation/reject', params)
/*法规采购流程*/
/* 法规采购流程 */
// 获取流程信息
const queryProcurementProcessInfo = (params) => getAction('/process/fb/processFbStandardPurchase/queryProcessInfoVO', params)
// 保存
@@ -196,6 +196,22 @@ const transferProcurementProcess = (params) => postAction('/process/fb/processFb
// 抄送
const carbonCopyProcurementProcess = (params) => postAction('/process/fb/processFbStandardPurchase/carbonCopy', params)
/* 企标稽查计划 */
// 生成项目id
const getInspectPlanProjectId = (params) => getAction('/process/esInspectPlanFlow/getProjectId', params)
// 详情信息
const getInspectPlanDetail = (params) => getAction('/process/esInspectPlanFlow/queryDetailByProjectId', params)
// 发起
const startInspectPlan = (params) => postAction('/process/esInspectPlanFlow/flowStart', params)
// 驳回
const refusalInspectPlan = (params) => postAction('/process/esInspectPlanFlow/flowRefusal', params)
// 审批
const approvalInspectPlan = (params) => postAction('/process/esInspectPlanFlow/flowApproval', params)
// 转办
const transferInspectPlan = (params) => postAction('/process/esInspectPlanFlow/flowTransfer', params)
// 保存
const saveInspectPlan = (params) => postAction('/process/esInspectPlanFlow/flowSave', params)
export {
getProcessNodeList,
@@ -294,5 +310,13 @@ export {
agreeProcurementProcess,
rejectProcurementProcess,
transferProcurementProcess,
carbonCopyProcurementProcess
carbonCopyProcurementProcess,
getInspectPlanProjectId,
getInspectPlanDetail,
startInspectPlan,
refusalInspectPlan,
approvalInspectPlan,
transferInspectPlan,
saveInspectPlan
}
+1
View File
@@ -217,6 +217,7 @@ module.exports = {
},
// 企标稽查计划
esInspectionPlan: {
node1: '稽查联络人发起计划',
inspectionPlan: '稽查计划',
inspectionBasisStandardNumber: '稽查依据标准号',
inspectionBasisStandardName: '稽查依据标准名称',
+1
View File
@@ -243,6 +243,7 @@ module.exports = {
},
// 企标稽查计划
esInspectionPlan: {
node1: '稽查联络人发起计划',
inspectionPlan: '稽查计划',
inspectionBasisStandardNumber: '稽查依据标准号',
inspectionBasisStandardName: '稽查依据标准名称',
+13 -2
View File
@@ -189,7 +189,9 @@ export const ProcessKey = {
// 法规合规评估流程
REGULATORY_COMPLIANCE_ASSESSMENT: { text: 'fb-standard-compliance-assessment', value: 'fb-standard-compliance-assessment' },
// 法规采购流程
LEGAL_PROCUREMENT: { text: 'fb-standard-purchase', value: 'fb-standard-purchase' }
LEGAL_PROCUREMENT: { text: 'fb-standard-purchase', value: 'fb-standard-purchase' },
// 企标稽查计划
ES_Inspection_Plan: { text: 'inspect_plan', value: 'inspect_plan' }
}
// 标准性质
@@ -248,6 +250,15 @@ export const SenderType = {
designEngineer: { text: '设计工程师', value: '2' }
}
// 企标稽查计划
export const EsInspectionPlan = new EsEnums({
initiate: { text: '稽查联络人发起计划', value: 'Activity_15w9cns', btn: 6 },
fillInComments: { text: '稽查征求意见对象填写意见', value: 'Activity_0mnt8n8', btn: 6 },
liaisonCollect: { text: '稽查联络人汇总', value: 'Activity_0r85qcr', btn: 6 },
relevantPersonnelCountersign: { text: '相关人员会签', value: 'Activity_1jmz9m2', btn: 27 },
liaisonLeaderApproval: { text: '联络人主管级领导批准', value: 'Activity_13e43pu', btn: 27 }
})
// 项目评估结果类型
export const EvaluationResultType = new EsEnums({
accordWith: { text: '符合', value: '1' },
@@ -270,4 +281,4 @@ export const ProcurementProcessNodes = new EsEnums({
standardLeaderApproval: { text: '标准化主管级领导审批', value: 'Activity_06jy4oo', btn: ['return', 'save', 'agree', 'reject'] },
standardSuperiorLeaderApproval: { text: '标准化主管级上一级领导审批', value: 'Activity_1u5337a', btn: ['return', 'save', 'agree', 'reject'] },
regulatoryEngineerConfirmation: { text: '法规工程师确认', value: 'Activity_1q01zfq', btn: ['carbonCopy', 'submit'] }
})
})
@@ -1,5 +1,5 @@
<template>
<internal-detail-page :title="pageTitle" :content-padding="0">
<internal-detail-page :title="pageTitle" :content-padding="0" :loading="loading">
<!-- 标题右侧tab -->
<template v-slot:titleRightCustom>
<div class="table-operator-tab">
@@ -27,7 +27,7 @@
@change="event => event.target.value = event.target.value.trim()"
:disabled="disabled || processDisabled"
:maxLength="50"
v-decorator="['processName', validatorRules.processName]" />
v-decorator="['prcName', validatorRules.processName]" />
</a-form-item>
</a-col>
<a-col :span="12">
@@ -37,7 +37,7 @@
style="width: 100%"
:disabled="disabled || processDisabled"
value-format="YYYY-MM-DD"
v-decorator="['expirationDate']" />
v-decorator="['dueTime']" />
</a-form-item>
</a-col>
<a-col :span="24">
@@ -47,7 +47,7 @@
:maxLength="500"
:rows="4"
:disabled="disabled || processDisabled"
v-decorator="['processExplain']" />
v-decorator="['prcMes']" />
</a-form-item>
</a-col>
</a-row>
@@ -55,9 +55,9 @@
<!-- 业务基本信息 -->
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
<inspection-plan-table :current-node="currentNode" />
<inspection-plan-table ref="inspectionPlanTable" :current-node="currentNode" />
<!-- 会签表单 -->
<a-form :form="countersignForm" v-if="currentNode === '3'">
<a-form :form="countersignForm" v-if="currentNode === EsInspectionPlan.liaisonCollect.value">
<a-row type="flex">
<a-col :span="12">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.esInspectionPlan.isCountersign')">
@@ -65,7 +65,7 @@
type="radio"
dictCode="yn"
@change="changeIsCountersign"
v-decorator="['isCountersign', validatorRules.isCountersign]" />
v-decorator="['pass', validatorRules.isCountersign]" />
</a-form-item>
</a-col>
<a-col :span="12"></a-col>
@@ -73,7 +73,7 @@
<a-form-item v-if="isCountersign" :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.esInspectionPlan.countersignRelevantPersonnel')">
<user-selection :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionPlan.countersignRelevantPersonnel')"
type="checkbox"
v-decorator="['countersignRelevantPersonnel', validatorRules.countersignRelevantPersonnel]" />
v-decorator="['involveList', validatorRules.countersignRelevantPersonnel]" />
</a-form-item>
</a-col>
</a-row>
@@ -86,92 +86,66 @@
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
:maxLength="500"
:rows="4"
v-decorator="['remarks', validatorRules.remarks]" />
v-decorator="['commitText', validatorRules.remarks]" />
</a-form-item>
<!--附件-->
<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>
</div>
<!-- 人员信息 -->
<div v-if="switchValue === 'user'" class="detail-page-scroll-content p-0">
<process-detail-list :url="url">
<personnel-info slot="personnelInfo" :data="personnelInfoData" :currentNode="currentNode"></personnel-info>
<div v-show="switchValue === 'user'" class="detail-page-scroll-content p-0">
<process-detail-list>
<template #personnelInfo>
<personnel-info ref="personnelInfo" :data="personnelInfoData" />
</template>
</process-detail-list>
</div>
<div class="detail-page-bottom-operate-box">
<a-button type="primary" :loading="loading" @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 type="primary" :loading="loading" @click="handleAgree" icon="check-circle">{{ $t('agree') }}</a-button>
<!--转办-->
<a-button v-if="1 & btn" type="primary" :loading="loading" @click="handleTurnTo" ghost icon="arrow-up">{{ $t('turnTo') }}</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>
<!--同意-->
<a-button v-if="8 & btn" type="primary" :loading="loading" @click="handleAgree" icon="check-circle">{{ $t('agree') }}</a-button>
<!--驳回-->
<a-button v-if="16 & btn" type="primary" :loading="loading" @click="handleReject" icon="close-circle">{{ $t('reject') }}</a-button>
</div>
<!--转办选人-->
<user-select-modal ref="userSelectModal" check-required @change="continueTurnTo" />
</internal-detail-page>
</template>
<script>
import '@assets/less/common.less'
import Vue from 'vue'
import InternalDetailPage from '@comp/InternalDetailPage'
import PersonnelInfo from '@comp/PersonnelInfo'
import ProcessDetailList from '@comp/ProcessDetailList'
import { USER_INFO } from '@/store/mutation-types'
import InspectionPlanTable from '@views/workCenter/enterpriseStandardInspectionPlan/modules/InspectionPlanTable'
import UserSelection from '@comp/selection/UserSelection'
const { realname, username } = Vue.ls.get(USER_INFO)
// 标准立项的人员信息
const approvalPersonalInfo = [ // 人员信息的数据
{
id: 1,
nodeName: '稽查联络人发起计划',
nodeRoleName: '稽查联络人',
canChoose: false,
userList: `${realname}(${username})`
},
{
id: 2,
nodeName: '稽查征求意见对象填写征求意见',
nodeRoleName: '征求意见对象',
canChoose: true,
chooseType: 'checkbox',
// chooseSource: 'contactManage',
fieldName: 'contactUser'
},
{
id: 3,
nodeName: '稽查联络人汇总',
nodeRoleName: '稽查联络人',
canChoose: true,
chooseType: 'checkbox',
// chooseSource: 'contactManage',
fieldName: 'contactUser'
},
{
id: 4,
nodeName: '相关人员会签',
nodeRoleName: '相关人员',
canChoose: true,
chooseType: 'checkbox',
// chooseSource: 'contactManage',
fieldName: 'contactUser'
},
{
id: 5,
nodeName: '联络人主管级领导批准',
nodeRoleName: '联络人主管级领导',
canChoose: true,
chooseType: 'radio',
// chooseSource: 'contactManage',
fieldName: 'contactUser'
}
]
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
import { EsInspectionPlan, ProcessKey } from '@/enums/commonEnums'
import {
approvalInspectPlan,
getInspectPlanDetail,
getInspectPlanProjectId,
refusalInspectPlan,
saveInspectPlan,
startInspectPlan, transferInspectPlan
} from '@api/workCenter'
import UserSelectModal from '@comp/selection/UserSelectModal'
export default {
name: 'EnterpriseStandardInspectionPlanFlow',
components: { UserSelection, InspectionPlanTable, ProcessDetailList, PersonnelInfo, InternalDetailPage },
components: { UserSelectModal, UserSelection, InspectionPlanTable, ProcessDetailList, PersonnelInfo, InternalDetailPage },
mixins: [WorkCenterMixin],
data () {
return {
EsInspectionPlan,
loading: false,
switchValue: 'base',
disabled: false,
@@ -191,8 +165,10 @@ export default {
xs: { span: 24 },
sm: { span: 22 }
},
currentNode: '4',
personnelInfoData: [], // 人员信息数据
currentNode: '',
// 项目id
projectId: '',
btn: 0,
validatorRules: {
// 流程名称
processName: {
@@ -222,6 +198,7 @@ export default {
validateTrigger: 'change'
}
},
// 流程基本信息
processInfoForm: this.$form.createForm(this),
countersignForm: this.$form.createForm(this),
approvalInfoForm: this.$form.createForm(this),
@@ -234,27 +211,237 @@ export default {
},
computed: {
pageTitle () {
return this.$t('flowCenter') + this.$route.meta.title
return this.$t('flowCenter') + this.$route.meta.title + '' + this.subTitle + ''
},
subTitle () {
return this.$route.query.taskName || this.$t('workCenter.esInspectionPlan.node1')
},
processDisabled () {
return +this.currentNode > 1
return this.currentNode !== EsInspectionPlan.initiate.value
}
},
created () {
// 查询人员信息
this.getPersonInfoStructure(ProcessKey.ES_Inspection_Plan.value)
// 如果是待办进来,就获取详情数据
const { projectId, taskId } = this.$route.query
if (projectId || taskId) {
this.loadPage({ projectId, taskId })
return
}
// 否则就是创建一个新的流程
getInspectPlanProjectId().then(res => {
if (res) {
this.projectId = res
this.currentNode = EsInspectionPlan.initiate.value
this.btn = EsInspectionPlan.initiate.btn
}
})
},
methods: {
/**
* 获取页面详情
*/
loadPage (params) {
this.currentNode = this.$route.query.nodeId
this.projectId = this.$route.query.projectId
switch (this.currentNode) {
case EsInspectionPlan.initiate.value:
this.btn = EsInspectionPlan.initiate.btn
break
case EsInspectionPlan.fillInComments.value:
this.btn = EsInspectionPlan.fillInComments.btn
break
case EsInspectionPlan.liaisonCollect.value:
this.btn = EsInspectionPlan.liaisonCollect.btn
break
case EsInspectionPlan.relevantPersonnelCountersign.value:
this.btn = EsInspectionPlan.relevantPersonnelCountersign.btn
break
case EsInspectionPlan.liaisonLeaderApproval.value:
this.btn = EsInspectionPlan.liaisonLeaderApproval.btn
break
}
getInspectPlanDetail(params).then(res => {
if (res.success) {
const data = res.result || {}
this.processInfoForm.setFieldsValue({
prcName: data.processAll.prcName,
dueTime: data.processAll.dueTime,
prcMes: data.processAll.prcMes
})
}
})
},
switchChange (value) {
this.switchValue = value
},
handleSave () {
// if (this.loading) return
// 获取页面参数
getPageParams (isValidate = true) {
return new Promise((resolve, reject) => {
// 人员信息的数据, 处理成对象
const personnelObj = this.$refs.personnelInfo.getDataObjVerify()
// List拆成数组
for (const key in personnelObj) {
if (key.includes('List')) {
personnelObj[key] = personnelObj[key].split(',')
}
}
// 获取表格数据
const params = {
processEsInspectPlanList: this.$refs.inspectionPlanTable.getData()
}
if (isValidate) {
this.validateFormList(
this.processInfoForm,
this.countersignForm,
this.approvalInfoForm
).then(res => {
params.processAll = res[0]
if (params.processAll.dueTime && params.processAll.dueTime.includes(' 00:00:00')) {
params.processAll.dueTime = params.processAll.dueTime + ' 00:00:00'
}
params.processAll.projectId = this.projectId
params.processAll.taskId = this.$route.query.taskId
params.processApprovalRecord = res[2]
params.processApprovalRecord.projectId = this.projectId
params.map = {}
Object.assign(params.map, res[1], personnelObj)
params.map.pass = params.map.pass === '1'
resolve(params)
}).catch(err => {
reject(err)
})
} else {
params.processAll = this.processInfoForm.getFieldsValue()
if (params.processAll.dueTime && params.processAll.dueTime.includes(' 00:00:00')) {
params.processAll.dueTime = params.processAll.dueTime + ' 00:00:00'
}
params.processAll.projectId = this.projectId
params.processApprovalRecord = this.approvalInfoForm.getFieldsValue()
params.processApprovalRecord.projectId = this.projectId
params.map = {}
Object.assign(params.map, this.countersignForm.getFieldsValue(), personnelObj)
if (params.map.pass) {
params.map.pass = params.map.pass === '1'
}
resolve(params)
}
})
},
/**
* 转办弹框
*/
handleTurnTo () {
this.$refs.userSelectModal.open()
},
/**
* 转办
*/
continueTurnTo () {
if (this.loading) return
this.loading = true
this.getPageParams().then(res => {
console.log(res)
return transferInspectPlan(res)
}).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 saveInspectPlan(res)
}).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warn(res.message)
}
}).finally(() => {
this.loading = false
})
},
/**
* 提交
*/
handleSubmit () {
if (this.loading) return
this.currentNode = +this.currentNode + 1 + ''
this.loading = true
let fn
if (this.currentNode === EsInspectionPlan.initiate.value) {
fn = startInspectPlan
} else if (this.currentNode === EsInspectionPlan.fillInComments.value) {
fn = approvalInspectPlan
} else if (this.currentNode === EsInspectionPlan.liaisonCollect.value) {
fn = approvalInspectPlan
}
this.getPageParams().then(res => {
console.log(res)
return fn && fn(res)
}).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warn(res.message)
}
}).finally(() => {
this.loading = false
})
},
/**
* 同意
*/
handleAgree () {
if (this.loading) return
this.currentNode = +this.currentNode + 1 + ''
this.loading = true
this.getPageParams().then(res => {
console.log(res)
return approvalInspectPlan(res)
}).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warn(res.message)
}
}).finally(() => {
this.loading = false
})
},
/**
* 驳回
*/
handleReject () {
if (this.loading) return
this.loading = true
this.getPageParams().then(res => {
console.log(res)
return refusalInspectPlan(res)
}).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warn(res.message)
}
}).finally(() => {
this.loading = false
})
},
// 是否会签改变
changeIsCountersign (val) {
@@ -265,10 +452,28 @@ export default {
} else {
this.isCountersign = null
}
},
/**
* 验证所有表单
* @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)
}
},
mounted () {
this.personnelInfoData = approvalPersonalInfo
}
}
</script>
@@ -17,19 +17,19 @@
<a-form-item :label="$t('workCenter.esInspectionPlan.inspectionBasisStandardNumber')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<standard-selection :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionPlan.inspectionBasisStandardNumber')"
disabledSourceSearch source="3" @nameChange="changeStandardName" type="radio"
v-decorator="['inspectionBasisStandardNumber', validatorRules.inspectionBasisStandardNumber]" />
v-decorator="['inspectNo', validatorRules.inspectionBasisStandardNumber]" />
</a-form-item>
<!-- 稽查依据标准名称 -->
<a-form-item :label="$t('workCenter.esInspectionPlan.inspectionBasisStandardName')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionPlan.inspectionBasisStandardName')"
disabled class="box-input" :maxLength="50"
v-decorator="['inspectionBasisStandardName', validatorRules.inspectionBasisStandardName]" />
v-decorator="['inspectName', validatorRules.inspectionBasisStandardName]" />
</a-form-item>
<!-- 计划稽查对象 -->
<a-form-item :label="$t('workCenter.esInspectionPlan.planInspectionObjects')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-depart :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionPlan.inspectionBasisStandardNumber')"
multi :disabled="disabled"
v-decorator="['planInspectionObjects', validatorRules.planInspectionObjects]" />
v-decorator="['inspectObject', validatorRules.planInspectionObjects]" />
</a-form-item>
<!-- 主责标准化工作组 -->
<!--<a-form-item :label="$t('workCenter.esInspectionPlan.mainDutyStandardizationGroup')" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
@@ -47,43 +47,43 @@
<!-- 主责标准化工作组 -->
<a-form-item :label="$t('workCenter.esInspectionPlan.mainDutyStandardizationGroup')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<work-group-selection :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionPlan.mainDutyStandardizationGroup')"
v-decorator="['mainDutyStandardizationGroup', validatorRules.mainDutyStandardizationGroup]" />
v-decorator="['standardizationWorkGroup', validatorRules.mainDutyStandardizationGroup]" />
</a-form-item>
<!-- 所属部门 -->
<a-form-item :label="$t('workCenter.esInspectionPlan.department')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-depart :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionPlan.inspectionBasisStandardNumber')"
multi :disabled="disabled"
v-decorator="['department', validatorRules.department]" />
v-decorator="['belongDept', validatorRules.department]" />
</a-form-item>
<!-- 计划稽查日期 -->
<a-form-item :label="$t('workCenter.esInspectionPlan.planInspectionDate')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-date date-format="YYYY-MM-DD" style="width: 100%" showType="day"
:placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionPlan.planInspectionDate')"
v-decorator="['planInspectionDate', validatorRules.planInspectionDate]" />
v-decorator="['planInspectDate', validatorRules.planInspectionDate]" />
</a-form-item>
<!-- 稽查负责人 -->
<a-form-item :label="$t('workCenter.esInspectionPlan.inspectionDirector')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<user-selection :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionPlan.solicitingOpinionsFrom')"
type="radio"
v-decorator="['inspectionDirector', validatorRules.inspectionDirector]" />
v-decorator="['inspectUser', validatorRules.inspectionDirector]" />
</a-form-item>
<!-- 标准化组对接人 -->
<a-form-item :label="$t('workCenter.esInspectionPlan.standardizationGroupContactPerson')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<user-selection :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionPlan.solicitingOpinionsFrom')"
type="radio"
v-decorator="['standardizationGroupContactPerson', validatorRules.standardizationGroupContactPerson]" />
v-decorator="['standardizationDockingUser', validatorRules.standardizationGroupContactPerson]" />
</a-form-item>
<!-- 征求意见对象 -->
<a-form-item :label="$t('workCenter.esInspectionPlan.solicitingOpinionsFrom')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<user-selection :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionPlan.solicitingOpinionsFrom')"
type="checkbox"
v-decorator="['solicitingOpinionsFrom', validatorRules.solicitingOpinionsFrom]" />
v-decorator="['objectOfConsultation', validatorRules.solicitingOpinionsFrom]" />
</a-form-item>
<!-- 备注 -->
<a-form-item :label="$t('workCenter.esInspectionPlan.remark')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-textarea :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionPlan.remark')"
:maxLength="500" :rows="4"
v-decorator="['remark', validatorRules.remark]" />
v-decorator="['remarks', validatorRules.remark]" />
</a-form-item>
</a-form>
</a-spin>
@@ -240,7 +240,7 @@ export default {
if (this.confirmLoading) return
this.form.validateFields((err, values) => {
if (!err) {
const value = Object.assign({}, values, this.model)
const value = Object.assign({}, this.model, values)
this.confirmLoading = true
this.$emit('ok', value)
this.confirmLoading = false
@@ -259,7 +259,7 @@ export default {
changeStandardName (value) {
console.log(value)
this.form.setFieldsValue({
inspectionBasisStandardName: value
inspectName: value
})
},
// 获取内部工作组树
@@ -45,13 +45,13 @@
<!-- 操作 -->
<template slot="action" slot-scope="{text, record, index}">
<!-- 编辑 and 删除:节点1 节点3 节点2且当前登录人是创建人 -->
<template v-if="['1', '3'].includes(currentNode) || (currentNode === '2' && $store.getters.userInfo.id === record.userId)">
<template v-if="isInitiateOrLiaisonCollect || (currentNode === EsInspectionPlan.fillInComments.value && $store.getters.userInfo.id === record.userId)">
<a @click="handleEdit(record, index)" >{{ $t('edit') }}</a>
<a-divider type="vertical" />
<a @click="handleDelete(record, index)" >{{ $t('delete') }}</a>
</template>
<!-- 意见 or 填写意见节点2非自己创建的就是意见和填写意见 -->
<template v-else-if="currentNode === '2'">
<template v-else-if="currentNode === EsInspectionPlan.fillInComments.value">
<a v-if="!!record.opinion" @click="handleShowOpinion(record, index)" >{{ $t('workCenter.esInspectionPlan.opinion') }}</a>
<a v-else @click="handleWriteOpinion(record, index)" >{{ $t('workCenter.esInspectionPlan.writeOpinion') }}</a>
</template>
@@ -61,7 +61,7 @@
</div>
<!-- 新增/编辑稽查计划 -->
<inspection-plan-drawer ref="modalForm" @ok="modalFormOk"/>
<inspection-plan-drawer ref="modalForm" @ok="addOrEditOk"/>
<!-- 填写意见意见回显 -->
<write-opinion-modal ref="writeOpinionModal" @ok="modalFormOk"/>
<!-- 节点3所属部门意见-查看 -->
@@ -75,6 +75,7 @@ import JTable from '@comp/jero/JTable'
import InspectionPlanDrawer from '@views/workCenter/enterpriseStandardInspectionPlan/modules/InspectionPlanDrawer'
import WriteOpinionModal from '@views/workCenter/enterpriseStandardInspectionPlan/modules/WriteOpinionModal'
import ShowOpinionModal from '@views/workCenter/enterpriseStandardInspectionPlan/modules/ShowOpinionModal'
import { EsInspectionPlan } from '@/enums/commonEnums'
export default {
name: 'InspectionPlanTable',
@@ -89,38 +90,13 @@ export default {
},
data () {
return {
EsInspectionPlan,
disableMixinCreated: true,
url: {
list: ''
list: '/process/processEsInspectPlan/page'
},
model: {},
dataSource: [
{
id: 1,
inspectionBasisStandardName: '123',
inspectionBasisStandardNumber: '123',
detailFlag: true,
departOpinion: '123',
mainDutyStandardizationGroup: '1699358097292472322'
},
{
id: 3,
inspectionBasisStandardName: 'qaaa',
inspectionBasisStandardNumber: '12asdasdas3',
detailFlag: true,
departOpinion: '123',
opinion: [],
mainDutyStandardizationGroup: '1699358097292472322'
},
{
id: 2,
inspectionBasisStandardName: '123',
inspectionBasisStandardNumber: '123',
detailFlag: true,
departOpinion: '123',
userId: 'e9ca23d68d884d4ebb19d07889727dae'
// mainDutyStandardizationGroup: '1699358097292472322'
}
],
dataSource: [],
allColumns: [
{
title: this.$t('serialNumber'),
@@ -136,56 +112,56 @@ export default {
title: this.$t('workCenter.esInspectionPlan.inspectionBasisStandardNumber'),
align: 'center',
width: 180,
dataIndex: 'inspectionBasisStandardNumber',
dataIndex: 'inspectNo',
scopedSlots: { customRender: 'standard' }
},
{ // 稽查依据标准名称
title: this.$t('workCenter.esInspectionPlan.inspectionBasisStandardName'),
align: 'center',
width: 180,
dataIndex: 'inspectionBasisStandardName',
dataIndex: 'inspectName',
scopedSlots: { customRender: 'standard' }
},
{ // 计划稽查对象
title: this.$t('workCenter.esInspectionPlan.planInspectionObjects'),
align: 'center',
width: 120,
dataIndex: 'planInspectionObjects',
dataIndex: 'inspectObject',
scopedSlots: { customRender: 'text' }
},
{ // 主责标准化工作组
title: this.$t('workCenter.esInspectionPlan.mainDutyStandardizationGroup'),
align: 'center',
width: 150,
dataIndex: 'mainDutyStandardizationGroup',
dataIndex: 'standardizationWorkGroup',
scopedSlots: { customRender: 'text' }
},
{ // 所属部门
title: this.$t('workCenter.esInspectionPlan.department'),
align: 'center',
width: 120,
dataIndex: 'department',
dataIndex: 'belongDept',
scopedSlots: { customRender: 'text' }
},
{ // 计划稽查日期
title: this.$t('workCenter.esInspectionPlan.planInspectionDate'),
align: 'center',
width: 120,
dataIndex: 'planInspectionDate',
dataIndex: 'planInspectDate',
scopedSlots: { customRender: 'text' }
},
{ // 稽查负责人
title: this.$t('workCenter.esInspectionPlan.inspectionDirector'),
align: 'center',
width: 120,
dataIndex: 'inspectionDirector',
dataIndex: 'inspectUser',
scopedSlots: { customRender: 'text' }
},
{ // 标准化组对接人
title: this.$t('workCenter.esInspectionPlan.standardizationGroupContactPerson'),
align: 'center',
width: 140,
dataIndex: 'standardizationGroupContactPerson',
dataIndex: 'standardizationDockingUser',
scopedSlots: { customRender: 'text' }
},
{ // 所属部门人员
@@ -193,15 +169,15 @@ export default {
align: 'center',
width: 120,
dataIndex: 'departmentPersonnel',
showCodeList: ['1'],
showCodeList: [EsInspectionPlan.initiate.value],
scopedSlots: { customRender: 'text' }
},
{ // 创建人
title: this.$t('workCenter.esInspectionPlan.creator'),
align: 'center',
width: 120,
dataIndex: 'creator',
showCodeList: ['2'],
dataIndex: 'createBy',
showCodeList: [EsInspectionPlan.fillInComments.value],
scopedSlots: { customRender: 'text' }
},
{ // 发起人
@@ -209,23 +185,31 @@ export default {
align: 'center',
width: 120,
dataIndex: 'initiator',
showCodeList: ['3', '4', '5'],
showCodeList: [
EsInspectionPlan.liaisonCollect.value,
EsInspectionPlan.relevantPersonnelCountersign.value,
EsInspectionPlan.liaisonLeaderApproval.value
],
scopedSlots: { customRender: 'text' }
},
{ // 所属部门意见
title: this.$t('workCenter.esInspectionPlan.departOpinion'),
align: 'center',
width: 120,
dataIndex: 'departOpinion',
showCodeList: ['3'],
dataIndex: 'opinion',
showCodeList: [EsInspectionPlan.liaisonCollect.value],
scopedSlots: { customRender: 'departOpinion' }
},
{
fixed: 'right',
// 操作
showCodeList: ['1', '2', '3'],
showCodeList: [
EsInspectionPlan.initiate.value,
EsInspectionPlan.fillInComments.value,
EsInspectionPlan.liaisonCollect.value
],
title: this.$t('operation'),
// dataIndex: 'action',
dataIndex: 'action',
align: 'center',
width: 180,
scopedSlots: { customRender: 'action' }
@@ -234,6 +218,11 @@ export default {
}
},
computed: {
// 是否发起节点和联络人汇总节点
isInitiateOrLiaisonCollect () {
const arr = [EsInspectionPlan.initiate.value, EsInspectionPlan.liaisonCollect.value]
return arr.includes(this.currentNode)
},
// 按节点进行过滤
columns () {
return this.allColumns.filter(item => {
@@ -250,6 +239,30 @@ export default {
},
methods: {
getData () {
return this.dataSource
},
// 表单提交
addOrEditOk (formData) {
console.log(formData)
if (formData.id) {
// 编辑
for (let i = 0; i < this.dataSource.length; i++) {
if (this.dataSource[i].id === formData.id) {
this.dataSource.splice(i, 1, formData)
return
}
}
} else {
// 添加
formData.id = this.dataSource.length
this.dataSource.push(formData)
}
},
// 更新表格数据
updateData (list) {
this.dataSource = list || []
},
// 跳转详情
detailClick (record) {
this.$openPageNewSheet({
@@ -76,7 +76,7 @@
<!-- 稽查内容节点2只查看后续不显示 -->
<inspection-process-content ref="inspectionProcessContent" @ok="modalFormOk" :disabled="['2'].includes(currentNode)"/>
<!-- 稽查报告节点3填写后续只查看 -->
<inspection-process-report ref="inspectionProcessReport" @ok="modalFormOk" :disabled="['4', '5'].includes(currentNode)"/>
<inspection-process-report v-drag-modal ref="inspectionProcessReport" @ok="modalFormOk" :disabled="['4', '5'].includes(currentNode)"/>
<!-- 整改计划节点3填写后续只查看 -->
<inspection-process-rectification-plan ref="inspectionProcessRectificationPlan" @ok="modalFormOk" :disabled="['4', '5'].includes(currentNode)"/>
</div>
@@ -188,10 +188,15 @@ export default {
case '15':
path = '/workCenter/enterpriseStandardStartUse/enterpriseStandardStartUseFlow'
break
// 企标稽查计划
case '16':
path = '/workCenter/EnterpriseStandardInspectionPlan'
break
}
this.$router.push({
path: path,
query: {
projectId: record.projectId,
taskName: record.taskName,
taskId: record.taskId, // 任务id
processInstanceId: record.processInstanceId, // 流程实例id,必须传人员信息右侧表格查询需要用