add 标准法规入库/变更流程
This commit is contained in:
+11
-1
@@ -133,6 +133,13 @@ const enStandardStartUseReject = (params) => postAction('', params)
|
|||||||
const toDoTurnTo = (params) => postAction('', params)
|
const toDoTurnTo = (params) => postAction('', params)
|
||||||
// 已发-强制撤回
|
// 已发-强制撤回
|
||||||
const compulsoryWithdrawal = (params) => postAction('', params)
|
const compulsoryWithdrawal = (params) => postAction('', params)
|
||||||
|
|
||||||
|
/*标准法规入库/变更流程*/
|
||||||
|
// 发起
|
||||||
|
const initiateStandardECProcess = (params) => postAction('/process/fb/processFbEntryChange/startProcess', params)
|
||||||
|
// 保存
|
||||||
|
const saveStandardECProcess = (params) => postAction('/process/fb/processFbEntryChange/saveToDraft', params)
|
||||||
|
|
||||||
export {
|
export {
|
||||||
getProcessNodeList,
|
getProcessNodeList,
|
||||||
|
|
||||||
@@ -200,5 +207,8 @@ export {
|
|||||||
enStandardStartUseReject,
|
enStandardStartUseReject,
|
||||||
|
|
||||||
toDoTurnTo,
|
toDoTurnTo,
|
||||||
compulsoryWithdrawal
|
compulsoryWithdrawal,
|
||||||
|
|
||||||
|
initiateStandardECProcess,
|
||||||
|
saveStandardECProcess
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,6 @@
|
|||||||
<div class="personnel-container-content">
|
<div class="personnel-container-content">
|
||||||
<div class="personnel-container-content-text">
|
<div class="personnel-container-content-text">
|
||||||
<template v-if="step.canChoose && index >= currentNodeIndex">
|
<template v-if="step.canChoose && index >= currentNodeIndex">
|
||||||
<!-- TODO 数据库设计确定后处理数据抛出格式-->
|
|
||||||
<user-select-by-work-group v-if="step.chooseSource === 'workGroup'" v-model="step.linkUserIds" :type="step.chooseType" :name-str="step.linkUserIds_dictText" input-type="textarea"/>
|
<user-select-by-work-group v-if="step.chooseSource === 'workGroup'" v-model="step.linkUserIds" :type="step.chooseType" :name-str="step.linkUserIds_dictText" input-type="textarea"/>
|
||||||
<user-select-by-contact v-else-if="step.chooseSource === 'contactManage'" v-model="step.linkUserIds" :type="step.chooseType" :name-str="step.linkUserIds_dictText" input-type="textarea"/>
|
<user-select-by-contact v-else-if="step.chooseSource === 'contactManage'" v-model="step.linkUserIds" :type="step.chooseType" :name-str="step.linkUserIds_dictText" input-type="textarea"/>
|
||||||
<user-selection v-else-if="step.chooseSource === 'user'" :type="step.chooseType" v-model="step.linkUserIds" :name-str="step.linkUserIds_dictText" input-type="textarea" />
|
<user-selection v-else-if="step.chooseSource === 'user'" :type="step.chooseType" v-model="step.linkUserIds" :name-str="step.linkUserIds_dictText" input-type="textarea" />
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// 国内、海外的零部件名称、适用认证、适用车型和标准性质关联,准入标准必填,非准入标准不必填
|
// 国内的零部件名称、适用认证、适用车型和标准性质关联,准入标准必填,非准入标准不必填
|
||||||
'formInline.standard_property' () {
|
'formInline.standard_property' () {
|
||||||
this.handleDomesticSpecialCheck()
|
this.handleDomesticSpecialCheck()
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -175,6 +175,12 @@ export const StandardizedActivityType = new EsEnums({
|
|||||||
|
|
||||||
// 支付状态
|
// 支付状态
|
||||||
export const PayState = new EsEnums({
|
export const PayState = new EsEnums({
|
||||||
已支付: { text: '已支付', value: '1' },
|
havePaid: { text: '已支付', value: '1' },
|
||||||
未支付: { text: '未支付', value: '2' }
|
nonPayment: { text: '未支付', value: '2' }
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 标准法规入库/变更流程
|
||||||
|
export const FGEntryChangeProcessNode = {
|
||||||
|
initiate: { text: '法规工程师发起', value: '1', btn: ['save', 'submit'] },
|
||||||
|
approve: { text: '审批', value: '2', btn: ['return', 'save', 'agree', 'reject'] }
|
||||||
|
}
|
||||||
|
|||||||
+378
-105
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<internal-detail-page :title="pageTitle" :content-padding="0">
|
<internal-detail-page :title="pageTitle" :content-padding="0" :loading="loading">
|
||||||
<!-- 标题右侧tab -->
|
<!-- 标题右侧tab -->
|
||||||
<template v-slot:titleRightCustom>
|
<template v-slot:titleRightCustom>
|
||||||
<div class="table-operator-tab">
|
<div class="table-operator-tab">
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
@change="event => event.target.value = event.target.value.trim()"
|
@change="event => event.target.value = event.target.value.trim()"
|
||||||
:maxLength="50"
|
:maxLength="50"
|
||||||
disabled
|
disabled
|
||||||
v-decorator="['nodeName']" />
|
v-decorator="['processName']" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
@@ -37,6 +37,7 @@
|
|||||||
:getCalendarContainer="(trigger) => trigger.parentNode"
|
:getCalendarContainer="(trigger) => trigger.parentNode"
|
||||||
format="YYYY-MM-DD"
|
format="YYYY-MM-DD"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
|
v-decorator="['processDueDate']"
|
||||||
style="width: 100%" />
|
style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -47,13 +48,13 @@
|
|||||||
@change="event => event.target.value = event.target.value.trim()"
|
@change="event => event.target.value = event.target.value.trim()"
|
||||||
:maxLength="500"
|
:maxLength="500"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
v-decorator="['nodeName']" />
|
v-decorator="['processDescription']" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
|
|
||||||
<!--业务基本信息-->
|
<!--业务基本信息-->
|
||||||
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
|
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
|
||||||
<a-form-model :model="basicFormInfo" v-if="isFormInline" class="form-add" :rules="rules" ref="ruleForm">
|
<a-form-model :model="formInline" v-if="isFormInline" class="form-add" :rules="rules" ref="ruleForm">
|
||||||
<template v-for="(val,index) in formList">
|
<template v-for="(val,index) in formList">
|
||||||
<div :key="index"
|
<div :key="index"
|
||||||
class="collapsible-panel-form"
|
class="collapsible-panel-form"
|
||||||
@@ -75,7 +76,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="item-model" prop="source">
|
<a-form-model-item class="item-model" prop="source">
|
||||||
<j-dict-select-tag class="box-input"
|
<j-dict-select-tag class="box-input"
|
||||||
v-model="basicFormInfo.source"
|
v-model="formInline.source"
|
||||||
:disabled="disabled || disabledFieldList.includes('source')"
|
:disabled="disabled || disabledFieldList.includes('source')"
|
||||||
:placeholder="$t('pleaseSelect')+$t('standardSelect.source')"
|
:placeholder="$t('pleaseSelect')+$t('standardSelect.source')"
|
||||||
:type="'select'"
|
:type="'select'"
|
||||||
@@ -92,7 +93,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="item-model" prop="operationType">
|
<a-form-model-item class="item-model" prop="operationType">
|
||||||
<j-dict-select-tag class="box-input"
|
<j-dict-select-tag class="box-input"
|
||||||
v-model="basicFormInfo.operationType"
|
v-model="formInline.operationType"
|
||||||
:disabled="disabled || disabledFieldList.includes('operationType')"
|
:disabled="disabled || disabledFieldList.includes('operationType')"
|
||||||
:placeholder="$t('pleaseSelect')+$t('log.operationType')"
|
:placeholder="$t('pleaseSelect')+$t('log.operationType')"
|
||||||
:type="'select'"
|
:type="'select'"
|
||||||
@@ -111,20 +112,23 @@
|
|||||||
<span class="required" v-if="item.fieldMustInput === '1'">*</span>
|
<span class="required" v-if="item.fieldMustInput === '1'">*</span>
|
||||||
<span class="title-text-text" :title="item.dbFieldTxt">{{ item.dbFieldTxt }}</span>
|
<span class="title-text-text" :title="item.dbFieldTxt">{{ item.dbFieldTxt }}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="item-model" :prop="item.dbFieldName" v-if="item.dbFieldName === 'standard_number_temp'">
|
<a-form-model-item class="item-model"
|
||||||
|
:prop="item.dbFieldName"
|
||||||
|
v-if="item.dbFieldName === 'standard_number_temp'">
|
||||||
<!--标准单选-->
|
<!--标准单选-->
|
||||||
<standard-selection v-if="basicFormInfo.operationType === OperationType.CHANGE.value"
|
<standard-selection v-if="formInline.operationType === OperationType.CHANGE.value"
|
||||||
:source="basicFormInfo.source"
|
:source="formInline.source"
|
||||||
:disabledSourceSearch="true"
|
:disabledSourceSearch="true"
|
||||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
||||||
type="radio"
|
type="radio"
|
||||||
:placeholder="$t('pleaseEnter')+item.dbFieldTxt"
|
:placeholder="$t('pleaseEnter')+item.dbFieldTxt"
|
||||||
v-model="basicFormInfo[item.dbFieldName]" />
|
v-model="formInline[item.dbFieldName]"
|
||||||
|
@listChange="handleStandardChange" />
|
||||||
<!--文本框-->
|
<!--文本框-->
|
||||||
<a-input v-else
|
<a-input v-else
|
||||||
class="box-input"
|
class="box-input"
|
||||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
||||||
v-model="basicFormInfo[item.dbFieldName]"
|
v-model="formInline[item.dbFieldName]"
|
||||||
:maxLength="50"
|
:maxLength="50"
|
||||||
@change="event => event.target.value = event.target.value.trim()"
|
@change="event => event.target.value = event.target.value.trim()"
|
||||||
:placeholder="specialPlaceholder[item.dbFieldName] || $t('pleaseEnter')+item.dbFieldTxt" />
|
:placeholder="specialPlaceholder[item.dbFieldName] || $t('pleaseEnter')+item.dbFieldTxt" />
|
||||||
@@ -137,26 +141,26 @@
|
|||||||
:getCalendarContainer="(trigger) => trigger.parentNode"
|
:getCalendarContainer="(trigger) => trigger.parentNode"
|
||||||
format="YYYY-MM-DD"
|
format="YYYY-MM-DD"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
v-model="basicFormInfo[item.dbFieldName]"
|
v-model="formInline[item.dbFieldName]"
|
||||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
||||||
style="width: 100%" />
|
style="width: 100%" />
|
||||||
<!-- 2, 单选用户 -->
|
<!-- 2, 单选用户 -->
|
||||||
<user-selection v-else-if="item.fieldShowType === FieldType.USER_SINGLE.value"
|
<user-selection v-else-if="item.fieldShowType === FieldType.USER_SINGLE.value"
|
||||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt"
|
:placeholder="$t('pleaseSelect')+item.dbFieldTxt"
|
||||||
v-model="basicFormInfo[item.dbFieldName]"
|
v-model="formInline[item.dbFieldName]"
|
||||||
:filedName="item.dbFieldName"
|
:filedName="item.dbFieldName"
|
||||||
@nameChange="userSelectNameChange"
|
@nameChange="userSelectNameChange"
|
||||||
:nameStr="basicFormInfo[item.dbFieldName + '_dictText']"
|
:nameStr="formInline[item.dbFieldName + '_dictText']"
|
||||||
type="radio"
|
type="radio"
|
||||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)" />
|
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)" />
|
||||||
<!-- 3, 单选组织机构 -->
|
<!-- 3, 单选组织机构 -->
|
||||||
<j-select-depart v-else-if="item.fieldShowType === FieldType.ORGAN_SINGLE.value"
|
<j-select-depart v-else-if="item.fieldShowType === FieldType.ORGAN_SINGLE.value"
|
||||||
v-model="basicFormInfo[item.dbFieldName]"
|
v-model="formInline[item.dbFieldName]"
|
||||||
:backDepart="true" />
|
:backDepart="true" />
|
||||||
<!-- 4, 日期多选 -->
|
<!-- 4, 日期多选 -->
|
||||||
<j-multiple-date-picker v-else-if="item.fieldShowType === FieldType.DATE_MORE.value"
|
<j-multiple-date-picker v-else-if="item.fieldShowType === FieldType.DATE_MORE.value"
|
||||||
class="box-input"
|
class="box-input"
|
||||||
v-model="basicFormInfo[item.dbFieldName]"
|
v-model="formInline[item.dbFieldName]"
|
||||||
:fieldName="item.dbFieldName"
|
:fieldName="item.dbFieldName"
|
||||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)" />
|
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)" />
|
||||||
<!-- 5, 多行文本 -->
|
<!-- 5, 多行文本 -->
|
||||||
@@ -164,16 +168,18 @@
|
|||||||
:placeholder="$t('pleaseEnter')+item.dbFieldTxt"
|
:placeholder="$t('pleaseEnter')+item.dbFieldTxt"
|
||||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
||||||
:maxLength="500"
|
:maxLength="500"
|
||||||
v-model="basicFormInfo[item.dbFieldName]" :rows="4" />
|
v-model="formInline[item.dbFieldName]" :rows="4" />
|
||||||
<!-- 6, 标准多选 -->
|
<!-- 6, 标准多选 -->
|
||||||
<standard-selection v-else-if="item.fieldShowType === FieldType.STANDARD_MORE.value"
|
<standard-selection v-else-if="item.fieldShowType === FieldType.STANDARD_MORE.value"
|
||||||
:source="basicFormInfo.source"
|
:source="formInline.source"
|
||||||
:disabledSourceSearch="true"
|
:disabledSourceSearch="true"
|
||||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
||||||
v-model="basicFormInfo[item.dbFieldName]" />
|
:exclude-standard-numbers="excludeStandardFields.includes(item.dbFieldName) ? excludeStandardNumbers : null"
|
||||||
|
v-model="formInline[item.dbFieldName]" />
|
||||||
<!-- 7, 多选组织机构 -->
|
<!-- 7, 多选组织机构 -->
|
||||||
<j-select-depart v-else-if="item.fieldShowType === FieldType.ORGAN_MORE.value"
|
<j-select-depart v-else-if="item.fieldShowType === FieldType.ORGAN_MORE.value"
|
||||||
v-model="basicFormInfo[item.dbFieldName]"
|
v-model="formInline[item.dbFieldName]"
|
||||||
|
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
||||||
:multi="true"
|
:multi="true"
|
||||||
:backDepart="true"
|
:backDepart="true"
|
||||||
:treeOpera="true" />
|
:treeOpera="true" />
|
||||||
@@ -181,8 +187,8 @@
|
|||||||
<a-button v-else-if="item.fieldShowType === FieldType.FILE_UP.value" type="primary" class="button-text"
|
<a-button v-else-if="item.fieldShowType === FieldType.FILE_UP.value" type="primary" class="button-text"
|
||||||
@click="clickButtonToUpload(item)">
|
@click="clickButtonToUpload(item)">
|
||||||
{{
|
{{
|
||||||
(basicFormInfo[item.dbFieldName] === 'null' || basicFormInfo[item.dbFieldName] === ''
|
(formInline[item.dbFieldName] === 'null' || formInline[item.dbFieldName] === ''
|
||||||
|| basicFormInfo[item.dbFieldName] === null || basicFormInfo[item.dbFieldName] === undefined)
|
|| formInline[item.dbFieldName] === null || formInline[item.dbFieldName] === undefined)
|
||||||
? $t('uploadFile.clickUpload')
|
? $t('uploadFile.clickUpload')
|
||||||
: $t('uploadFile.viewUploadedFiles')
|
: $t('uploadFile.viewUploadedFiles')
|
||||||
}}
|
}}
|
||||||
@@ -191,14 +197,14 @@
|
|||||||
<a-input v-else-if="item.fieldShowType === FieldType.TEXT_BOX.value"
|
<a-input v-else-if="item.fieldShowType === FieldType.TEXT_BOX.value"
|
||||||
class="box-input"
|
class="box-input"
|
||||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
||||||
v-model="basicFormInfo[item.dbFieldName]"
|
v-model.trim="formInline[item.dbFieldName]"
|
||||||
:maxLength="50"
|
:maxLength="item.dbLength"
|
||||||
@change="event => event.target.value = event.target.value.trim()"
|
@change="event => event.target.value = event.target.value.trim()"
|
||||||
:placeholder="specialPlaceholder[item.dbFieldName] || $t('pleaseEnter')+item.dbFieldTxt" />
|
:placeholder="specialPlaceholder[item.dbFieldName] || $t('pleaseEnter')+item.dbFieldTxt" />
|
||||||
<!-- 10, 下拉单选(数据字典) -->
|
<!-- 10, 下拉单选(数据字典) -->
|
||||||
<j-dict-select-tag v-else-if="item.fieldShowType === FieldType.OPTION_SINGLE.value"
|
<j-dict-select-tag v-else-if="item.fieldShowType === FieldType.OPTION_SINGLE.value"
|
||||||
class="box-input"
|
class="box-input"
|
||||||
v-model="basicFormInfo[item.dbFieldName]"
|
v-model="formInline[item.dbFieldName]"
|
||||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
||||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt"
|
:placeholder="$t('pleaseSelect')+item.dbFieldTxt"
|
||||||
:type="'select'"
|
:type="'select'"
|
||||||
@@ -207,7 +213,7 @@
|
|||||||
<!-- 11, 下拉多选(数据字典) -->
|
<!-- 11, 下拉多选(数据字典) -->
|
||||||
<j-multi-select-tag v-else-if="item.fieldShowType === FieldType.OPTION_MORE.value"
|
<j-multi-select-tag v-else-if="item.fieldShowType === FieldType.OPTION_MORE.value"
|
||||||
class="box-input"
|
class="box-input"
|
||||||
v-model="basicFormInfo[item.dbFieldName]"
|
v-model="formInline[item.dbFieldName]"
|
||||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
||||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt"
|
:placeholder="$t('pleaseSelect')+item.dbFieldTxt"
|
||||||
:type="'select'"
|
:type="'select'"
|
||||||
@@ -216,7 +222,7 @@
|
|||||||
<!-- 12, 树选择 -->
|
<!-- 12, 树选择 -->
|
||||||
<a-tree-select
|
<a-tree-select
|
||||||
v-else-if="item.fieldShowType === FieldType.TREE.value"
|
v-else-if="item.fieldShowType === FieldType.TREE.value"
|
||||||
v-model="basicFormInfo[item.dbFieldName]"
|
v-model="formInline[item.dbFieldName]"
|
||||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
||||||
@@ -229,19 +235,29 @@
|
|||||||
<j-date v-else-if="item.fieldShowType === FieldType.YEAR_PICKER.value"
|
<j-date v-else-if="item.fieldShowType === FieldType.YEAR_PICKER.value"
|
||||||
show-type="year"
|
show-type="year"
|
||||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
||||||
v-model="basicFormInfo[item.dbFieldName]"
|
v-model="formInline[item.dbFieldName]"
|
||||||
:default-value="defaultValue[item.dbFieldName]"
|
:default-value="defaultValue[item.dbFieldName]"
|
||||||
date-format="YYYY"
|
date-format="YYYY"
|
||||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt" />
|
:placeholder="$t('pleaseSelect')+item.dbFieldTxt" />
|
||||||
<!-- 15, 树选择(单选) -->
|
<!-- 15, 树选择(单选) -->
|
||||||
<a-tree-select v-else-if="item.fieldShowType === FieldType.TREE_SINGLE.value"
|
<a-tree-select v-else-if="item.fieldShowType === FieldType.TREE_SINGLE.value"
|
||||||
v-model="basicFormInfo[item.dbFieldName]"
|
v-model="formInline[item.dbFieldName]"
|
||||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
||||||
:tree-data="optionsData[item.dbFieldName]"
|
:tree-data="optionsData[item.dbFieldName]"
|
||||||
:label-in-value="false"
|
:label-in-value="false"
|
||||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt" />
|
:placeholder="$t('pleaseSelect')+item.dbFieldTxt" />
|
||||||
|
<!--16、树形弹框选择-->
|
||||||
|
<tree-selection v-else-if="item.fieldShowType === FieldType.TREE_MODAL_SELECT.value"
|
||||||
|
:placeholder="$t('pleaseSelect')+item.dbFieldTxt"
|
||||||
|
v-model="formInline[item.dbFieldName]"
|
||||||
|
@nameChange="treeSelectNameChange"
|
||||||
|
:filedName="item.dbFieldName"
|
||||||
|
type="radio"
|
||||||
|
:nameStr="formInline[item.dbFieldName + '_dictText']"
|
||||||
|
:dict-id="item.dictId"
|
||||||
|
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -259,11 +275,11 @@
|
|||||||
@change="event => event.target.value = event.target.value.trim()"
|
@change="event => event.target.value = event.target.value.trim()"
|
||||||
:maxLength="500"
|
:maxLength="500"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
v-decorator="['remarks']" />
|
v-decorator="['handleText']" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<!--附件-->
|
<!--附件-->
|
||||||
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('businessSupport.questionAnswer.attach')">
|
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('businessSupport.questionAnswer.attach')">
|
||||||
<j-upload v-decorator="['file']" return-id />
|
<j-upload v-decorator="['handleFile']" return-id />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -271,21 +287,31 @@
|
|||||||
<div class="detail-page-scroll-content p-0" v-show="switchValue === 'user'">
|
<div class="detail-page-scroll-content p-0" v-show="switchValue === 'user'">
|
||||||
<process-detail-list>
|
<process-detail-list>
|
||||||
<template #personnelInfo>
|
<template #personnelInfo>
|
||||||
<personnel-info :data="personalInfoData" />
|
<personnel-info ref="personnelInfo" :data="personnelInfoData" />
|
||||||
</template>
|
</template>
|
||||||
</process-detail-list>
|
</process-detail-list>
|
||||||
</div>
|
</div>
|
||||||
<div class="detail-page-bottom-operate-box">
|
<div class="detail-page-bottom-operate-box">
|
||||||
<!--转办 审批节点存在-->
|
<!--转办 审批节点存在-->
|
||||||
<a-button type="primary" :loading="loading" ghost icon="arrow-up" @click="handleTurnTo">{{ $t('turnTo') }}</a-button>
|
<a-button type="primary" :loading="loading" ghost icon="arrow-up" v-if="btnList.includes('return')" @click="handleTurnTo">
|
||||||
|
{{ $t('turnTo') }}
|
||||||
|
</a-button>
|
||||||
<!--保存 发起节点、审批节点都存在-->
|
<!--保存 发起节点、审批节点都存在-->
|
||||||
<a-button type="primary" :loading="loading" ghost @click="handleSave"><i class="iconfont icon-save" />{{ $t('preservation') }}</a-button>
|
<a-button type="primary" :loading="loading" ghost v-if="btnList.includes('save')" @click="handleSave">
|
||||||
|
<i class="iconfont icon-save" />{{ $t('preservation') }}
|
||||||
|
</a-button>
|
||||||
<!--提交 发起节点存在-->
|
<!--提交 发起节点存在-->
|
||||||
<a-button type="primary" :loading="loading" @click="handleSubmit" icon="upload">{{ $t('submit') }}</a-button>
|
<a-button type="primary" :loading="loading" @click="handleSubmit" v-if="btnList.includes('submit')" icon="upload">
|
||||||
|
{{ $t('submit') }}
|
||||||
|
</a-button>
|
||||||
<!--同意 审批节点存在-->
|
<!--同意 审批节点存在-->
|
||||||
<a-button type="primary" :loading="loading" icon="check-circle" @click="handleSubmit">{{ $t('agree') }}</a-button>
|
<a-button type="primary" :loading="loading" icon="check-circle" v-if="btnList.includes('agree')" @click="handleSubmit">
|
||||||
|
{{ $t('agree') }}
|
||||||
|
</a-button>
|
||||||
<!--驳回 审批节点存在-->
|
<!--驳回 审批节点存在-->
|
||||||
<a-button type="primary" :loading="loading" icon="close-circle" @click="handleSubmit">{{ $t('reject') }}</a-button>
|
<a-button type="primary" :loading="loading" icon="close-circle" v-if="btnList.includes('reject')" @click="handleSubmit">
|
||||||
|
{{ $t('reject') }}
|
||||||
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false"></upload-file>
|
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false"></upload-file>
|
||||||
@@ -297,8 +323,20 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import InternalDetailPage from '../../../components/InternalDetailPage.vue'
|
import InternalDetailPage from '../../../components/InternalDetailPage.vue'
|
||||||
import { FieldType, StandardSource, OperationType } from '../../../enums/commonEnums.js'
|
import {
|
||||||
import { getDomesticStandardDocumentInfo, getDomesticStandardFormModal, getOverseasStandardForm } from '../../../api/standardRegulationLibraryApi.js'
|
FieldType,
|
||||||
|
StandardSource,
|
||||||
|
OperationType,
|
||||||
|
StandardProperty,
|
||||||
|
ProcessKey,
|
||||||
|
FGEntryChangeProcessNode
|
||||||
|
} from '../../../enums/commonEnums.js'
|
||||||
|
import {
|
||||||
|
getDomesticStandardDocumentInfo,
|
||||||
|
getDomesticStandardFormModal,
|
||||||
|
getOverseasStandardForm,
|
||||||
|
getOverseasStandardDocumentInfo
|
||||||
|
} from '../../../api/standardRegulationLibraryApi.js'
|
||||||
import { getAction } from '../../../api/manage.js'
|
import { getAction } from '../../../api/manage.js'
|
||||||
import { ajaxGetDictItems, getFormDictTreeList } from '../../../api/api.js'
|
import { ajaxGetDictItems, getFormDictTreeList } from '../../../api/api.js'
|
||||||
import JMultipleDatePicker from '../../../components/JMultipleDatePicker.vue'
|
import JMultipleDatePicker from '../../../components/JMultipleDatePicker.vue'
|
||||||
@@ -308,6 +346,9 @@ import UploadFile from '../../../components/UploadFile.vue'
|
|||||||
import PersonnelInfo from '../../../components/PersonnelInfo.vue'
|
import PersonnelInfo from '../../../components/PersonnelInfo.vue'
|
||||||
import ProcessDetailList from '../../../components/ProcessDetailList.vue'
|
import ProcessDetailList from '../../../components/ProcessDetailList.vue'
|
||||||
import UserSelectModal from '../../../components/selection/UserSelectModal.vue'
|
import UserSelectModal from '../../../components/selection/UserSelectModal.vue'
|
||||||
|
import TreeSelection from '../../../components/selection/TreeSelection'
|
||||||
|
import { initiateStandardECProcess, saveStandardECProcess } from '../../../api/workCenter'
|
||||||
|
import { WorkCenterMixin } from '../../../mixins/WorkCenterMixin'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandardEntryOrChangeProcess',
|
name: 'StandardEntryOrChangeProcess',
|
||||||
@@ -319,8 +360,10 @@ export default {
|
|||||||
JMultipleDatePicker,
|
JMultipleDatePicker,
|
||||||
InternalDetailPage,
|
InternalDetailPage,
|
||||||
ProcessDetailList,
|
ProcessDetailList,
|
||||||
UserSelectModal
|
UserSelectModal,
|
||||||
|
TreeSelection
|
||||||
},
|
},
|
||||||
|
mixins: [WorkCenterMixin],
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
FieldType,
|
FieldType,
|
||||||
@@ -343,8 +386,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 流程信息表单
|
// 流程信息表单
|
||||||
processInfoForm: this.$form.createForm(this),
|
processInfoForm: this.$form.createForm(this),
|
||||||
getFormFunc: getDomesticStandardFormModal,
|
processInfo: {},
|
||||||
getDocumentInfoFunc: getDomesticStandardDocumentInfo,
|
|
||||||
// 特殊的placeholder
|
// 特殊的placeholder
|
||||||
specialPlaceholder: {
|
specialPlaceholder: {
|
||||||
standard_number_temp: `${this.$t('standardRegulationLibrary.inputExample')}7258`
|
standard_number_temp: `${this.$t('standardRegulationLibrary.inputExample')}7258`
|
||||||
@@ -362,60 +404,20 @@ export default {
|
|||||||
isFormInline: false,
|
isFormInline: false,
|
||||||
rules: {},
|
rules: {},
|
||||||
// 业务基本信息表单
|
// 业务基本信息表单
|
||||||
basicFormInfo: {},
|
formInline: {},
|
||||||
// 需要隐藏的字段
|
// 需要隐藏的字段
|
||||||
hiddenFieldList: [],
|
hiddenFieldList: [],
|
||||||
disabled: false,
|
disabled: false,
|
||||||
uploadName: '',
|
uploadName: '',
|
||||||
sourceOptions: [],
|
sourceOptions: [],
|
||||||
|
// 审批信息的表单
|
||||||
approvalInfoForm: this.$form.createForm(this),
|
approvalInfoForm: this.$form.createForm(this),
|
||||||
|
approvalInfo: {},
|
||||||
loading: false,
|
loading: false,
|
||||||
switchValue: 'base',
|
switchValue: 'base',
|
||||||
personalInfoData: [ // 人员信息的数据
|
excludeStandardNumbers: null,
|
||||||
{
|
currentNode: null,
|
||||||
id: 1,
|
btnList: [] // 拥有的按钮
|
||||||
nodeName: '主起草人发起',
|
|
||||||
nodeRoleName: '发起人',
|
|
||||||
canChoose: false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
nodeName: '部所联络人校对',
|
|
||||||
nodeRoleName: '部所联络人',
|
|
||||||
canChoose: true,
|
|
||||||
chooseType: 'radio',
|
|
||||||
chooseSource: 'contactManage'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 3,
|
|
||||||
nodeName: '专家审批',
|
|
||||||
nodeRoleName: '专家',
|
|
||||||
canChoose: true,
|
|
||||||
chooseType: 'checkbox',
|
|
||||||
chooseSource: 'workGroup'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 4,
|
|
||||||
nodeName: '发起人主管级领导审批',
|
|
||||||
nodeRoleName: '发起人主管级领导',
|
|
||||||
canChoose: true,
|
|
||||||
chooseType: 'radio'
|
|
||||||
}
|
|
||||||
// {
|
|
||||||
// id: 5,
|
|
||||||
// nodeName: '发起人主管级上级领导审批',
|
|
||||||
// nodeRoleName: '发起人主管级上级领导',
|
|
||||||
// canChoose: true,
|
|
||||||
// chooseType: 'radio'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// id: 6,
|
|
||||||
// nodeName: '标准化审批',
|
|
||||||
// nodeRoleName: '标准化',
|
|
||||||
// canChoose: true,
|
|
||||||
// chooseType: 'radio'
|
|
||||||
// }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -424,22 +426,43 @@ export default {
|
|||||||
},
|
},
|
||||||
// 不可编辑的字段
|
// 不可编辑的字段
|
||||||
disabledFieldList () {
|
disabledFieldList () {
|
||||||
if (this.isEdit) {
|
// 标准法规变更
|
||||||
|
if (this.formInline.operationType === OperationType.CHANGE.value) {
|
||||||
// 标准编号,被代替标准号,被引用标准号,标准类别,年代号
|
// 标准编号,被代替标准号,被引用标准号,标准类别,年代号
|
||||||
return ['standard_number_temp', 'replaced_by_standard_number', 'referenced_standard', 'standard_class', 'year_number']
|
return ['standard_name', 'replaced_by_standard_number', 'referenced_standard', 'standard_class', 'year_number']
|
||||||
}
|
}
|
||||||
return ['replaced_by_standard_number', 'referenced_standard']
|
return ['replaced_by_standard_number', 'referenced_standard']
|
||||||
|
},
|
||||||
|
// 不能包含当前标准的字段
|
||||||
|
excludeStandardFields () {
|
||||||
|
if (this.formInline.operationType === OperationType.CHANGE.value) {
|
||||||
|
return ['substitute_standard_number', 'reference_standard']
|
||||||
|
}
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
// 国内的零部件名称、适用认证、适用车型和标准性质关联,准入标准必填,非准入标准不必填
|
||||||
|
'formInline.standard_property' () {
|
||||||
|
this.handleDomesticSpecialCheck()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
if (this.$route.query.id) {
|
if (this.$route.query.id) {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
|
} else {
|
||||||
|
this.currentNode = FGEntryChangeProcessNode.initiate.value
|
||||||
|
this.btnList = FGEntryChangeProcessNode.initiate.btn
|
||||||
}
|
}
|
||||||
this.getSourceOptions()
|
this.getSourceOptions()
|
||||||
// 默认选中国内
|
// 默认选中国内
|
||||||
this.initDomesticStandardForm()
|
this.initDomesticStandardForm()
|
||||||
|
this.getPersonInfoStructure(ProcessKey.FB_ENTRY_CHANGE.value)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/**
|
||||||
|
* 数据字典值获取
|
||||||
|
*/
|
||||||
getSourceOptions () {
|
getSourceOptions () {
|
||||||
ajaxGetDictItems('standard_source').then(res => {
|
ajaxGetDictItems('standard_source').then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
@@ -455,35 +478,44 @@ export default {
|
|||||||
module: StandardSource.DOMESTIC.value,
|
module: StandardSource.DOMESTIC.value,
|
||||||
type: 2 // 2是新增;1是详情
|
type: 2 // 2是新增;1是详情
|
||||||
}
|
}
|
||||||
this.basicFormInfo = {}
|
this.formInline = {}
|
||||||
|
this.loading = true
|
||||||
getDomesticStandardFormModal(params).then(res => {
|
getDomesticStandardFormModal(params).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.formList = res.result || {}
|
this.formList = res.result || {}
|
||||||
this.formListArr = Object.values(this.formList).reduce((acc, cur) => acc.concat(cur), [])
|
this.formListArr = Object.values(this.formList).reduce((acc, cur) => acc.concat(cur), [])
|
||||||
this.formPartList = Object.keys(this.formList)
|
this.formPartList = Object.keys(this.formList)
|
||||||
this.basicFormInfo.source = StandardSource.DOMESTIC.value
|
this.formInline.source = StandardSource.DOMESTIC.value
|
||||||
this.getOptionsData() // 处理通过接口获取的下拉数据
|
this.getOptionsData() // 处理通过接口获取的下拉数据
|
||||||
this.integrateData() // 处理表单验证
|
this.integrateData() // 处理表单验证
|
||||||
this.initRetractableFlag() // 处理面板展开
|
this.initRetractableFlag() // 处理面板展开
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 获取海外标准的表单
|
||||||
|
*/
|
||||||
initOverseasStandardForm () {
|
initOverseasStandardForm () {
|
||||||
|
this.loading = true
|
||||||
const params = {
|
const params = {
|
||||||
module: StandardSource.OVERSEAS.value,
|
module: StandardSource.OVERSEAS.value,
|
||||||
type: 2 // 2是新增;1是详情
|
type: 2 // 2是新增;1是详情
|
||||||
}
|
}
|
||||||
this.basicFormInfo = {}
|
this.formInline = {}
|
||||||
getOverseasStandardForm(params).then(res => {
|
getOverseasStandardForm(params).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.formList = res.result || {}
|
this.formList = res.result || {}
|
||||||
this.formListArr = Object.values(this.formList).reduce((acc, cur) => acc.concat(cur), [])
|
this.formListArr = Object.values(this.formList).reduce((acc, cur) => acc.concat(cur), [])
|
||||||
this.formPartList = Object.keys(this.formList)
|
this.formPartList = Object.keys(this.formList)
|
||||||
this.basicFormInfo.source = StandardSource.OVERSEAS.value
|
this.formInline.source = StandardSource.OVERSEAS.value
|
||||||
this.getOptionsData() // 处理通过接口获取的下拉数据
|
this.getOptionsData() // 处理通过接口获取的下拉数据
|
||||||
this.integrateData() // 处理表单验证
|
this.integrateData() // 处理表单验证
|
||||||
this.initRetractableFlag() // 处理面板展开
|
this.initRetractableFlag() // 处理面板展开
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@@ -570,14 +602,14 @@ export default {
|
|||||||
* @param fieldName
|
* @param fieldName
|
||||||
*/
|
*/
|
||||||
userSelectNameChange (value, fieldName) {
|
userSelectNameChange (value, fieldName) {
|
||||||
this.basicFormInfo[fieldName + '_dictText'] = value
|
this.formInline[fieldName + '_dictText'] = value
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 点击点击上传按钮
|
* 点击点击上传按钮
|
||||||
* @param item
|
* @param item
|
||||||
*/
|
*/
|
||||||
clickButtonToUpload (item) {
|
clickButtonToUpload (item) {
|
||||||
this.$refs.uploadFile.open(this.basicFormInfo[item.dbFieldName])
|
this.$refs.uploadFile.open(this.formInline[item.dbFieldName])
|
||||||
this.uploadName = item.dbFieldName
|
this.uploadName = item.dbFieldName
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@@ -592,14 +624,14 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
/** 赋值给当前对应的表单文件 */
|
/** 赋值给当前对应的表单文件 */
|
||||||
this.basicFormInfo[this.uploadName] = attIdList.join(',')
|
this.formInline[this.uploadName] = attIdList.join(',')
|
||||||
this.basicFormInfo = { ...this.basicFormInfo }
|
this.formInline = { ...this.formInline }
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 来源变更,重新获取表单
|
* 来源变更,重新获取表单
|
||||||
*/
|
*/
|
||||||
handleSourceChange () {
|
handleSourceChange () {
|
||||||
switch (this.basicFormInfo.source) {
|
switch (this.formInline.source) {
|
||||||
case StandardSource.DOMESTIC.value:
|
case StandardSource.DOMESTIC.value:
|
||||||
this.initDomesticStandardForm()
|
this.initDomesticStandardForm()
|
||||||
break
|
break
|
||||||
@@ -607,28 +639,128 @@ export default {
|
|||||||
this.initOverseasStandardForm()
|
this.initOverseasStandardForm()
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
this.basicFormInfo.source = StandardSource.DOMESTIC.value
|
this.formInline.source = StandardSource.DOMESTIC.value
|
||||||
this.initDomesticStandardForm()
|
this.initDomesticStandardForm()
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleOperationTypeChange () {
|
/**
|
||||||
console.log(this.basicFormInfo.operationType)
|
* 操作类型变化
|
||||||
|
*/
|
||||||
|
handleOperationTypeChange (value) {
|
||||||
|
this.$refs.ruleForm.clearValidate()
|
||||||
|
this.formInline = {
|
||||||
|
source: this.formInline.source
|
||||||
|
}
|
||||||
|
this.formInline.operationType = value
|
||||||
},
|
},
|
||||||
switchChange (value) {
|
switchChange (value) {
|
||||||
this.switchValue = value
|
this.switchValue = value
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 处理页面的数据
|
||||||
|
*/
|
||||||
|
dealFormData () {
|
||||||
|
const formData = {}
|
||||||
|
let flag = true
|
||||||
|
// 处理流程信息
|
||||||
|
this.processInfoForm.validateFields((errors, values) => {
|
||||||
|
if (!errors) {
|
||||||
|
formData.basicProcessInfoDTO = Object.assign(this.processInfo, values)
|
||||||
|
} else {
|
||||||
|
flag = false
|
||||||
|
}
|
||||||
|
formData.basicProcessInfoDTO = Object.assign(this.processInfo, values)
|
||||||
|
})
|
||||||
|
// 处理业务信息
|
||||||
|
this.$refs.ruleForm.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
formData.businessInfoDTO = this.dealBusinessData({ ...this.formInline })
|
||||||
|
} else {
|
||||||
|
flag = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 处理流程审批信息
|
||||||
|
this.approvalInfoForm.validateFields((errors, values) => {
|
||||||
|
if (!errors) {
|
||||||
|
formData.basicTaskInfoDTO = Object.assign(this.approvalInfo, values)
|
||||||
|
} else {
|
||||||
|
flag = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 处理人员信息
|
||||||
|
const userInfo = this.$refs.personnelInfo.getDataObjVerify()
|
||||||
|
if (!userInfo) {
|
||||||
|
flag = false
|
||||||
|
} else {
|
||||||
|
formData.userInfoMap = userInfo
|
||||||
|
}
|
||||||
|
if (flag) {
|
||||||
|
return formData
|
||||||
|
}
|
||||||
|
return flag
|
||||||
|
},
|
||||||
|
dealBusinessData (data) {
|
||||||
|
// 下划线转驼峰
|
||||||
|
const toHump = (name) => {
|
||||||
|
return name.replace(/\_(\w)/g, function (all, letter) {
|
||||||
|
return letter.toUpperCase()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const resultData = {}
|
||||||
|
Object.keys(data).forEach(key => {
|
||||||
|
const newKey = toHump(key)
|
||||||
|
resultData[newKey] = data[key]
|
||||||
|
})
|
||||||
|
return resultData
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*/
|
*/
|
||||||
handleSave () {
|
handleSave () {
|
||||||
|
const formData = {
|
||||||
|
basicProcessInfoDTO: Object.assign(this.processInfo, this.processInfoForm.getFieldsValue()), // 流程信息
|
||||||
|
businessInfoDTO: this.dealBusinessData({ ...this.formInline }), // 业务信息
|
||||||
|
basicTaskInfoDTO: Object.assign(this.approvalInfo, this.approvalInfoForm.getFieldsValue()), // 流程审批信息
|
||||||
|
userInfoMap: this.$refs.personnelInfo.getDataObj() // 用户信息
|
||||||
|
}
|
||||||
|
const params = { ...formData.basicProcessInfoDTO, ...formData.businessInfoDTO, ...formData.basicTaskInfoDTO }
|
||||||
|
if (!Object.values(params).some(tt => !!tt || tt === 0)) {
|
||||||
|
// 提示至少填写一项
|
||||||
|
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.loading = true
|
||||||
|
saveStandardECProcess(formData).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message)
|
||||||
|
this.goBack()
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 提交
|
* 提交(发起)
|
||||||
*/
|
*/
|
||||||
handleSubmit () {
|
handleSubmit () {
|
||||||
|
const formData = this.dealFormData()
|
||||||
|
if (!formData) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.loading = true
|
||||||
|
initiateStandardECProcess(formData).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message)
|
||||||
|
this.goBack()
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 转办
|
* 转办
|
||||||
@@ -638,6 +770,143 @@ export default {
|
|||||||
},
|
},
|
||||||
continueTurnTo () {
|
continueTurnTo () {
|
||||||
|
|
||||||
|
},
|
||||||
|
treeSelectNameChange (value, fieldName) {
|
||||||
|
this.formInline[fieldName + '_dictText'] = value
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 标准变化
|
||||||
|
* @param list
|
||||||
|
*/
|
||||||
|
handleStandardChange (list) {
|
||||||
|
if (this.formInline.operationType === OperationType.CHANGE.value && list && list.length > 0) {
|
||||||
|
const standardId = list[0].id
|
||||||
|
switch (this.formInline.source) {
|
||||||
|
case StandardSource.DOMESTIC.value:
|
||||||
|
this.initDomesticFormData(standardId)
|
||||||
|
break
|
||||||
|
case StandardSource.OVERSEAS.value:
|
||||||
|
this.initOverseasFormData(standardId)
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 获取国内标准表单数据
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
initDomesticFormData (id) {
|
||||||
|
this.loading = true
|
||||||
|
getDomesticStandardDocumentInfo({ id, type: 2 }).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
// 处理树结构多选回显
|
||||||
|
console.log(this.da)
|
||||||
|
const formList = Object.values(this.formList).reduce((acc, cur) => acc.concat(cur), [])
|
||||||
|
const treeMultipleField = formList.filter(tt => tt.fieldShowType === FieldType.TREE.value)
|
||||||
|
const data = res.result || {}
|
||||||
|
treeMultipleField.forEach(field => {
|
||||||
|
const valueArr = []
|
||||||
|
if (data[field.dbFieldName]) {
|
||||||
|
const values = data[field.dbFieldName].split(',')
|
||||||
|
for (let i = 0; i < values.length; i++) {
|
||||||
|
valueArr[i] = {
|
||||||
|
value: values[i]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
data[field.dbFieldName] = valueArr
|
||||||
|
} else {
|
||||||
|
data[field.dbFieldName] = undefined
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const dictField = formList.filter(tt => tt.fieldShowType === FieldType.OPTION_SINGLE.value)
|
||||||
|
dictField.forEach(field => {
|
||||||
|
data[field.dbFieldName] = data[field.dbFieldName] || null
|
||||||
|
})
|
||||||
|
this.formInline = Object.assign({ ...this.formInline }, { ...data })
|
||||||
|
// 处理标准选择不能选自己
|
||||||
|
this.excludeStandardNumbers = this.formInline.standard_number
|
||||||
|
this.handleDomesticSpecialCheck()
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 国内的特殊处理
|
||||||
|
*/
|
||||||
|
handleDomesticSpecialCheck () {
|
||||||
|
const fieldNameList = ['part_name', 'applicable_certification', 'applicable_vehicle']
|
||||||
|
const rules = JSON.parse(JSON.stringify(this.rules))
|
||||||
|
if (this.formInline.standard_property === StandardProperty.admittance.value) {
|
||||||
|
fieldNameList.forEach(key => {
|
||||||
|
if (rules[key] && rules[key].length > 0) {
|
||||||
|
rules[key][0].required = true
|
||||||
|
const dataPart = Object.keys(this.formList).find(tt => this.formList[tt].some(item => item.dbFieldName === key))
|
||||||
|
const index = this.formList[dataPart].findIndex(tt => tt.dbFieldName === key)
|
||||||
|
this.formList[dataPart][index].fieldMustInput = '1'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
fieldNameList.forEach(key => {
|
||||||
|
if (rules[key] && rules[key].length > 0) {
|
||||||
|
rules[key][0].required = false
|
||||||
|
const dataPart = Object.keys(this.formList).find(tt => this.formList[tt].some(item => item.dbFieldName === key))
|
||||||
|
const index = this.formList[dataPart].findIndex(tt => tt.dbFieldName === key)
|
||||||
|
this.formList[dataPart][index].fieldMustInput = '0'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.rules = Object.assign({}, rules)
|
||||||
|
this.$refs.ruleForm.clearValidate()
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 获取海外的表单数据
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
initOverseasFormData (id) {
|
||||||
|
this.loading = true
|
||||||
|
getOverseasStandardDocumentInfo({ id, type: 2 }).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
// 处理树结构多选回显
|
||||||
|
const formList = Object.values(this.formList).reduce((acc, cur) => acc.concat(cur), [])
|
||||||
|
const treeMultipleField = formList.filter(tt => tt.fieldShowType === FieldType.TREE.value)
|
||||||
|
const data = res.result || {}
|
||||||
|
treeMultipleField.forEach(field => {
|
||||||
|
const valueArr = []
|
||||||
|
if (data[field.dbFieldName]) {
|
||||||
|
const values = data[field.dbFieldName].split(',')
|
||||||
|
for (let i = 0; i < values.length; i++) {
|
||||||
|
valueArr[i] = {
|
||||||
|
value: values[i]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
data[field.dbFieldName] = valueArr
|
||||||
|
} else {
|
||||||
|
data[field.dbFieldName] = undefined
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const dictField = formList.filter(tt => tt.fieldShowType === FieldType.OPTION_SINGLE.value)
|
||||||
|
dictField.forEach(field => {
|
||||||
|
data[field.dbFieldName] = data[field.dbFieldName] || null
|
||||||
|
})
|
||||||
|
this.formInline = Object.assign({ ...this.formInline }, { ...data })
|
||||||
|
// 处理标准选择不能选自己
|
||||||
|
this.excludeStandardNumbers = this.formInline.standard_number
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
goBack () {
|
||||||
|
let timer = setTimeout(() => {
|
||||||
|
this.$router.go(-1)
|
||||||
|
}, 700)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -650,4 +919,8 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.button-text {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user