[update] 流程驳回传JSON

This commit is contained in:
lideqin
2024-07-15 16:26:50 +08:00
parent 974d150e1b
commit 1143098bc4
6 changed files with 111 additions and 12 deletions
+2 -1
View File
@@ -51,7 +51,8 @@ module.exports = {
salvageListTemplateName: 'Decomposes a single file upload template', salvageListTemplateName: 'Decomposes a single file upload template',
carTypeFileTemplateDownload: 'Model project file template download', carTypeFileTemplateDownload: 'Model project file template download',
carTypeFileTemplateName: 'Model project file upload template', carTypeFileTemplateName: 'Model project file upload template',
pleaseGenerate: 'Please generate data' pleaseGenerate: 'Please generate data',
pleaseClickNext: 'Please click Next to display the information'
}, },
// 市场清单发布流程 // 市场清单发布流程
marketListReleaseProcess: { marketListReleaseProcess: {
+2 -1
View File
@@ -51,7 +51,8 @@ module.exports = {
salvageListTemplateName: '分解单文件上传模板', salvageListTemplateName: '分解单文件上传模板',
carTypeFileTemplateDownload: '车型项目文件模板下载', carTypeFileTemplateDownload: '车型项目文件模板下载',
carTypeFileTemplateName: '车型项目文件上传模板', carTypeFileTemplateName: '车型项目文件上传模板',
pleaseGenerate: '请先生成数据' pleaseGenerate: '请先生成数据',
pleaseClickNext: '请点击下一步显示信息'
}, },
// 市场清单发布流程 // 市场清单发布流程
marketListReleaseProcess: { marketListReleaseProcess: {
@@ -638,9 +638,26 @@ export default {
this.approvalInfoForm.validateFields({ force: true }, (err, values) => { this.approvalInfoForm.validateFields({ force: true }, (err, values) => {
if (!err) { if (!err) {
this.loading = true this.loading = true
// 保存快照需要的JSON start
const jasonObj = {}
// 流程信息表单
const processInfoForm = this.processInfoForm.getFieldsValue()
// 流程审批信息
const approvalInfoForm = this.approvalInfoForm.getFieldsValue()
// 业务基本信息
const baseInfo = this.$refs.baseInfoRef.getData()
// 流程信息
jasonObj.basicProcessInfoDTO = Object.assign({}, processInfoForm)
// 流程审批信息
jasonObj.basicTaskInfoDTO = Object.assign({}, approvalInfoForm)
// 业务信息
jasonObj.businessInfoDTO = baseInfo
// 保存快照需要的JSON end
const param = {} const param = {}
param.basicTaskInfoDTO = Object.assign({}, values) param.basicTaskInfoDTO = Object.assign({}, values)
param.basicTaskInfoDTO.taskId = this.$route.query.taskId param.basicTaskInfoDTO.taskId = this.$route.query.taskId
// 草稿JSON
param.infoJsonStr = JSON.stringify(jasonObj)
marketListReleaseReject(param).then(res => { marketListReleaseReject(param).then(res => {
if (res.success) { if (res.success) {
this.$message.success(res.message) this.$message.success(res.message)
@@ -557,9 +557,26 @@ export default {
this.approvalInfoForm.validateFields({ force: true }, (err, values) => { this.approvalInfoForm.validateFields({ force: true }, (err, values) => {
if (!err) { if (!err) {
this.loading = true this.loading = true
// 保存快照需要的JSON start
const jasonObj = {}
// 流程信息表单
const processInfoForm = this.processInfoForm.getFieldsValue()
// 流程审批信息
const approvalInfoForm = this.approvalInfoForm.getFieldsValue()
// 业务基本信息
const baseInfo = this.$refs.baseInfoRef.getData()
// 流程信息
jasonObj.basicProcessInfoDTO = Object.assign({}, processInfoForm)
// 流程审批信息
jasonObj.basicTaskInfoDTO = Object.assign({}, approvalInfoForm)
// 业务信息
jasonObj.businessInfoDTO = baseInfo
// 保存快照需要的JSON end
const param = {} const param = {}
param.basicTaskInfoDTO = Object.assign({}, values) param.basicTaskInfoDTO = Object.assign({}, values)
param.basicTaskInfoDTO.taskId = this.$route.query.taskId param.basicTaskInfoDTO.taskId = this.$route.query.taskId
// 草稿JSON
param.infoJsonStr = JSON.stringify(jasonObj)
newRegulationImportReject(param).then(res => { newRegulationImportReject(param).then(res => {
if (res.success) { if (res.success) {
this.$message.success(res.message) this.$message.success(res.message)
@@ -153,7 +153,7 @@
<!-- 保存 --> <!-- 保存 -->
<a-button type="primary" ghost :loading="loading" @click="handleSave"><i class="iconfont icon-save"></i> {{ $t('preservation') }}</a-button> <a-button type="primary" ghost :loading="loading" @click="handleSave"><i class="iconfont icon-save"></i> {{ $t('preservation') }}</a-button>
<!-- 提交 --> <!-- 提交 -->
<a-button type="primary" :loading="loading" @click="handleAgree" icon="upload">{{ $t('submit') }}</a-button> <a-button type="primary" :loading="loading" @click="handleSubmit" icon="upload">{{ $t('submit') }}</a-button>
</template> </template>
<template v-else> <template v-else>
<!-- 转办 --> <!-- 转办 -->
@@ -563,6 +563,7 @@ export default {
if (this.loading) return if (this.loading) return
this.approvalInfoForm.validateFields(async (err, values) => { this.approvalInfoForm.validateFields(async (err, values) => {
const data = await this.$refs.baseInfoRef.getDataValidate() const data = await this.$refs.baseInfoRef.getDataValidate()
console.log('---------', data)
if (!err && data) { if (!err && data) {
this.loading = true this.loading = true
// 保存快照需要的JSON start // 保存快照需要的JSON start
@@ -656,9 +657,26 @@ export default {
this.approvalInfoForm.validateFields({ force: true }, (err, values) => { this.approvalInfoForm.validateFields({ force: true }, (err, values) => {
if (!err) { if (!err) {
this.loading = true this.loading = true
// 保存快照需要的JSON start
const jasonObj = {}
// 流程信息表单
const processInfoForm = this.processInfoForm.getFieldsValue()
// 流程审批信息
const approvalInfoForm = this.approvalInfoForm.getFieldsValue()
// 业务基本信息
const baseInfo = this.$refs.baseInfoRef.getData()
// 流程信息
jasonObj.basicProcessInfoDTO = Object.assign({}, processInfoForm)
// 流程审批信息
jasonObj.basicTaskInfoDTO = Object.assign({}, approvalInfoForm)
// 业务信息
jasonObj.businessInfoDTO = baseInfo
// 保存快照需要的JSON end
const param = {} const param = {}
param.common = Object.assign({}, values) param.common = Object.assign({}, values)
param.common.taskId = this.$route.query.taskId param.common.taskId = this.$route.query.taskId
// 草稿JSON
param.infoJsonStr = JSON.stringify(jasonObj)
regulatoryComplianceCheckReject(param).then(res => { regulatoryComplianceCheckReject(param).then(res => {
if (res.success) { if (res.success) {
this.$message.success(res.message) this.$message.success(res.message)
@@ -17,7 +17,8 @@
<j-dict-select-tag <j-dict-select-tag
:placeholder="$t('pleaseSelect') + this.$t('workCenter.regulatoryComplianceCheckProcess.checkWhetherTheTaskIsDelivered')" :placeholder="$t('pleaseSelect') + this.$t('workCenter.regulatoryComplianceCheckProcess.checkWhetherTheTaskIsDelivered')"
dict-code="yn" dict-code="yn"
v-model="formInline.distributeFlag"> v-model="formInline.distributeFlag"
@change="distributeFlagChange">
</j-dict-select-tag> </j-dict-select-tag>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -47,9 +48,10 @@
rowKey="standardNumber" rowKey="standardNumber"
:columns="columns" :columns="columns"
:dataSource="dataSource" :dataSource="dataSource"
:pagination="false" :pagination="ipagination"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
:loading="loading"> :loading="loading"
@change="handleTableChange">
</j-table> </j-table>
</div> </div>
</template> </template>
@@ -82,7 +84,9 @@
:dataSource="dataSourceEvaluate" :dataSource="dataSourceEvaluate"
formIsDepend="result" formIsDepend="result"
:extraForm="extraForm" :extraForm="extraForm"
:loading="loading"> :pagination="ipagination"
:loading="loading"
@change="handleTableChange">
<template slot="result" slot-scope="{text, record}"> <template slot="result" slot-scope="{text, record}">
<j-dict-select-tag <j-dict-select-tag
@@ -96,7 +100,7 @@
</j-expand-table> </j-expand-table>
</div> </div>
<a-form-model :model="personFormInline" class="form-add" :rules="rules" ref="ruleForm"> <a-form-model :model="personFormInline" class="form-add" :rules="rules" ref="personRuleForm">
<div class="form-flex-box"> <div class="form-flex-box">
<!-- 会签人员 自动带出法规工程师可多选其他人 --> <!-- 会签人员 自动带出法规工程师可多选其他人 -->
<div class="box-title-text form-flex-item"> <div class="box-title-text form-flex-item">
@@ -204,6 +208,18 @@ export default {
YesOrNoEnum, YesOrNoEnum,
loading: false, loading: false,
formInline: {}, formInline: {},
/* 分页参数 */
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
},
rules: { rules: {
// 排查任务是否下发 // 排查任务是否下发
distributeFlag: [ distributeFlag: [
@@ -502,7 +518,8 @@ export default {
url: { url: {
downTemplateUrl: '', downTemplateUrl: '',
importExcelUrl: '' importExcelUrl: ''
} },
dataSourceCopy: [] // 列表数组备份,防止切换排查任务是否下发后,填的数据带到新数组里
} }
}, },
methods: { methods: {
@@ -511,6 +528,7 @@ export default {
// 给表单赋值 // 给表单赋值
this.formInline = Object.assign({}, data.standardInfo) this.formInline = Object.assign({}, data.standardInfo)
this.dataSource = JSON.parse(JSON.stringify(data.detailInfoList)) this.dataSource = JSON.parse(JSON.stringify(data.detailInfoList))
this.dataSourceCopy = JSON.parse(JSON.stringify(data.detailInfoList))
this.isGetDataAfter = true this.isGetDataAfter = true
}, },
// 外层要获取数据 // 外层要获取数据
@@ -524,16 +542,40 @@ export default {
// 外层获取数据要过校验,返回false表示没有通过校验 // 外层获取数据要过校验,返回false表示没有通过校验
async getDataValidate () { async getDataValidate () {
let data = {} let data = {}
await this.$refs.ruleForm.validate(valid => { await this.$refs.ruleForm.validate(async valid => {
if (valid) { if (valid) {
data.standardInfo = Object.assign({}, this.formInline) if (!this.$refs.personRuleForm) {
data.detailInfoList = JSON.parse(JSON.stringify(this.dataSource)) this.$message.warning(this.$t('workCenter.regulatoryComplianceCheckProcess.pleaseClickNext'))
data = false
} else {
if (this.formInline.distributeFlag === YesOrNoEnum.YES.value) {
if (valid) {
data.standardInfo = Object.assign({}, this.formInline)
data.detailInfoList = JSON.parse(JSON.stringify(this.dataSource))
} else {
data = false
}
} else {
await this.$refs.personRuleForm.validate(personValid => {
if (valid && personValid) {
data.standardInfo = Object.assign({}, this.formInline, this.personFormInline)
data.detailInfoList = JSON.parse(JSON.stringify(this.dataSource))
} else {
data = false
}
})
}
}
} else { } else {
data = false data = false
} }
}) })
return data return data
}, },
// 排查任务是否下发改变
distributeFlagChange (value) {
this.dataSource = JSON.parse(JSON.stringify(this.dataSourceCopy))
},
// 下一步 // 下一步
handleNext () { handleNext () {
this.clickNextAfter = true this.clickNextAfter = true
@@ -543,6 +585,9 @@ export default {
this.selectedRowKeys = selectedRowKeys this.selectedRowKeys = selectedRowKeys
this.selectionRows = selectionRows this.selectionRows = selectionRows
}, },
handleTableChange (pagination) {
this.ipagination = pagination
},
// 批量选择人员 // 批量选择人员
batchCheckPerson () { batchCheckPerson () {
if (this.selectedRowKeys.length <= 0) { if (this.selectedRowKeys.length <= 0) {