fix
This commit is contained in:
parent
0b4c283d9c
commit
c69ff8dedc
|
|
@ -18,25 +18,29 @@
|
|||
<span class="text">{{ scope.getPropValue(scope.field.label) }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:table-top="btns">
|
||||
<div v-if="!isComponents" style="margin-bottom: 12px;">
|
||||
<el-button type="primary" @click="addData">添加</el-button>
|
||||
<el-button icon="el-icon-download" type="primary" @click="downloadTemplate">下载模板</el-button>
|
||||
<el-upload
|
||||
style="display: inline-block; margin-left: 10px; margin-right: 10px;"
|
||||
action=""
|
||||
:show-file-list="false"
|
||||
:auto-upload="false"
|
||||
:on-change="(file) => { batchImport(file) }"
|
||||
>
|
||||
<el-button
|
||||
slot="trigger"
|
||||
icon="iconfont icon-tijiao"
|
||||
type="primary"
|
||||
>批量导入</el-button>
|
||||
</el-upload>
|
||||
</div>
|
||||
<div v-if="isComponents" style="margin-bottom: 12px;">
|
||||
<el-button type="primary" @click="confirmRemove">确定除名</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</edit-table>
|
||||
<div class="btns">
|
||||
<el-button icon="el-icon-circle-plus-outline" type="primary" size="mini" @click="addData">添加</el-button>
|
||||
<el-upload
|
||||
style="display: inline-block; margin-left: 10px; margin-right: 10px;"
|
||||
action=""
|
||||
:show-file-list="false"
|
||||
:auto-upload="false"
|
||||
:on-change="(file) => { batchImport(file) }"
|
||||
>
|
||||
<el-button
|
||||
slot="trigger"
|
||||
icon="iconfont icon-tijiao"
|
||||
type="primary"
|
||||
size="mini"
|
||||
>批量导入</el-button>
|
||||
</el-upload>
|
||||
<el-button icon="el-icon-download" type="primary" size="mini" @click="downloadTemplate">下载模板</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -47,6 +51,14 @@ export default {
|
|||
components: {
|
||||
EditTable
|
||||
},
|
||||
props: {
|
||||
isComponents: {
|
||||
type: Boolean,
|
||||
default: () => {
|
||||
return false
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
data: [],
|
||||
|
|
@ -55,15 +67,10 @@ export default {
|
|||
emitLoadOnCreate: true,
|
||||
tableConfig: {
|
||||
showIndex: true,
|
||||
selection: false,
|
||||
selection: this.isComponents,
|
||||
indexWidth: '80px',
|
||||
handlerWidth: '120px',
|
||||
showPagination: true,
|
||||
tableSelectionProps: {
|
||||
selectable: (row, index) => {
|
||||
return row.status === '1'
|
||||
}
|
||||
},
|
||||
tableProps: {
|
||||
headerCellStyle: { background: '#F5F5F5!important', color: '#333333!important', padding: '0px' },
|
||||
headerRowStyle: { height: '48px' },
|
||||
|
|
@ -75,7 +82,7 @@ export default {
|
|||
{
|
||||
label: '编辑',
|
||||
type: 'text',
|
||||
show: true,
|
||||
show: !this.isComponents,
|
||||
handler: (scope, { row }) => {
|
||||
this.$refs.EditTable.editReady(row)
|
||||
}
|
||||
|
|
@ -83,7 +90,7 @@ export default {
|
|||
{
|
||||
label: '删除',
|
||||
type: 'text',
|
||||
show: true,
|
||||
show: !this.isComponents,
|
||||
handler: (scope, { row }) => {
|
||||
this.$confirm('是否确认删除该' + row.entName + '市场主体拟除名名单信息', '提示', {
|
||||
type: 'info',
|
||||
|
|
@ -254,14 +261,14 @@ export default {
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type: 'divider',
|
||||
label: '市场主体拟除名名单信息',
|
||||
showInTable: false,
|
||||
showInForm: ({ meta }) => {
|
||||
return meta.isForm === true
|
||||
}
|
||||
},
|
||||
// {
|
||||
// type: 'divider',
|
||||
// label: '市场主体拟除名名单信息',
|
||||
// showInTable: false,
|
||||
// showInForm: ({ meta }) => {
|
||||
// return meta.isForm === true
|
||||
// }
|
||||
// },
|
||||
{
|
||||
type: 'input',
|
||||
label: '市场主体名称',
|
||||
|
|
@ -359,6 +366,12 @@ export default {
|
|||
this.$message.success('导入成功')
|
||||
this.$refs.EditTable.search({ reset: true })
|
||||
})
|
||||
},
|
||||
confirmRemove() {
|
||||
if (!this.selected || this.selected.length === 0) {
|
||||
return this.$message.error('请至少勾选一个主体名单')
|
||||
}
|
||||
this.$emit('confirm-remove', this.selected)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,344 @@
|
|||
<template>
|
||||
|
||||
<div class="page">
|
||||
<edit-table
|
||||
ref="EditTable"
|
||||
v-model="data"
|
||||
:table-prop="tableProp"
|
||||
:fields="fields"
|
||||
:dialog-prop="dialogProp"
|
||||
:show-search-form="true"
|
||||
row-key="id"
|
||||
:search-form-prop="searchFormProp"
|
||||
:form-prop="formProp"
|
||||
:search-loader="searchLoader"
|
||||
@update:selected="(value)=>{selected = value}"
|
||||
>
|
||||
<template v-slot:divider="scope">
|
||||
<div class="divider">
|
||||
<span class="text">{{ scope.getPropValue(scope.field.label) }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:table-top="btns">
|
||||
<div style="margin-bottom: 12px;">
|
||||
<el-button type="primary" @click="visible = true">发起除名告知</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</edit-table>
|
||||
<el-dialog
|
||||
title="市场主体拟除名名单库"
|
||||
:visible.sync="visible"
|
||||
width="90vw"
|
||||
top="153px"
|
||||
custom-class="dialog-abnormal-list"
|
||||
>
|
||||
<ExpelledList :is-components="true" @confirm-remove="confirmRemove" />
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
title="除名告知通知书管理"
|
||||
:visible.sync="noticeVisible"
|
||||
width="90vw"
|
||||
top="153px"
|
||||
custom-class="dialog-abnormal-list"
|
||||
>
|
||||
<div>
|
||||
<p style="text-indent: 2em">您拟对{{ removeEntBases }}等市场主体进行除名处理,请按照相关的法定法规,作出除名决定的事实、理由、依据、后果,并将以上情况告知拟被除名市场主体。</p>
|
||||
<p style="text-indent: 2em">除名告知书无法使用其他方式送达的,市场监管部门应当通过国家企业信用信息公示系统发布除名告知公告。</p>
|
||||
<p style="text-indent: 2em">自公告发出之日起,经过三十日,即视为送达。</p>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { listExpelled, saveExpelled } from '@/api/expelled'
|
||||
import EditTable from '@/plugins/EasyComponent/EditTable'
|
||||
import ExpelledList from '@/views/expelled/list/index.vue'
|
||||
export default {
|
||||
components: {
|
||||
EditTable,
|
||||
ExpelledList
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
noticeVisible: false,
|
||||
expelledDatas: [],
|
||||
removeEntBases: '',
|
||||
data: [],
|
||||
selected: [],
|
||||
tableProp: {
|
||||
emitLoadOnCreate: true,
|
||||
tableConfig: {
|
||||
showIndex: true,
|
||||
selection: false,
|
||||
indexWidth: '80px',
|
||||
handlerWidth: '120px',
|
||||
showPagination: true,
|
||||
tableSelectionProps: {
|
||||
selectable: (row, index) => {
|
||||
return row.status === '1'
|
||||
}
|
||||
},
|
||||
tableProps: {
|
||||
headerCellStyle: { background: '#F5F5F5!important', color: '#333333!important', padding: '0px' },
|
||||
headerRowStyle: { height: '48px' },
|
||||
rowStyle: { height: '48px' },
|
||||
cellStyle: { padding: '16px 0', color: '#333' }
|
||||
}
|
||||
},
|
||||
buttons: [
|
||||
{
|
||||
label: '查看详情',
|
||||
type: 'text',
|
||||
show: true,
|
||||
handler: (scope, { row }) => {
|
||||
this.$refs.EditTable.editReady(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
searchFormProp: {
|
||||
formConfig: {
|
||||
labelWidth: '100px',
|
||||
labelPosition: 'right',
|
||||
gutter: 32
|
||||
}
|
||||
},
|
||||
formProp: {
|
||||
formConfig: {
|
||||
labelWidth: '210px',
|
||||
labelPosition: 'right',
|
||||
gutter: 32,
|
||||
buttonPosition: 'right'
|
||||
},
|
||||
buttons: [
|
||||
{
|
||||
label: '返回',
|
||||
type: 'primary',
|
||||
buttonProps: {
|
||||
plain: true
|
||||
},
|
||||
handler: (scope, { row }) => {
|
||||
this.$refs.EditTable.cancelEdit()
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '同意',
|
||||
type: 'primary',
|
||||
handler: (scope, { row }) => {
|
||||
return scope.formInstance.submitForm().then((formData) => {
|
||||
return this.$confirm('是否继续提交', '提示', {
|
||||
type: 'info',
|
||||
customClass: 'type-1'
|
||||
})
|
||||
.then(() => {
|
||||
return (() => {
|
||||
return saveExpelled
|
||||
})()(formData)
|
||||
.then(() => {
|
||||
this.$message.success('保存成功')
|
||||
this.$refs.EditTable.editConfirm(formData)
|
||||
return this.$refs.EditTable.search({ reset: true })
|
||||
})
|
||||
.catch(error => {
|
||||
this.$message.error('保存失败: ' + (error.message || '未知错误'))
|
||||
throw error
|
||||
})
|
||||
})
|
||||
.catch(error => {
|
||||
// 如果只是取消操作,不抛出错误
|
||||
if (error !== 'cancel') {
|
||||
throw error
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
dialogProp: {
|
||||
title: (scope) => {
|
||||
if (scope.editRowClone && scope.editRowClone._isAdd) {
|
||||
return !scope.editRowClone.selected ? '除名告知通知书管理' : '除名告知通知书管理'
|
||||
} else if (scope.editRowClone) {
|
||||
return '除名告知通知书管理'
|
||||
}
|
||||
return '除名告知通知书管理'
|
||||
},
|
||||
width: '1200px',
|
||||
customClass: 'dialog-abnormal-list'
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
type: 'input',
|
||||
label: '业务号',
|
||||
prop: 'searchBizNo',
|
||||
span: 9,
|
||||
showInForm: ({ meta }) => {
|
||||
return meta.isSearchForm === true
|
||||
},
|
||||
showInTable: false
|
||||
},
|
||||
{
|
||||
type: 'buttons',
|
||||
showInTable: false,
|
||||
showInForm: ({ meta }) => {
|
||||
return meta.isSearchForm === true
|
||||
},
|
||||
hiddenLabel: true,
|
||||
label: '搜索操作',
|
||||
prop: '搜索操作',
|
||||
span: 6,
|
||||
formItemProp: {
|
||||
labelWidth: '0px'
|
||||
},
|
||||
buttons: [
|
||||
{
|
||||
label: '查询',
|
||||
type: 'primary',
|
||||
handler: (scope) => {
|
||||
const { meta } = scope
|
||||
const { _editTable } = meta
|
||||
const { editTableInstance } = _editTable
|
||||
editTableInstance.search()
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '重置',
|
||||
type: 'primary',
|
||||
buttonProps: {
|
||||
plain: true
|
||||
},
|
||||
handler: (scope) => {
|
||||
const { meta } = scope
|
||||
const { _editTable } = meta
|
||||
const { editTableInstance } = _editTable
|
||||
editTableInstance.search({
|
||||
reset: true,
|
||||
resetData: {
|
||||
status: '1'
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type: 'divider',
|
||||
label: '除名告知通知书管理',
|
||||
showInTable: false,
|
||||
showInForm: ({ meta }) => {
|
||||
return meta.isForm === true
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '业务号',
|
||||
prop: 'bizNo',
|
||||
required: true,
|
||||
showInForm: ({ meta }) => {
|
||||
return meta.isForm === true
|
||||
},
|
||||
showInTable: true
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '除名决定的事实',
|
||||
prop: 'truth',
|
||||
required: true,
|
||||
showInForm: ({ meta }) => {
|
||||
return meta.isForm === true
|
||||
},
|
||||
tableProps: {
|
||||
showOverflowTooltip: true
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '除名决定的理由',
|
||||
prop: 'reason',
|
||||
required: true,
|
||||
showInForm: ({ meta }) => {
|
||||
return meta.isForm === true
|
||||
},
|
||||
tableProps: {
|
||||
showOverflowTooltip: true
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '除名决定的依据',
|
||||
prop: 'law',
|
||||
required: true,
|
||||
showInForm: ({ meta }) => {
|
||||
return meta.isForm === true
|
||||
},
|
||||
tableProps: {
|
||||
showOverflowTooltip: true
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '除名决定的后果',
|
||||
prop: 'result',
|
||||
required: true,
|
||||
showInForm: ({ meta }) => {
|
||||
return meta.isForm === true
|
||||
},
|
||||
tableProps: {
|
||||
showOverflowTooltip: true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
beforeRouteEnter(to, from, next) {
|
||||
next((vm) => {
|
||||
// 使用 $nextTick 确保组件完全渲染后再调用
|
||||
vm.$nextTick(() => {
|
||||
if (vm.$refs.EditTable) {
|
||||
vm.$refs.EditTable.search({ reset: true })
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
searchLoader(pageParam, parseSearchFormData, instance) {
|
||||
return listExpelled({
|
||||
size: pageParam.size,
|
||||
current: pageParam.current,
|
||||
entity: {
|
||||
...parseSearchFormData
|
||||
}
|
||||
}).then((data) => {
|
||||
// 确保每条记录都有必要的属性
|
||||
const records = data.data.records.map(record => ({
|
||||
...record,
|
||||
_isAdd: record._isAdd || false
|
||||
}))
|
||||
return {
|
||||
tableData: records,
|
||||
total: data.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
confirmRemove(datas) {
|
||||
this.expelledDatas = datas
|
||||
for (let i = 0; i < datas.length; i++) {
|
||||
if (i >= 10) {
|
||||
break
|
||||
}
|
||||
this.removeEntBases += datas[i].entName + '(' + datas[i].uscc + ')、'
|
||||
}
|
||||
this.removeEntBases = this.removeEntBases.substring(0, this.removeEntBases.length - 1)
|
||||
this.visible = false
|
||||
this.noticeVisible = true
|
||||
this.$refs.EditTable.editReady({})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "~@/styles/abnormal-list.scss";
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ module.exports = {
|
|||
// 如果有多个mock请往里面继续添加
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
timeout: 60000,
|
||||
target: `http://219.148.175.145:56666`,
|
||||
target: `http://localhost:8080`,
|
||||
// target: `http://127.0.0.1:8090`,
|
||||
// target: `http://172.22.80.129`,
|
||||
changeOrigin: true
|
||||
|
|
|
|||
Loading…
Reference in New Issue