查询工商登记开业信息

This commit is contained in:
ZZM 2025-09-17 18:37:57 +08:00
parent 6fa525880d
commit f7050b1f92
6 changed files with 201 additions and 17 deletions

View File

@ -743,3 +743,17 @@ export function verifyPasswordAPI(data) {
} }
}) })
} }
/**
* 根据导入的Excel获取重点辅导单位名单公海
*/
export function uploadExcelFileAPI(data) {
return request({
url: 'crmCustomer/verifyPassword',
method: 'post',
data: data,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})
}

View File

@ -14,3 +14,17 @@ export function syGsdjxx(data) {
} }
}) })
} }
/**
* 根据时间查询工商登记信息
*/
export function queryGsdjxxByDate(data) {
return request({
url: `crmGsdjxx/queryGsdjxxByDate/${data}`,
method: 'post',
data: data,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})
}

View File

@ -27,12 +27,6 @@
@scene-handle="sceneHandle" @scene-handle="sceneHandle"
@hidden-scene="showScene=false" /> @hidden-scene="showScene=false" />
</el-popover> </el-popover>
<el-button
v-if="showFilterView"
type="primary"
class="filter-button"
icon="wk wk-screening"
@click="showFilterClick">高级筛选</el-button>
<el-button <el-button
v-if="sortData && sortData.order && sortData.column" v-if="sortData && sortData.order && sortData.column"
type="primary" type="primary"
@ -49,6 +43,12 @@
:save-scene="!isSeas" :save-scene="!isSeas"
@filter="handleFilter" /> @filter="handleFilter" />
<slot /> <slot />
<el-button
v-if="showFilterView"
type="primary"
class="filter-button"
icon="wk wk-screening"
@click="showFilterClick">高级筛选</el-button>
</flexbox> </flexbox>
<flexbox <flexbox
v-if="selectionList.length > 0" v-if="selectionList.length > 0"
@ -850,7 +850,7 @@ export default {
} }
.filter-button { .filter-button {
margin-left: 20px; margin-left: 500px;
/deep/ i { /deep/ i {
font-size: 14px; font-size: 14px;
margin-right: 5px; margin-right: 5px;

View File

@ -34,7 +34,6 @@
:header-cell-class-name="headerCellClassName" :header-cell-class-name="headerCellClassName"
:row-key="`${crmType}Id`" :row-key="`${crmType}Id`"
class="n-table--border" class="n-table--border"
use-virtual
stripe stripe
border border
highlight-current-row highlight-current-row

View File

@ -50,7 +50,6 @@
:row-key="`${crmType}Id`" :row-key="`${crmType}Id`"
:class="[{'no-all-selection': config.radio}]" :class="[{'no-all-selection': config.radio}]"
class="n-table--border" class="n-table--border"
use-virtual
stripe stripe
border border
highlight-current-row highlight-current-row

View File

@ -63,6 +63,45 @@
@click="handlePoolAction"> @click="handlePoolAction">
同步数据 同步数据
</el-button> </el-button>
<div class="time-container">
<!-- 添加时间选择输入框 -->
<el-date-picker
v-if="poolId === 34557"
v-model="currentDateTime"
type="datetime"
placeholder="选择日期时间"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
class="time-select"
/>
<!-- 添加查询按钮 -->
<el-button
v-if="poolId === 34557"
:loading="isSubmitting"
type="primary"
size="small"
style="margin-left: 2px;height: 40px"
@click="queryGsdjxxByDate"
>
查询
</el-button>
<!-- 操作反馈提示 -->
<div v-if="submitSuccess" class="success-message">
<el-alert :closable="false" title="查询成功!" type="success" show-icon/>
</div>
<div v-if="submitError" class="error-message">
<el-alert :title="errorMessage" :closable="false" type="error" show-icon/>
</div>
</div>
<!-- 添加导入按钮 -->
<el-button
v-if="poolId === 34554"
type="primary"
size="small"
style="margin-left: 10px"
@click="uploadVisible = true">
导入Excel
</el-button>
</template> </template>
</c-r-m-table-head> </c-r-m-table-head>
<el-table <el-table
@ -74,7 +113,6 @@
:cell-class-name="cellClassName" :cell-class-name="cellClassName"
:row-key="`${crmType}Id`" :row-key="`${crmType}Id`"
class="n-table--border" class="n-table--border"
use-virtual
stripe stripe
border border
highlight-current-row highlight-current-row
@ -156,12 +194,12 @@
width="400px" width="400px"
append-to-body> append-to-body>
<el-form> <el-form>
<el-table-column label="同步月份"> <el-table-column label="同步日期">
同步月份 同步日期
<el-date-picker <el-date-picker
v-model="month" v-model="month"
value-format="yyyyMMdd" value-format="yyyyMMdd"
placeholder="选择同步"/> placeholder="选择同步日期"/>
</el-table-column> </el-table-column>
<el-form-item style="padding-top: 30px"> <el-form-item style="padding-top: 30px">
地区 地区
@ -178,6 +216,37 @@
<el-button :loading="loadingGs" type="primary" @click="sysGsdjxx">提交</el-button> <el-button :loading="loadingGs" type="primary" @click="sysGsdjxx">提交</el-button>
</span> </span>
</el-dialog> </el-dialog>
<!-- 导入Excel对话框 -->
<el-dialog
:visible.sync="uploadVisible"
:before-close="handleClose"
title="上传文件"
width="30%"
>
<!-- 上传组件 -->
<el-upload
ref="upload"
:multiple="true"
:file-list="fileList"
:auto-upload="false"
:on-change="handleFileChange"
:on-remove="handleRemove"
class="upload-demo"
action="#"
drag
>
<i class="el-icon-upload"/>
<div class="el-upload__text">将文件拖到此处<em>点击选择文件</em></div>
<div slot="tip" class="el-upload__tip">
只能上传特定格式的文件可选且不超过2MB
</div>
</el-upload>
<span slot="footer" class="dialog-footer">
<el-button @click="uploadVisible = false"> </el-button>
<el-button type="primary" @click="submitUpload"> </el-button>
</span>
</el-dialog>
</div> </div>
<customer-detail <customer-detail
v-if="showDview" v-if="showDview"
@ -197,8 +266,8 @@ import { crmCustomerPoolNameListAPI, crmCustomerPoolQueryAuthAPI } from '@/api/c
import CustomerDetail from '../customer/Detail' import CustomerDetail from '../customer/Detail'
import TableMixin from '../mixins/Table' import TableMixin from '../mixins/Table'
import {getXzqhList} from "../../../api/crm/xzqh"; import { getXzqhList } from '../../../api/crm/xzqh'
import {syGsdjxx} from "../../../api/crm/gsdjxx"; import { queryGsdjxxByDate, syGsdjxx } from '../../../api/crm/gsdjxx'
export default { export default {
/** 客户管理 的 公海列表 */ /** 客户管理 的 公海列表 */
@ -224,10 +293,19 @@ export default {
poolAuth: {}, poolAuth: {},
poolList: [], poolList: [],
openXky: false, openXky: false,
uploadVisible: false,
uploadFiles: [],
xzqhList: [], xzqhList: [],
month: '', month: '',
xzqhDm: '', xzqhDm: '',
loadingGs: false loadingGs: false,
currentDateTime: '', //
submitSuccess: false, //
submitError: false, //
isSubmitting: false, //
autoCloseDelay: 3000, // 3
successTimer: null, //
errorTimer: null //
} }
}, },
computed: { computed: {
@ -271,6 +349,11 @@ export default {
immediate: true immediate: true
} }
}, },
mounted() {
//
this.setDefaultDateTime()
this.queryGsdjxxByDate()
},
created() { created() {
this.getPoolList() this.getPoolList()
}, },
@ -282,7 +365,59 @@ export default {
deactivated() { deactivated() {
this.$refs.elMenu.activeIndex = 'seas' this.$refs.elMenu.activeIndex = 'seas'
}, },
beforeDestroy() {
//
clearTimeout(this.successTimer)
clearTimeout(this.errorTimer)
},
methods: { methods: {
/**
* 根据时间查询工商登记开业信息(默认是今天)
*/
queryGsdjxxByDate() {
this.isSubmitting = true
this.submitSuccess = false
this.submitError = false
//
clearTimeout(this.successTimer)
clearTimeout(this.errorTimer)
const time = this.currentDateTime
queryGsdjxxByDate(time)
.then(res => {
console.log('查询成功:', res.data)
this.list = res.data.list
this.submitSuccess = true
// autoCloseDelay
this.successTimer = setTimeout(() => {
this.submitSuccess = false
}, this.autoCloseDelay)
})
.catch(error => {
console.error('查询失败:', error)
this.submitError = true
this.errorMessage = '查询失败,请重试'
// autoCloseDelay
this.errorTimer = setTimeout(() => {
this.submitError = false
}, this.autoCloseDelay)
})
.finally(
this.isSubmitting = false
)
},
/**
* 获取当天时间
*/
setDefaultDateTime() {
const now = new Date()
// YYYY-MM-DD HH:mm:ss
const year = now.getFullYear()
const month = String(now.getMonth() + 1).padStart(2, '0')
const day = String(now.getDate()).padStart(2, '0')
this.currentDateTime = `${year}-${month}-${day}`
},
/** /**
* 获取公海权限 * 获取公海权限
*/ */
@ -307,7 +442,7 @@ export default {
sysGsdjxx() { sysGsdjxx() {
let xzqhMc = null let xzqhMc = null
for (let i = 0; i < this.xzqhList.length; i++) { for (let i = 0; i < this.xzqhList.length; i++) {
if (this.xzqhList[i].xzqhDm === this.xzqhDm){ if (this.xzqhList[i].xzqhDm === this.xzqhDm) {
xzqhMc = this.xzqhList[i].xzqhMc xzqhMc = this.xzqhList[i].xzqhMc
} }
} }
@ -321,6 +456,14 @@ export default {
this.$message.success(`同步成功,请稍后刷新界面`) this.$message.success(`同步成功,请稍后刷新界面`)
this.openXky = false this.openXky = false
}, },
//
//
submitUpload() {
if (this.uploadFiles.length === 0) {
this.$message.warning('请先选择要上传的文件')
return
}
},
/** /**
* 左侧菜单选择 * 左侧菜单选择
*/ */
@ -367,4 +510,19 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
@import '../styles/table.scss'; @import '../styles/table.scss';
.success-message, .error-message {
margin-left: 15px;
margin-top: 10px;
display: inline-block;
}
.time-container {
width: 500px;
display: flex;
}
.time-select {
margin-left: 50px;
}
</style> </style>