[update] 联调企标计划立项/变更流程

This commit is contained in:
lideqin
2023-10-16 20:34:08 +08:00
parent 2db880c6b7
commit 48ac6dd11e
18 changed files with 374 additions and 193 deletions
+5 -2
View File
@@ -813,7 +813,7 @@
/*流程表单样式end*/ /*流程表单样式end*/
/* 按钮中发那个自定义图标的样式 */ /* 按钮中使用自定义图标的样式 */
/deep/ .ant-btn { /deep/ .ant-btn {
.iconfont { .iconfont {
margin-right: 8px; margin-right: 8px;
@@ -825,9 +825,12 @@
.iconfont { .iconfont {
display: none; display: none;
} }
span {
margin-left: 8px;
}
} }
/* 按钮中发那个自定义图标的样式 end */ /* 按钮中使用自定义图标的样式 end */
.detail-page-bottom-operate-box { .detail-page-bottom-operate-box {
height: 52px; height: 52px;
+1
View File
@@ -156,6 +156,7 @@ module.exports = {
pleaseFillInAtLeastOneItem: 'Please Fill In At Least One Item', pleaseFillInAtLeastOneItem: 'Please Fill In At Least One Item',
addAtLeastOneRowOfData: 'Please Add At Least One Row Of Data', addAtLeastOneRowOfData: 'Please Add At Least One Row Of Data',
mergeStandardInformation: '合并标准信息', mergeStandardInformation: '合并标准信息',
pleaseEnterPersonnelInfo: '请完整填写人员信息',
// 树右键 // 树右键
treeRight: { treeRight: {
addFolder: 'Create New Folder', addFolder: 'Create New Folder',
+1
View File
@@ -159,6 +159,7 @@ module.exports = {
pleaseFillInAtLeastOneItem: '请至少填写一项', pleaseFillInAtLeastOneItem: '请至少填写一项',
addAtLeastOneRowOfData: '请至少添加一行数据', addAtLeastOneRowOfData: '请至少添加一行数据',
mergeStandardInformation: '合并标准信息', mergeStandardInformation: '合并标准信息',
pleaseEnterPersonnelInfo: '请完整填写人员信息',
// 树右键 // 树右键
treeRight: { treeRight: {
addFolder: '新增文件夹', addFolder: '新增文件夹',
+1
View File
@@ -82,6 +82,7 @@ export default {
data: { data: {
handler () { handler () {
this.stepsData = JSON.parse(JSON.stringify(this.data)) this.stepsData = JSON.parse(JSON.stringify(this.data))
console.log(this.stepsData)
this.currentNodeIndex = this.stepsData.findIndex(tt => tt.nodeName === this.currentNode) this.currentNodeIndex = this.stepsData.findIndex(tt => tt.nodeName === this.currentNode)
}, },
deep: true, deep: true,
@@ -99,7 +99,7 @@ export default {
position: relative; position: relative;
display: flex; display: flex;
align-items: center; align-items: center;
height: 39.98px; //height: 39.98px;
.user-input { .user-input {
resize: none; resize: none;
@@ -43,8 +43,8 @@
</div> </div>
<p class="modal-content-title">{{ $t('userSelect.selectedPersonnel') }}</p> <p class="modal-content-title">{{ $t('userSelect.selectedPersonnel') }}</p>
<div v-if="dataSourceRight && dataSourceRight.length > 0" class="name-content"> <div v-if="dataSourceRight && dataSourceRight.length > 0" class="name-content">
<div v-for="(item, index) in dataSourceRight" :key="item.id" class="name-div"> <div v-for="(item, index) in dataSourceRight" :key="item.contactId" class="name-div">
{{ item.realname + '(' + item.username + ')' }} {{ item.contactId_dictText }}
<a-icon type="close" @click="handleDelete(item, index)" /> <a-icon type="close" @click="handleDelete(item, index)" />
</div> </div>
</div> </div>
@@ -192,7 +192,7 @@ export default {
if (selectedRowKeys.length > this.dataSourceRight.length) { if (selectedRowKeys.length > this.dataSourceRight.length) {
// 说明是增加了数据 // 说明是增加了数据
for (const rowIndex in selectedRows) { for (const rowIndex in selectedRows) {
if (!this.dataSourceRight.find(item => item.id === selectedRows[rowIndex].id)) { if (!this.dataSourceRight.find(item => item.contactId === selectedRows[rowIndex].contactId)) {
// 右侧不存在,追加到右侧表格 // 右侧不存在,追加到右侧表格
this.dataSourceRight.push(selectedRows[rowIndex]) this.dataSourceRight.push(selectedRows[rowIndex])
} }
@@ -202,7 +202,7 @@ export default {
if (selectedRowKeys && selectedRowKeys.length > 0) { if (selectedRowKeys && selectedRowKeys.length > 0) {
// 没有选中数据,说明这一页没有选中数据了 // 没有选中数据,说明这一页没有选中数据了
for (let i = 0; i < this.dataSourceRight.length; i++) { for (let i = 0; i < this.dataSourceRight.length; i++) {
if (!selectedRowKeys.find(item => item === this.dataSourceRight[i].id)) { if (!selectedRowKeys.find(item => item === this.dataSourceRight[i].contactId)) {
// 表格选中中没有找到这一条数据,说明已经被删了 // 表格选中中没有找到这一条数据,说明已经被删了
this.dataSourceRight.splice(i, 1) this.dataSourceRight.splice(i, 1)
i-- i--
@@ -229,7 +229,12 @@ export default {
this.loadingRight = true this.loadingRight = true
getAction(this.url.userListByIds, params).then((res) => { getAction(this.url.userListByIds, params).then((res) => {
if (res.success) { if (res.success) {
this.dataSourceRight = res.result || [] this.dataSourceRight = res.result.map(item => {
return {
contactId: item.id,
contactId_dictText: item.realname + '(' + item.username + ')'
}
}) || []
} else { } else {
this.$message.warn(res.message) this.$message.warn(res.message)
} }
@@ -240,12 +245,12 @@ export default {
// 名字列表的删除 // 名字列表的删除
handleDelete (record, index) { handleDelete (record, index) {
this.dataSourceRight.splice(index, 1) this.dataSourceRight.splice(index, 1)
this.selectedRowKeys = this.selectedRowKeys.filter(item => item !== record.id) this.selectedRowKeys = this.selectedRowKeys.filter(item => item !== record.contactId)
}, },
handleOk () { handleOk () {
this.$emit('change', this.selectedRowKeys.join(',')) this.$emit('change', this.selectedRowKeys.join(','))
this.$emit('listChange', this.dataSourceRight) this.$emit('listChange', this.dataSourceRight)
this.$emit('nameChange', this.dataSourceRight.map(item => item.realname + '(' + item.username + ')').join(',')) this.$emit('nameChange', this.dataSourceRight.map(item => item.contactId_dictText).join(','))
this.close() this.close()
}, },
handleCancel () { handleCancel () {
@@ -96,7 +96,7 @@ export default {
position: relative; position: relative;
display: flex; display: flex;
align-items: center; align-items: center;
height: 39.98px; //height: 39.98px;
.user-input { .user-input {
resize: none; resize: none;
@@ -30,20 +30,20 @@
<a-input :placeholder="$t('pleaseEnter')+$t('system.internalWorkGroup.post')" v-model="queryParam.userPostName"></a-input> <a-input :placeholder="$t('pleaseEnter')+$t('system.internalWorkGroup.post')" v-model="queryParam.userPostName"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="6"> <!--<a-col :span="6">-->
<a-form-item :label="$t('userSelect.workGroup')" :labelCol="labelCol" :wrapperCol="wrapperCol"> <!-- <a-form-item :label="$t('userSelect.workGroup')" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
<a-tree-select <!-- <a-tree-select-->
tree-node-filter-prop="title" <!-- tree-node-filter-prop="title"-->
v-model="queryParam.workingGroupId" <!-- v-model="queryParam.workingGroupId"-->
:maxTagCount="1" <!-- :maxTagCount="1"-->
:show-search="true" <!-- :show-search="true"-->
:getPopupContainer="triggerNode=> triggerNode.parentNode" <!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
style="width: 100%" <!-- style="width: 100%"-->
:tree-data="workingGroupTreeList" <!-- :tree-data="workingGroupTreeList"-->
:placeholder="$t('pleaseSelect')" <!-- :placeholder="$t('pleaseSelect')"-->
/> <!-- />-->
</a-form-item> <!-- </a-form-item>-->
</a-col> <!--</a-col>-->
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons"> <span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-button style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button> <a-button style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
<a-button style="margin-left: 8px" type="primary" @click="searchQuery">{{$t('query')}}</a-button> <a-button style="margin-left: 8px" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
@@ -54,7 +54,7 @@
<div class="modal-content"> <div class="modal-content">
<a-table <a-table
:columns="columns" :columns="columns"
rowKey="userId" rowKey="id"
bordered bordered
:scroll="{x: '100%'}" :scroll="{x: '100%'}"
:data-source="dataSource" :data-source="dataSource"
@@ -164,7 +164,7 @@ export default {
dataSourceRight: [], dataSourceRight: [],
workingGroupTreeList: [], // 内部工作组下拉框数据 workingGroupTreeList: [], // 内部工作组下拉框数据
url: { url: {
userList: '/sys/lawsWorkingGroupUser/page', userList: '/act/user/workGroupPage',
userListByIds: '/sys/user/queryByIds' userListByIds: '/sys/user/queryByIds'
} }
} }
@@ -237,7 +237,7 @@ export default {
if (selectedRowKeys.length > this.dataSourceRight.length) { if (selectedRowKeys.length > this.dataSourceRight.length) {
// 说明是增加了数据 // 说明是增加了数据
for (const rowIndex in selectedRows) { for (const rowIndex in selectedRows) {
if (!this.dataSourceRight.find(item => item.userId === selectedRows[rowIndex].userId)) { if (!this.dataSourceRight.find(item => item.id === selectedRows[rowIndex].id)) {
// 右侧不存在,追加到右侧表格 // 右侧不存在,追加到右侧表格
this.dataSourceRight.push(selectedRows[rowIndex]) this.dataSourceRight.push(selectedRows[rowIndex])
} }
@@ -247,7 +247,7 @@ export default {
if (selectedRowKeys && selectedRowKeys.length > 0) { if (selectedRowKeys && selectedRowKeys.length > 0) {
// 没有选中数据,说明这一页没有选中数据了 // 没有选中数据,说明这一页没有选中数据了
for (let i = 0; i < this.dataSourceRight.length; i++) { for (let i = 0; i < this.dataSourceRight.length; i++) {
if (!selectedRowKeys.find(item => item === this.dataSourceRight[i].userId)) { if (!selectedRowKeys.find(item => item === this.dataSourceRight[i].id)) {
// 表格选中中没有找到这一条数据,说明已经被删了 // 表格选中中没有找到这一条数据,说明已经被删了
this.dataSourceRight.splice(i, 1) this.dataSourceRight.splice(i, 1)
i-- i--
@@ -285,7 +285,7 @@ export default {
// 名字列表的删除 // 名字列表的删除
handleDelete (record, index) { handleDelete (record, index) {
this.dataSourceRight.splice(index, 1) this.dataSourceRight.splice(index, 1)
this.selectedRowKeys = this.selectedRowKeys.filter(item => item !== record.userId) this.selectedRowKeys = this.selectedRowKeys.filter(item => item !== record.id)
}, },
handleOk () { handleOk () {
this.$emit('change', this.selectedRowKeys.join(',')) this.$emit('change', this.selectedRowKeys.join(','))
+1 -1
View File
@@ -97,7 +97,7 @@ export default {
position: relative; position: relative;
display: flex; display: flex;
align-items: center; align-items: center;
height: 39.98px; //height: 39.98px;
.user-input { .user-input {
resize: none; resize: none;
+8 -8
View File
@@ -78,17 +78,17 @@ export const OperationType = {
// 企标计划立项/变更流程-申请类型 // 企标计划立项/变更流程-申请类型
export const ApplicationCategory = { export const ApplicationCategory = {
INITIATION: { text: '立项', value: '1' }, INITIATION: { text: '立项', value: '3' },
CHANGE: { text: '变更', value: '2' } CHANGE: { text: '变更', value: '4' }
} }
// 企标计划立项/变更流程-项目类别 // 企标计划立项/变更流程-项目类别
export const ProjectType = { export const ProjectType = {
ENACT: { text: '制定', value: '5' }, ENACT: { text: '制定', value: '1' },
MODIFY: { text: '修订', value: '6' }, MODIFY: { text: '修订', value: '2' },
COMPLETE_TIME_CHANGE: { text: '完成时间变更', value: '1' }, COMPLETE_TIME_CHANGE: { text: '完成时间变更', value: '3' },
WORK_TERMINATE: { text: '工作中止', value: '2' }, WORK_TERMINATE: { text: '工作中止', value: '4' },
RESPONSIBLE_DEPT_CHANGE: { text: '责任部门变更', value: '3' }, RESPONSIBLE_DEPT_CHANGE: { text: '责任部门变更', value: '5' },
MERGE: { text: '合并', value: '4' } MERGE: { text: '合并', value: '6' }
} }
// 文档拆分-拆分状态 // 文档拆分-拆分状态
@@ -22,7 +22,7 @@
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')">
<a-input :placeholder="$t('pleaseEnter') + $t('processName')" <a-input :placeholder="$t('pleaseEnter') + $t('processName')"
@change="event => event.target.value = event.target.value.trim()" @change="event => event.target.value = event.target.value.trim()"
:disabled="disabled" :disabled="disabled || processNameDisabled"
:maxLength="50" :maxLength="50"
v-decorator="['processName', validatorRules.processName]" /> v-decorator="['processName', validatorRules.processName]" />
</a-form-item> </a-form-item>
@@ -65,18 +65,18 @@
</span> </span>
</div> </div>
<a-form-model-item class="item-model" prop="applicationCategory"> <a-form-model-item class="item-model" prop="applicationCategory">
<j-dict-select-tag v-model="formInline.applicationCategory" <!--<j-dict-select-tag v-model="formInline.applicationCategory"-->
:disabled="disabled" <!-- :disabled="disabled"-->
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.applicationType')" <!-- :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.applicationType')"-->
:type="'select'" <!-- :type="'select'"-->
:triggerChange="false" <!-- :triggerChange="false"-->
dictCode="esp_application_category" /> <!-- dictCode="esp_application_category" />-->
<!--<a-select v-model="formInline.applicationCategory"--> <a-select v-model="formInline.applicationCategory"
<!-- :disabled="disabled"--> :disabled="disabled"
<!-- :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.applicationType')">--> :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.applicationType')">
<!-- <a-select-option :value="ApplicationCategory.INITIATION.value">{{ $t('workCenter.enterpriseInitChangePlan.standardProjectEstablishment') }}</a-select-option>--> <a-select-option :value="ApplicationCategory.INITIATION.value">{{ $t('workCenter.enterpriseInitChangePlan.standardProjectEstablishment') }}</a-select-option>
<!-- <a-select-option :value="ApplicationCategory.CHANGE.value">{{ $t('workCenter.enterpriseInitChangePlan.change') }}</a-select-option>--> <a-select-option :value="ApplicationCategory.CHANGE.value">{{ $t('workCenter.enterpriseInitChangePlan.change') }}</a-select-option>
<!--</a-select>--> </a-select>
</a-form-model-item> </a-form-model-item>
</div> </div>
<!-- 项目类别 --> <!-- 项目类别 -->
@@ -91,12 +91,11 @@
<a-select v-if="formInline.applicationCategory === ApplicationCategory.INITIATION.value" <a-select v-if="formInline.applicationCategory === ApplicationCategory.INITIATION.value"
v-model="formInline.projectType" v-model="formInline.projectType"
:disabled="disabled" :disabled="disabled"
@change="projectTypeChange"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.itemCategory')"> :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.itemCategory')">
<a-select-option :value="ProjectType.ENACT.value">{{ $t('workCenter.enterpriseInitChangePlan.formulate') }}</a-select-option> <a-select-option :value="ProjectType.ENACT.value">{{ $t('workCenter.enterpriseInitChangePlan.formulate') }}</a-select-option>
<a-select-option :value="ProjectType.MODIFY.value">{{ $t('workCenter.enterpriseInitChangePlan.revise') }}</a-select-option> <a-select-option :value="ProjectType.MODIFY.value">{{ $t('workCenter.enterpriseInitChangePlan.revise') }}</a-select-option>
</a-select> </a-select>
<a-select v-else <a-select v-else-if="formInline.applicationCategory === ApplicationCategory.CHANGE.value"
v-model="formInline.projectType" v-model="formInline.projectType"
:disabled="disabled" :disabled="disabled"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.itemCategory')"> :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.itemCategory')">
@@ -105,6 +104,11 @@
<a-select-option :value="ProjectType.RESPONSIBLE_DEPT_CHANGE.value">{{ $t('workCenter.enterpriseInitChangePlan.dutyDepartChange') }}</a-select-option> <a-select-option :value="ProjectType.RESPONSIBLE_DEPT_CHANGE.value">{{ $t('workCenter.enterpriseInitChangePlan.dutyDepartChange') }}</a-select-option>
<a-select-option :value="ProjectType.MERGE.value">{{ $t('workCenter.enterpriseInitChangePlan.merge') }}</a-select-option> <a-select-option :value="ProjectType.MERGE.value">{{ $t('workCenter.enterpriseInitChangePlan.merge') }}</a-select-option>
</a-select> </a-select>
<a-select v-else
v-model="formInline.projectType"
:disabled="disabled"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.itemCategory')">
</a-select>
</a-form-model-item> </a-form-model-item>
</div> </div>
</div> </div>
@@ -116,6 +120,7 @@
ref="approvalBaseInfo" ref="approvalBaseInfo"
:disabled="disabled" :disabled="disabled"
:currentNode="currentNode" :currentNode="currentNode"
@processNameChange="processNameChange"
:projectType="formInline.projectType"> :projectType="formInline.projectType">
</approval-base-info> </approval-base-info>
<!-- 申请类型为变更,项目类型为完成时间变更时的业务基本信息部分组件 --> <!-- 申请类型为变更,项目类型为完成时间变更时的业务基本信息部分组件 -->
@@ -141,6 +146,7 @@
v-else-if="formInline.applicationCategory === ApplicationCategory.CHANGE.value && formInline.projectType === ProjectType.RESPONSIBLE_DEPT_CHANGE.value" v-else-if="formInline.applicationCategory === ApplicationCategory.CHANGE.value && formInline.projectType === ProjectType.RESPONSIBLE_DEPT_CHANGE.value"
ref="changeBaseInfo" ref="changeBaseInfo"
:disabled="disabled" :disabled="disabled"
@processNameChange="processNameChange"
:projectType="formInline.projectType" :projectType="formInline.projectType"
> >
</duty-depart-change-base-info> </duty-depart-change-base-info>
@@ -149,6 +155,7 @@
v-else-if="formInline.applicationCategory === ApplicationCategory.CHANGE.value && formInline.projectType === ProjectType.MERGE.value" v-else-if="formInline.applicationCategory === ApplicationCategory.CHANGE.value && formInline.projectType === ProjectType.MERGE.value"
ref="changeBaseInfo" ref="changeBaseInfo"
:disabled="disabled" :disabled="disabled"
@processNameChange="processNameChange"
:projectType="formInline.projectType" :projectType="formInline.projectType"
> >
</merge-base-info> </merge-base-info>
@@ -213,7 +220,7 @@
<!-- 转办 --> <!-- 转办 -->
<a-button type="primary" ghost :loading="loading" @click="handleTurnTo" icon="arrow-up">{{ $t('turnTo') }}</a-button> <a-button type="primary" ghost :loading="loading" @click="handleTurnTo" icon="arrow-up">{{ $t('turnTo') }}</a-button>
<!-- 保存 --> <!-- 保存 -->
<a-button type="primary" ghost :loading="loading" @click="handleSave"><i class="iconfont icon-save"></i> {{ $t('save') }}</a-button> <a-button type="primary" ghost :loading="loading" @click="handleSave"><i class="iconfont icon-save"></i> {{ $t('preservation') }}</a-button>
<!-- 提交 --> <!-- 提交 -->
<a-button type="primary" :loading="loading" @click="handleSubmit" icon="upload">{{ $t('submit') }}</a-button> <a-button type="primary" :loading="loading" @click="handleSubmit" icon="upload">{{ $t('submit') }}</a-button>
</template> </template>
@@ -225,7 +232,7 @@
<!-- 转办 --> <!-- 转办 -->
<a-button type="primary" ghost :loading="loading" @click="handleTurnTo" icon="arrow-up">{{ $t('turnTo') }}</a-button> <a-button type="primary" ghost :loading="loading" @click="handleTurnTo" icon="arrow-up">{{ $t('turnTo') }}</a-button>
<!-- 保存 --> <!-- 保存 -->
<a-button type="primary" ghost :loading="loading" @click="handleSave"><i class="iconfont icon-save"></i> {{ $t('save') }}</a-button> <a-button type="primary" ghost :loading="loading" @click="handleSave"><i class="iconfont icon-save"></i> {{ $t('preservation') }}</a-button>
<!-- 同意 --> <!-- 同意 -->
<a-button type="primary" :loading="loading" @click="handleAgree" icon="check-circle">{{ $t('agree') }}</a-button> <a-button type="primary" :loading="loading" @click="handleAgree" icon="check-circle">{{ $t('agree') }}</a-button>
<!-- 驳回 --> <!-- 驳回 -->
@@ -259,6 +266,9 @@ import JobEndBaseInfo from './modules/JobEndBaseInfo'
import DutyDepartChangeBaseInfo from './modules/DutyDepartChangeBaseInfo' import DutyDepartChangeBaseInfo from './modules/DutyDepartChangeBaseInfo'
import MergeBaseInfo from './modules/MergeBaseInfo' import MergeBaseInfo from './modules/MergeBaseInfo'
import { ProjectType, ApplicationCategory } from '@/enums/commonEnums' import { ProjectType, ApplicationCategory } from '@/enums/commonEnums'
import Vue from 'vue'
import { USER_INFO } from '@/store/mutation-types'
import pick from 'lodash.pick'
// 标准立项的人员信息 // 标准立项的人员信息
const approvalPersonalInfo = [ // 人员信息的数据 const approvalPersonalInfo = [ // 人员信息的数据
@@ -266,7 +276,8 @@ const approvalPersonalInfo = [ // 人员信息的数据
id: 1, id: 1,
nodeName: '主起草人发起', nodeName: '主起草人发起',
nodeRoleName: '发起人', nodeRoleName: '发起人',
canChoose: false canChoose: false,
userList: Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')'
}, },
{ {
id: 2, id: 2,
@@ -359,32 +370,28 @@ const changePersonalInfo = [
nodeName: '新起草部门主管级上一级领导下发', nodeName: '新起草部门主管级上一级领导下发',
nodeRoleName: '新起草部门主管级上一级领导', nodeRoleName: '新起草部门主管级上一级领导',
canChoose: false, canChoose: false,
chooseType: 'radio', chooseType: 'radio'
fieldName: 'newMainDraftUserLeaderLeader'
}, },
{ {
id: 7, id: 7,
nodeName: '新起草部门主管级领导确认', nodeName: '新起草部门主管级领导确认',
nodeRoleName: '新起草部门主管级领导', nodeRoleName: '新起草部门主管级领导',
canChoose: false, canChoose: false,
chooseType: 'radio', chooseType: 'radio'
fieldName: 'newMainDraftUserLeader'
}, },
{ {
id: 8, id: 8,
nodeName: '相关人员会签', nodeName: '相关人员会签',
nodeRoleName: '相关人员', nodeRoleName: '相关人员',
canChoose: false, canChoose: false,
chooseType: 'checkbox', chooseType: 'checkbox'
fieldName: 'relatedUser'
}, },
{ {
id: 9, id: 9,
nodeName: '抄送主起草人', nodeName: '抄送主起草人',
nodeRoleName: '主起草人', nodeRoleName: '主起草人',
canChoose: false, canChoose: false,
chooseType: 'checkbox', chooseType: 'checkbox'
fieldName: 'copyUser'
} }
] ]
@@ -405,7 +412,36 @@ export default {
computed: { computed: {
pageTitle () { pageTitle () {
return this.$t('flowCenter') + this.$route.meta.title return this.$t('flowCenter') + this.$route.meta.title
},
// 流程名称是否不可填写
processNameDisabled () {
if (this.formInline.applicationCategory === ApplicationCategory.CHANGE.value &&
(this.formInline.projectType === ProjectType.COMPLETE_TIME_CHANGE.value ||
this.formInline.projectType === ProjectType.WORK_TERMINATE.value)) {
// 是完成时间变更或工作终止,流程名称无法自动生成,须填写
return false
} else {
return true
}
} }
// 项目类别下拉框数据
// projectTypeOptions () {
// if (this.formInline.applicationCategory === ApplicationCategory.INITIATION.value) {
// return [
// { value: ProjectType.ENACT.value, label: this.$t('workCenter.enterpriseInitChangePlan.formulate') },
// { value: ProjectType.MODIFY.value, label: this.$t('workCenter.enterpriseInitChangePlan.revise') }
// ]
// } else if (this.formInline.applicationCategory === ApplicationCategory.CHANGE.value) {
// return [
// { value: ProjectType.COMPLETE_TIME_CHANGE.value, label: this.$t('workCenter.enterpriseInitChangePlan.completionTimeChange') },
// { value: ProjectType.WORK_TERMINATE.value, label: this.$t('workCenter.enterpriseInitChangePlan.terminationOfWork') },
// { value: ProjectType.RESPONSIBLE_DEPT_CHANGE.value, label: this.$t('workCenter.enterpriseInitChangePlan.dutyDepartChange') },
// { value: ProjectType.MERGE.value, label: this.$t('workCenter.enterpriseInitChangePlan.merge') },
// ]
// } else {
// return []
// }
// }
}, },
watch: { watch: {
'formInline.applicationCategory' (value) { 'formInline.applicationCategory' (value) {
@@ -414,7 +450,7 @@ export default {
if (this.currentNode === 1) { if (this.currentNode === 1) {
this.personnelInfoData = approvalPersonalInfo this.personnelInfoData = approvalPersonalInfo
} else { } else {
this.personnelInfoData = approvalPersonalInfo.map(item => { this.personnelInfoData = this.personnelInfoData.map(item => {
return { ...item, canChoose: false } return { ...item, canChoose: false }
}) })
} }
@@ -422,7 +458,7 @@ export default {
if (this.currentNode === 1) { if (this.currentNode === 1) {
this.personnelInfoData = changePersonalInfo this.personnelInfoData = changePersonalInfo
} else { } else {
this.personnelInfoData = changePersonalInfo.map(item => { this.personnelInfoData = this.personnelInfoData.map(item => {
return { ...item, canChoose: false } return { ...item, canChoose: false }
}) })
} }
@@ -434,16 +470,14 @@ export default {
} }
}, },
mounted () { mounted () {
console.log(this.$route.query.processId)
if (this.$route.query.processId) { if (this.$route.query.processId) {
this.currentNode = 2 // todo: 先设置一个假数据,后端还不能返回当前节点
// 有流程id说明是从流程中心来的,需要初始化数据 // 有流程id说明是从流程中心来的,需要初始化数据
this.getProcessData(this.$route.query.processId) this.getProcessData(this.$route.query.processId)
} }
if (this.currentNode === 1) { if (this.currentNode === 1) {
this.personnelInfoData = approvalPersonalInfo this.personnelInfoData = approvalPersonalInfo
} else {
this.personnelInfoData = approvalPersonalInfo.map(item => {
return { ...item, canChoose: false }
})
} }
// 如果是查看进入的,不可编辑,不可操作 // 如果是查看进入的,不可编辑,不可操作
if (this.$route.query.onlyLook) { if (this.$route.query.onlyLook) {
@@ -460,7 +494,7 @@ export default {
disabled: false, disabled: false,
onlyLook: false, // 是否仅查看 onlyLook: false, // 是否仅查看
currentNode: 1, // 当前节点 currentNode: 1, // 当前节点
model: {}, model: [],
processInfoForm: this.$form.createForm(this), processInfoForm: this.$form.createForm(this),
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
@@ -539,6 +573,64 @@ export default {
getProcessData (processId) { getProcessData (processId) {
getProcessDataById({ processInstanceId: processId }).then(res => { getProcessDataById({ processInstanceId: processId }).then(res => {
if (res.success) { if (res.success) {
this.model = res.result
this.$nextTick(() => {
// 初始化流程信息
this.processInfoForm.setFieldsValue(pick(this.model[0], 'processName', 'deadlineDate', 'processDescription'))
// 初始化流程审批信息
this.approvalInfoForm.setFieldsValue(pick(this.model[0], 'remarks', 'attachment'))
})
// 初始化业务基本信息的申请类型和项目类别
this.formInline.applicationCategory = this.model[0].applicationCategory
this.formInline.projectType = this.model[0].projectType
// 初始化人员信息 todo: 发起人还没处理
if (this.formInline.applicationCategory === ApplicationCategory.INITIATION.value) {
this.personnelInfoData = approvalPersonalInfo.map(item => {
if (item.fieldName) {
return { ...item, userList: this.model[0][item.fieldName + '_dictText'], canChoose: false }
} else {
return item
}
})
} else {
this.personnelInfoData = changePersonalInfo.map(item => {
console.log(item)
if (item.fieldName) {
return { ...item, userList: this.model[0][item.fieldName + '_dictText'], canChoose: false }
} else {
return item
}
})
}
// 初始化业务基本信息中组件内容
if (this.model[0].applicationCategory === ApplicationCategory.INITIATION.value) {
// 是立项
this.$nextTick(() => {
this.$nextTick(() => {
const param = this.model[0]
param.enStandardSystem = param.enStandardSystem.split(',').map(item => { return { value: item } })
this.$refs.approvalBaseInfo.formInline = param
})
})
} else if (this.model[0].applicationCategory === ApplicationCategory.CHANGE.value &&
(this.model[0].projectType === ProjectType.COMPLETE_TIME_CHANGE.value ||
this.model[0].projectType === ProjectType.WORK_TERMINATE.value)) {
// 是完成时间变更或工作终止的变更
this.$nextTick(() => {
this.$refs.changeBaseInfo.dataSource = this.model
})
} else if (this.model[0].applicationCategory === ApplicationCategory.CHANGE.value &&
(this.model[0].projectType === ProjectType.RESPONSIBLE_DEPT_CHANGE.value ||
this.model[0].projectType === ProjectType.MERGE.value)) {
// 是责任部门变更或合并变更
this.$nextTick(() => {
this.$nextTick(() => {
const param = this.model[0]
param.enStandardSystem = param.enStandardSystem.split(',').map(item => { return { value: item } })
this.$refs.changeBaseInfo.formInline = param
})
})
}
console.log(res.result) console.log(res.result)
} else { } else {
this.$message.warning(res.message) this.$message.warning(res.message)
@@ -549,6 +641,13 @@ export default {
switchChange (value) { switchChange (value) {
this.switchValue = value this.switchValue = value
}, },
// 流程名称修改
processNameChange (value) {
const param = { processName: value }
this.$nextTick(() => {
this.processInfoForm.setFieldsValue(pick(param, 'processName'))
})
},
// 保存(业务基本信息那里是表格的就穿给后端数组里多条数据,是表单的就在数组里放一条数据) // 保存(业务基本信息那里是表格的就穿给后端数组里多条数据,是表单的就在数组里放一条数据)
handleSave () { handleSave () {
// 有任意一项填了即可 // 有任意一项填了即可
@@ -577,7 +676,7 @@ export default {
if (approvalBaseInfo.enStandardSystem && approvalBaseInfo.enStandardSystem.length > 0) { if (approvalBaseInfo.enStandardSystem && approvalBaseInfo.enStandardSystem.length > 0) {
approvalBaseInfo.enStandardSystem = approvalBaseInfo.enStandardSystem.map(item => item.value).join(',') approvalBaseInfo.enStandardSystem = approvalBaseInfo.enStandardSystem.map(item => item.value).join(',')
} }
const param = { ...processInfoForm, ...ruleForm, ...approvalBaseInfo, ...approvalInfoForm } const param = { ...processInfoForm, ...ruleForm, ...approvalBaseInfo, ...approvalInfoForm, ...personnelObj }
const flag = Object.values(param).some(v => !!v || v === 0) const flag = Object.values(param).some(v => !!v || v === 0)
if (!flag) { if (!flag) {
// 提示至少填写一项 // 提示至少填写一项
@@ -587,7 +686,7 @@ export default {
arr.push(param) arr.push(param)
} else if (this.formInline.projectType === ProjectType.COMPLETE_TIME_CHANGE.value) { } else if (this.formInline.projectType === ProjectType.COMPLETE_TIME_CHANGE.value) {
// 业务基本信息-变更-完成时间变更 // 业务基本信息-变更-完成时间变更
const param = { ...processInfoForm, ...ruleForm, ...approvalInfoForm } const param = { ...processInfoForm, ...ruleForm, ...approvalInfoForm, ...personnelObj }
const flag = Object.values(param).some(v => !!v || v === 0) const flag = Object.values(param).some(v => !!v || v === 0)
if (!flag && this.$refs.changeBaseInfo.dataSource.length <= 0) { if (!flag && this.$refs.changeBaseInfo.dataSource.length <= 0) {
// 提示至少填写一项 // 提示至少填写一项
@@ -597,7 +696,7 @@ export default {
arr = this.$refs.changeBaseInfo.dataSource.map(item => { return { ...item, ...param } }) arr = this.$refs.changeBaseInfo.dataSource.map(item => { return { ...item, ...param } })
} else if (this.formInline.projectType === ProjectType.WORK_TERMINATE.value) { } else if (this.formInline.projectType === ProjectType.WORK_TERMINATE.value) {
// 业务基本信息-变更-工作终止 // 业务基本信息-变更-工作终止
const param = { ...processInfoForm, ...ruleForm, ...approvalInfoForm } const param = { ...processInfoForm, ...ruleForm, ...approvalInfoForm, ...personnelObj }
const flag = Object.values(param).some(v => !!v || v === 0) const flag = Object.values(param).some(v => !!v || v === 0)
if (!flag && this.$refs.changeBaseInfo.dataSource.length <= 0) { if (!flag && this.$refs.changeBaseInfo.dataSource.length <= 0) {
// 提示至少填写一项 // 提示至少填写一项
@@ -611,7 +710,7 @@ export default {
if (this.$refs.changeBaseInfo) { if (this.$refs.changeBaseInfo) {
dutyDepartChangeForm = this.$refs.changeBaseInfo.formInline dutyDepartChangeForm = this.$refs.changeBaseInfo.formInline
} }
const param = { ...processInfoForm, ...ruleForm, ...dutyDepartChangeForm, ...approvalInfoForm } const param = { ...processInfoForm, ...ruleForm, ...dutyDepartChangeForm, ...approvalInfoForm, ...personnelObj }
const flag = Object.values(param).some(v => !!v || v === 0) const flag = Object.values(param).some(v => !!v || v === 0)
if (!flag) { if (!flag) {
// 提示至少填写一项 // 提示至少填写一项
@@ -625,7 +724,7 @@ export default {
if (this.$refs.changeBaseInfo) { if (this.$refs.changeBaseInfo) {
mergeForm = this.$refs.changeBaseInfo.formInline mergeForm = this.$refs.changeBaseInfo.formInline
} }
const param = { ...processInfoForm, ...ruleForm, ...mergeForm, ...approvalInfoForm } const param = { ...processInfoForm, ...ruleForm, ...mergeForm, ...approvalInfoForm, ...personnelObj }
const flag = Object.values(param).some(v => !!v || v === 0) const flag = Object.values(param).some(v => !!v || v === 0)
if (!flag) { if (!flag) {
// 提示至少填写一项 // 提示至少填写一项
@@ -635,7 +734,7 @@ export default {
arr.push(param) arr.push(param)
} else { } else {
// 还没有选择申请类型和项目类别,需要外层信息至少填了一项 // 还没有选择申请类型和项目类别,需要外层信息至少填了一项
const param = { ...processInfoForm, ...ruleForm, ...approvalBaseInfo, ...approvalInfoForm } const param = { ...processInfoForm, ...ruleForm, ...approvalBaseInfo, ...approvalInfoForm, ...personnelObj }
const flag = Object.values(param).some(v => !!v || v === 0) const flag = Object.values(param).some(v => !!v || v === 0)
if (!flag) { if (!flag) {
// 提示至少填写一项 // 提示至少填写一项
@@ -657,29 +756,35 @@ export default {
// 节点一时候的提交,发起立项变更申请(业务基本信息那里是表格的就穿给后端数组里多条数据,是表单的就在数组里放一条数据) // 节点一时候的提交,发起立项变更申请(业务基本信息那里是表格的就穿给后端数组里多条数据,是表单的就在数组里放一条数据)
handleStart () { handleStart () {
if (this.loading) return if (this.loading) return
// 人员信息的数据, 处理成对象
const personnelInfo = this.$refs.personnelInfo.stepsData
const personnelObj = {}
for (const item of personnelInfo) {
if (item.fieldName) {
personnelObj[item.fieldName] = item.user
}
}
// 校验是否填了所有能填的人员信息
// if (!Object.values(personnelObj).every(v => !!v)) {
// this.$message.warning(this.$t('pleaseEnterPersonnelInfo'))
// return
// }
this.processInfoForm.validateFields((err, values) => { this.processInfoForm.validateFields((err, values) => {
this.$refs.ruleForm.validate(valid => { this.$refs.ruleForm.validate(valid => {
this.approvalInfoForm.validateFields((approvalErr, approvalValues) => { this.approvalInfoForm.validateFields((approvalErr, approvalValues) => {
let arr = [] // 需要传给后端的数据 let arr = [] // 需要传给后端的数据
let haveErr = false // 是否有错误,有错,则不能提交,false没有错 let haveErr = true // 是否有错误,有错,则不能提交,false没有错
// 立项和变更的数据不一样,分开判断 // 立项和变更的数据不一样,分开判断
if (this.formInline.applicationCategory === ApplicationCategory.INITIATION.value) { if (this.formInline.applicationCategory === ApplicationCategory.INITIATION.value) {
// 是立项 // 是立项
this.$refs.approvalBaseInfo.$refs.ruleForm.validate(approvalBaseValid => { this.$refs.approvalBaseInfo.$refs.ruleForm.validate(approvalBaseValid => {
if (valid && approvalBaseValid && !err && !approvalErr) { if (valid && approvalBaseValid && !err && !approvalErr) {
this.loading = true this.loading = true
// 人员信息的数据, 处理成对象
const personnelInfo = this.$refs.personnelInfo.stepsData
const personnelObj = {}
for (const item of personnelInfo) {
if (item.fieldName) {
personnelObj[item.fieldName] = item.user
}
}
const param = Object.assign({}, values, this.formInline, approvalValues, this.$refs.approvalBaseInfo.formInline, personnelObj) const param = Object.assign({}, values, this.formInline, approvalValues, this.$refs.approvalBaseInfo.formInline, personnelObj)
// 企标体系处理成逗号分隔 // 企标体系处理成逗号分隔
param.enStandardSystem = param.enStandardSystem.map(item => item.value).join(',') param.enStandardSystem = param.enStandardSystem.map(item => item.value).join(',')
arr.push(param) arr.push(param)
haveErr = false
} else { } else {
haveErr = true haveErr = true
} }
@@ -689,16 +794,9 @@ export default {
// 是变更-完成时间 或者 变更-工作终止变更 // 是变更-完成时间 或者 变更-工作终止变更
if (valid && !err && !approvalErr && this.$refs.changeBaseInfo && this.$refs.changeBaseInfo.dataSource.length > 0) { if (valid && !err && !approvalErr && this.$refs.changeBaseInfo && this.$refs.changeBaseInfo.dataSource.length > 0) {
this.loading = true this.loading = true
// 人员信息的数据, 处理成对象
const personnelInfo = this.$refs.personnelInfo.stepsData
const personnelObj = {}
for (const item of personnelInfo) {
if (item.fieldName) {
personnelObj[item.fieldName] = item.user
}
}
const param = { ...values, ...this.formInline, ...approvalValues, ...personnelObj } const param = { ...values, ...this.formInline, ...approvalValues, ...personnelObj }
arr = this.$refs.changeBaseInfo.dataSource.map(item => { return { ...item, ...param } }) arr = this.$refs.changeBaseInfo.dataSource.map(item => { return { ...item, ...param } })
haveErr = false
} else { } else {
haveErr = true haveErr = true
if (this.$refs.changeBaseInfo.dataSource.length <= 0) { if (this.$refs.changeBaseInfo.dataSource.length <= 0) {
@@ -710,16 +808,9 @@ export default {
this.$refs.changeBaseInfo.$refs.ruleForm.validate(changeBaseValid => { this.$refs.changeBaseInfo.$refs.ruleForm.validate(changeBaseValid => {
if (valid && changeBaseValid && !err && !approvalErr) { if (valid && changeBaseValid && !err && !approvalErr) {
this.loading = true this.loading = true
// 人员信息的数据, 处理成对象
const personnelInfo = this.$refs.personnelInfo.stepsData
const personnelObj = {}
for (const item of personnelInfo) {
if (item.fieldName) {
personnelObj[item.fieldName] = item.user
}
}
const param = Object.assign({}, values, this.formInline, approvalValues, this.$refs.changeBaseInfo.formInline, personnelObj) const param = Object.assign({}, values, this.formInline, approvalValues, this.$refs.changeBaseInfo.formInline, personnelObj)
arr.push(param) arr.push(param)
haveErr = false
} else { } else {
haveErr = true haveErr = true
} }
@@ -735,16 +826,11 @@ export default {
return return
} }
this.loading = true this.loading = true
// 人员信息的数据, 处理成对象
const personnelInfo = this.$refs.personnelInfo.stepsData
const personnelObj = {}
for (const item of personnelInfo) {
if (item.fieldName) {
personnelObj[item.fieldName] = item.user
}
}
const param = Object.assign({}, values, this.formInline, approvalValues, this.$refs.changeBaseInfo.formInline, personnelObj) const param = Object.assign({}, values, this.formInline, approvalValues, this.$refs.changeBaseInfo.formInline, personnelObj)
// 企标体系处理成逗号分隔
param.enStandardSystem = param.enStandardSystem.map(item => item.value).join(',')
arr.push(param) arr.push(param)
haveErr = false
} else { } else {
haveErr = true haveErr = true
} }
@@ -99,23 +99,6 @@
dictCode="standard_category_code" /> dictCode="standard_category_code" />
</a-form-model-item> </a-form-model-item>
</div> </div>
<!-- 年代号 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.yearNumber')">
{{ $t('workCenter.enterpriseInitChangePlan.yearNumber') }}
</span>
</div>
<a-form-model-item class="item-model" prop="decadeCode">
<j-date show-type="year"
:disabled="disabled"
v-model="formInline.decadeCode"
date-format="YYYY"
@change="decadeCodeChange"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.yearNumber')" />
</a-form-model-item>
</div>
</template> </template>
<!-- 标准立项-修订 --> <!-- 标准立项-修订 -->
<template v-else-if="projectType && projectType === ProjectType.MODIFY.value"> <template v-else-if="projectType && projectType === ProjectType.MODIFY.value">
@@ -183,24 +166,25 @@
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardName')" /> :placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardName')" />
</a-form-model-item> </a-form-model-item>
</div> </div>
<!-- 年代号 --> </template>
<div class="box-title-text form-flex-item"> <!-- 年代号 -->
<div class="title-text"> <div class="box-title-text form-flex-item">
<span class="required">*</span> <div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.yearNumber')"> <span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.yearNumber')">
{{ $t('workCenter.enterpriseInitChangePlan.yearNumber') }} {{ $t('workCenter.enterpriseInitChangePlan.yearNumber') }}
</span> </span>
</div>
<a-form-model-item class="item-model" prop="decadeCode">
<j-date show-type="year"
:disabled="disabled"
v-model="formInline.decadeCode"
date-format="YYYY"
@change="decadeCodeChange"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.yearNumber')" />
</a-form-model-item>
</div> </div>
</template> <a-form-model-item class="item-model" prop="decadeCode">
<j-date show-type="year"
:disabled="disabled"
v-model="formInline.decadeCode"
date-format="YYYY"
:defaultValue="decadeCodeDefaultValue"
@change="decadeCodeChange"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.yearNumber')" />
</a-form-model-item>
</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">
@@ -219,9 +203,10 @@
<!-- 标准体系 --> <!-- 标准体系 -->
<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.enterpriseInitChangePlan.standardSystem')"> <span class="required">*</span>
{{ $t('workCenter.enterpriseInitChangePlan.standardSystem') }} <span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.standardSystem')">
</span> {{ $t('workCenter.enterpriseInitChangePlan.standardSystem') }}
</span>
</div> </div>
<a-form-model-item class="item-model" prop="enStandardSystem"> <a-form-model-item class="item-model" prop="enStandardSystem">
<a-tree-select <a-tree-select
@@ -237,9 +222,10 @@
<!-- 标准类型 --> <!-- 标准类型 -->
<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.enterpriseInitChangePlan.standardType')"> <span class="required">*</span>
{{ $t('workCenter.enterpriseInitChangePlan.standardType') }} <span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.standardType')">
</span> {{ $t('workCenter.enterpriseInitChangePlan.standardType') }}
</span>
</div> </div>
<a-form-model-item class="item-model" prop="standardType"> <a-form-model-item class="item-model" prop="standardType">
<j-dict-select-tag class="box-input" <j-dict-select-tag class="box-input"
@@ -254,9 +240,10 @@
<!-- 标准等级分类 --> <!-- 标准等级分类 -->
<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.enterpriseInitChangePlan.standardGradeClassification')"> <span class="required">*</span>
{{ $t('workCenter.enterpriseInitChangePlan.standardGradeClassification') }} <span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.standardGradeClassification')">
</span> {{ $t('workCenter.enterpriseInitChangePlan.standardGradeClassification') }}
</span>
</div> </div>
<a-form-model-item class="item-model" prop="enStandardClassification"> <a-form-model-item class="item-model" prop="enStandardClassification">
<j-dict-select-tag class="box-input" <j-dict-select-tag class="box-input"
@@ -366,7 +353,6 @@
<!-- 零部件名称 --> <!-- 零部件名称 -->
<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="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.partName')"> <span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.partName')">
{{ $t('workCenter.enterpriseInitChangePlan.partName') }} {{ $t('workCenter.enterpriseInitChangePlan.partName') }}
</span> </span>
@@ -629,7 +615,18 @@ export default {
watch: { watch: {
projectType () { projectType () {
this.$refs.ruleForm.resetFields() this.$refs.ruleForm.resetFields()
this.formInline.decadeCode = new Date().getFullYear() + '' const formInline = {}
const userInfo = Vue.ls.get(USER_INFO)
// 初始化主起草人信息
formInline.mainDraftingUser = userInfo.id
formInline.mainDraftingUser_dictText = userInfo.realname
// 初始化主起草单位信息
formInline.mainDraftingUnit = userInfo.departIds
// 重置年代号
formInline.decadeCode = new Date().getFullYear() + ''
formInline.enStandardSystem = []
this.formInline = Object.assign({}, formInline)
this.$forceUpdate()
}, },
// 企业标准代号 // 企业标准代号
'formInline.enStandardCode' (value) { 'formInline.enStandardCode' (value) {
@@ -646,6 +643,17 @@ export default {
// 原企标编号改变,新企标编号随之改变 // 原企标编号改变,新企标编号随之改变
'formInline.originEnStandardNo' (value) { 'formInline.originEnStandardNo' (value) {
this.getEnStandardNo() this.getEnStandardNo()
},
// 企标名称,企标名称修改流程名称需要自动更改
'formInline.newEnStandardName' (value) {
this.returnProcessName()
}
},
computed: {
// 年代号默认值
decadeCodeDefaultValue () {
console.log(new Date().getFullYear() + '')
return new Date().getFullYear() + ''
} }
}, },
data () { data () {
@@ -829,25 +837,39 @@ export default {
fileMaxSize: undefined fileMaxSize: undefined
} }
}, },
mounted () { created () {
const userInfo = Vue.ls.get(USER_INFO)
// 初始化主起草人信息
this.formInline.mainDraftingUser = userInfo.id
this.formInline.mainDraftingUser_dictText = userInfo.realname
// 初始化主起草单位信息
this.formInline.mainDraftingUnit = userInfo.departIds
// 获取零部件名称下拉框数据 // 获取零部件名称下拉框数据
this.initPartNameOptions() this.initPartNameOptions()
// 获取标准体系下拉框数据 // 获取标准体系下拉框数据
this.initStandardSystemOptions() this.initStandardSystemOptions()
// 初始化年代号 },
this.formInline.decadeCode = new Date().getFullYear() + '' mounted () {
console.log(this.$route.query.processId)
if (!this.$route.query.processId) {
const userInfo = Vue.ls.get(USER_INFO)
const formInline = {}
// 初始化主起草人信息
formInline.mainDraftingUser = userInfo.id
formInline.mainDraftingUser_dictText = userInfo.realname
// 初始化主起草单位信息
formInline.mainDraftingUnit = userInfo.departIds
// 初始化年代号
formInline.decadeCode = new Date().getFullYear() + ''
this.formInline = Object.assign({}, formInline)
this.$forceUpdate()
}
}, },
methods: { methods: {
// watch监视年代号会滞后 // watch监视年代号会滞后
decadeCodeChange (value) { decadeCodeChange (value) {
this.getEnStandardNo() this.getEnStandardNo()
}, },
// 返回流程名称
returnProcessName () {
const processName = (this.formInline.newEnStandardNo || '') + '-' + (this.formInline.newEnStandardName || '') + '-' + '立项'
console.log(processName)
this.$emit('processNameChange', processName)
},
// 根据三个代号和一个年代号获取企标编号 // 根据三个代号和一个年代号获取企标编号
getEnStandardNo () { getEnStandardNo () {
// 如果是制定根据填的三个代号和一个年代号获取 // 如果是制定根据填的三个代号和一个年代号获取
@@ -866,6 +888,8 @@ export default {
if (res.success) { if (res.success) {
this.$set(this.formInline, 'newEnStandardNo', res.message) this.$set(this.formInline, 'newEnStandardNo', res.message)
this.$forceUpdate() this.$forceUpdate()
// 返回流程名称
this.returnProcessName()
} }
}) })
} else { } else {
@@ -874,6 +898,8 @@ export default {
const standardNo = this.formInline.originEnStandardNo.split('-')[0] + '-' + this.formInline.decadeCode const standardNo = this.formInline.originEnStandardNo.split('-')[0] + '-' + this.formInline.decadeCode
this.$set(this.formInline, 'newEnStandardNo', standardNo) this.$set(this.formInline, 'newEnStandardNo', standardNo)
this.$forceUpdate() this.$forceUpdate()
// 返回流程名称
this.returnProcessName()
} }
} }
}, },
@@ -169,6 +169,18 @@ export default {
default: 1 default: 1
} }
}, },
watch: {
// 企标编号,如果修改流程名称需更新
'formInline.originEnStandardNo' (value) {
const processName = (value || '') + '-' + (this.formInline.originEnStandardName || '') + '-' + '变更'
this.$emit('processNameChange', processName)
},
// 企标名称
'formInline.originEnStandardName' (value) {
const processName = (this.formInline.originEnStandardNo || '') + '-' + (value || '') + '-' + '变更'
this.$emit('processNameChange', processName)
}
},
data () { data () {
return { return {
formInline: {}, formInline: {},
@@ -202,10 +214,16 @@ export default {
console.log(value) console.log(value)
if (value && value.length > 0) { if (value && value.length > 0) {
this.formInline.originEnStandardName = value[0].originEnStandardName this.formInline.originEnStandardName = value[0].originEnStandardName
this.formInline.mainDraftingUser_dictText = value[0].mainDraftingUser this.formInline.mainDraftingUser = value[0].mainDraftingUser
this.formInline.mainDraftingUser_dictText = value[0].mainDraftingUser_dictText
this.formInline.mainDraftingUnit = value[0].mainDraftingUnit this.formInline.mainDraftingUnit = value[0].mainDraftingUnit
this.formInline.newMainDraftingUser_dictText = value[0].mainDraftingUser this.formInline.newMainDraftingUser = value[0].mainDraftingUser
this.formInline.newMainDraftingUser_dictText = value[0].mainDraftingUser_dictText
this.formInline.newMainDraftingUnit = value[0].mainDraftingUnit this.formInline.newMainDraftingUnit = value[0].mainDraftingUnit
this.formInline.mainDraftingUnitResponsiblePerson = value[0].mainDraftingUnitResponsiblePerson
this.formInline.mainDraftingUnitResponsiblePerson_dictText = value[0].mainDraftingUnitResponsiblePerson_dictText
this.formInline.newMainDraftingUnitResponsiblePerson = value[0].mainDraftingUnitResponsiblePerson
this.formInline.newMainDraftingUnitResponsiblePerson_dictText = value[0].mainDraftingUnitResponsiblePerson_dictText
} }
}, },
// 选择用户得到用户名 // 选择用户得到用户名
@@ -104,7 +104,7 @@ export default {
title: this.$t('workCenter.enterpriseInitChangePlan.mainDraftUnit'), title: this.$t('workCenter.enterpriseInitChangePlan.mainDraftUnit'),
align: 'center', align: 'center',
width: 180, width: 180,
dataIndex: 'mainDraftingUnit', dataIndex: 'mainDraftingUnit_dictText',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ // 原草稿计划完成日期 { // 原草稿计划完成日期
@@ -279,15 +279,19 @@ export default {
// todo: 三个有校验的日期验证不会消失 // todo: 三个有校验的日期验证不会消失
console.log(value) console.log(value)
if (value && value.length > 0) { if (value && value.length > 0) {
this.$refs.ruleForm.clearValidate()
this.formInline.originEnStandardName = value[0].originEnStandardName this.formInline.originEnStandardName = value[0].originEnStandardName
this.formInline.mainDraftingUser_dictText = value[0].mainDraftingUser this.formInline.mainDraftingUser = value[0].mainDraftingUser
this.formInline.mainDraftingUser_dictText = value[0].mainDraftingUser_dictText
this.formInline.mainDraftingUnit = value[0].mainDraftingUnit this.formInline.mainDraftingUnit = value[0].mainDraftingUnit
this.formInline.mainDraftingUnit_dictText = value[0].mainDraftingUnit_dictText
this.formInline.originDraftPlannedCompleteDate = value[0].draftPlannedCompleteDate this.formInline.originDraftPlannedCompleteDate = value[0].draftPlannedCompleteDate
this.formInline.originSolicitationDraftPlanCompleteDate = value[0].solicitationDraftPlanCompleteDate this.formInline.originSolicitationDraftPlanCompleteDate = value[0].solicitationDraftPlanCompleteDate
this.formInline.originPlanApprovalDate = value[0].planApprovalDate this.formInline.originPlanApprovalDate = value[0].planApprovalDate
this.formInline.draftPlannedCompleteDate = value[0].draftPlannedCompleteDate this.formInline.draftPlannedCompleteDate = value[0].draftPlannedCompleteDate
this.formInline.solicitationDraftPlanCompleteDate = value[0].solicitationDraftPlanCompleteDate this.formInline.solicitationDraftPlanCompleteDate = value[0].solicitationDraftPlanCompleteDate
this.formInline.planApprovalDate = value[0].planApprovalDate this.formInline.planApprovalDate = value[0].planApprovalDate
this.$refs.ruleForm.validate()
} }
}, },
// 选择用户得到用户名 // 选择用户得到用户名
@@ -103,7 +103,7 @@ export default {
title: this.$t('workCenter.enterpriseInitChangePlan.mainDraftUnit'), title: this.$t('workCenter.enterpriseInitChangePlan.mainDraftUnit'),
align: 'center', align: 'center',
width: 180, width: 180,
dataIndex: 'mainDraftingUnit', dataIndex: 'mainDraftingUnit_dictText',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ // 变更原因 { // 变更原因
@@ -160,8 +160,10 @@ export default {
console.log(value) console.log(value)
if (value && value.length > 0) { if (value && value.length > 0) {
this.formInline.originEnStandardName = value[0].originEnStandardName this.formInline.originEnStandardName = value[0].originEnStandardName
this.formInline.mainDraftingUser_dictText = value[0].mainDraftingUser this.formInline.mainDraftingUser = value[0].mainDraftingUser
this.formInline.mainDraftingUser_dictText = value[0].mainDraftingUser_dictText
this.formInline.mainDraftingUnit = value[0].mainDraftingUnit this.formInline.mainDraftingUnit = value[0].mainDraftingUnit
this.formInline.mainDraftingUnit_dictText = value[0].mainDraftingUnit_dictText
} }
}, },
// 选择用户得到用户名 // 选择用户得到用户名
@@ -27,7 +27,7 @@
:disabled="disabled" :disabled="disabled"
:searchParam="{ projectType: projectType }" :searchParam="{ projectType: projectType }"
@standardNumberChange="standardNumberChangeOne" @standardNumberChange="standardNumberChangeOne"
@listChange="listChange"/> @listChange="listChangeOne"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
<!-- 企标名称1 --> <!-- 企标名称1 -->
@@ -77,7 +77,7 @@
:standard-number="formInline.standardNoTwo" :standard-number="formInline.standardNoTwo"
:searchParam="{ projectType: projectType }" :searchParam="{ projectType: projectType }"
@standardNumberChange="standardNumberChangeTwo" @standardNumberChange="standardNumberChangeTwo"
@listChange="listChange"/> @listChange="listChangeTwo"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
<!-- 企标名称2 --> <!-- 企标名称2 -->
@@ -123,7 +123,6 @@
<a-input class="box-input" <a-input class="box-input"
v-model="formInline.newEnStandardNo" v-model="formInline.newEnStandardNo"
:maxLength="50" :maxLength="50"
disabled
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardNum')" /> :placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardNum')" />
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -429,7 +428,7 @@
</div> </div>
<!-- 变更原因 --> <!-- 变更原因 -->
<div class="box-title-text form-flex-item form-flex-item-long"> <div class="box-title-text form-flex-item form-flex-item-long">
<div class="title-text title-text-long"> <div class="title-text">
<span class="required">*</span> <span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.changeReason')"> <span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.changeReason')">
{{ $t('workCenter.enterpriseInitChangePlan.changeReason') }} {{ $t('workCenter.enterpriseInitChangePlan.changeReason') }}
@@ -471,6 +470,16 @@ export default {
default: 1 default: 1
} }
}, },
watch: {
// 企标编号,企标编号修改流程名称需要自动更改
'formInline.newEnStandardNo' (value) {
this.returnProcessName()
},
// 企标名称,企标名称修改流程名称需要自动更改
'formInline.newEnStandardName' (value) {
this.returnProcessName()
}
},
data () { data () {
return { return {
ApplicationCategory, ApplicationCategory,
@@ -630,6 +639,12 @@ export default {
this.initPartNameOptions() this.initPartNameOptions()
}, },
methods: { methods: {
// 返回流程名称
returnProcessName () {
const processName = (this.formInline.newEnStandardNo || '') + '-' + (this.formInline.newEnStandardName || '') + '-' + '立项'
console.log(processName)
this.$emit('processNameChange', processName)
},
// 获取标准体系下拉框数据 // 获取标准体系下拉框数据
initStandardSystemOptions () { initStandardSystemOptions () {
getTreeList({ option: 1 }).then(res => { getTreeList({ option: 1 }).then(res => {
@@ -660,45 +675,64 @@ export default {
this.formInline.standardNoTwo = value this.formInline.standardNoTwo = value
}, },
// 企标选编号1选择完成的回调 // 企标选编号1选择完成的回调
listChange (value) { listChangeOne (value) {
console.log(value) console.log(value)
if (value && value.length > 0) { if (value && value.length > 0) {
const formInline = {}
// 企标名称1 // 企标名称1
this.formInline.standardNameOne = value[0].originEnStandardName formInline.standardNameOne = value[0].originEnStandardName || ''
// 制修订类型1 // 制修订类型1
this.formInline.projectTypeOne = value[0].revisionType formInline.projectTypeOne = value[0].applicationCategory || undefined
// 新企标名称 // 新企标名称
this.formInline.newEnStandardName = value[0].originEnStandardName formInline.newEnStandardName = value[0].originEnStandardName || ''
// 标准英文名称 // 标准英文名称
this.formInline.enStandardEnglishName = value[0].originEnStandardName formInline.enStandardEnglishName = value[0].enStandardEnglishName || ''
// 标准体系 // 标准体系
this.formInline.enStandardSystem = value[0].originEnStandardName formInline.enStandardSystem = value[0].enStandardSystem ? value[0].enStandardSystem.split(',').map(item => { return { value: item } }) : []
// 企业标准代号 // 企业标准代号
this.formInline.enStandardCode = value[0].originEnStandardName formInline.enStandardCode = value[0].enStandardCode || undefined
// 企业名称代号 // 企业名称代号
this.formInline.enNameCode = value[0].originEnStandardName formInline.enNameCode = value[0].enNameCode || undefined
// 标准类别代号 // 标准类别代号
this.formInline.standardCategoryCode = value[0].originEnStandardName formInline.standardCategoryCode = value[0].standardCategoryCode || undefined
// 年代号 // 年代号
this.formInline.decadeCode = value[0].originEnStandardName formInline.decadeCode = value[0].decadeCode || undefined
// 编制说明 // 编制说明
this.formInline.compilationDescription = value[0].originEnStandardName formInline.compilationDescription = value[0].compilationDescription || undefined
// 标准等级分类 // 标准等级分类
this.formInline.enStandardClassification = value[0].originEnStandardName formInline.enStandardClassification = value[0].enStandardClassification || undefined
// 草稿计划完成日期 // 草稿计划完成日期
this.formInline.draftPlannedCompleteDate = value[0].originEnStandardName formInline.draftPlannedCompleteDate = value[0].draftPlannedCompleteDate || undefined
// 征求意见稿计划完成日期 // 征求意见稿计划完成日期
this.formInline.solicitationDraftPlanCompleteDate = value[0].originEnStandardName formInline.solicitationDraftPlanCompleteDate = value[0].solicitationDraftPlanCompleteDate || undefined
// 计划报批日期 // 计划报批日期
this.formInline.planApprovalDate = value[0].originEnStandardName formInline.planApprovalDate = value[0].planApprovalDate || undefined
// 零部件名称 // 零部件名称
this.formInline.componentName = value[0].originEnStandardName formInline.componentName = value[0].componentName || undefined
// 主起草人 // 主起草人
this.formInline.mainDraftingUser_dictText = value[0].mainDraftingUser formInline.mainDraftingUser = value[0].mainDraftingUser || undefined
formInline.mainDraftingUser_dictText = value[0].mainDraftingUser_dictText || undefined
// 主起草单位 // 主起草单位
this.formInline.mainDraftingUnit = value[0].mainDraftingUnit formInline.mainDraftingUnit = value[0].mainDraftingUnit || undefined
// 起草单位负责人 // 起草单位负责人
this.formInline.mainDraftingUnitResponsiblePerson_dictText = value[0].mainDraftingUnit formInline.mainDraftingUnitResponsiblePerson = value[0].mainDraftingUnitResponsiblePerson || undefined
formInline.mainDraftingUnitResponsiblePerson_dictText = value[0].mainDraftingUnitResponsiblePerson_dictText || undefined
this.formInline = Object.assign({}, this.formInline, formInline)
this.$forceUpdate()
this.returnProcessName()
}
},
// 企标选编号2选择完成的回调
listChangeTwo (value) {
console.log(value)
if (value && value.length > 0) {
const formInline = {}
// 企标名称2
formInline.standardNameTwo = value[0].originEnStandardName
// 制修订类型2
formInline.projectTypeTwo = value[0].applicationCategory
this.formInline = Object.assign(this.formInline, formInline)
this.$forceUpdate()
} }
}, },
// 选择用户得到用户名 // 选择用户得到用户名
@@ -734,6 +768,6 @@ export default {
} }
.title-text-long { .title-text-long {
width: 220px; width: 220px !important;
} }
</style> </style>