diff --git a/jero-web/src/views/businessSupport/regulationReport/components/modules/defaultTemplate.vue b/jero-web/src/views/businessSupport/regulationReport/components/modules/defaultTemplate.vue index d25b37dfb..505e2d5eb 100644 --- a/jero-web/src/views/businessSupport/regulationReport/components/modules/defaultTemplate.vue +++ b/jero-web/src/views/businessSupport/regulationReport/components/modules/defaultTemplate.vue @@ -554,7 +554,22 @@ callback && callback(formInline) } }) - } + }, + save(callback){ + let formInline = JSON.parse(JSON.stringify(this.formInline)) + Object.keys(formInline).forEach(res => { + if (formInline[res] && formInline[res] instanceof Array) { + formInline[res] = formInline[res].join(',') + } + }) + if (!formInline.state || formInline.state == '' || formInline.state == 'null') { + formInline.state = '' + } + if (!formInline.useMethod || formInline.useMethod == '' || formInline.useMethod == 'null') { + formInline.useMethod = '' + } + callback && callback(formInline) + }, } } diff --git a/jero-web/src/views/businessSupport/regulationReport/components/modules/fillAdd.vue b/jero-web/src/views/businessSupport/regulationReport/components/modules/fillAdd.vue index ca6173da4..4f0757583 100644 --- a/jero-web/src/views/businessSupport/regulationReport/components/modules/fillAdd.vue +++ b/jero-web/src/views/businessSupport/regulationReport/components/modules/fillAdd.vue @@ -98,6 +98,7 @@
@@ -266,6 +267,51 @@ this.formInline.memoriesChapter = value this.formInline = { ...this.formInline } }, + handleSave(){ + let text = '' + if (this.$refs.defaultTemplateRef) { + text = 'defaultTemplateRef' + } else if (this.$refs.solicitOpinionsRef) { + text = 'solicitOpinionsRef' + } else if (this.$refs.releaseStandardRef) { + text = 'releaseStandardRef' + } else if (this.$refs.industryTemplateRef) { + text = 'industryTemplateRef' + } + this.$refs[text].save((val) => { + this.confirmLoading = true + let url = '' + if (this.formInline.id) { + url = this.url.edit + } else { + url = this.url.add + } + let formInline = JSON.parse(JSON.stringify(this.formInline)) + Object.keys(formInline).forEach(res => { + if (formInline[res] && formInline[res] instanceof Array) { + formInline[res] = formInline[res].join(',') + } + }) + let query = Object.assign(val, { + month: formInline.month, + memoriesChapter: formInline.memoriesChapter, + contentTemplate: formInline.contentTemplate, + memoriesChapterOne:formInline.memoriesChapterOne, + saveState:0, + }) + postAction(url, query).then((res) => { + if (res.success) { + this.$message.success(this.$t('OperationSuccessful')) + this.visible = false + this.confirmLoading = false + this.$emit('fillAddForm') + } else { + this.confirmLoading = false + this.$message.warning(this.$t('operationFailed')) + } + }) + }) + }, handleSubmit() { this.$refs.ruleForm.validate(valid => { if (valid) { @@ -297,7 +343,8 @@ month: formInline.month, memoriesChapter: formInline.memoriesChapter, contentTemplate: formInline.contentTemplate, - memoriesChapterOne:formInline.memoriesChapterOne + memoriesChapterOne:formInline.memoriesChapterOne, + saveState:1, }) postAction(url, query).then((res) => { if (res.success) { diff --git a/jero-web/src/views/businessSupport/regulationReport/components/modules/industryTemplate.vue b/jero-web/src/views/businessSupport/regulationReport/components/modules/industryTemplate.vue index 8fb6a1f6e..e9f5be646 100644 --- a/jero-web/src/views/businessSupport/regulationReport/components/modules/industryTemplate.vue +++ b/jero-web/src/views/businessSupport/regulationReport/components/modules/industryTemplate.vue @@ -296,7 +296,16 @@ callback && callback(formInline) } }) - } + }, + save(callback){ + let formInline = JSON.parse(JSON.stringify(this.formInline)) + Object.keys(formInline).forEach(res => { + if (formInline[res] && formInline[res] instanceof Array) { + formInline[res] = formInline[res].join(',') + } + }) + callback && callback(formInline) + }, } } diff --git a/jero-web/src/views/businessSupport/regulationReport/components/modules/releaseStandard.vue b/jero-web/src/views/businessSupport/regulationReport/components/modules/releaseStandard.vue index 35bf4c0d1..6662d7b0f 100644 --- a/jero-web/src/views/businessSupport/regulationReport/components/modules/releaseStandard.vue +++ b/jero-web/src/views/businessSupport/regulationReport/components/modules/releaseStandard.vue @@ -173,7 +173,14 @@ callback && callback(query) } }) - } + }, + save(callback){ + let query = { + id: this.formInline.id, + newStandardTemplateEOList: this.formInline.dataList + } + callback && callback(query) + }, } } diff --git a/jero-web/src/views/businessSupport/regulationReport/components/modules/solicitOpinions.vue b/jero-web/src/views/businessSupport/regulationReport/components/modules/solicitOpinions.vue index 553c5b0b0..dfdb760bc 100644 --- a/jero-web/src/views/businessSupport/regulationReport/components/modules/solicitOpinions.vue +++ b/jero-web/src/views/businessSupport/regulationReport/components/modules/solicitOpinions.vue @@ -152,7 +152,14 @@ callback && callback(query) } }) - } + }, + save(callback){ + let query = { + id: this.formInline.id, + newOpinionTemplateEOList: this.formInline.dataList + } + callback && callback(query) + }, } }