Merge remote-tracking branch 'origin/thirdStage' into thirdStage

This commit is contained in:
danshihao
2024-01-10 09:01:45 +08:00
63 changed files with 946 additions and 252 deletions
+4 -1
View File
@@ -28,7 +28,10 @@ module.exports = {
expenseReimbursement: '费用列支', expenseReimbursement: '费用列支',
meetingMaterial: '会议资料', meetingMaterial: '会议资料',
pleaseEnterCorrectPhone: '请输入正确格式的电话', pleaseEnterCorrectPhone: '请输入正确格式的电话',
addUpToFourLevels: '该节点无法添加子节点' addUpToFourLevels: '该节点无法添加子节点',
pleaseUploadGroupInfo: '请上传集团参与情况资料',
pleaseUploadPaymentInfo: '请上传支付信息资料',
pleaseUploadMeeting: '请上传参会记录会议资料'
}, },
// 问答库 // 问答库
questionAnswer: { questionAnswer: {
@@ -55,6 +55,8 @@ module.exports = {
// 资料中心 // 资料中心
profileCenter: { profileCenter: {
typeOfOwnership: '所属类型', typeOfOwnership: '所属类型',
uploadData: '上传资料' uploadData: '上传资料',
addAPeer: '新增同级',
newChild: '新增子级'
} }
} }
+12 -1
View File
@@ -174,7 +174,18 @@ module.exports = {
updateReason: '修改理由', updateReason: '修改理由',
lookUpdateBeforeContent: '查看修改前内容', lookUpdateBeforeContent: '查看修改前内容',
proposingDepartment: '提出部门', proposingDepartment: '提出部门',
introducer: '提出人' introducer: '提出人',
levelCode: '更改级别代号',
isHasGraph: '有无二维或三维图',
customerConfirmation: '顾客确认(适用军品)',
refreshFileNumber: '刷新文件号(三维)',
inventory: '库存',
workInProgress: '在制品',
spareParts: '备件',
relatedChanges: '关联更改项',
changeTag: '更改标记',
treatmentCount: '处数',
effectiveDate: '生效日期'
}, },
// 企标复审流程 // 企标复审流程
enStandardRecheck: { enStandardRecheck: {
+1 -1
View File
@@ -98,7 +98,6 @@ export default {
this.isLoadEnd = true this.isLoadEnd = true
const dom = document.getElementById(this.domId) const dom = document.getElementById(this.domId)
this.observer = new ResizeObserver(this.handleResize) this.observer = new ResizeObserver(this.handleResize)
console.log(this.observer)
this.observer.observe(dom, { box: 'border-box' }) this.observer.observe(dom, { box: 'border-box' })
}) })
}, },
@@ -337,6 +336,7 @@ export default {
return return
} }
this.graph.changeSize(document.getElementById(this.domId).clientWidth, document.getElementById(this.domId).clientHeight) this.graph.changeSize(document.getElementById(this.domId).clientWidth, document.getElementById(this.domId).clientHeight)
this.graph.fitCenter()
} }
}, },
beforeDestroy () { beforeDestroy () {
+1
View File
@@ -177,6 +177,7 @@ export default {
{ {
title: this.$t('workCenter.processDetail.timeConsuming'), title: this.$t('workCenter.processDetail.timeConsuming'),
width: 150, width: 150,
dataIndex: 'timeConsuming',
scopedSlots: { customRender: 'timeConsuming' } scopedSlots: { customRender: 'timeConsuming' }
}, },
// 审批意见 // 审批意见
+2 -2
View File
@@ -466,7 +466,7 @@ export default {
this.innerDisabledField = this.innerDisabledField.filter(item => item !== 'standard_state') this.innerDisabledField = this.innerDisabledField.filter(item => item !== 'standard_state')
} }
} }
// 起草、征求依据、报批状态时发布日期、实施日期不必填 // 起草、征求依据、报批、废止状态时发布日期、实施日期不必填
this.handleRequiredByState(val) this.handleRequiredByState(val)
} }
}, },
@@ -715,7 +715,7 @@ export default {
let notRequiredStatus = [], fields = [] let notRequiredStatus = [], fields = []
// 国内和海外的标准状态是同一个数据字典 // 国内和海外的标准状态是同一个数据字典
if (this.flag === StandardSource.DOMESTIC.value || this.flag === StandardSource.OVERSEAS.value) { if (this.flag === StandardSource.DOMESTIC.value || this.flag === StandardSource.OVERSEAS.value) {
notRequiredStatus = [StandardStatus.DRAFT.value, StandardStatus.SEEK_FOR_OPTIONS.value, StandardStatus.EXAMINE.value, StandardStatus.APPROVAL.value] notRequiredStatus = [StandardStatus.DRAFT.value, StandardStatus.SEEK_FOR_OPTIONS.value, StandardStatus.EXAMINE.value, StandardStatus.APPROVAL.value, StandardStatus.ABOLISH.value]
fields = ['release_date', 'implementation_date'] fields = ['release_date', 'implementation_date']
} else { // 处理企标 } else { // 处理企标
notRequiredStatus = [EnterpriseStandardStatus.DRAFT.value, EnterpriseStandardStatus.SEEK_FOR_OPTIONS.value, EnterpriseStandardStatus.EXAMINE.value, EnterpriseStandardStatus.APPROVAL.value] notRequiredStatus = [EnterpriseStandardStatus.DRAFT.value, EnterpriseStandardStatus.SEEK_FOR_OPTIONS.value, EnterpriseStandardStatus.EXAMINE.value, EnterpriseStandardStatus.APPROVAL.value]
+1
View File
@@ -17,6 +17,7 @@
:placeholder="placeholder" :placeholder="placeholder"
:disabled="disabled" :disabled="disabled"
:value="getValueSting" :value="getValueSting"
v-bind="$attrs"
show-search show-search
:filter-option="filterOption" :filter-option="filterOption"
@change="handleInput" @change="handleInput"
@@ -100,7 +100,8 @@ export default {
treeScreenClass () { treeScreenClass () {
return { return {
'my-dept-select-tree': true, 'my-dept-select-tree': true,
fullscreen: this.fullscreen fullscreen: this.fullscreen,
'radio-class': !this.multi
} }
} }
}, },
@@ -131,16 +132,16 @@ export default {
// 筛选出只有在选择范围里的数据 // 筛选出只有在选择范围里的数据
filterTreeDataOnlySelectRange (arr) { filterTreeDataOnlySelectRange (arr) {
for (const item of arr) { for (const item of arr) {
console.log('可选范围是否包括', item.departName, this.selectRange.includes(item.key))
if (!this.selectRange.includes(item.key)) {
item.disabled = true
item.selectable = false
} else {
item.disabled = false
item.selectable = true
}
if (item.children && item.children.length > 0) { if (item.children && item.children.length > 0) {
this.filterTreeDataOnlySelectRange(item.children) this.filterTreeDataOnlySelectRange(item.children)
} else {
if (!this.selectRange.includes(item.key)) {
item.disabled = true
item.selectable = false
} else {
item.disabled = false
item.selectable = true
}
} }
} }
}, },
@@ -332,4 +333,11 @@ export default {
background: #fff; background: #fff;
border-radius: 0 0 2px 2px; border-radius: 0 0 2px 2px;
} }
// 单选
.radio-class {
/deep/ .ant-tree-checkbox-inner {
border-radius: 8px;
}
}
</style> </style>
@@ -15,13 +15,13 @@
<!-- 企标编号 --> <!-- 企标编号 -->
<a-col :span="8"> <a-col :span="8">
<a-form-item :label="$t('enterpriseStandardLibrary.reviewPlan.enterpriseStandardNum')" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item :label="$t('enterpriseStandardLibrary.reviewPlan.enterpriseStandardNum')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+$t('enterpriseStandardLibrary.reviewPlan.enterpriseStandardNum')" v-model="queryParam.originEnStandardNo"></a-input> <a-input :placeholder="$t('pleaseEnter')+$t('enterpriseStandardLibrary.reviewPlan.enterpriseStandardNum')" v-model="queryParam.standardNo"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- 企标名称 --> <!-- 企标名称 -->
<a-col :span="8"> <a-col :span="8">
<a-form-item :label="$t('enterpriseStandardLibrary.reviewPlan.enterpriseStandardName')" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item :label="$t('enterpriseStandardLibrary.reviewPlan.enterpriseStandardName')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+$t('enterpriseStandardLibrary.reviewPlan.enterpriseStandardName')" v-model="queryParam.originEnStandardName"></a-input> <a-input :placeholder="$t('pleaseEnter')+$t('enterpriseStandardLibrary.reviewPlan.enterpriseStandardName')" v-model="queryParam.standardName"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- 主起草人 --> <!-- 主起草人 -->
@@ -5,15 +5,19 @@
:type="inputType" :type="inputType"
:autoSize="true" :autoSize="true"
:rows="1" :rows="1"
disabled readOnly
class="user-input" :disabled="disabled"
:class="{
'input-readonly': !disabled,
'user-input': showBtn
}"
:placeholder="placeholder" :placeholder="placeholder"
:value="checkedValue" :value="checkedValue"
@click="selectClick" @click="selectClick"
:title="checkedValue" :title="checkedValue"
> >
</a-input> </a-input>
<a-button type="primary" class="button-box" @click="selectClick" :disabled="disabled"> <a-button type="primary" class="button-box" @click="selectClick" :disabled="disabled" v-if="showBtn && !disabled">
{{ $t('userSelect.select') }} {{ $t('userSelect.select') }}
</a-button> </a-button>
</div> </div>
@@ -56,6 +60,12 @@ export default {
type: String, type: String,
required: false, required: false,
default: 'text' default: 'text'
},
// 是否展示按钮
showBtn: {
type: Boolean,
required: false,
default: true
} }
}, },
watch: { watch: {
@@ -73,6 +83,10 @@ export default {
}, },
methods: { methods: {
selectClick () { selectClick () {
// 禁用后不弹框
if (this.disabled) {
return
}
this.$refs.selectModal.open(this.value) this.$refs.selectModal.open(this.value)
}, },
selectChange (ids) { selectChange (ids) {
@@ -106,7 +120,7 @@ export default {
width: calc(100% - 70px); width: calc(100% - 70px);
} }
// 因为需要加title,所以不能把鼠标事件去掉 // 因为需要加title,所以不能把鼠标事件去掉
/deep/ .ant-input-disabled { /deep/ .input-readonly.ant-input-disabled {
background: #fff; background: #fff;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
cursor: default; cursor: default;
@@ -5,15 +5,19 @@
:type="inputType" :type="inputType"
:autoSize="true" :autoSize="true"
:rows="1" :rows="1"
disabled readOnly
class="user-input" :disabled="disabled"
:class="{
'input-readonly': !disabled,
'user-input': showBtn
}"
:placeholder="placeholder" :placeholder="placeholder"
:value="checkedValue" :value="checkedValue"
@click="selectClick" @click="selectClick"
:title="checkedValue" :title="checkedValue"
> >
</a-input> </a-input>
<a-button type="primary" class="button-box" @click="selectClick" :disabled="disabled"> <a-button type="primary" class="button-box" @click="selectClick" :disabled="disabled" v-if="showBtn && !disabled">
{{ $t('userSelect.select') }} {{ $t('userSelect.select') }}
</a-button> </a-button>
</div> </div>
@@ -56,6 +60,12 @@ export default {
type: String, type: String,
required: false, required: false,
default: 'text' default: 'text'
},
// 是否展示按钮
showBtn: {
type: Boolean,
required: false,
default: true
} }
}, },
watch: { watch: {
@@ -73,6 +83,10 @@ export default {
}, },
methods: { methods: {
selectClick () { selectClick () {
// 禁用后不弹框
if (this.disabled) {
return
}
this.$refs.selectModal.open(this.value) this.$refs.selectModal.open(this.value)
}, },
selectChange (ids) { selectChange (ids) {
@@ -103,7 +117,7 @@ export default {
width: calc(100% - 70px); width: calc(100% - 70px);
} }
// 因为需要加title,所以不能把鼠标事件去掉 // 因为需要加title,所以不能把鼠标事件去掉
/deep/ .ant-input-disabled { /deep/ .input-readonly.ant-input-disabled {
background: #fff; background: #fff;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
cursor: default; cursor: default;
+11 -3
View File
@@ -30,9 +30,17 @@ export const WorkCenterMixin = {
}) })
if (!this.$route.query.processInstanceId) { if (!this.$route.query.processInstanceId) {
// 说明是在新发起一个节点,初始化发起人员信息 // 说明是在新发起一个节点,初始化发起人员信息
this.personnelInfoData[0].linkUserIds = Vue.ls.get(USER_INFO).id const firstFieldName = this.personnelInfoData[0].variableName
this.personnelInfoData[0].linkUserIds_dictText = Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')' for (const item of this.personnelInfoData) {
this.personnelInfoData[0].userList = Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')' if (item.variableName === firstFieldName) {
item.linkUserIds = Vue.ls.get(USER_INFO).id
item.linkUserIds_dictText = Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')'
item.userList = Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')'
}
}
// this.personnelInfoData[0].linkUserIds = Vue.ls.get(USER_INFO).id
// this.personnelInfoData[0].linkUserIds_dictText = Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')'
// this.personnelInfoData[0].userList = Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')'
} }
if (callback) { if (callback) {
callback() callback()
@@ -109,6 +109,7 @@ import { getCarTypeProjectList } from '@/api/projectLibraryApi.js'
// 双向绑定的标准选择器 // 双向绑定的标准选择器
import StandardSelection from '@/components/selection/StandardSelection' import StandardSelection from '@/components/selection/StandardSelection'
import pick from 'lodash.pick' import pick from 'lodash.pick'
import moment from 'moment'
export default { export default {
name: 'QuizModal', name: 'QuizModal',
@@ -200,8 +201,7 @@ export default {
this.visible = true this.visible = true
this.form.resetFields() this.form.resetFields()
const param = {} const param = {}
param.quizTime = new Date().getFullYear() + '-' + (new Date().getMonth() + 1) + '-' + new Date().getDay() + ' ' + param.quizTime = moment().format('YYYY-MM-DD HH:mm:ss')
new Date().getHours() + ':' + new Date().getMinutes() + ':' + new Date().getSeconds()
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue(pick(param, 'quizTime')) this.form.setFieldsValue(pick(param, 'quizTime'))
}) })
@@ -2,7 +2,7 @@
<internal-detail-page :title="pageTitle" :loading="loading"> <internal-detail-page :title="pageTitle" :loading="loading">
<div class="detail-page-title">{{ model.title }}</div> <div class="detail-page-title">{{ model.title }}</div>
<div class="detail-page-second-title"> <div class="detail-page-second-title">
{{ $t('businessSupport.questionAnswer.poster') + ':' + model.orgCode_dictText + ' ' + model.userId_dictText }} {{ $t('businessSupport.questionAnswer.poster') + ':' + (model.orgCode_dictText || '') + ' ' + (model.userId_dictText || '') }}
</div> </div>
<div class="detail-page-part"> <div class="detail-page-part">
<div class="detail-page-part-form"> <div class="detail-page-part-form">
@@ -56,7 +56,7 @@
<div class="left-user-info"> <div class="left-user-info">
<a-avatar shape="square" :size="56" :src="getAvatarView(item.avatar)" icon="user"/> <a-avatar shape="square" :size="56" :src="getAvatarView(item.avatar)" icon="user"/>
<p class="left-user-name">{{ item.name }}</p> <p class="left-user-name">{{ item.name }}</p>
<p>{{ item.departName }}</p> <p>{{ item.departName || '' }}</p>
</div> </div>
<div class="right-answer-wrapper"> <div class="right-answer-wrapper">
<!-- 是否是置顶 --> <!-- 是否是置顶 -->
@@ -70,14 +70,14 @@
<!-- 取消置顶 --> <!-- 取消置顶 -->
<a class="right-bottom-p-a" @click="setOrCancelTop(item.id)" v-has="'quiz:detail:topOrCancel'">{{ $t('businessSupport.questionAnswer.cancelTop') }}</a> <a class="right-bottom-p-a" @click="setOrCancelTop(item.id)" v-has="'quiz:detail:topOrCancel'">{{ $t('businessSupport.questionAnswer.cancelTop') }}</a>
<!-- 删除 : 发帖人、评论人、有置顶权限的用户可以删除 ?? --> <!-- 删除 : 发帖人、评论人、有置顶权限的用户可以删除 ?? -->
<a v-if="userInfo.id === model.userId || userInfo.id === item.userId" v-has="'quiz:detail:deleteAnswer'" class="right-bottom-p-a" @click="deleteAnswer(item.id)">{{ $t('delete') }}</a> <!--<a v-if="userInfo.id === model.userId || userInfo.id === item.userId || isHasPermission('quiz:detail:topOrCancel')" v-has="'quiz:detail:deleteAnswer'" class="right-bottom-p-a" @click="deleteAnswer(item.id)">{{ $t('delete') }}</a>-->
</template> </template>
<!-- 非置顶评论 --> <!-- 非置顶评论 -->
<template v-else> <template v-else>
<!-- 设置为置顶 --> <!-- 设置为置顶 -->
<a class="right-bottom-p-a" @click="setOrCancelTop(item.id)" v-has="'quiz:detail:topOrCancel'">{{ $t('businessSupport.questionAnswer.setTop') }}</a> <a class="right-bottom-p-a" @click="setOrCancelTop(item.id)" v-has="'quiz:detail:topOrCancel'">{{ $t('businessSupport.questionAnswer.setTop') }}</a>
<!-- 删除 : 发帖人、评论人、有置顶权限的用户可以删除,置顶的评论不允许删除,取消置顶后允许删除 ?? --> <!-- 删除 : 发帖人、评论人、有置顶权限的用户可以删除,置顶的评论不允许删除,取消置顶后允许删除 -->
<a v-if="userInfo.id === model.userId || userInfo.id === item.userId" v-has="'quiz:detail:deleteAnswer'" class="right-bottom-p-a" @click="deleteAnswer(item.id)">{{ $t('delete') }}</a> <a v-if="userInfo.id === model.userId || userInfo.id === item.userId || isHasPermission('quiz:detail:topOrCancel')" v-has="'quiz:detail:deleteAnswer'" class="right-bottom-p-a" @click="deleteAnswer(item.id)">{{ $t('delete') }}</a>
</template> </template>
</p> </p>
</div> </div>
@@ -88,7 +88,7 @@
<div v-if="canAnswer === 1" class="answer-form-wrapper"> <div v-if="canAnswer === 1" class="answer-form-wrapper">
<div class="answer-form-wrapper-title"> <div class="answer-form-wrapper-title">
<a-avatar shape="square" :size="28" :src="getAvatarView(currentUser.avatar)" icon="user"/> <a-avatar shape="square" :size="28" :src="getAvatarView(currentUser.avatar)" icon="user"/>
<p class="user-name">{{ currentUser.realname }}({{ currentUser.username }}) {{ currentUser.departIds_dicText }}</p> <p class="user-name">{{ currentUser.departIds_dicText || '' }} {{ currentUser.realname }}({{ currentUser.username }})</p>
<p class="answer_question">{{ $t('businessSupport.questionAnswer.answerQuestion') }}</p> <p class="answer_question">{{ $t('businessSupport.questionAnswer.answerQuestion') }}</p>
</div> </div>
<a-textarea v-model="answerDesc" :autoSize="{minRows: 4}" :maxLength="2000"></a-textarea> <a-textarea v-model="answerDesc" :autoSize="{minRows: 4}" :maxLength="2000"></a-textarea>
@@ -124,6 +124,7 @@ import { getFileInfo } from '@/api/api'
import { previewPdf } from '@/utils/previewPdf' import { previewPdf } from '@/utils/previewPdf'
import InternalDetailPage from '@/components/InternalDetailPage' import InternalDetailPage from '@/components/InternalDetailPage'
import { kkFilePreview } from '@/utils/kkFilePreview' import { kkFilePreview } from '@/utils/kkFilePreview'
import { isHasPermission } from '@/utils/hasPermission'
// 支持预览的文件后缀 // 支持预览的文件后缀
const CAN_PREVIEW_FILE_SUFFIX = ['jpg', 'jpeg', 'png', 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx'] const CAN_PREVIEW_FILE_SUFFIX = ['jpg', 'jpeg', 'png', 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx']
@@ -166,6 +167,7 @@ export default {
} }
}, },
methods: { methods: {
isHasPermission,
// 初始化获取数据信息 // 初始化获取数据信息
initData (id) { initData (id) {
this.loading = true this.loading = true
@@ -84,18 +84,20 @@
<!--集团参与情况--> <!--集团参与情况-->
<div class="header-text">{{ $t('businessSupport.standardizationActivity.groupParticipation') }}</div> <div class="header-text">{{ $t('businessSupport.standardizationActivity.groupParticipation') }}</div>
<group-table :data-source="groupDataSource" :disabled="disabled" :need-row-selection="!disabled" @ok="groupModalOk" /> <group-table ref="groupTable" :data-source="groupDataSource" :disabled="disabled" :need-row-selection="!disabled" @ok="groupModalOk" />
<!--支付信息--> <!--支付信息-->
<div class="header-text">{{ $t('businessSupport.standardizationActivity.paymentInfo') }}</div> <div class="header-text">{{ $t('businessSupport.standardizationActivity.paymentInfo') }}</div>
<payment-table :data-source="paymentDataSource" <payment-table ref="paymentTable"
:data-source="paymentDataSource"
:disabled="disabled" :disabled="disabled"
:need-row-selection="!disabled" :need-row-selection="!disabled"
@ok="paymentModalOk" /> @ok="paymentModalOk" />
<!--参会记录--> <!--参会记录-->
<div class="header-text">{{ $t('businessSupport.standardizationActivity.attendanceRecord') }}</div> <div class="header-text">{{ $t('businessSupport.standardizationActivity.attendanceRecord') }}</div>
<meeting-table :data-source="meetingDataSource" <meeting-table ref="meetingTable"
:data-source="meetingDataSource"
:disabled="disabled" :disabled="disabled"
:need-row-selection="!disabled" :need-row-selection="!disabled"
@ok="meetingModalOk" /> @ok="meetingModalOk" />
@@ -103,8 +105,8 @@
</div> </div>
<div class="custom-drawer-style-bottom-btn"> <div class="custom-drawer-style-bottom-btn">
<a-button type="primary" @click="handleOk" v-if="!disabled">{{ $t('determine') }}</a-button>
<a-button @click="handleCancel">{{ $t('cancel') }}</a-button> <a-button @click="handleCancel">{{ $t('cancel') }}</a-button>
<a-button type="primary" @click="handleOk" v-if="!disabled">{{ $t('determine') }}</a-button>
</div> </div>
</a-drawer> </a-drawer>
@@ -263,6 +265,12 @@ export default {
}) })
}, },
handleOk () { handleOk () {
const groupValidateFlag = this.$refs.groupTable.validateTableData()
const paymentValidateFlag = this.$refs.paymentTable.validateTableData()
const meetingValidateFlag = this.$refs.meetingTable.validateTableData()
if (!groupValidateFlag || !paymentValidateFlag || !meetingValidateFlag) {
return
}
this.form.validateFields((errors, values) => { this.form.validateFields((errors, values) => {
if (!errors) { if (!errors) {
const formData = { const formData = {
@@ -186,6 +186,17 @@ export default {
/** 赋值给当前对应的表单文件 */ /** 赋值给当前对应的表单文件 */
this.$set(this.realDataSource[this.uploadTable.index], this.uploadTable.dbFieldName, attIdList.join(',')) this.$set(this.realDataSource[this.uploadTable.index], this.uploadTable.dbFieldName, attIdList.join(','))
this.$emit('ok', this.realDataSource) this.$emit('ok', this.realDataSource)
},
/**
* 校验文件是否上传
* @returns {boolean}
*/
validateTableData() {
if (this.realDataSource.some(tt => !tt.feeData)) {
this.$message.warning(this.$t('businessSupport.standardizationActivity.pleaseUploadGroupInfo'))
return false
}
return true
} }
} }
} }
@@ -185,6 +185,17 @@ export default {
}, },
handleTableChange (pagination) { handleTableChange (pagination) {
this.ipagination = pagination this.ipagination = pagination
},
/**
* 校验文件是否上传
* @returns {boolean}
*/
validateTableData() {
if (this.realDataSource.some(tt => !tt.meetingData)) {
this.$message.warning(this.$t('businessSupport.standardizationActivity.pleaseUploadMeeting'))
return false
}
return true
} }
} }
} }
@@ -173,6 +173,17 @@ export default {
/** 赋值给当前对应的表单文件 */ /** 赋值给当前对应的表单文件 */
this.$set(this.realDataSource[this.uploadTable.index], this.uploadTable.dbFieldName, attIdList.join(',')) this.$set(this.realDataSource[this.uploadTable.index], this.uploadTable.dbFieldName, attIdList.join(','))
this.$emit('ok', this.realDataSource) this.$emit('ok', this.realDataSource)
},
/**
* 校验文件是否上传
* @returns {boolean}
*/
validateTableData() {
if (this.realDataSource.some(tt => !tt.feeData)) {
this.$message.warning(this.$t('businessSupport.standardizationActivity.pleaseUploadPaymentInfo'))
return false
}
return true
} }
} }
} }
@@ -73,6 +73,7 @@
import { detailSubmitQuestion } from '@/api/enterpriseStandardLibraryApi' import { detailSubmitQuestion } from '@/api/enterpriseStandardLibraryApi'
import { getCarTypeProjectList } from '@/api/projectLibraryApi.js' import { getCarTypeProjectList } from '@/api/projectLibraryApi.js'
import pick from 'lodash.pick' import pick from 'lodash.pick'
import moment from 'moment'
export default { export default {
name: 'SubmitQuestionModal', name: 'SubmitQuestionModal',
@@ -139,8 +140,7 @@ export default {
this.visible = true this.visible = true
const param = {} const param = {}
param.standardNumber = standardNumber param.standardNumber = standardNumber
param.quizTime = new Date().getFullYear() + '-' + (new Date().getMonth() + 1) + '-' + new Date().getDay() + ' ' + param.quizTime = moment().format('YYYY-MM-DD HH:mm:ss')
new Date().getHours() + ':' + new Date().getMinutes() + ':' + new Date().getSeconds()
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue(pick(param, 'standardNumber', 'quizTime')) this.form.setFieldsValue(pick(param, 'standardNumber', 'quizTime'))
}) })
@@ -79,7 +79,7 @@
<template v-slot:action="{text, record}"> <template v-slot:action="{text, record}">
<!-- 解除授权 --> <!-- 解除授权 -->
<a class="table-del" @click="handleCancelAuthor(record)">{{$t('enterpriseStandardLibrary.standard.cancelAuthor')}}</a> <a class="table-del" :disabled="isDisabled(record)" @click="handleCancelAuthor(record)">{{$t('enterpriseStandardLibrary.standard.cancelAuthor')}}</a>
</template> </template>
</j-table> </j-table>
@@ -186,6 +186,12 @@ export default {
} }
}) })
}, },
// 解除授权按钮是否不可点击
isDisabled (record) {
const authExpireDate = new Date(Date.parse(record.authExpireDate))
const currentDate = new Date().getFullYear() + '-' + (new Date().getMonth() + 1) + '-' + new Date().getDate()
return new Date(Date.parse(authExpireDate)) < new Date(Date.parse(currentDate))
},
loadData (arg) { loadData (arg) {
if (!this.url.list) { if (!this.url.list) {
this.$message.warning('请设置url.list属性!') this.$message.warning('请设置url.list属性!')
@@ -254,6 +260,17 @@ export default {
close () { close () {
this.queryParam = {} this.queryParam = {}
this.visible = false this.visible = false
this.ipagination = {
current: 1,
pageSize: 10,
pageSizeOptions: ['10', '30', '50', '100', '150', '200'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' ' + this.$t('total') + total + this.$t('strip')
},
showQuickJumper: true,
showSizeChanger: true,
total: 0
}
} }
} }
} }
@@ -150,9 +150,10 @@ export default {
dataIndex: 'transferUser', dataIndex: 'transferUser',
customRender: (value, row, index) => { customRender: (value, row, index) => {
return <user-selection v-model={this.dataSource[index].transferUser} return <user-selection v-model={this.dataSource[index].transferUser}
ref={'userSelection'}
disabled={this.disabled} type={'radio'} disabled={this.disabled} type={'radio'}
filedName={this.dataSource[index].id + '-' + this.dataSource[index].type} filedName={this.dataSource[index].id + '-' + this.dataSource[index].type}
nameStr={this.dataSource[index].transferUser_dictText}
onNameChange={this.userNameChange} showBtn={false}
placeholder={this.$t('pleaseSelect')} onChange={this.transferUserChange} /> placeholder={this.$t('pleaseSelect')} onChange={this.transferUserChange} />
} }
} }
@@ -194,19 +195,19 @@ export default {
if (res.success) { if (res.success) {
this.$message.success(res.message) this.$message.success(res.message)
this.loadData() this.loadData()
this.$forceUpdate()
this.$refs.userSelection.$forceUpdate()
} else { } else {
this.$message.warning(res.message) this.$message.warning(res.message)
} }
}).finally(() => {
this.loading = false
}) })
}, },
userNameChange (value, fieldName) {
const data = this.dataSource.find(item => item.id === fieldName.split('-')[0])
data.transferUser_dictText = value
},
// 批量转交 // 批量转交
handleTransfer () { handleTransfer () {
if (this.selectedRowKeys.length <= 0) { if (this.selectedRowKeys.length <= 0) {
this.$message.warning(this.$t('selectARecord')) this.$message.warning(this.$t('selectLeastOne'))
} else { } else {
this.$refs.userSelectModal.open() this.$refs.userSelectModal.open()
} }
@@ -22,6 +22,7 @@
<j-dict-select-tag <j-dict-select-tag
:placeholder="$t('pleaseSelect')+$t('workCenter.processCenter.processType')" :placeholder="$t('pleaseSelect')+$t('workCenter.processCenter.processType')"
dict-code="prc_type" dict-code="prc_type"
:dropdownMatchSelectWidth="false"
v-model="queryParam.prcType"> v-model="queryParam.prcType">
</j-dict-select-tag> </j-dict-select-tag>
</a-form-item> </a-form-item>
@@ -152,10 +153,11 @@ export default {
customRender: (value, row, index) => { customRender: (value, row, index) => {
if (row.state) { if (row.state) {
return <user-selection v-model={this.dataSource[index].transferUser} return <user-selection v-model={this.dataSource[index].transferUser}
nameStr={this.dataSource[index].transferUser_dictText} nameStr={this.dataSource[index].transferUser_dictText}
filedName={this.dataSource[index].taskId} filedName={this.dataSource[index].taskId}
onChange={this.transferUserChange} onChange={this.transferUserChange}
disabled={this.disabled} type={'radio'} placeholder={this.$t('pleaseSelect')} /> onNameChange={this.userNameChange} showBtn={false}
disabled={this.disabled} type={'radio'} placeholder={this.$t('pleaseSelect')} />
} else { } else {
return this.global.emptyLine return this.global.emptyLine
} }
@@ -185,14 +187,16 @@ export default {
} else { } else {
this.$message.warning(res.message) this.$message.warning(res.message)
} }
}).finally(() => {
this.loading = false
}) })
}, },
userNameChange (value, fieldName) {
const data = this.dataSource.find(item => item.taskId === fieldName)
data.transferUser_dictText = value
},
// 批量转交 // 批量转交
handleTransfer () { handleTransfer () {
if (this.selectedRowKeys.length <= 0) { if (this.selectedRowKeys.length <= 0) {
this.$message.warning(this.$t('selectARecord')) this.$message.warning(this.$t('selectLeastOne'))
} else { } else {
this.$refs.userSelectModal.open() this.$refs.userSelectModal.open()
} }
@@ -131,11 +131,21 @@ import InconformityItemModal from './modules/InconformityItemModal'
import { batchCloseInconformityItem } from '../../../api/projectLibraryApi' import { batchCloseInconformityItem } from '../../../api/projectLibraryApi'
import InconformityItemDetailModal from './modules/InconformityItemDetailModal' import InconformityItemDetailModal from './modules/InconformityItemDetailModal'
import { StandardSource } from '../../../enums/commonEnums' import { StandardSource } from '../../../enums/commonEnums'
import { mapGetters } from 'vuex'
export default { export default {
name: 'InconformityItemList', name: 'InconformityItemList',
components: { JTable, InconformityItemModal, InconformityItemDetailModal }, components: { JTable, InconformityItemModal, InconformityItemDetailModal },
mixins: [JeroListMixin], mixins: [JeroListMixin],
computed: {
...mapGetters(['userInfo']),
// 当前用户是否管理员
isAdmin () {
const adminRoleList = window._CONFIG.adminRoleCode.split(',')
const userRoleList = this.userInfo.roleCode.split(',')
return userRoleList.some(tt => adminRoleList.includes(tt))
}
},
data () { data () {
return { return {
columns: [ columns: [
@@ -233,7 +243,11 @@ export default {
{ {
text: this.$t('edit'), text: this.$t('edit'),
clickEvent: 'handleEdit', clickEvent: 'handleEdit',
has: 'inconformityItem:edit' has: 'inconformityItem:edit',
// 创建人可以维护自己创建的数据,管理员可以维护所有数据
show: (record) => {
return this.isAdmin || record.engineerId === this.userInfo.id
}
} }
], ],
disableMixinCreated: true disableMixinCreated: true
@@ -301,8 +315,8 @@ export default {
path, query path, query
}) })
}, },
handlePreview ({ id }) { handlePreview (record) {
this.$refs.detailModal.open() this.$refs.detailModal.open(record)
} }
} }
} }
@@ -11,41 +11,42 @@
<!--标准编号--> <!--标准编号-->
<div class="detail-page-part-form-item"> <div class="detail-page-part-form-item">
<label>{{ $t('standardNumber') }}</label> <label>{{ $t('standardNumber') }}</label>
<span>{{ detailData.standardNumber }}</span> <span>{{ detailData.standardNumber || global.emptyLine }}</span>
</div> </div>
<!--标准名称--> <!--标准名称-->
<div class="detail-page-part-form-item"> <div class="detail-page-part-form-item">
<label>{{ $t('standardName') }}</label> <label>{{ $t('standardName') }}</label>
<span>{{ detailData.a }}</span> <span>{{ detailData.standardName || global.emptyLine }}</span>
</div> </div>
<!--整改状态--> <!--整改状态-->
<div class="detail-page-part-form-item"> <div class="detail-page-part-form-item">
<label>{{ $t('workCenter.esInspectionProcess.rectificationStatus') }}</label> <label>{{ $t('workCenter.esInspectionProcess.rectificationStatus') }}</label>
<span>{{ detailData.state_dictText }}</span> <span>{{ detailData.state_dictText || global.emptyLine }}</span>
</div> </div>
<!--预计整改完成日期--> <!--预计整改完成日期-->
<div class="detail-page-part-form-item"> <div class="detail-page-part-form-item">
<label>{{ $t('projectLibrary.vehicleItemLibrary.estimatedDateOfCompletionOfRectification') }}</label> <label>{{ $t('projectLibrary.vehicleItemLibrary.estimatedDateOfCompletionOfRectification') }}</label>
<span>{{ detailData.expectedTime }}</span> <span>{{ detailData.expectedTime || global.emptyLine }}</span>
</div> </div>
<!--相关项目--> <!--相关项目-->
<div class="detail-page-part-form-item"> <div class="detail-page-part-form-item">
<label>{{ $t('projectLibrary.noncoincidenceItem.relevantProject') }}</label> <label>{{ $t('projectLibrary.noncoincidenceItem.relevantProject') }}</label>
<span>{{ detailData.projectName }}</span> <span>{{ detailData.projectName || global.emptyLine }}</span>
</div> </div>
<!--设计工程师--> <!--设计工程师-->
<div class="detail-page-part-form-item"> <div class="detail-page-part-form-item">
<label>{{ $t('workCenter.standardConsultationProcess.designEngineer') }}</label> <label>{{ $t('workCenter.standardConsultationProcess.designEngineer') }}</label>
<span>{{ detailData.engineerName }}</span> <span>{{ detailData.engineerId_dictText || global.emptyLine }}</span>
</div> </div>
<!--相关流程--> <!--相关流程-->
<div class="detail-page-part-form-item"> <div class="detail-page-part-form-item">
<label>{{ $t('projectLibrary.noncoincidenceItem.relatedProcess') }}</label> <label>{{ $t('projectLibrary.noncoincidenceItem.relatedProcess') }}</label>
<span>{{ detailData.b }}</span> <span>{{ detailData.prcNum || global.emptyLine }}</span>
</div> </div>
<!--查看未符合项评估结果--> <!--查看未符合项评估结果-->
<div class="btn-box"> <div class="btn-box">
<a-button type="primary" class="form-btn">{{ $t('projectLibrary.noncoincidenceItem.viewNonMatchItemEvaluationResult') }} <a-button type="primary" class="form-btn" @click="handleToProcessDetail">
{{ $t('projectLibrary.noncoincidenceItem.viewNonMatchItemEvaluationResult') }}
</a-button> </a-button>
</div> </div>
</div> </div>
@@ -56,22 +57,22 @@
<!--条款号--> <!--条款号-->
<div class="line-form-item"> <div class="line-form-item">
<label>{{ $t('workCenter.enStandardRevision.clauseNumber') }}</label> <label>{{ $t('workCenter.enStandardRevision.clauseNumber') }}</label>
<span>{{ detailData.termNum }}</span> <span>{{ detailData.termNum || global.emptyLine }}</span>
</div> </div>
<!--条款名称--> <!--条款名称-->
<div class="line-form-item"> <div class="line-form-item">
<label>{{ $t('workCenter.enStandardRevision.clauseName') }}</label> <label>{{ $t('workCenter.enStandardRevision.clauseName') }}</label>
<span>{{ detailData.termName }}</span> <span>{{ detailData.termName || global.emptyLine }}</span>
</div> </div>
<!--涉及项目--> <!--涉及项目-->
<div class="line-form-item"> <div class="line-form-item">
<label>{{ $t('projectLibrary.noncoincidenceItem.involvedItem') }}</label> <label>{{ $t('projectLibrary.noncoincidenceItem.involvedItem') }}</label>
<span>{{ detailData.projectName }}</span> <span>{{ detailData.projectName || global.emptyLine }}</span>
</div> </div>
<!--设计工程师--> <!--设计工程师-->
<div class="line-form-item"> <div class="line-form-item">
<label>{{ $t('workCenter.standardConsultationProcess.designEngineer') }}</label> <label>{{ $t('workCenter.standardConsultationProcess.designEngineer') }}</label>
<span>{{ detailData.engineerName }}</span> <span>{{ detailData.engineerName || global.emptyLine }}</span>
</div> </div>
</div> </div>
</div> </div>
@@ -79,6 +80,8 @@
</template> </template>
<script> <script>
import { ProcessKey } from '../../../../enums/commonEnums'
export default { export default {
name: 'InconformityItemDetailModal', name: 'InconformityItemDetailModal',
data () { data () {
@@ -88,12 +91,22 @@ export default {
} }
}, },
methods: { methods: {
open () { open (record) {
this.visible = true this.visible = true
this.detailData = Object.assign({}, record)
}, },
close () { close () {
this.visible = false this.visible = false
this.detailData = {}
},
handleToProcessDetail () {
this.$router.push({
path: '/workCenter/processCenter/detail/processDetail',
query: {
processKey: ProcessKey.NO_MATCH_TRACKING.value,
processInstanceId: this.detailData.prcNum_dictText
}
})
} }
} }
} }
@@ -437,12 +437,10 @@ export default {
/** /**
* 评估结果 * 评估结果
*/ */
toEvaluationResult ({ assessResults }) { toEvaluationResult ({ assessResults, id }) {
this.$router.push({ this.$router.push({
path: '/projectLibrary/EvaluationResultPage', path: '/projectLibrary/EvaluationResultPage',
query: { query: { assessResults, id }
assessResults
}
}) })
}, },
/** /**
@@ -75,6 +75,7 @@
import { submitDomesticQuestion, submitOverseasQuestion } from '../../../../api/standardRegulationLibraryApi.js' import { submitDomesticQuestion, submitOverseasQuestion } from '../../../../api/standardRegulationLibraryApi.js'
import { getCarTypeProjectList } from '../../../../api/projectLibraryApi.js' import { getCarTypeProjectList } from '../../../../api/projectLibraryApi.js'
import { StandardSource } from '../../../../enums/commonEnums.js' import { StandardSource } from '../../../../enums/commonEnums.js'
import moment from 'moment'
export default { export default {
name: 'SubmitQuestionModal', name: 'SubmitQuestionModal',
@@ -141,8 +142,7 @@ export default {
this.type = type this.type = type
const param = {} const param = {}
param.standardNumber = standardNumber param.standardNumber = standardNumber
param.quizTime = new Date().getFullYear() + '-' + (new Date().getMonth() + 1) + '-' + new Date().getDay() + ' ' + param.quizTime = moment().format('YYYY-MM-DD HH:mm:ss')
new Date().getHours() + ':' + new Date().getMinutes() + ':' + new Date().getSeconds()
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue(param) this.form.setFieldsValue(param)
}) })
@@ -10,6 +10,7 @@
<a-tree :show-line="true" :show-icon="true" :tree-data="treeData" :selected-keys="selectedTreeKeys"> <a-tree :show-line="true" :show-icon="true" :tree-data="treeData" :selected-keys="selectedTreeKeys">
<template #title="record"> <template #title="record">
<div class="tree-operate-node" <div class="tree-operate-node"
:class="{'tree-operate-node-selected': selectedTreeKeys.includes(record.id)}"
@mouseenter="handleTreeMouseover(record.id)" @mouseenter="handleTreeMouseover(record.id)"
@mouseleave="handleTreeMouseout(record.id)" @mouseleave="handleTreeMouseout(record.id)"
@click="handleSelectTreeNode(record)"> @click="handleSelectTreeNode(record)">
@@ -27,23 +28,27 @@
v-if="hasManagePermission(record)"> v-if="hasManagePermission(record)">
<!--新增同级--> <!--新增同级-->
<a-button icon="plus" <a-button icon="plus"
:title="$t('standardRegulationLibrary.profileCenter.addAPeer')"
class="tree-operate-node-btn" class="tree-operate-node-btn"
@click.stop="handleAddPeerFolder(record)" @click.stop="handleAddPeerFolder(record)"
v-has="'profileCenter:addPeer'" /> v-has="'profileCenter:addPeer'" />
<!--新增子级--> <!--新增子级-->
<a-button class="tree-operate-node-btn" <a-button class="tree-operate-node-btn"
:title="$t('standardRegulationLibrary.profileCenter.newChild')"
@click.stop="handleAddChildrenFolder(record)" @click.stop="handleAddChildrenFolder(record)"
v-has="'profileCenter:addChildren'"> v-has="'profileCenter:addChildren'">
<i class="iconfont icon-wenjian-tianjia" /> <i class="iconfont icon-wenjian-tianjia" />
</a-button> </a-button>
<!--编辑--> <!--编辑-->
<a-button class="tree-operate-node-btn" <a-button class="tree-operate-node-btn"
:title="$t('edit')"
@click.stop="handleEditTreeNode(record)" @click.stop="handleEditTreeNode(record)"
v-has="'profileCenter:editFolder'"> v-has="'profileCenter:editFolder'">
<i class="iconfont icon-bianji" /> <i class="iconfont icon-bianji" />
</a-button> </a-button>
<!--删除,根节点不能删除--> <!--删除,根节点不能删除-->
<a-button class="tree-operate-node-btn" <a-button class="tree-operate-node-btn"
:title="$t('delete')"
@click.stop="handleDelTreeNode(record)" @click.stop="handleDelTreeNode(record)"
v-has="'profileCenter:deleteFolder'"> v-has="'profileCenter:deleteFolder'">
<i class="iconfont icon-shanchu_" /> <i class="iconfont icon-shanchu_" />
@@ -199,13 +204,19 @@ export default {
{ {
text: this.$t('edit'), text: this.$t('edit'),
clickEvent: 'handleEdit', clickEvent: 'handleEdit',
has: 'profileCenter:table' has: 'profileCenter:table',
show: (record) => {
return record.authManageTag
}
}, },
// 删除 // 删除
{ {
text: this.$t('delete'), text: this.$t('delete'),
clickEvent: 'handleDelete', clickEvent: 'handleDelete',
has: 'profileCenter:table' has: 'profileCenter:table',
show: (record) => {
return record.authManageTag
}
} }
], ],
url: { url: {
@@ -390,4 +401,7 @@ export default {
<style scoped lang="less"> <style scoped lang="less">
@import '~@assets/less/common.less'; @import '~@assets/less/common.less';
.tree-operate-node-selected {
background-color: #ffd9d1 !important;
}
</style> </style>
@@ -253,19 +253,23 @@ export default {
processInfoForm: this.$form.createForm(this), processInfoForm: this.$form.createForm(this),
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 4 } sm: { span: 6 },
xxl: { span: 4 }
}, },
wrapperCol: { wrapperCol: {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 20 } sm: { span: 18 },
xxl: { span: 20 }
}, },
longLabelCol: { longLabelCol: {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 2 } sm: { span: 3 },
xxl: { span: 2 }
}, },
longWrapperCol: { longWrapperCol: {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 22 } sm: { span: 21 },
xxl: { span: 22 }
}, },
disabled: false, disabled: false,
validatorRules: { validatorRules: {
@@ -518,7 +518,8 @@
</a-form-model> </a-form-model>
</a-spin> </a-spin>
</div> </div>
<div class="custom-drawer-style-bottom-btn"> <!-- 查看不显示操作栏 -->
<div v-if="!isLook" class="custom-drawer-style-bottom-btn">
<a-button @click="handleCancel">{{ $t('cancel') }}</a-button> <a-button @click="handleCancel">{{ $t('cancel') }}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{ $t('submit') }}</a-button> <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{ $t('submit') }}</a-button>
</div> </div>
@@ -716,7 +717,8 @@ export default {
trigger: 'change' trigger: 'change'
} }
] ]
} },
isLook: false // 是否是查看
} }
}, },
computed: { computed: {
@@ -781,8 +783,13 @@ export default {
}, },
look (record) { look (record) {
this.visible = true this.visible = true
this.isLook = true
this.model = Object.assign({}, record) this.model = Object.assign({}, record)
this.formInline = Object.assign({}, record) this.formInline = Object.assign({}, record)
// 没有申请类型就设置为立项
if (!this.formInline.applicationType) {
this.formInline.applicationType = this.ApplicationCategory.INITIATION.value
}
if (this.formInline.workGroup) { if (this.formInline.workGroup) {
this.formInline.workGroup = { value: this.formInline.workGroup, label: this.formInline.workGroup_dictText } this.formInline.workGroup = { value: this.formInline.workGroup, label: this.formInline.workGroup_dictText }
} }
@@ -906,6 +913,7 @@ export default {
this.model = {} this.model = {}
this.formInline = {} this.formInline = {}
this.visible = false this.visible = false
this.isLook = false
this.$refs.ruleForm.clearValidate() this.$refs.ruleForm.clearValidate()
}, },
// 提交 // 提交
@@ -460,11 +460,21 @@ export default {
}, },
// 批量删除 // 批量删除
batchDel () { batchDel () {
for (let i = 0; i < this.selectedRowKeys.length; i++) { if (this.selectedRowKeys.length <= 0) {
this.dataSource.splice(this.selectedRowKeys[i], 1, false) this.$message.warning(this.$t('selectARecord'))
return
} }
this.dataSource = this.dataSource.filter(item => !!item) this.$confirm({
this.selectedRowKeys = [] title: this.$t('confirmBatchDeletion'),
content: this.$t('deleteAData'),
onOk: () => {
for (let i = 0; i < this.selectedRowKeys.length; i++) {
this.dataSource.splice(this.selectedRowKeys[i], 1, false)
}
this.dataSource = this.dataSource.filter(item => !!item)
this.selectedRowKeys = []
}
})
}, },
/** /**
* 对数组形式后端错误信息进行处理 * 对数组形式后端错误信息进行处理
@@ -498,7 +498,7 @@
</a-form-model> </a-form-model>
</a-spin> </a-spin>
</div> </div>
<div class="custom-drawer-style-bottom-btn"> <div v-if="!isLook" class="custom-drawer-style-bottom-btn">
<a-button @click="handleCancel">{{ $t('cancel') }}</a-button> <a-button @click="handleCancel">{{ $t('cancel') }}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{ $t('submit') }}</a-button> <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{ $t('submit') }}</a-button>
</div> </div>
@@ -742,7 +742,8 @@ export default {
trigger: 'change' trigger: 'change'
} }
] ]
} },
isLook: false // 是否是查看
} }
}, },
computed: { computed: {
@@ -859,9 +860,14 @@ export default {
this.formInline = Object.assign({}, formInline) this.formInline = Object.assign({}, formInline)
}, },
look (record) { look (record) {
this.isLook = true
this.visible = true this.visible = true
this.model = Object.assign({}, record) this.model = Object.assign({}, record)
this.formInline = Object.assign({}, record) this.formInline = Object.assign({}, record)
// 没有申请类型就设置为立项
if (!this.formInline.applicationType) {
this.formInline.applicationType = this.ApplicationCategory.INITIATION.value
}
this.formInline.enStandardSystem = this.formInline.enStandardSystem ? this.formInline.enStandardSystem.split(',').map(item => { this.formInline.enStandardSystem = this.formInline.enStandardSystem ? this.formInline.enStandardSystem.split(',').map(item => {
return { value: item } return { value: item }
}) : [] }) : []
@@ -963,6 +969,7 @@ export default {
this.model = {} this.model = {}
this.formInline = {} this.formInline = {}
this.visible = false this.visible = false
this.isLook = false
this.$refs.ruleForm.clearValidate() this.$refs.ruleForm.clearValidate()
this.draftPlanFinishDateDisabled = false this.draftPlanFinishDateDisabled = false
this.exposureDraftPlanFinishDateDisabled = false this.exposureDraftPlanFinishDateDisabled = false
@@ -1049,7 +1056,7 @@ export default {
} }
.title-text { .title-text {
width: 180px; width: 200px;
} }
/deep/ .ant-form-item-children > * { /deep/ .ant-form-item-children > * {
@@ -205,7 +205,7 @@ export default {
customRender: (value, row, index) => { customRender: (value, row, index) => {
return <user-selection v-model={this.dataSource[index].approvalUser} return <user-selection v-model={this.dataSource[index].approvalUser}
filedName={index + ''} onNameChange={this.userNameChange} filedName={index + ''} onNameChange={this.userNameChange}
nameStr={this.dataSource[index].approvalUser_dictText} nameStr={this.dataSource[index].approvalUser_dictText} showBtn={false}
disabled={this.disabled} type={'radio'} placeholder={this.$t('pleaseSelect')} /> disabled={this.disabled} type={'radio'} placeholder={this.$t('pleaseSelect')} />
} }
} }
@@ -252,7 +252,7 @@ export default {
} else { } else {
// 不是被驳回的待办,可以设置联络人 // 不是被驳回的待办,可以设置联络人
return <user-select-by-contact v-model={this.dataSource[index].contactUser} return <user-select-by-contact v-model={this.dataSource[index].contactUser}
nameStr={this.dataSource[index].contactUser_dictText} nameStr={this.dataSource[index].contactUser_dictText} showBtn={false}
disabled={this.disabled} type={'radio'} placeholder={this.$t('pleaseSelect')} /> disabled={this.disabled} type={'radio'} placeholder={this.$t('pleaseSelect')} />
} }
} }
@@ -469,11 +469,21 @@ export default {
}, },
// 批量删除 // 批量删除
batchDel () { batchDel () {
for (let i = 0; i < this.selectedRowKeys.length; i++) { if (this.selectedRowKeys.length <= 0) {
this.dataSource.splice(this.selectedRowKeys[i], 1, false) this.$message.warning(this.$t('selectARecord'))
return
} }
this.dataSource = this.dataSource.filter(item => !!item) this.$confirm({
this.selectedRowKeys = [] title: this.$t('confirmBatchDeletion'),
content: this.$t('deleteAData'),
onOk: () => {
for (let i = 0; i < this.selectedRowKeys.length; i++) {
this.dataSource.splice(this.selectedRowKeys[i], 1, false)
}
this.dataSource = this.dataSource.filter(item => !!item)
this.selectedRowKeys = []
}
})
}, },
// 批量设置联络人 // 批量设置联络人
batchSetContact () { batchSetContact () {
@@ -196,7 +196,7 @@ export default {
customRender: (value, row, index) => { customRender: (value, row, index) => {
return <user-selection v-model={this.dataSource[index].prcMainDraftUser} return <user-selection v-model={this.dataSource[index].prcMainDraftUser}
filedName={index + ''} onNameChange={this.userNameChange} filedName={index + ''} onNameChange={this.userNameChange}
nameStr={this.dataSource[index].prcMainDraftUser_dictText} nameStr={this.dataSource[index].prcMainDraftUser_dictText} showBtn={false}
disabled={this.disabled} type={'radio'} placeholder={this.$t('pleaseSelect')} /> disabled={this.disabled} type={'radio'} placeholder={this.$t('pleaseSelect')} />
} }
} }
@@ -633,6 +633,8 @@ export default {
if (res.success) { if (res.success) {
const result = res.result const result = res.result
const formInline = {} const formInline = {}
// 企标id
formInline.standardId = result.id
// 标准等级分类 // 标准等级分类
formInline.gradeClassification = result.grade_classification || undefined formInline.gradeClassification = result.grade_classification || undefined
// 授权部门 // 授权部门
@@ -51,6 +51,199 @@
</j-table> </j-table>
</div> </div>
<!-- 修改单需要用的字段 -->
<a-form-model class="update-list-form" :model="formInline" :rules="rules" ref="ruleForm">
<div class="form-flex-box">
<!-- 更改级别代号 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enStandardChange.levelCode')">
{{ $t('workCenter.enStandardChange.levelCode') }}
</span>
</div>
<a-form-model-item class="item-model" prop="levelCode">
<a-input class="box-input"
v-model="formInline.levelCode"
:maxLength="50"
:disabled="disabled"
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enStandardChange.levelCode')" />
</a-form-model-item>
</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.enStandardChange.isHasGraph')">
{{ $t('workCenter.enStandardChange.isHasGraph') }}
</span>
</div>
<a-form-model-item class="item-model" prop="has2d3dGraph">
<a-input class="box-input"
v-model="formInline.has2d3dGraph"
:maxLength="50"
:disabled="disabled"
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enStandardChange.isHasGraph')" />
</a-form-model-item>
</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.enStandardChange.customerConfirmation')">
{{ $t('workCenter.enStandardChange.customerConfirmation') }}
</span>
</div>
<a-form-model-item class="item-model" prop="customerConfirmation">
<a-input class="box-input"
v-model="formInline.customerConfirmation"
:maxLength="50"
:disabled="disabled"
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enStandardChange.customerConfirmation')" />
</a-form-model-item>
</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.enStandardChange.refreshFileNumber')">
{{ $t('workCenter.enStandardChange.refreshFileNumber') }}
</span>
</div>
<a-form-model-item class="item-model" prop="refreshFileNumber">
<a-input class="box-input"
v-model="formInline.refreshFileNumber"
:maxLength="50"
:disabled="disabled"
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enStandardChange.refreshFileNumber')" />
</a-form-model-item>
</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.enStandardChange.inventory')">
{{ $t('workCenter.enStandardChange.inventory') }}
</span>
</div>
<a-form-model-item class="item-model" prop="inventory">
<a-input class="box-input"
v-model="formInline.inventory"
:maxLength="50"
:disabled="disabled"
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enStandardChange.inventory')" />
</a-form-model-item>
</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.enStandardChange.workInProgress')">
{{ $t('workCenter.enStandardChange.workInProgress') }}
</span>
</div>
<a-form-model-item class="item-model" prop="workInProgress">
<a-input class="box-input"
v-model="formInline.workInProgress"
:maxLength="50"
:disabled="disabled"
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enStandardChange.workInProgress')" />
</a-form-model-item>
</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.enStandardChange.spareParts')">
{{ $t('workCenter.enStandardChange.spareParts') }}
</span>
</div>
<a-form-model-item class="item-model" prop="spareParts">
<a-input class="box-input"
v-model="formInline.spareParts"
:maxLength="50"
:disabled="disabled"
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enStandardChange.spareParts')" />
</a-form-model-item>
</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.enStandardChange.relatedChanges')">
{{ $t('workCenter.enStandardChange.relatedChanges') }}
</span>
</div>
<a-form-model-item class="item-model" prop="relatedChanges">
<a-input class="box-input"
v-model="formInline.relatedChanges"
:maxLength="50"
:disabled="disabled"
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enStandardChange.relatedChanges')" />
</a-form-model-item>
</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.enStandardChange.changeTag')">
{{ $t('workCenter.enStandardChange.changeTag') }}
</span>
</div>
<a-form-model-item class="item-model" prop="changeTag">
<a-input class="box-input"
v-model="formInline.changeTag"
:maxLength="50"
:disabled="disabled"
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enStandardChange.changeTag')" />
</a-form-model-item>
</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.enStandardChange.treatmentCount')">
{{ $t('workCenter.enStandardChange.treatmentCount') }}
</span>
</div>
<a-form-model-item class="item-model" prop="treatmentCount">
<a-input class="box-input"
v-model="formInline.treatmentCount"
:maxLength="50"
:disabled="disabled"
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enStandardChange.treatmentCount')" />
</a-form-model-item>
</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.enStandardChange.effectiveDate')">
{{ $t('workCenter.enStandardChange.effectiveDate') }}
</span>
</div>
<a-form-model-item class="item-model" prop="effectiveDate">
<a-date-picker
v-model="formInline.effectiveDate"
:showTime="false"
:disabled="disabled"
value-format="YYYY-MM-DD">
</a-date-picker>
</a-form-model-item>
</div>
</div>
</a-form-model>
<update-list-modal ref="updateListModal" @ok="modalFormOk"></update-list-modal> <update-list-modal ref="updateListModal" @ok="modalFormOk"></update-list-modal>
<!-- 修改前 弹框显示 --> <!-- 修改前 弹框显示 -->
<text-content-modal ref="textContentModal" /> <text-content-modal ref="textContentModal" />
@@ -134,7 +327,98 @@ export default {
} }
], ],
dataSource: [], dataSource: [],
loading: false loading: false,
formInline: {},
rules: {
// 更改级别代号
levelCode: [
{
required: true,
message: this.$t('workCenter.enStandardChange.levelCode') + this.$t('cannotEmpty'),
trigger: 'blur'
}
],
// 有无二维或三维图
has2d3dGraph: [
{
required: true,
message: this.$t('workCenter.enStandardChange.isHasGraph') + this.$t('cannotEmpty'),
trigger: 'blur'
}
],
// 顾客确认(适用军品)
customerConfirmation: [
{
required: true,
message: this.$t('workCenter.enStandardChange.customerConfirmation') + this.$t('cannotEmpty'),
trigger: 'blur'
}
],
// 刷新文件号(三维)
refreshFileNumber: [
{
required: true,
message: this.$t('workCenter.enStandardChange.refreshFileNumber') + this.$t('cannotEmpty'),
trigger: 'blur'
}
],
// 库存
inventory: [
{
required: true,
message: this.$t('workCenter.enStandardChange.inventory') + this.$t('cannotEmpty'),
trigger: 'blur'
}
],
// 在制品
workInProgress: [
{
required: true,
message: this.$t('workCenter.enStandardChange.workInProgress') + this.$t('cannotEmpty'),
trigger: 'blur'
}
],
// 备件
spareParts: [
{
required: true,
message: this.$t('workCenter.enStandardChange.spareParts') + this.$t('cannotEmpty'),
trigger: 'blur'
}
],
// 关联更改项
relatedChanges: [
{
required: true,
message: this.$t('workCenter.enStandardChange.relatedChanges') + this.$t('cannotEmpty'),
trigger: 'blur'
}
],
// 更改标记
changeTag: [
{
required: true,
message: this.$t('workCenter.enStandardChange.changeTag') + this.$t('cannotEmpty'),
trigger: 'blur'
}
],
// 处数
treatmentCount: [
{
required: true,
message: this.$t('workCenter.enStandardChange.treatmentCount') + this.$t('cannotEmpty'),
trigger: 'blur'
}
],
// 生效日期
effectiveDate: [
{
required: true,
message: this.$t('workCenter.enStandardChange.effectiveDate') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
}
} }
}, },
methods: { methods: {
@@ -142,6 +426,30 @@ export default {
initData (data) { initData (data) {
// 给表格赋值,在线编辑不知道要怎么赋值? // 给表格赋值,在线编辑不知道要怎么赋值?
this.dataSource = data.list this.dataSource = data.list
const formInline = {}
// 更改级别代号
formInline.levelCode = data.levelCode
// 有无二维或三维图
formInline.has2d3dGraph = data.has2d3dGraph
// 顾客确认(适用军品)
formInline.customerConfirmation = data.customerConfirmation
// 刷新文件号(三维)
formInline.refreshFileNumber = data.refreshFileNumber
// 库存
formInline.inventory = data.inventory
// 在制品
formInline.workInProgress = data.workInProgress
// 备件
formInline.spareParts = data.spareParts
// 关联更改项
formInline.relatedChanges = data.relatedChanges
// 更改标记
formInline.changeTag = data.changeTag
// 处数
formInline.treatmentCount = data.treatmentCount
// 生效日期
formInline.effectiveDate = data.effectiveDate
this.formInline = Object.assign({}, formInline)
// 给表单赋值 // 给表单赋值
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.baseInfoForm.initData(data) this.$refs.baseInfoForm.initData(data)
@@ -151,23 +459,50 @@ export default {
getData () { getData () {
// 把数据抛出,在线编辑不知道要不要抛 // 把数据抛出,在线编辑不知道要不要抛
const data = {} const data = {}
data.formInline = this.$refs.baseInfoForm.getData() data.formInline = {
...this.$refs.baseInfoForm.getData(),
...this.formInline
}
data.dataSource = this.dataSource data.dataSource = this.dataSource
return data return data
}, },
// 外层获取数据要过校验,返回false表示没有通过校验 // 外层获取数据要过校验,返回false表示没有通过校验
async getDataValidate () { async getDataValidate () {
let data = {} let data = {}
const formInline = await this.$refs.baseInfoForm.getDataValidate() let formInline = {}
if (formInline && this.dataSource.length > 0) { if (formInline = await this.$refs.baseInfoForm.getDataValidate()) {
data.formInline = formInline this.$refs.ruleForm.validate(async valid => {
data.dataSource = this.dataSource if (valid) {
} else if (this.dataSource.length <= 0) { if (this.dataSource.length > 0) {
this.$message.warning(this.$t('addAtLeastOneRowOfData')) data.formInline = { ...formInline, ...this.formInline }
data = false data.dataSource = this.dataSource
} else {
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
data = false
}
} else {
data = false
}
})
} else { } else {
data = false data = false
} }
// await this.$refs.ruleForm.validate(async valid => {
// if (valid) {
// const formInline = await this.$refs.baseInfoForm.getDataValidate()
// if (formInline && this.dataSource.length > 0) {
// data.formInline = { ...formInline, ...this.formInline }
// data.dataSource = this.dataSource
// } else if (this.dataSource.length <= 0) {
// this.$message.warning(this.$t('addAtLeastOneRowOfData'))
// data = false
// } else {
// data = false
// }
// } else {
// data = false
// }
// })
return data return data
}, },
// 企标编号和名称修改触发流程名称的修改 // 企标编号和名称修改触发流程名称的修改
@@ -227,4 +562,11 @@ export default {
margin-right: 20px; margin-right: 20px;
} }
} }
/deep/ .ant-form-item-children > * {
width: 100% !important;
}
.update-list-form {
margin-top: 20px;
}
</style> </style>
@@ -91,6 +91,7 @@
<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 || categoryTypeDisabled" :disabled="disabled || categoryTypeDisabled"
@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>
@@ -485,8 +486,16 @@ export default {
}) })
if (!this.$route.query.processInstanceId) { if (!this.$route.query.processInstanceId) {
// 说明是在新发起一个节点,初始化发起人员信息 // 说明是在新发起一个节点,初始化发起人员信息
this.personnelInfoDataAll[0].linkUserIds = Vue.ls.get(USER_INFO).id const firstFieldName = this.personnelInfoDataAll[0].variableName
this.personnelInfoDataAll[0].userList = Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')' for (const item of this.personnelInfoDataAll) {
if (item.variableName === firstFieldName) {
item.linkUserIds = Vue.ls.get(USER_INFO).id
item.linkUserIds_dictText = Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')'
item.userList = Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')'
}
}
// this.personnelInfoDataAll[0].linkUserIds = Vue.ls.get(USER_INFO).id
// this.personnelInfoDataAll[0].userList = Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')'
// 筛选出立项的人员信息 // 筛选出立项的人员信息
this.personnelInfoData = this.personnelInfoDataAll.filter(item => item.branchType.split(',').includes('1')) this.personnelInfoData = this.personnelInfoDataAll.filter(item => item.branchType.split(',').includes('1'))
} }
@@ -637,11 +646,13 @@ export default {
if (this.formInline.projectType) { if (this.formInline.projectType) {
this.formInline.projectType = undefined this.formInline.projectType = undefined
} }
// 清空流程名称
this.processInfoForm.resetFields(['prcName'])
}, },
// 项目类别改变 // 项目类别改变
projectTypeChange (value) { projectTypeChange (value) {
console.log(value, this.formInline.applicationCategory) console.log(value, this.formInline.applicationCategory)
if (value) { if (value && this.formInline.applicationCategory === ApplicationCategory.CHANGE.value) {
if (value === ProjectType.RESPONSIBLE_DEPT_CHANGE.value) { if (value === ProjectType.RESPONSIBLE_DEPT_CHANGE.value) {
// 是责任部门变更 // 是责任部门变更
this.resetPersonInfoStructure('3') this.resetPersonInfoStructure('3')
@@ -650,6 +661,8 @@ export default {
this.resetPersonInfoStructure('2') this.resetPersonInfoStructure('2')
} }
} }
// 清空流程名称
this.processInfoForm.resetFields(['prcName'])
}, },
// 选择用户得到用户名 // 选择用户得到用户名
userSelectNameChange (value, fieldName) { userSelectNameChange (value, fieldName) {
@@ -44,6 +44,7 @@
v-model="formInline.newEnStandardName" v-model="formInline.newEnStandardName"
:disabled="disabled" :disabled="disabled"
:maxLength="200" :maxLength="200"
@blur="newEnStandardNameBlur"
@change="event => event.target.value = event.target.value.trim()" @change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')" /> :placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')" />
</a-form-model-item> </a-form-model-item>
@@ -169,6 +170,7 @@
:disabled="disabled" :disabled="disabled"
v-model="formInline.newEnStandardName" v-model="formInline.newEnStandardName"
:maxLength="200" :maxLength="200"
@blur="newEnStandardNameBlur"
@change="event => event.target.value = event.target.value.trim()" @change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardName')" /> :placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.newEnterpriseStandardName')" />
</a-form-model-item> </a-form-model-item>
@@ -660,10 +662,6 @@ export default {
// 原企标编号改变,新企标编号随之改变 // 原企标编号改变,新企标编号随之改变
'formInline.originEnStandardNo' (value) { 'formInline.originEnStandardNo' (value) {
this.getEnStandardNo() this.getEnStandardNo()
},
// 企标名称,企标名称修改流程名称需要自动更改
'formInline.newEnStandardName' (value) {
this.returnProcessName()
} }
}, },
computed: { computed: {
@@ -873,6 +871,10 @@ export default {
decadeCodeChange (value) { decadeCodeChange (value) {
this.getEnStandardNo() this.getEnStandardNo()
}, },
newEnStandardNameBlur (value) {
// 企标名称,企标名称修改流程名称需要自动更改
this.returnProcessName()
},
// 返回流程名称 // 返回流程名称
returnProcessName () { returnProcessName () {
const processName = (this.formInline.newEnStandardNo || '') + '-' + (this.formInline.newEnStandardName || '') + '-' + '立项' const processName = (this.formInline.newEnStandardNo || '') + '-' + (this.formInline.newEnStandardName || '') + '-' + '立项'
@@ -472,6 +472,10 @@ export default {
this.validatorRules.commitText.rules[0].required = false this.validatorRules.commitText.rules[0].required = false
this.rejectBtnDisabled = true this.rejectBtnDisabled = true
this.agreeBtnDisabled = false this.agreeBtnDisabled = false
const obj = { commitText: '' }
this.$nextTick(() => {
this.approvalInfoForm.setFieldsValue(pick(obj, 'commitText'))
})
} else { } else {
// 选了否 // 选了否
this.validatorRules.commitText.rules[0].required = true this.validatorRules.commitText.rules[0].required = true
@@ -46,6 +46,7 @@
<a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')" <a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')"
v-decorator="['deadline', validatorRules.deadline]" v-decorator="['deadline', validatorRules.deadline]"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
:disabled-date="disabledDate"
format="YYYY-MM-DD" format="YYYY-MM-DD"
:showTime="false" :showTime="false"
style="width: 100%" /> style="width: 100%" />
@@ -59,6 +60,7 @@
<script> <script>
import pick from 'lodash.pick' import pick from 'lodash.pick'
import UserSelection from '@/components/selection/UserSelection' import UserSelection from '@/components/selection/UserSelection'
import moment from 'moment'
export default { export default {
name: 'AddEditDrafterDrawer', name: 'AddEditDrafterDrawer',
@@ -118,6 +120,10 @@ export default {
this.form.setFieldsValue(pick(this.model, 'dept', 'user', 'scope', 'deadline')) this.form.setFieldsValue(pick(this.model, 'dept', 'user', 'scope', 'deadline'))
}) })
}, },
// 不可选择的日期
disabledDate (current) {
return current && current < moment().startOf('day')
},
// 选择用户得到用户名 // 选择用户得到用户名
userSelectNameChange (value, fieldName) { userSelectNameChange (value, fieldName) {
this.model[fieldName + '_dictText'] = value this.model[fieldName + '_dictText'] = value
@@ -33,10 +33,9 @@
</a-form-item> </a-form-item>
<!-- 修改意见内容(包括修改理由和依据) --> <!-- 修改意见内容(包括修改理由和依据) -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.enStandardRevision.contentOfRevisedOpinion')"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.enStandardRevision.contentOfRevisedOpinion')">
<a-input :placeholder="$t('pleaseEnter') + $t('workCenter.enStandardRevision.contentOfRevisedOpinion')" <a-textarea :placeholder="$t('pleaseEnter') + $t('workCenter.enStandardRevision.contentOfRevisedOpinion')"
:maxLength="50" :maxLength="500" :rows="4"
@change="event => event.target.value = event.target.value.trim()" v-decorator.trim="[ 'editAdvice', validatorRules.editAdvice ]" />
v-decorator.trim="[ 'editAdvice', validatorRules.editAdvice ]" />
</a-form-item> </a-form-item>
</a-form> </a-form>
</a-spin> </a-spin>
@@ -79,12 +78,22 @@ export default {
model: {}, model: {},
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 10 } sm: { span: 12 },
xxl: { span: 10 }
}, },
wrapperCol: { wrapperCol: {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 12 } sm: { span: 10 },
xxl: { span: 12 }
}, },
// labelLongCol: {
// xs: { span: 24 },
// sm: { span: 21, offset: 1 }
// },
// wrapperLongCol: {
// xs: { span: 24 },
// sm: { span: 21, offset: 1 }
// },
validatorRules: { validatorRules: {
// 条款号 // 条款号
clauseNum: { clauseNum: {
@@ -12,7 +12,7 @@
<div class="online-edit-wrapper"> <div class="online-edit-wrapper">
<!-- todo: 还不确定这里展示的是什么 --> <!-- todo: 还不确定这里展示的是什么 -->
<p>企业标准</p> <p>企业标准</p>
<a-button type="primary">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button> <a-button type="primary">{{ $t('view') }}</a-button>
</div> </div>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -153,7 +153,13 @@ export default {
}, },
// 征求意见的删除 // 征求意见的删除
handleDelete (index) { handleDelete (index) {
this.dataSource.splice(index, 1) this.$confirm({
title: this.$t('confirmDeletion'),
content: this.$t('areYouSure'),
onOk: () => {
this.dataSource.splice(index, 1)
}
})
}, },
// 征求意见新增编辑完成 // 征求意见新增编辑完成
modalFormOk (value, index) { modalFormOk (value, index) {
@@ -14,7 +14,7 @@
<div class="online-edit-wrapper"> <div class="online-edit-wrapper">
<!-- todo: 还不确定这里展示的是什么 --> <!-- todo: 还不确定这里展示的是什么 -->
<p>企业标准</p> <p>企业标准</p>
<a-button type="primary">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button> <a-button type="primary">{{ $t('view') }}</a-button>
</div> </div>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -37,9 +37,9 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
<!-- 部门联络人 --> <!-- 部门联络人 -->
<div class="box-title-text form-flex-item"> <div v-if="formInline.adviceFlag === '1'" class="box-title-text form-flex-item">
<div class="title-text"> <div class="title-text">
<span class="required" v-if="rules.contactUser[0].required">*</span> <span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.departmentalLiaison')"> <span class="title-text-text" :title="$t('workCenter.enStandardRevision.departmentalLiaison')">
{{ $t('workCenter.enStandardRevision.departmentalLiaison') }} {{ $t('workCenter.enStandardRevision.departmentalLiaison') }}
</span> </span>
@@ -87,19 +87,6 @@ export default {
} }
} }
}, },
watch: {
// 是否开启征求意见
'formInline.adviceFlag': {
handler (val) {
if (val && val === '1') {
// 开启征求意见,部门联络人必填
this.rules.contactUser[0].required = true
} else {
this.rules.contactUser[0].required = false
}
}
}
},
methods: { methods: {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) { initData (data) {
@@ -12,7 +12,7 @@
<div class="online-edit-wrapper"> <div class="online-edit-wrapper">
<!-- todo: 还不确定这里展示的是什么 --> <!-- todo: 还不确定这里展示的是什么 -->
<p>企业标准</p> <p>企业标准</p>
<a-button type="primary">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button> <a-button type="primary">{{ $t('view') }}</a-button>
</div> </div>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -189,7 +189,13 @@ export default {
}, },
// 征求意见的删除 // 征求意见的删除
handleDelete (index) { handleDelete (index) {
this.dataSource.splice(index, 1) this.$confirm({
title: this.$t('confirmDeletion'),
content: this.$t('areYouSure'),
onOk: () => {
this.dataSource.splice(index, 1)
}
})
}, },
// 征求意见新增编辑完成 // 征求意见新增编辑完成
modalFormOk (value, index) { modalFormOk (value, index) {
@@ -14,7 +14,7 @@
<div class="online-edit-wrapper"> <div class="online-edit-wrapper">
<!-- todo: 还不确定这里展示的是什么 --> <!-- todo: 还不确定这里展示的是什么 -->
<p>企业标准</p> <p>企业标准</p>
<a-button type="primary">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button> <a-button type="primary">{{ $t('view') }}</a-button>
</div> </div>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -12,7 +12,7 @@
<div class="online-edit-wrapper"> <div class="online-edit-wrapper">
<!-- todo: 还不确定这里展示的是什么 --> <!-- todo: 还不确定这里展示的是什么 -->
<p>企业标准</p> <p>企业标准</p>
<a-button type="primary">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button> <a-button type="primary">{{ $t('view') }}</a-button>
</div> </div>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -160,7 +160,13 @@ export default {
}, },
// 征求意见的删除 // 征求意见的删除
handleDelete (index) { handleDelete (index) {
this.dataSource.splice(index, 1) this.$confirm({
title: this.$t('confirmDeletion'),
content: this.$t('areYouSure'),
onOk: () => {
this.dataSource.splice(index, 1)
}
})
}, },
// 征求意见新增编辑完成 // 征求意见新增编辑完成
modalFormOk (value, index) { modalFormOk (value, index) {
@@ -203,7 +203,13 @@ export default {
}, },
// 征求意见的删除 // 征求意见的删除
handleDelete (index) { handleDelete (index) {
this.dataSource.splice(index, 1) this.$confirm({
title: this.$t('confirmDeletion'),
content: this.$t('areYouSure'),
onOk: () => {
this.dataSource.splice(index, 1)
}
})
}, },
// 征求意见新增编辑完成 // 征求意见新增编辑完成
modalFormOk (value, index) { modalFormOk (value, index) {
@@ -79,6 +79,27 @@
</a-button> </a-button>
</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.enStandardRevision.compilationIllustration')">
{{ $t('workCenter.enStandardRevision.compilationIllustration') }}
</span>
</div>
<a-form-model-item class="item-model" prop="compIllustration">
<a-button type="primary" class="button-text" style="width: 200px" @click="clickButtonToUpload('compIllustration')">
{{
(formInline.compIllustration === 'null' || formInline.compIllustration === ''
|| formInline.compIllustration === null || formInline.compIllustration === undefined)
? $t('uploadFile.clickUpload')
: $t('uploadFile.viewUploadedFiles')
}}
</a-button>
</a-form-model-item>
</div>
<!-- 稽查内容 -->
<p class="base-info-inner-title">{{ $t('enterpriseStandardLibrary.standard.auditContent') }}</p>
<!-- 是否需要稽查 --> <!-- 是否需要稽查 -->
<div class="box-title-text form-flex-item"> <div class="box-title-text form-flex-item">
<div class="title-text"> <div class="title-text">
@@ -102,9 +123,6 @@
</a-form-model> </a-form-model>
<!-- 是否需要稽查选择是,需要填写稽查内容,否则隐藏稽查内容区域 --> <!-- 是否需要稽查选择是,需要填写稽查内容,否则隐藏稽查内容区域 -->
<template v-if="formInline.inspectFlag === '1'"> <template v-if="formInline.inspectFlag === '1'">
<!-- 稽查内容 -->
<p class="base-info-inner-title">{{ $t('enterpriseStandardLibrary.standard.auditContent') }}</p>
<!-- 操作区域 --> <!-- 操作区域 -->
<div v-if="!disabled" class="table-operator"> <div v-if="!disabled" class="table-operator">
<!-- 新增 --> <!-- 新增 -->
@@ -236,6 +254,14 @@ export default {
trigger: 'change' trigger: 'change'
} }
], ],
// 编制说明
compIllustration: [
{
required: true,
message: this.$t('workCenter.enStandardRevision.compilationIllustration') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// 是否需要稽查 // 是否需要稽查
inspectFlag: [ inspectFlag: [
{ {
@@ -408,7 +434,13 @@ export default {
}, },
// 稽查内容的删除 // 稽查内容的删除
handleDelete (index) { handleDelete (index) {
this.dataSource.splice(index, 1) this.$confirm({
title: this.$t('confirmDeletion'),
content: this.$t('areYouSure'),
onOk: () => {
this.dataSource.splice(index, 1)
}
})
}, },
// 稽查内容新增编辑完成 // 稽查内容新增编辑完成
checkContentOk (value, index) { checkContentOk (value, index) {
@@ -430,6 +462,7 @@ export default {
.form-add { .form-add {
margin-top: 30px; margin-top: 30px;
margin-bottom: 0;
} }
.online-edit-wrapper { .online-edit-wrapper {
@@ -444,6 +477,7 @@ export default {
} }
.base-info-inner-title { .base-info-inner-title {
width: 100%;
color: #1D2129; color: #1D2129;
font-size: 16px; font-size: 16px;
font-weight: 500; font-weight: 500;
@@ -157,7 +157,13 @@ export default {
}, },
// 删除 // 删除
handleDelete (id, index) { handleDelete (id, index) {
this.dataSource.splice(index, 1) this.$confirm({
title: this.$t('confirmDeletion'),
content: this.$t('areYouSure'),
onOk: () => {
this.dataSource.splice(index, 1)
}
})
}, },
// 新增或编辑完成 // 新增或编辑完成
modalFormOk (value) { modalFormOk (value) {
@@ -12,7 +12,7 @@
<div class="online-edit-wrapper"> <div class="online-edit-wrapper">
<!-- todo: 还不确定这里展示的是什么 --> <!-- todo: 还不确定这里展示的是什么 -->
<p>企业标准</p> <p>企业标准</p>
<a-button type="primary">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button> <a-button type="primary">{{ $t('view') }}</a-button>
</div> </div>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -12,12 +12,12 @@
:pagination="false" :pagination="false"
:loading="loading"> :loading="loading">
<!-- 起草人 --> <!-- 起草人 -->
<template slot="user" slot-scope="{record, text}"> <!--<template slot="user" slot-scope="{record, text}">-->
<a-tooltip overlay-class-name="tooltip-style"> <!-- <a-tooltip overlay-class-name="tooltip-style">-->
<template slot="title">{{ record.operateType === '2' ? '我' : (text || global.emptyLine) }}</template> <!-- <template slot="title">{{ record.operateType === '2' ? '我' : (text || global.emptyLine) }}</template>-->
<div class="table-text">{{ record.operateType === '2' ? '我' : (text || global.emptyLine) }}</div> <!-- <div class="table-text">{{ record.operateType === '2' ? '我' : (text || global.emptyLine) }}</div>-->
</a-tooltip> <!-- </a-tooltip>-->
</template> <!--</template>-->
<!-- 操作栏 --> <!-- 操作栏 -->
<div slot="action" slot-scope="{record, index}" class="action-span-cell"> <div slot="action" slot-scope="{record, index}" class="action-span-cell">
@@ -71,7 +71,7 @@ export default {
align: 'center', align: 'center',
width: 200, width: 200,
dataIndex: 'user_dictText', dataIndex: 'user_dictText',
scopedSlots: { customRender: 'user' } scopedSlots: { customRender: 'text' }
}, },
{ // 起草范围 { // 起草范围
title: this.$t('workCenter.enStandardRevision.draftingScope'), title: this.$t('workCenter.enStandardRevision.draftingScope'),
@@ -109,7 +109,7 @@ export default {
methods: { methods: {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) { initData (data) {
// 给表格赋值,在线编辑不知道要怎么赋值? // 给表格赋值
this.dataSource = data.otherDraftUserVOS this.dataSource = data.otherDraftUserVOS
// 给表单赋值 // 给表单赋值
this.$nextTick(() => { this.$nextTick(() => {
@@ -12,7 +12,7 @@
<div class="online-edit-wrapper"> <div class="online-edit-wrapper">
<!-- todo: 还不确定这里展示的是什么 --> <!-- todo: 还不确定这里展示的是什么 -->
<p>企业标准</p> <p>企业标准</p>
<a-button type="primary">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button> <a-button type="primary">{{ $t('view') }}</a-button>
</div> </div>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -15,7 +15,7 @@
<div class="online-edit-wrapper"> <div class="online-edit-wrapper">
<!-- todo: 还不确定这里展示的是什么 --> <!-- todo: 还不确定这里展示的是什么 -->
<p>企业标准</p> <p>企业标准</p>
<a-button type="primary">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button> <a-button type="primary">{{ $t('view') }}</a-button>
</div> </div>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -238,4 +238,8 @@ export default {
.title-text-long { .title-text-long {
width: 220px !important; width: 220px !important;
} }
/deep/ .ant-form-item-children > * {
width: 100%;
}
</style> </style>
@@ -22,6 +22,7 @@
<j-dict-select-tag <j-dict-select-tag
:placeholder="$t('pleaseSelect')+$t('workCenter.processCenter.processType')" :placeholder="$t('pleaseSelect')+$t('workCenter.processCenter.processType')"
dict-code="prc_type" dict-code="prc_type"
:dropdownMatchSelectWidth="false"
v-model="queryParam.prcType"> v-model="queryParam.prcType">
</j-dict-select-tag> </j-dict-select-tag>
</a-form-item> </a-form-item>
@@ -4,12 +4,13 @@
<div class="table-page-search-wrapper"> <div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery"> <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24"> <a-row :gutter="24">
<!-- 流程类型 todo:流程类型是字典还是什么后端还没确定 --> <!-- 流程类型 -->
<a-col :span="6"> <a-col :span="6">
<a-form-item :label="$t('workCenter.processCenter.processType')" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item :label="$t('workCenter.processCenter.processType')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag <j-dict-select-tag
:placeholder="$t('pleaseSelect')+$t('workCenter.processCenter.processType')" :placeholder="$t('pleaseSelect')+$t('workCenter.processCenter.processType')"
dict-code="prc_type" dict-code="prc_type"
:dropdownMatchSelectWidth="false"
v-model="queryParam.prcType"> v-model="queryParam.prcType">
</j-dict-select-tag> </j-dict-select-tag>
</a-form-item> </a-form-item>
@@ -22,6 +22,7 @@
<j-dict-select-tag <j-dict-select-tag
:placeholder="$t('pleaseSelect')+$t('workCenter.processCenter.processType')" :placeholder="$t('pleaseSelect')+$t('workCenter.processCenter.processType')"
dict-code="prc_type" dict-code="prc_type"
:dropdownMatchSelectWidth="false"
v-model="queryParam.prcType"> v-model="queryParam.prcType">
</j-dict-select-tag> </j-dict-select-tag>
</a-form-item> </a-form-item>
@@ -22,6 +22,7 @@
<j-dict-select-tag <j-dict-select-tag
:placeholder="$t('pleaseSelect')+$t('workCenter.processCenter.processType')" :placeholder="$t('pleaseSelect')+$t('workCenter.processCenter.processType')"
dict-code="prc_type" dict-code="prc_type"
:dropdownMatchSelectWidth="false"
v-model="queryParam.prcType"> v-model="queryParam.prcType">
</j-dict-select-tag> </j-dict-select-tag>
</a-form-item> </a-form-item>
@@ -22,6 +22,7 @@
<j-dict-select-tag <j-dict-select-tag
:placeholder="$t('pleaseSelect')+$t('workCenter.processCenter.processType')" :placeholder="$t('pleaseSelect')+$t('workCenter.processCenter.processType')"
dict-code="prc_type" dict-code="prc_type"
:dropdownMatchSelectWidth="false"
v-model="queryParam.prcType"> v-model="queryParam.prcType">
</j-dict-select-tag> </j-dict-select-tag>
</a-form-item> </a-form-item>
@@ -970,7 +970,6 @@ export default {
this.$message.warning(this.$t('addAtLeastOneRowOfData')) this.$message.warning(this.$t('addAtLeastOneRowOfData'))
flag = false flag = false
} else { } else {
console.log(this.projectId, this.projectDataSource[0].id)
if (this.projectId !== this.projectDataSource[0].id) { if (this.projectId !== this.projectDataSource[0].id) {
this.standardDataSource = [] this.standardDataSource = []
} }
@@ -174,7 +174,10 @@ export default {
this.selectedRowKeys = selectedRowKeys this.selectedRowKeys = selectedRowKeys
}, },
handleOk (rows) { handleOk (rows) {
this.dataSource = rows.map((item, index) => { rows.forEach((item) => {
if (this.dataSource.findIndex(tt => tt.id === item.id) !== -1) {
return
}
// 默认选中不带入 // 默认选中不带入
if (!item.decompositionOrderSource) { if (!item.decompositionOrderSource) {
item.decompositionOrderSource = '0' item.decompositionOrderSource = '0'
@@ -188,9 +191,10 @@ export default {
return dictItem return dictItem
}) })
} }
item.tableRowKey = index item.tableRowKey = this.dataSource.length
return item this.dataSource.push(item)
}) })
console.log(this.dataSource)
}, },
getData () { getData () {
return this.dataSource return this.dataSource
@@ -801,16 +801,17 @@ export default {
} }
}, },
created () { created () {
// 有流程id或者草稿id点进来的
if (this.$route.query.processInstanceId || this.$route.query.draftId) {
this.currentNode = this.$route.query.nodeId || ConsultationProcess.initiate.value
this.initProcessDetailData()
} else {
this.currentNode = ConsultationProcess.initiate.value
}
// 获取人员信息数据 // 获取人员信息数据
this.getPersonInfoStructure(this.processKey, () => { this.getPersonInfoStructure(this.processKey, () => {
this.initPersonInfoData(this.currentNode.indexOf(ConsultationProcess.initiate.value) === 0) // 有流程id或者草稿id点进来的
if (this.$route.query.processInstanceId || this.$route.query.draftId) {
this.currentNode = this.$route.query.nodeId || ConsultationProcess.initiate.value
this.initPersonInfoData(this.currentNode.indexOf(ConsultationProcess.initiate.value) === 0)
this.initProcessDetailData()
} else {
this.currentNode = ConsultationProcess.initiate.value
this.initPersonInfoData(this.currentNode.indexOf(ConsultationProcess.initiate.value) === 0)
}
}) })
// 找不到这个节点默认使用审批节点页面及按钮,发起除外 // 找不到这个节点默认使用审批节点页面及按钮,发起除外
this.nodeEnumsKey = this.currentNode ? ConsultationProcess.keyOfValueByLike(this.currentNode) || 'regulatoryEngineerApproval' : 'initiate' this.nodeEnumsKey = this.currentNode ? ConsultationProcess.keyOfValueByLike(this.currentNode) || 'regulatoryEngineerApproval' : 'initiate'
@@ -830,7 +831,12 @@ export default {
} }
queryConsultationProcessDetail(params).then(async res => { queryConsultationProcessDetail(params).then(async res => {
if (res.success) { if (res.success) {
const { result } = res let result = res.result || {}
// 草稿有数据需要从草稿里取
if (result.infoJsonStr) {
result = JSON.parse(result.infoJsonStr)
this.draftInitPersonInfo(result.userInfoMap)
}
this.businessId = result.businessId this.businessId = result.businessId
// 处理流程信息 // 处理流程信息
this.processInfo = Object.assign({}, result.basicProcessInfoDTO || {}) this.processInfo = Object.assign({}, result.basicProcessInfoDTO || {})
@@ -1095,6 +1101,13 @@ export default {
if (!formData) { if (!formData) {
return return
} }
formData.infoJsonStr = JSON.stringify(formData)
// saveSource:从待办进入保存--1;发起/草稿页面--2
if (this.$route.query.processInstanceId) {
formData.saveSource = 1
} else {
formData.saveSource = 2
}
this.loading = true this.loading = true
saveConsultationProcess(formData).then(res => { saveConsultationProcess(formData).then(res => {
if (res.success) { if (res.success) {
@@ -126,6 +126,7 @@
:disabledSourceSearch="true" :disabledSourceSearch="true"
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)" :disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
type="radio" type="radio"
select-only
:placeholder="$t('pleaseEnter')+item.dbFieldTxt" :placeholder="$t('pleaseEnter')+item.dbFieldTxt"
v-model="formInline[item.dbFieldName.replace('_temp', '')]" v-model="formInline[item.dbFieldName.replace('_temp', '')]"
@listChange="handleStandardChange" /> @listChange="handleStandardChange" />
@@ -441,7 +442,8 @@ export default {
validateTrigger: 'blur' validateTrigger: 'blur'
} }
}, },
businessId: null businessId: null,
standardGetState: null // 标准从接口获取到数据时候的标准状态值
} }
}, },
computed: { computed: {
@@ -474,7 +476,12 @@ export default {
// 标准法规变更 // 标准法规变更
if (this.formInline.operateType === OperationType.CHANGE.value) { if (this.formInline.operateType === OperationType.CHANGE.value) {
// 标准名称,被代替标准号,被引用标准号,标准类别,年代号 // 标准名称,被代替标准号,被引用标准号,标准类别,年代号
return ['replaced_by_standard_number', 'referenced_standard', 'standard_class', 'year_number'] const fields = ['replaced_by_standard_number', 'referenced_standard', 'standard_class', 'year_number']
// 废止状态的标准,标准状态不可以编辑
if (this.standardGetState === StandardStatus.ABOLISH.value) {
fields.push('standard_state')
}
return fields
} }
return ['replaced_by_standard_number', 'referenced_standard'] return ['replaced_by_standard_number', 'referenced_standard']
} }
@@ -490,51 +497,52 @@ export default {
} }
}, },
created () { created () {
if (this.$route.query.processInstanceId || this.$route.query.draftId) {
this.currentNode = this.$route.query.nodeId || FGEntryChangeProcessNode.initiate.value
this.initProcessData()
} else {
this.currentNode = FGEntryChangeProcessNode.initiate.value
// 处理非管理员从国内/海外标准模块进入发起页面,不可修改来源和操作类型
if (this.$route.query.source && this.$route.query.operateType) {
this.formInline = {
source: this.$route.query.source,
operateType: this.$route.query.operateType
}
switch (this.$route.query.source) {
// 国内标准
case StandardSource.DOMESTIC.value:
this.initDomesticStandardForm()
if (this.$route.query.standardId) {
this.initDomesticFormData(this.$route.query.standardId)
}
break
// 海外标准
case StandardSource.OVERSEAS.value:
this.initOverseasStandardForm()
if (this.$route.query.standardId) {
this.initOverseasFormData(this.$route.query.standardId)
}
break
default:
break
}
} else {
// 默认选中国内
this.initDomesticStandardForm()
}
}
// 获取按钮清单
const btnList = FGEntryChangeProcessNode.propertyOfValue('btn', this.currentNode)
if (btnList && btnList.length > 0) {
this.btnList = btnList
} else {
this.btnList = FGEntryChangeProcessNode.approve.btn
}
this.disabled = FGEntryChangeProcessNode.propertyOfValue('disabled', this.currentNode) || false
// 获取人员信息 // 获取人员信息
this.getPersonInfoStructure(this.processKey, () => { this.getPersonInfoStructure(this.processKey, () => {
this.initPersonInfoData(this.currentNode === FGEntryChangeProcessNode.initiate.value) if (this.$route.query.processInstanceId || this.$route.query.draftId) {
this.currentNode = this.$route.query.nodeId || FGEntryChangeProcessNode.initiate.value
this.initPersonInfoData(this.currentNode === FGEntryChangeProcessNode.initiate.value)
this.initProcessData()
} else {
this.currentNode = FGEntryChangeProcessNode.initiate.value
this.initPersonInfoData(this.currentNode === FGEntryChangeProcessNode.initiate.value)
// 处理非管理员从国内/海外标准模块进入发起页面,不可修改来源和操作类型
if (this.$route.query.source && this.$route.query.operateType) {
this.formInline = {
source: this.$route.query.source,
operateType: this.$route.query.operateType
}
switch (this.$route.query.source) {
// 国内标准
case StandardSource.DOMESTIC.value:
this.initDomesticStandardForm()
if (this.$route.query.standardId) {
this.initDomesticFormData(this.$route.query.standardId)
}
break
// 海外标准
case StandardSource.OVERSEAS.value:
this.initOverseasStandardForm()
if (this.$route.query.standardId) {
this.initOverseasFormData(this.$route.query.standardId)
}
break
default:
break
}
} else {
// 默认选中国内
this.initDomesticStandardForm()
}
}
// 获取按钮清单
const btnList = FGEntryChangeProcessNode.propertyOfValue('btn', this.currentNode)
if (btnList && btnList.length > 0) {
this.btnList = btnList
} else {
this.btnList = FGEntryChangeProcessNode.approve.btn
}
this.disabled = FGEntryChangeProcessNode.propertyOfValue('disabled', this.currentNode) || false
}) })
this.getSourceOptions() this.getSourceOptions()
}, },
@@ -544,9 +552,15 @@ export default {
*/ */
initProcessData () { initProcessData () {
this.loading = true this.loading = true
const { processInstanceId, draftId, taskId } = this.$route.query const { processInstanceId, draftId, taskId, projectId } = this.$route.query
queryStandardECProcessData({ processInstanceId, draftId, taskId }).then(async res => { queryStandardECProcessData({ processInstanceId, draftId, taskId, projectId }).then(async res => {
if (res.success) { if (res.success) {
let result = res.result || {}
// 如果草稿中有内容,就从草稿里取值
if (res.result.infoJsonStr) {
result = JSON.parse(res.result.infoJsonStr)
this.draftInitPersonInfo(result.userInfoMap)
}
const businessData = Object.assign({}, { ...res.result.businessInfoDTO.businessMap }) const businessData = Object.assign({}, { ...res.result.businessInfoDTO.businessMap })
this.businessId = res.result.businessId this.businessId = res.result.businessId
this.formInline.source = businessData.source this.formInline.source = businessData.source
@@ -564,7 +578,7 @@ export default {
// 处理业务基本信息部分的数据 // 处理业务基本信息部分的数据
const formList = Object.values(this.formList).reduce((acc, cur) => acc.concat(cur), []) const formList = Object.values(this.formList).reduce((acc, cur) => acc.concat(cur), [])
this.formInline = Object.assign({ ...this.formInline }, { ...businessData }) this.formInline = { ...Object.assign({ ...this.formInline }, { ...businessData }) }
const nodeId = this.$route.query.nodeId const nodeId = this.$route.query.nodeId
const treeMultipleField = formList.filter(tt => tt.fieldShowType === FieldType.TREE.value) const treeMultipleField = formList.filter(tt => tt.fieldShowType === FieldType.TREE.value)
treeMultipleField.forEach(field => { treeMultipleField.forEach(field => {
@@ -577,14 +591,9 @@ export default {
} }
} }
this.formInline[field.dbFieldName] = valueArr this.formInline[field.dbFieldName] = valueArr
} else {
this.formInline[field.dbFieldName] = undefined
} }
}) })
const dictField = formList.filter(tt => tt.fieldShowType === FieldType.OPTION_SINGLE.value) const dictField = formList.filter(tt => tt.fieldShowType === FieldType.OPTION_SINGLE.value)
dictField.forEach(field => {
this.formInline[field.dbFieldName] = this.formInline[field.dbFieldName] || null
})
}) })
} else { } else {
this.$message.warning(res.message) this.$message.warning(res.message)
@@ -890,6 +899,15 @@ export default {
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem')) this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
return return
} }
formData.infoJsonStr = JSON.stringify(formData)
formData.businessId = this.businessId
formData.draftId = this.$route.query.draftId
// saveSource:从待办进入保存--1;发起/草稿页面--2
if (this.currentNode !== FGEntryChangeProcessNode.initiate.value || this.$route.query.processInstanceId) {
formData.saveSource = 1
} else {
formData.saveSource = 2
}
this.loading = true this.loading = true
saveStandardECProcess(formData).then(res => { saveStandardECProcess(formData).then(res => {
if (res.success) { if (res.success) {
@@ -1049,6 +1067,7 @@ export default {
data[field.dbFieldName] = data[field.dbFieldName] || null data[field.dbFieldName] = data[field.dbFieldName] || null
}) })
this.formInline = Object.assign({ ...this.formInline }, { ...data }) this.formInline = Object.assign({ ...this.formInline }, { ...data })
this.standardGetState = this.formInline.standard_state
// 处理标准选择不能选自己 // 处理标准选择不能选自己
this.excludeStandardNumbers = this.formInline.standard_number this.excludeStandardNumbers = this.formInline.standard_number
this.handleDomesticSpecialCheck() this.handleDomesticSpecialCheck()
@@ -1118,6 +1137,7 @@ export default {
data[field.dbFieldName] = data[field.dbFieldName] || null data[field.dbFieldName] = data[field.dbFieldName] || null
}) })
this.formInline = Object.assign({ ...this.formInline }, { ...data }) this.formInline = Object.assign({ ...this.formInline }, { ...data })
this.standardGetState = this.formInline.standard_state
// 处理标准选择不能选自己 // 处理标准选择不能选自己
this.excludeStandardNumbers = this.formInline.standard_number this.excludeStandardNumbers = this.formInline.standard_number
} else { } else {
@@ -1139,11 +1159,11 @@ export default {
return this.formInline.source return this.formInline.source
}, },
/** /**
* 标准状态为起草、征求意见、报批等状态时发布日期、实施日期不应是必填项 * 标准状态为起草、征求意见、报批、废止状态时发布日期、实施日期不应是必填项
* @param val * @param val
*/ */
handleRequiredByState (val) { handleRequiredByState (val) {
const notRequiredStatus = [StandardStatus.DRAFT.value, StandardStatus.SEEK_FOR_OPTIONS.value, StandardStatus.EXAMINE.value, StandardStatus.APPROVAL.value] const notRequiredStatus = [StandardStatus.DRAFT.value, StandardStatus.SEEK_FOR_OPTIONS.value, StandardStatus.EXAMINE.value, StandardStatus.APPROVAL.value, StandardStatus.ABOLISH.value]
const fields = ['release_date', 'implementation_date'] const fields = ['release_date', 'implementation_date']
const rules = JSON.parse(JSON.stringify(this.rules)) const rules = JSON.parse(JSON.stringify(this.rules))
if (notRequiredStatus.includes(val)) { if (notRequiredStatus.includes(val)) {
@@ -269,18 +269,19 @@ export default {
} }
}, },
created () { created () {
if (this.$route.query.processInstanceId || this.$route.query.draftId) {
this.currentNode = this.$route.query.nodeId || ProcurementProcessNodes.initiate.value
this.initProcessInfo()
} else {
this.currentNode = ProcurementProcessNodes.initiate.value
}
if (this.currentNode === ProcurementProcessNodes.initiate.value) {
this.columns.push(this.operateColumn)
}
this.btnList = ProcurementProcessNodes.propertyOfValue('btn', this.currentNode)
this.getPersonInfoStructure(this.processKey, () => { this.getPersonInfoStructure(this.processKey, () => {
this.initPersonInfoData(this.currentNode === ProcurementProcessNodes.initiate.value) if (this.$route.query.processInstanceId || this.$route.query.draftId) {
this.currentNode = this.$route.query.nodeId || ProcurementProcessNodes.initiate.value
this.initPersonInfoData(this.currentNode === ProcurementProcessNodes.initiate.value)
this.initProcessInfo()
} else {
this.currentNode = ProcurementProcessNodes.initiate.value
this.initPersonInfoData(this.currentNode === ProcurementProcessNodes.initiate.value)
}
if (this.currentNode === ProcurementProcessNodes.initiate.value) {
this.columns.push(this.operateColumn)
}
this.btnList = ProcurementProcessNodes.propertyOfValue('btn', this.currentNode)
}) })
}, },
methods: { methods: {
@@ -337,7 +338,11 @@ export default {
} }
queryProcurementProcessInfo(params).then(res => { queryProcurementProcessInfo(params).then(res => {
if (res.success) { if (res.success) {
const { result } = res let result = res.result || {}
if (result.infoJsonStr) {
result = JSON.parse(result.infoJsonStr)
this.draftInitPersonInfo(result.userInfoMap)
}
this.businessId = result.businessId this.businessId = result.businessId
this.processInfo = Object.assign({}, result.basicProcessInfoDTO || {}) this.processInfo = Object.assign({}, result.basicProcessInfoDTO || {})
this.dataSource = result.businessInfoDTO || [] this.dataSource = result.businessInfoDTO || []
@@ -447,6 +452,16 @@ export default {
*/ */
handleSave () { handleSave () {
const formData = this.dealFormData(true) const formData = this.dealFormData(true)
if (!formData) {
return
}
formData.infoJsonStr = JSON.stringify(formData)
// saveSource:从待办进入保存--1;发起/草稿页面--2
if (this.$route.query.processInstanceId) {
formData.saveSource = 1
} else {
formData.saveSource = 2
}
this.loading = true this.loading = true
saveProcurementProcess(formData).then(res => { saveProcurementProcess(formData).then(res => {
if (res.success) { if (res.success) {