242 lines
7.9 KiB
Vue
242 lines
7.9 KiB
Vue
<template>
|
|
<internal-detail-page :title="pageTitle" :content-padding="0">
|
|
<!-- 标题右侧tab -->
|
|
<template v-slot:titleRightCustom>
|
|
<div class="table-operator-tab">
|
|
<!-- 基础信息 -->
|
|
<a class="switch-item" :class="switchValue === 'base' ? 'table-operator-tab-active' : ''"
|
|
@click="switchChange('base')">{{ $t('basicInformation') }}
|
|
</a>
|
|
<!-- 人员信息 -->
|
|
<a class="switch-item" :class="switchValue === 'user' ? 'table-operator-tab-active' : ''"
|
|
@click="switchChange('user')">{{ $t('personalInformation') }}
|
|
</a>
|
|
</div>
|
|
</template>
|
|
|
|
<!--基本信息-->
|
|
<div class="detail-page-scroll-content" v-show="switchValue === 'base'">
|
|
<!-- 流程信息 -->
|
|
<div class="process-part-title">{{ $t('processInformation') }}</div>
|
|
<a-form :form="processInfoForm">
|
|
<a-row>
|
|
<a-col :span="12">
|
|
<!-- 流程名称 -->
|
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')">
|
|
<a-input :placeholder="$t('pleaseEnter') + $t('processName')"
|
|
@change="event => event.target.value = event.target.value.trim()"
|
|
:disabled="disabled || processDisabled"
|
|
:maxLength="50"
|
|
v-decorator="['processName', validatorRules.processName]" />
|
|
</a-form-item>
|
|
</a-col>
|
|
<a-col :span="12">
|
|
<!-- 截止日期 -->
|
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('expirationDate')">
|
|
<a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')"
|
|
style="width: 100%"
|
|
:disabled="disabled || processDisabled"
|
|
value-format="YYYY-MM-DD"
|
|
v-decorator="['expirationDate']" />
|
|
</a-form-item>
|
|
</a-col>
|
|
<a-col :span="24">
|
|
<!-- 流程说明 -->
|
|
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('processExplain')">
|
|
<a-textarea :placeholder="$t('pleaseEnter') + $t('processExplain')"
|
|
:maxLength="500"
|
|
:rows="4"
|
|
:disabled="disabled || processDisabled"
|
|
v-decorator="['processExplain']" />
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-row>
|
|
</a-form>
|
|
|
|
<!-- 业务基本信息 -->
|
|
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
|
|
<!-- 流程表格 -->
|
|
<inspection-process-table :current-node="currentNode" />
|
|
|
|
<!-- 流程审批信息 -->
|
|
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
|
|
<a-form :form="approvalInfoForm">
|
|
<!--备注-->
|
|
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('remarks')">
|
|
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
|
|
:maxLength="500"
|
|
:rows="4"
|
|
v-decorator="['remarks', validatorRules.remarks]" />
|
|
</a-form-item>
|
|
<!--附件-->
|
|
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('businessSupport.questionAnswer.attach')">
|
|
<j-upload v-decorator="['file']" 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>
|
|
</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>
|
|
</div>
|
|
</internal-detail-page>
|
|
</template>
|
|
|
|
<script>
|
|
import InternalDetailPage from '@comp/InternalDetailPage'
|
|
import ProcessDetailList from '@comp/ProcessDetailList'
|
|
import PersonnelInfo from '@comp/PersonnelInfo'
|
|
import InspectionProcessTable
|
|
from '@views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessTable'
|
|
|
|
// 标准立项的人员信息
|
|
const approvalPersonalInfo = [ // 人员信息的数据
|
|
{
|
|
id: 1,
|
|
nodeName: '稽查负责人发起计划',
|
|
nodeRoleName: '稽查负责人',
|
|
canChoose: false,
|
|
userList: `系统管理员`
|
|
},
|
|
{
|
|
id: 2,
|
|
nodeName: '负责人主管级领导审批',
|
|
nodeRoleName: '负责人主管级领导',
|
|
canChoose: true,
|
|
chooseType: 'checkbox',
|
|
// chooseSource: 'contactManage',
|
|
fieldName: 'contactUser'
|
|
},
|
|
{
|
|
id: 3,
|
|
nodeName: '稽查负责人上传稽查报告和整改计划',
|
|
nodeRoleName: '稽查负责人',
|
|
canChoose: false,
|
|
chooseType: 'checkbox',
|
|
// chooseSource: 'contactManage',
|
|
fieldName: 'contactUser'
|
|
},
|
|
{
|
|
id: 4,
|
|
nodeName: '负责人主管级领导审批',
|
|
nodeRoleName: '负责人主管级领导',
|
|
canChoose: false,
|
|
chooseType: 'radio',
|
|
// chooseSource: 'contactManage',
|
|
fieldName: 'contactUser'
|
|
},
|
|
{
|
|
id: 5,
|
|
nodeName: '相关人员会签',
|
|
nodeRoleName: '相关人员',
|
|
canChoose: true,
|
|
chooseType: 'checkbox',
|
|
// chooseSource: 'contactManage',
|
|
fieldName: 'contactUser'
|
|
}
|
|
]
|
|
|
|
export default {
|
|
name: 'EnterpriseStandardInspectionProcess',
|
|
components: { InspectionProcessTable, PersonnelInfo, ProcessDetailList, InternalDetailPage },
|
|
data () {
|
|
return {
|
|
loading: false,
|
|
switchValue: 'base',
|
|
disabled: false,
|
|
labelCol: {
|
|
xs: { span: 24 },
|
|
sm: { span: 4 }
|
|
},
|
|
wrapperCol: {
|
|
xs: { span: 24 },
|
|
sm: { span: 20 }
|
|
},
|
|
longLabelCol: {
|
|
xs: { span: 24 },
|
|
sm: { span: 2 }
|
|
},
|
|
longWrapperCol: {
|
|
xs: { span: 24 },
|
|
sm: { span: 22 }
|
|
},
|
|
currentNode: '5',
|
|
personnelInfoData: [], // 人员信息数据
|
|
validatorRules: {
|
|
// 流程名称
|
|
processName: {
|
|
rules: [
|
|
{ required: true, message: this.$t('pleaseEnter') + this.$t('processName') }
|
|
],
|
|
validateTrigger: 'blur'
|
|
},
|
|
// 备注
|
|
remarks: {
|
|
rules: [
|
|
{ required: false, message: this.$t('pleaseEnter') + this.$t('remarks') }
|
|
],
|
|
validateTrigger: 'blur'
|
|
}
|
|
},
|
|
processInfoForm: this.$form.createForm(this),
|
|
countersignForm: this.$form.createForm(this),
|
|
approvalInfoForm: this.$form.createForm(this),
|
|
// 是否会签
|
|
isCountersign: null,
|
|
url: {
|
|
list: '' // 人员信息右侧表的分页查询接口
|
|
}
|
|
}
|
|
},
|
|
computed: {
|
|
pageTitle () {
|
|
return this.$t('flowCenter') + this.$route.meta.title
|
|
},
|
|
processDisabled () {
|
|
return +this.currentNode > 1
|
|
}
|
|
},
|
|
methods: {
|
|
switchChange (value) {
|
|
this.switchValue = value
|
|
},
|
|
handleSave () {
|
|
// if (this.loading) return
|
|
|
|
},
|
|
handleSubmit () {
|
|
if (this.loading) return
|
|
this.currentNode = +this.currentNode + 1 + ''
|
|
},
|
|
handleAgree () {
|
|
if (this.loading) return
|
|
this.currentNode = +this.currentNode + 1 + ''
|
|
},
|
|
// 是否会签改变
|
|
changeIsCountersign (val) {
|
|
if (val === '1') {
|
|
this.isCountersign = true
|
|
} else if (val === '2') {
|
|
this.isCountersign = false
|
|
} else {
|
|
this.isCountersign = null
|
|
}
|
|
}
|
|
},
|
|
mounted () {
|
|
this.personnelInfoData = approvalPersonalInfo
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
|
|
</style>
|