新增属地调整功能页面

This commit is contained in:
zhouxy 2026-01-10 21:24:01 +08:00
parent b32260ed08
commit 694a182eb3
5 changed files with 365 additions and 18 deletions

View File

@ -93,15 +93,13 @@ export function listBaseinfo(data) {
data
})
}
/**
* 查询主体信息列表
* @param data
* @returns {AxiosPromise}
*/
export function superviseDeptEBaseinfoList(data) {
export function pageBaseinfo(data) {
return request({
useResponseData: true,
url: '/xr-supervisor/superviseDeptEBaseinfoList',
url: '/eBaseinfo/pageBaseinfo',
method: 'post',
data
})
@ -138,3 +136,21 @@ export function getEntIllegalPage(data) {
data
})
}
export function getOrgunits(orgNumber, orgLevel) {
return request({
url: '/tOrgunits/getAllOrgunits',
method: 'post',
params: {
orgNumber,
orgLevel
}
})
}
export function updateBaseinfoSuperviseDept(data) {
return request({
url: '/eBaseinfo/updateBaseinfoSuperviseDept',
method: 'post',
data
})
}

View File

@ -35,14 +35,3 @@ export function getIsUserProp() {
method: 'get'
})
}
/**
* 查询主体信息列表
*/
export function listBaseinfo(data) {
return request({
url: '/eBaseinfo/listEBaseinfo',
method: 'post',
data
})
}

View File

@ -2575,6 +2575,14 @@ export const constantRoutes = [{
title: '认领情况统计表'
}
},
{
path: 'superviseAdjuest',
name: 'superviseAdjuest',
component: () => import('@/views/superviseAdjust/index.vue'),
meta: {
title: '属地机关调整'
}
}]
},
{

View File

@ -0,0 +1,334 @@
<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="EditTable">
<div style="margin-bottom: 12px;">
<el-button
style="background: #32BBD6;"
type="primary"
@click="()=>{
if (selected.length === 0) {
$message.warning('请先勾选需要调整的主体')
return
}
if(!(selected[0].regstate === '1')){
$message.warning('不能调整非开业的主体的属地机关!');
return;
}
// if(!selected[0].suporg){
// if(userInfo.orgCode.slice(0, 4) !== selected[0].regorg.slice(0, 4)){
// $message.warning('');
// return;
// }
// } else {
// if(userInfo.orgCode.slice(0, 4) !== selected[0].suporg.slice(0, 4)){
// $message.warning('');
// return;
// }
// }
$refs.EditTable.editReady(selected[0])
}"
>
调整属地
</el-button>
</div>
</template>
</edit-table>
</div>
</template>
<script>
import { getOrgunits, updateBaseinfoSuperviseDept, pageBaseinfo } from '@/api'
import { getInfo } from '@/api/user'
export default {
data() {
return {
isExSearch: false,
data: [],
selected: [],
userInfo: [],
orgMap: [],
tableProp: {
emitLoadOnCreate: true,
tableConfig: {
showIndex: false,
selection: true,
indexWidth: '100px',
handlerWidth: '120px',
showPagination: true,
tableSelectionProps: {
selectable: (row, index) => {
return this.selected.length === 0 || this.selected[0] === row
}
},
tableProps: {
headerCellStyle: { background: '#F5F5F5!important', color: '#333333!important', padding: '0px' },
headerRowStyle: { height: '48px' },
rowStyle: { height: '48px' },
cellStyle: { padding: '16px 0', color: '#333' }
},
indexMethod: (index, scope, defaultIndex) => {
const s = String(defaultIndex)
return `${new Array(3 - s.length).fill('0').join('')}${defaultIndex}`
}
}
},
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',
confirmHandlerPromise: () => {
return updateBaseinfoSuperviseDept({
pripid: formData.pripid,
uniscid: formData.uniscid,
entname: formData.entname,
regno: formData.regno,
afterDeptid: formData.afterDeptid
}).then(() => {
this.$refs.EditTable.editConfirm(formData)
this.$message.success('调整属地成功')
return this.$refs.EditTable.search({ reset: true })
})
}
})
})
}
}
]
},
dialogProp: {
title: '调整属地',
width: '1200px',
customClass: 'dialog-abnormal-list'
},
fields: [
{
type: 'input',
label: '统一社会信用代码/注册号',
prop: 'searchUscc',
span: 9,
tableProps: {
width: '210px',
showOverflowTooltip: true,
formatter: (row, column, cellValue, index) => {
return `${row.uniscid || row.regno || ''}`
}
},
showInForm: ({ meta }) => {
return meta.isSearchForm === true
}
},
{
type: 'divider',
label: '调整属地',
showInTable: false,
showInForm: ({ meta }) => {
return meta.isForm === true
}
},
{
type: 'input',
label: '主体名称',
prop: 'entname',
span: ({ meta }) => {
return meta.isForm ? 24 : 9
},
tableProps: {
width: '260px',
showOverflowTooltip: true
},
isView: ({ meta }) => {
return meta.isForm
}
},
{
type: 'input',
label: '主体状态',
prop: 'regstateCn',
isView: true,
showInForm: false
},
{
type: 'input',
label: '法定代表人',
prop: 'name',
isView: true,
showInForm: 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: {
查询类型: editTableInstance.searchForm.查询类型
}
})
}
}
]
},
{
type: 'input',
label: '地址',
prop: 'dom',
showInTable: true,
showInForm: false
},
{
type: 'input',
label: ({ meta }) => {
return meta.isForm ? '当前所属机关' : '所属机关'
},
prop: 'suporgCn',
span: ({ meta }) => {
return meta.isForm ? 24 : 6
},
isView: ({ meta }) => {
return meta.isForm
},
showInForm: ({ meta }) => {
return meta.isForm || (this.isExSearch && meta.isSearchForm === true)
}
},
{
type: 'cascader',
label: '调整后所属机关',
prop: 'afterDeptid',
span: 24,
required: true,
optionConfig: {
labelKeyName: 'label',
valueKeyName: 'value'
},
formProps: {
props: { checkStrictly: true }
},
options: () => {
return this.orgMap
},
onCreated: ({ setOptionLoading }) => {
if (this.orgMap.length === 0) {
setOptionLoading('authItem', getOrgunits('15', 0).then((data) => {
this.orgMap = data.data
}))
}
},
showInForm: ({ meta }) => {
return meta.isForm === true
},
showInTable: false
}
]
}
},
beforeRouteEnter(to, from, next) {
next((vm) => {
vm.$refs.EditTable.search({ reset: true })
})
},
created() {
getInfo().then((user) => {
this.userInfo = user
})
},
methods: {
searchLoader(pageParam, parseSearchFormData, instance) {
return pageBaseinfo({
size: pageParam.size,
current: pageParam.current,
entity: {
...parseSearchFormData
}
}).then((data) => {
return {
tableData: data.data.records,
total: data.data.total
}
})
}
}
}
</script>
<style lang="scss" scoped>
@import "~@/styles/abnormal-list.scss";
</style>

View File

@ -28,7 +28,7 @@
</template>
<script>
import { listBaseinfo } from '@/api/susnate'
import { pageBaseinfo } from '@/api'
export default {
props: {
type: {
@ -218,7 +218,7 @@ export default {
},
searchLoader(pageParam, parseSearchFormData, instance) {
const { searchUscc, entName } = parseSearchFormData
return listBaseinfo({
return pageBaseinfo({
size: pageParam.size,
current: pageParam.current,
entity: {