[update] 法规符合性排查流程

This commit is contained in:
lideqin
2024-07-09 18:20:37 +08:00
parent e932d40c83
commit e3ebdc2c25
7 changed files with 88 additions and 56 deletions
+2 -1
View File
@@ -50,7 +50,8 @@ module.exports = {
salvageListTemplateDownload: 'Split single file template download',
salvageListTemplateName: 'Decomposes a single file upload template',
carTypeFileTemplateDownload: 'Model project file template download',
carTypeFileTemplateName: 'Model project file upload template'
carTypeFileTemplateName: 'Model project file upload template',
pleaseGenerate: 'Please generate data'
},
// 市场清单发布流程
marketListReleaseProcess: {
+2 -1
View File
@@ -50,7 +50,8 @@ module.exports = {
salvageListTemplateDownload: '分解单文件模板下载',
salvageListTemplateName: '分解单文件上传模板',
carTypeFileTemplateDownload: '车型项目文件模板下载',
carTypeFileTemplateName: '车型项目文件上传模板'
carTypeFileTemplateName: '车型项目文件上传模板',
pleaseGenerate: '请先生成数据'
},
// 市场清单发布流程
marketListReleaseProcess: {
@@ -20,6 +20,7 @@
v-bind="$attrs"
:value="value"
@change="modalInput"
@numberChange="modalNumberChange"
@nameChange="modalNameChange"
@listChange="modalListChange">
</market-regulations-list-selection-modal>
@@ -76,6 +77,7 @@ export default {
clearInput () {
console.log('输入框清空了')
this.$emit('change', '')
this.$emit('numberChange', '')
this.$emit('nameChange', '')
this.$emit('listChange', [])
},
@@ -86,6 +88,9 @@ export default {
modalInput (value) {
this.$emit('change', value)
},
modalNumberChange (value) {
this.$emit('numberChange', value)
},
modalNameChange (value) {
this.$emit('nameChange', value)
},
@@ -310,14 +310,15 @@ export default {
this.close()
},
handleSubmit () {
const serialNumber = []
const serialNumberArr = []
const serialNameArr = []
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.selectedRowList.forEach(res => {
serialNumber.push(res.standardNumber)
serialNameArr.push(res.standardName)
serialNumberArr.push(res.manifestNo)
serialNameArr.push(res.manifestName)
})
this.$emit('change', this.selectedRowKeys.join(','))
this.$emit('numberChange', serialNumberArr.join(','))
this.$emit('nameChange', serialNameArr.join(','))
this.$emit('listChange', this.selectedRowList)
this.close()
@@ -80,6 +80,7 @@ import {
NewRegulationsImportNodes, StandardInterpretationNodes
} from '@/enums/commonEnums'
import { getAction } from '../../../../api/manage'
import { RegulatoryComplianceCheckNodes } from '../../../../enums/commonEnums'
export default {
name: 'TodoList',
@@ -161,6 +162,7 @@ export default {
// 标准解读流程
[ProcessType.STANDARD_INTERPRETATION_PROCESS.value]: [StandardInterpretationNodes.initiated.value],
// 法规符合性排查流程
[ProcessType.REGULATORY_COMPLIANCE_CHECK.value]: [RegulatoryComplianceCheckNodes.initiated.value],
// 市场清单发布流程
[ProcessType.MARKET_LIST_RELEASE.value]: [MarketListReleaseNodes.initiated.value]
},
@@ -233,7 +235,7 @@ export default {
break
// 法规符合性排查流程
case '3':
path = ''
path = '/workCenter/RegulatoryComplianceCheckProcess'
break
// 市场清单发布流程
case '4':
@@ -27,7 +27,7 @@
<a-input :placeholder="$t('pleaseEnter') + $t('processName')"
disabled
:maxLength="50"
v-decorator="['prcName', validatorRules.prcName]" />
v-decorator="['processName', validatorRules.processName]" />
</a-form-item>
</a-col>
<a-col :span="12">
@@ -41,7 +41,7 @@
style="width: 100%"
:disabled="disabled"
value-format="YYYY-MM-DD"
v-decorator="['dueTime']" />
v-decorator="['processDueDate']" />
</a-form-item>
</a-col>
<a-col :span="24">
@@ -55,7 +55,7 @@
:maxLength="500"
:rows="4"
:disabled="disabled"
v-decorator="['prcMes']" />
v-decorator="['processDescription']" />
</a-form-item>
</a-col>
<a-col v-if="[2, 3, 4, 5, 6, 7, 8, 9].includes(currentNode)" :span="24">
@@ -79,7 +79,7 @@
:colon="formItemColon">
<a-input :placeholder="$t('pleaseEnter') + $t('applicableMarket')"
disabled
v-decorator="['applicableMarket']" />
v-decorator="['applicableMarket_dictText']" />
</a-form-item>
</a-col>
</a-row>
@@ -111,11 +111,11 @@
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
:maxLength="500"
:rows="4"
v-decorator="['commitText', validatorRules.commitText]" />
v-decorator="['handleText', validatorRules.handleText]" />
</a-form-item>
<!--附件-->
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('attach')" :colon="formItemColon">
<j-upload v-decorator="['commitFile']" return-id multiple />
<j-upload v-decorator="['handleFile']" return-id multiple />
</a-form-item>
</a-form>
</div>
@@ -325,13 +325,13 @@ export default {
},
validatorRules: {
// 流程名称
prcName: {
processName: {
rules: [
{ required: true, message: this.$t('pleaseEnter') + this.$t('processName') }
],
validateTrigger: 'blur'
},
commitText: {
handleText: {
rules: [
{ required: false, message: this.$t('pleaseEnter') + this.$t('remarks') }
],
@@ -362,19 +362,27 @@ export default {
this.$nextTick(() => {
if (type === 'todo') {
// 初始化流程信息
this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes'))
if (this.currentNode !== 1) {
// 需要回显上方的标准编号/标准名称和适用市场
// 标准编号/标准名称
this.model.basicProcessInfoDTO.standardNumberName = this.model.businessInfoDTO.standardInfo.standardNumber + ' ' + this.model.businessInfoDTO.standardInfo.standardName
// 适用市场
this.model.basicProcessInfoDTO.applicableMarket_dictText = this.model.businessInfoDTO.standardInfo.applicableMarket_dictText
}
this.processInfoForm.setFieldsValue(pick(this.model.basicProcessInfoDTO, 'processName', 'processDueDate', 'processDescription', 'standardNumberName', 'applicableMarket_dictText'))
}
// 有草稿json按草稿进来的回显
if (this.model.infoJsonStr) {
this.model = JSON.parse(this.model.infoJsonStr)
// 初始化流程信息
const prcObj = Object.assign({}, this.model)
prcObj.dueTime = this.model.processDueDate
prcObj.prcMes = this.model.processDescription
this.processInfoForm.setFieldsValue(pick(prcObj, 'prcName', 'dueTime', 'prcMes'))
prcObj.processDueDate = this.model.processDueDate
prcObj.processDescription = this.model.processDescription
this.processInfoForm.setFieldsValue(pick(prcObj, 'processName', 'processDueDate', 'processDescription'))
// 初始化流程审批信息
prcObj.commitText = this.model.handleText
prcObj.commitFile = this.model.handleFile
this.approvalInfoForm.setFieldsValue(pick(prcObj, 'commitText', 'commitFile'))
prcObj.handleText = this.model.handleText
prcObj.handleFile = this.model.handleFile
this.approvalInfoForm.setFieldsValue(pick(prcObj, 'handleText', 'handleFile'))
this.model.data = JSON.parse(this.model.infoJsonStr).data
// 如果是节点1的保存回显人员信息
if (this.currentNode === 1) {
@@ -399,9 +407,9 @@ export default {
},
// 业务基本信息组件中获取到流程名称改变后的值
processNameChange (value) {
const param = { prcName: value }
const param = { processName: value }
this.$nextTick(() => {
this.processInfoForm.setFieldsValue(pick(param, 'prcName'))
this.processInfoForm.setFieldsValue(pick(param, 'processName'))
})
},
// 保存
@@ -429,14 +437,9 @@ export default {
const paramObj = {}
// 流程信息
paramObj.basicProcessInfoDTO = Object.assign({}, processInfoForm)
paramObj.basicProcessInfoDTO.processName = paramObj.basicProcessInfoDTO.prcName
paramObj.basicProcessInfoDTO.processDueDate = paramObj.basicProcessInfoDTO.dueTime
paramObj.basicProcessInfoDTO.processDescription = paramObj.basicProcessInfoDTO.prcMes
paramObj.basicProcessInfoDTO.processInstanceId = this.$route.query.processInstanceId
// 流程审批信息
paramObj.basicTaskInfoDTO = Object.assign({}, approvalInfoForm)
paramObj.basicTaskInfoDTO.handleText = paramObj.basicTaskInfoDTO.commitText
paramObj.basicTaskInfoDTO.handleFile = paramObj.basicTaskInfoDTO.commitFile
paramObj.basicTaskInfoDTO.taskId = this.$route.query.taskId
// 草稿id
if (this.model.infoJsonStr) {
@@ -476,13 +479,18 @@ export default {
}
this.loading = true
const paramObj = {} // 需要传给后端的数据
paramObj.common = { ...values, ...approvalValues }
// 流程基本信息
paramObj.basicProcessInfoDTO = values
// 流程审批信息
paramObj.basicTaskInfoDTO = approvalValues
// 草稿id
if (this.model.infoJsonStr) {
paramObj.common.draftId = this.model.id
paramObj.draftId = this.model.id
}
paramObj.flowUser = personnelObj
paramObj.data = data.formInline
paramObj.userInfoMap = personnelObj
paramObj.businessInfoDTO = data
// JSON字符串
paramObj.infoJsonStr = JSON.stringify(paramObj)
let func
if (this.$route.query.taskId) {
// 有taskId说明是驳回的提交
@@ -560,9 +568,9 @@ export default {
// 同意
handleAgree () {
if (this.loading) return
this.validatorRules.commitText.rules[0].required = false
if (!this.approvalInfoForm.getFieldValue('commitText')) {
this.approvalInfoForm.setFieldsValue({ commitText: '同意' })
this.validatorRules.handleText.rules[0].required = false
if (!this.approvalInfoForm.getFieldValue('handleText')) {
this.approvalInfoForm.setFieldsValue({ handleText: '同意' })
}
this.approvalInfoForm.validateFields((err, values) => {
if (!err) {
@@ -585,8 +593,8 @@ export default {
// 驳回
handleReject () {
if (this.loading) return
this.validatorRules.commitText.rules[0].required = true
if (!this.approvalInfoForm.getFieldValue('commitText')) {
this.validatorRules.handleText.rules[0].required = true
if (!this.approvalInfoForm.getFieldValue('handleText')) {
this.$message.warning(this.$t('pleaseEnterRemarks'))
this.switchValue = 'base'
}
@@ -606,7 +614,7 @@ export default {
this.loading = false
}
}).finally(() => {
this.validatorRules.commitText.rules[0].required = false
this.validatorRules.handleText.rules[0].required = false
})
}
})
@@ -74,11 +74,11 @@
</span>
</div>
<a-form-model-item class="item-model" prop="applicableMarket">
<s-tree-select
<market-regulations-list-selection
v-model="formInline.applicableMarket"
:tree-data="countryOptions"
tree-checkable
treeCheckStrictly
type="radio"
@numberChange="marketRegulationNumberChange"
:name-str="formInline.applicableMarket_dictText"
:placeholder="$t('pleaseSelect')+$t('applicableMarket')" />
</a-form-model-item>
</div>
@@ -103,7 +103,7 @@
<div class="center-operate-box">
<!-- 生成 -->
<a-button type="primary" ghost :loading="loading" @click="handleGenerate">{{ $t('generate') }}</a-button>
<a-button class="next-btn" type="primary" ghost :loading="loading" @click="handleGenerate">{{ $t('generate') }}</a-button>
</div>
</div>
<template v-if="isGenerateAfter">
@@ -203,10 +203,13 @@ import { regulatoryComplianceCheckGenerate } from '@/api/workCenter'
import { getFormDictTreeList, queryDepartTreeList } from '../../../../api/api'
import { downloadFile } from '../../../../api/manage'
import { JeroListMixin } from '@/mixins/JeroListMixin'
import MarketRegulationsListSelection from '../../../../components/selection/MarketRegulationsListSelection'
import pick from 'lodash.pick'
export default {
name: 'EngineerInitBaseInfo',
components: {
MarketRegulationsListSelection,
JTable,
ManualAddModal,
StandardSelectionModal,
@@ -397,7 +400,11 @@ export default {
},
disableMixinCreated: true,
countryOptions: [], // 适用市场下拉框
model: {}
model: {
standardInfo: {
id: ''
}
}
}
},
mounted () {
@@ -414,20 +421,19 @@ export default {
// 外层要获取数据
getData () {
// 把数据抛出,在线编辑不知道要不要抛
const data = {}
data.formInline = {standardInfo: {id: this.model.id}}
const data = { standardInfo: {} }
data.standardInfo.id = {standardInfo: {id: this.model.standardInfo.id}}
return data
},
// 外层获取数据要过校验,返回false表示没有通过校验
async getDataValidate () {
let data = {}
await this.$refs.ruleForm.validate(valid => {
if (valid) {
data.formInline = this.formInline
} else {
data = false
}
})
let data = { standardInfo: {} }
if (!this.model.standardInfo.id) {
this.$message.warning(this.$t('workCenter.regulatoryComplianceCheckProcess.pleaseGenerate'))
data = false
} else {
data.standardInfo.id = this.model.standardInfo.id
}
return data
},
getCountryOption () {
@@ -552,11 +558,12 @@ export default {
},
// 生成
handleGenerate () {
console.log('--------生成了')
if (this.standardDataSource.length >= 1) {
this.$refs.ruleForm.validate(valid => {
console.log('-----valid', valid)
if (valid) {
const param = Object.assign({}, this.standardDataSource[0], this.formInline)
param.applicableMarket = param.applicableMarket.map(item => item.value).join(',')
regulatoryComplianceCheckGenerate(param).then(res => {
if (res.success) {
this.$message.success(res.message)
@@ -564,7 +571,7 @@ export default {
this.isGenerateAfter = true
// 获取下方列表信息
this.filters.checkId = res.result
this.model.id = res.result
this.model.standardInfo.id = res.result
this.loadData(1)
} else {
this.$message.warning(res.message)
@@ -576,6 +583,10 @@ export default {
this.$message.warning(this.$t('workCenter.regulatoryComplianceCheckProcess.pleaseAddStandard'))
}
},
// 选择市场法规清单回调
marketRegulationNumberChange (value) {
this.formInline.applicableMarket_dictText = value
},
filterTreeOption (input, option) {
const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
@@ -600,5 +611,8 @@ export default {
.center-operate-box {
float: right;
.next-btn {
z-index: 999;
}
}
</style>