强制注销功能优化

This commit is contained in:
zhouxy 2026-01-30 21:48:26 +08:00
parent e78f2fd9a8
commit 97cbc29c77
4 changed files with 317 additions and 69 deletions

View File

@ -6,19 +6,43 @@
top="153px"
custom-class="dialog-abnormal-list"
>
<edit-table
v-if="visible"
v-model="tableData"
:table-prop="tableProp"
:fields="fields"
:show-search-form="true"
row-key="pripid"
:search-form-prop="searchFormProp"
:search-loader="searchLoader"
:selected.sync="selected"
/>
<!-- 当没有输入条件时显示提示 -->
<div v-if="showNoDataMessage" class="no-data-message">请输入条件进行查询</div>
<div class="dialog-container">
<!-- 左侧表格 -->
<div class="left-panel">
<edit-table
v-if="visible"
v-model="tableData"
:table-prop="tableProp"
:fields="fields"
:show-search-form="true"
row-key="pripid"
:search-form-prop="searchFormProp"
:search-loader="searchLoader"
:selected.sync="selected"
/>
<!-- 当没有输入条件时显示提示 -->
<!-- <div v-if="showNoDataMessage" class="no-data-message">请输入条件进行查询</div>-->
</div>
<!-- 右侧已选择主体显示区域 -->
<div class="right-panel">
<div class="selected-title">已选择主体</div>
<div v-if="selected.length === 0" class="empty-tip">暂无选择</div>
<div v-else class="selected-list">
<div
v-for="(entity, index) in selected"
:key="entity.pripid"
class="selected-item"
>
<div class="item-info">
<div class="item-name">{{ entity.entname }}</div>
<div class="item-code">{{ entity.uniscid || entity.regno }}</div>
</div>
<i class="el-icon-close remove-btn" @click="removeEntity(index)" />
</div>
</div>
</div>
</div>
<div slot="footer">
<el-button type="primary" plain @click="visible = false">取消</el-button>
@ -29,6 +53,7 @@
<script>
import { baseinfoListByRegOrg, getIsUserProp } from '@/api/force'
import { getBaseCodeList } from '@/api/constant'
export default {
props: {
type: {
@ -44,17 +69,20 @@ export default {
isExSearch: false,
tableData: [],
selected: [],
selectedEntities: [], //
showNoDataMessage: false, //
INDUSTRYPHYList: [], //
fields: [
{
type: 'input',
label: '统一社会信用代码/注册号',
prop: 'searchUscc',
span: 8,
span: 10,
tableProps: {
width: `210px`,
showOverflowTooltip: true,
formatter: (row, column, cellValue, index) => {
return `${row.uniscid || row.regNO || ''}`
return `${row.uniscid || row.regno || ''}`
}
}
},
@ -64,14 +92,71 @@ export default {
return meta.isSearchForm ? '主体名称(模糊)' : '主体名称'
},
prop: 'entName',
span: 8,
span: 10,
tableProps: {
width: `210px`,
showOverflowTooltip: true,
formatter: (row, column, cellValue, index) => {
return `${row.entname || ''}`
}
}
},
{
type: 'input',
label: '登记机关',
prop: 'regorgCn',
span: 6,
isView: false,
tableProps: {
width: '180px',
formatter: (row, column, cellValue, index) => {
return `${row.regorgCn || ''}`
}
},
showInForm: false
},
{
type: 'select',
label: '主体类型',
prop: 'enterType',
span: 7,
defaultValue: 'company', //
options: [
{ label: '企业', value: 'company' },
{ label: '个体户', value: 'individual' },
{ label: '农专社', value: 'farmer' }
],
tableProps: {
width: '90px',
showOverflowTooltip: true,
formatter: (row, column, cellValue, index) => {
const typeMap = {
company: '企业',
individual: '个体户',
farmer: '农专社'
}
return typeMap[cellValue] || ''
}
}
},
{
type: 'select',
label: '行业门类',
prop: 'industryphy',
span: 9,
options: [],
tableProps: {
width: '150px',
showOverflowTooltip: true,
formatter: (row, column, cellValue, index) => {
const industryMap = this.INDUSTRYPHYList?.reduce((map, item) => {
map[item.code] = item.name // 使 code keyname value
return map
}, {})
return industryMap?.[cellValue] || '' // cellValue
}
}
},
{
type: 'buttons',
showInTable: false,
@ -111,58 +196,76 @@ export default {
]
},
{
type: 'input',
label: '登记机关',
prop: 'regorgCn',
span: 6,
isView: false,
tableProps: {
width: '200px',
formatter: (row, column, cellValue, index) => {
return `${row.regorgCn || ''}`
}
},
showInForm: false
type: 'date-picker',
label: '吊销日期自',
prop: 'revStartDate',
span: 8,
valueFormat: 'yyyy-MM-dd',
placeholder: '请选择开始日期',
showInTable: false
},
{
type: 'date-picker',
label: '吊销日期至',
prop: 'revEndDate',
span: 8,
valueFormat: 'yyyy-MM-dd',
placeholder: '请选择结束日期',
showInTable: false
},
{
type: 'input',
label: '法定代表人',
prop: 'leRep',
label: '吊销时间',
prop: 'revDate',
span: 6,
tableProps: {
formatter: (row, column, cellValue, index) => {
return `${row.name || ''}`
}
},
showInForm: false
},
{
type: 'input',
label: '经营地址',
prop: 'dom',
span: 10,
tableProps: {
width: '120px',
showOverflowTooltip: true,
formatter: (row, column, cellValue, index) => {
return `${row.dom || ''}`
}
},
showInForm: false
},
{
type: 'input',
label: '属地机关',
prop: 'localadm',
span: 6,
isView: false,
tableProps: {
width: '200px',
formatter: (row, column, cellValue, index) => {
return `${row.localadmCn || cellValue}`
return row.revDate || ''
}
},
showInForm: false
}
// {
// type: 'input',
// label: '',
// prop: 'leRep',
// span: 6,
// tableProps: {
// formatter: (row, column, cellValue, index) => {
// return `${row.name || ''}`
// }
// },
// showInForm: false
// }
// {
// type: 'input',
// label: '',
// prop: 'dom',
// span: 10,
// tableProps: {
// showOverflowTooltip: true,
// formatter: (row, column, cellValue, index) => {
// return `${row.dom || ''}`
// }
// },
// showInForm: false
// },
// {
// type: 'input',
// label: '',
// prop: 'localadm',
// span: 6,
// isView: false,
// tableProps: {
// width: '200px',
// formatter: (row, column, cellValue, index) => {
// return `${row.localadmCn || cellValue}`
// }
// },
// showInForm: false
// }
],
searchFormProp: {
formConfig: {
@ -177,10 +280,7 @@ export default {
selection: true,
// eslint-disable-next-line no-mixed-spaces-and-tabs
tableSelectionProps: {
reserveSelection: true,
selectable: (row, index) => {
return this.selected.length === 0 || this.selected[0] === row
}
reserveSelection: true
// eslint-disable-next-line no-mixed-spaces-and-tabs
},
disableSelectAll: false,
@ -212,18 +312,48 @@ export default {
}
})
},
mounted() {
getBaseCodeList('CA05').then(res => {
if (res.code === 0) {
this.INDUSTRYPHYList = res.data
// 使 $set fields options
const industryFieldIndex = this.fields.findIndex(field => field.prop === 'industryphy')
if (industryFieldIndex !== -1) {
this.$set(this.fields[industryFieldIndex], 'options', this.INDUSTRYPHYList.map(item => ({
label: item.name,
value: item.code
})))
}
}
})
},
methods: {
open() {
this.selected = []
this.selectedEntities = []
this.visible = true
},
handleSelectionChange(selection) {
this.$set(this, 'selectedEntities', [...selection])
},
removeEntity(index) {
this.selected.splice(index, 1)
},
searchLoader(pageParam, parseSearchFormData, instance) {
const { searchUscc, entName } = parseSearchFormData
const { searchUscc, entName, revStartDate, revEndDate } = parseSearchFormData
//
if ((revStartDate && !revEndDate) || (!revStartDate && revEndDate)) {
this.$message.warning('吊销日期自 和 吊销日期至 需同时选择!')
return Promise.reject() //
}
return baseinfoListByRegOrg({
size: pageParam.size,
current: pageParam.current,
entity: {
...parseSearchFormData
...parseSearchFormData,
revStartDate, //
revEndDate //
}
}).then((data) => {
this.showNoDataMessage = !searchUscc && !entName
@ -234,17 +364,81 @@ export default {
})
},
confirm() {
this.$emit('confirm', this.selected)
this.$emit('confirm', this.selected) //
this.visible = false
}
}
}
</script>
<style lang="scss" scoped>
.dialog-container {
display: flex;
height: 60vh;
.left-panel {
flex: 1;
overflow-y: auto;
border-right: 1px solid #ebeef5;
padding-right: 16px;
}
.right-panel {
width: 300px;
padding-left: 16px;
overflow-y: auto;
.selected-title {
font-weight: bold;
margin-bottom: 10px;
}
.empty-tip {
color: #999;
text-align: center;
margin-top: 20px;
}
.selected-list {
max-height: 50vh;
overflow-y: auto;
.selected-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 12px;
border: 1px solid #ebeef5;
border-radius: 4px;
margin-bottom: 8px;
.item-info {
flex: 1;
.item-name {
font-weight: bold;
}
.item-code {
font-size: 12px;
color: #999;
}
}
.remove-btn {
cursor: pointer;
color: #f56c6c;
}
}
}
}
}
.no-data-message {
color: red;
text-align: center; /* 可选:让文字居中 */
font-size: 16px; /* 可选:设置字体大小 */
margin-top: 20px; /* 可选:增加顶部间距 */
text-align: center;
font-size: 16px;
margin-top: 20px;
}
</style>

View File

@ -219,6 +219,25 @@ export default {
},
optionsBaseCode: 'C13044',
showInForm: false
},
{
type: 'input',
label: '公告期至剩余天数',
prop: 'noticeToRemain',
span: 8,
tableProps: {
showOverflowTooltip: true,
width: '150px',
formatter: (row, column, cellValue, index) => {
//
const noticeToDate = new Date(row.noticeTo)
const today = new Date()
const diffTime = noticeToDate - today
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24))
return diffDays >= 0 ? `${diffDays}` : '已过期'
}
},
showInForm: false //
}
]
}
@ -274,7 +293,23 @@ export default {
size: pageParam.size,
current: pageParam.current,
entity: {
...parseSearchFormData
...parseSearchFormData,
soon: '0'
}
}).then((data) => {
return {
tableData: data.dataPage.records,
total: data.dataPage.total
}
})
} else if (this.params === 'soon') {
this.params = 'force'
return forceDeregisterPageByRegOrg({
size: pageParam.size,
current: pageParam.current,
entity: {
...parseSearchFormData,
soon: '1'
}
}).then((data) => {
return {

View File

@ -23,6 +23,13 @@
>
个案办理
</el-button>
<el-button
style="background: #FF8C00;"
type="primary"
@click="$refs.speList.open('soon')"
>
公告期即将届满名单
</el-button>
</div>
</template>
<template v-slot:bus-status="{ row, field, formatter }">
@ -308,6 +315,13 @@ export default {
this.getOrgunits()
},
methods: {
goToExpiringSoonList() {
//
this.$router.push({
path: `/forceNotice/force/todo`,
query: { expiringSoon: true }
})
},
getOrgunits() {
getOrgunits().then(res => {
this.orgs = res
@ -460,4 +474,9 @@ export default {
.bus-status-4 {
color: #F4222D;
}
.el-button--primary {
margin-right: 12px;
}
</style>

View File

@ -22,7 +22,7 @@
type="primary"
@click="$refs.entlist.open()"
>
个案主体办理
主体名单办理
</el-button>
<el-button
v-if="type === 'todo'"