强制注销功能加上添加主体按钮和删除主体按钮
This commit is contained in:
parent
97cbc29c77
commit
b4b207884f
|
|
@ -0,0 +1,123 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
title="删除主体"
|
||||
:visible.sync="visible"
|
||||
width="80%"
|
||||
top="100px"
|
||||
>
|
||||
<easy-table
|
||||
ref="deleteTable"
|
||||
v-model="tableData"
|
||||
:fields="fields"
|
||||
:table-config="tableConfig"
|
||||
:emit-load-on-create="true"
|
||||
:on-load="loadData"
|
||||
/>
|
||||
<div slot="footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="danger" @click="confirmDelete">确定删除</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { xrForceDeregisterSpeListByBizSeqNo } from '@/api/force'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
tableData: [],
|
||||
fields: [
|
||||
{
|
||||
type: 'input',
|
||||
label: '统一社会信用代码/注册号',
|
||||
prop: 'uniscId',
|
||||
tableProps: {
|
||||
showOverflowTooltip: true,
|
||||
width: '220px',
|
||||
formatter: (row, column, cellValue, index) => {
|
||||
return `${row.uniscId || row.regNo || ''}`
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '主体名称',
|
||||
prop: 'entName',
|
||||
tableProps: {
|
||||
showOverflowTooltip: true,
|
||||
width: '300px',
|
||||
formatter: (row, column, cellValue, index) => {
|
||||
return `${row.entName || ''}`
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '登记机关',
|
||||
prop: 'regOrgCn',
|
||||
tableProps: {
|
||||
showOverflowTooltip: true
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '法定代表人',
|
||||
prop: 'leRep',
|
||||
tableProps: {
|
||||
showOverflowTooltip: true,
|
||||
formatter: (row, column, cellValue, index) => {
|
||||
return `${row.leRep || ''}`
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '主体状态',
|
||||
prop: 'opState',
|
||||
optionsBaseCode: 'TY01',
|
||||
tableProps: {
|
||||
showOverflowTooltip: true
|
||||
}
|
||||
}
|
||||
],
|
||||
tableConfig: {
|
||||
selection: true,
|
||||
showIndex: true,
|
||||
indexWidth: '100px',
|
||||
showPagination: true,
|
||||
tableProps: {
|
||||
headerCellStyle: { background: '#F5F5F5!important', color: '#333333!important', padding: '0px' },
|
||||
headerRowStyle: { height: '48px' },
|
||||
rowStyle: { height: '48px' },
|
||||
cellStyle: { padding: '16px 0', color: '#333' }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
this.visible = true
|
||||
},
|
||||
loadData(pageParam) {
|
||||
return xrForceDeregisterSpeListByBizSeqNo({
|
||||
size: pageParam.size,
|
||||
current: pageParam.current,
|
||||
bizSeqNo: this.$route.query.bizSeqNo,
|
||||
forceType: '1'
|
||||
}).then((data) => {
|
||||
return {
|
||||
tableData: data,
|
||||
total: data.length
|
||||
}
|
||||
})
|
||||
},
|
||||
confirmDelete() {
|
||||
const selectedRows = this.$refs.deleteTable.getSelection()
|
||||
this.$emit('confirm', selectedRows)
|
||||
this.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -121,6 +121,11 @@
|
|||
</div>
|
||||
</template>
|
||||
<template v-slot:entListTable>
|
||||
<!-- 按钮组 -->
|
||||
<div class="button-group" style="margin-bottom: 10px; text-align: right;">
|
||||
<el-button type="primary" @click="openAddDialog">添加主体</el-button>
|
||||
<el-button type="danger" @click="openDeleteDialog">删除主体</el-button>
|
||||
</div>
|
||||
<easy-table
|
||||
ref="EntListTable"
|
||||
v-model="entListTableData"
|
||||
|
|
@ -131,6 +136,10 @@
|
|||
/>
|
||||
</template>
|
||||
</easy-form>
|
||||
<!-- 引入 EntList 组件 -->
|
||||
<ent-list ref="entListDialog" @confirm="addEntities"></ent-list>
|
||||
<!-- 删除主体对话框 -->
|
||||
<delete-ent-list-dialog ref="deleteEntListDialog" @confirm="deleteEntities"></delete-ent-list-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -140,14 +149,21 @@ import { createGlobalLoading, parseTime2 } from '@/utils'
|
|||
import { findCurrentNode, findNextSequenceFlowList, taskInfo } from '@/api'
|
||||
import {
|
||||
getForceDeregisterContent,
|
||||
xrForceDeregisterSpeListByBizSeqNo,
|
||||
xrForceDeregisterSpeProcessControl,
|
||||
getOrgunits,
|
||||
xrAttachmentDelLawFile,
|
||||
xrAttachmentListByBizSepNo,
|
||||
xrForceDeregisterSpeListByBizSeqNo,
|
||||
xrForceDeregisterSpeProcessControl,
|
||||
xrOpinionListByBizSeqNo
|
||||
} from '@/api/force'
|
||||
import EntList from '@/views/forceNotice/component/EntList.vue'
|
||||
import DeleteEntListDialog from '@/views/forceNotice/component/DeleteEntListDialog.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
EntList,
|
||||
DeleteEntListDialog
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
authItemMap: [],
|
||||
|
|
@ -278,14 +294,13 @@ export default {
|
|||
return formData.status !== '0'
|
||||
},
|
||||
onChange: ({ formData }) => {
|
||||
if (!formData && !formData.noticeFrom) return;
|
||||
const fromDate = new Date(formData.noticeFrom);
|
||||
const toDate = new Date(fromDate.getTime() + 90 * 24 * 60 * 60 * 1000);
|
||||
const year = toDate.getFullYear();
|
||||
const month = String(toDate.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(toDate.getDate()).padStart(2, '0');
|
||||
const toDateStr = `${year}-${month}-${day}`;
|
||||
formData.noticeTo = toDateStr;
|
||||
if (!formData && !formData.noticeFrom) return
|
||||
const fromDate = new Date(formData.noticeFrom)
|
||||
const toDate = new Date(fromDate.getTime() + 90 * 24 * 60 * 60 * 1000)
|
||||
const year = toDate.getFullYear()
|
||||
const month = String(toDate.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(toDate.getDate()).padStart(2, '0')
|
||||
formData.noticeTo = `${year}-${month}-${day}`
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -658,6 +673,25 @@ export default {
|
|||
})
|
||||
},
|
||||
methods: {
|
||||
// 打开添加主体对话框
|
||||
openAddDialog() {
|
||||
this.$refs.entListDialog.open()
|
||||
},
|
||||
// 打开删除主体对话框
|
||||
openDeleteDialog() {
|
||||
this.$refs.deleteEntListDialog.open()
|
||||
},
|
||||
// 添加主体回调
|
||||
addEntities(selectedEntities) {
|
||||
// 将选中的主体添加到 entListTableData 中
|
||||
this.entListTableData = [...this.entListTableData, ...selectedEntities]
|
||||
},
|
||||
deleteEntities(selectedEntities) {
|
||||
const selectedIds = selectedEntities.map(entity => entity.pripid)
|
||||
this.entListTableData = this.entListTableData.filter(
|
||||
entity => !selectedIds.includes(entity.pripid)
|
||||
)
|
||||
},
|
||||
generateNoticeContent(scope) {
|
||||
this.generatingContent = true
|
||||
getForceDeregisterContent(
|
||||
|
|
@ -790,4 +824,14 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.button-group {
|
||||
margin-bottom: 10px;
|
||||
text-align: right;
|
||||
|
||||
.el-button {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue