查询工商登记开业信息
This commit is contained in:
parent
6fa525880d
commit
f7050b1f92
|
|
@ -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'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,12 +27,6 @@
|
|||
@scene-handle="sceneHandle"
|
||||
@hidden-scene="showScene=false" />
|
||||
</el-popover>
|
||||
<el-button
|
||||
v-if="showFilterView"
|
||||
type="primary"
|
||||
class="filter-button"
|
||||
icon="wk wk-screening"
|
||||
@click="showFilterClick">高级筛选</el-button>
|
||||
<el-button
|
||||
v-if="sortData && sortData.order && sortData.column"
|
||||
type="primary"
|
||||
|
|
@ -49,6 +43,12 @@
|
|||
:save-scene="!isSeas"
|
||||
@filter="handleFilter" />
|
||||
<slot />
|
||||
<el-button
|
||||
v-if="showFilterView"
|
||||
type="primary"
|
||||
class="filter-button"
|
||||
icon="wk wk-screening"
|
||||
@click="showFilterClick">高级筛选</el-button>
|
||||
</flexbox>
|
||||
<flexbox
|
||||
v-if="selectionList.length > 0"
|
||||
|
|
@ -850,7 +850,7 @@ export default {
|
|||
}
|
||||
|
||||
.filter-button {
|
||||
margin-left: 20px;
|
||||
margin-left: 500px;
|
||||
/deep/ i {
|
||||
font-size: 14px;
|
||||
margin-right: 5px;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
:header-cell-class-name="headerCellClassName"
|
||||
:row-key="`${crmType}Id`"
|
||||
class="n-table--border"
|
||||
use-virtual
|
||||
stripe
|
||||
border
|
||||
highlight-current-row
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@
|
|||
:row-key="`${crmType}Id`"
|
||||
:class="[{'no-all-selection': config.radio}]"
|
||||
class="n-table--border"
|
||||
use-virtual
|
||||
stripe
|
||||
border
|
||||
highlight-current-row
|
||||
|
|
|
|||
|
|
@ -63,6 +63,45 @@
|
|||
@click="handlePoolAction">
|
||||
同步数据
|
||||
</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>
|
||||
</c-r-m-table-head>
|
||||
<el-table
|
||||
|
|
@ -74,7 +113,6 @@
|
|||
:cell-class-name="cellClassName"
|
||||
:row-key="`${crmType}Id`"
|
||||
class="n-table--border"
|
||||
use-virtual
|
||||
stripe
|
||||
border
|
||||
highlight-current-row
|
||||
|
|
@ -156,12 +194,12 @@
|
|||
width="400px"
|
||||
append-to-body>
|
||||
<el-form>
|
||||
<el-table-column label="同步月份">
|
||||
同步月份:
|
||||
<el-table-column label="同步日期">
|
||||
同步日期:
|
||||
<el-date-picker
|
||||
v-model="month"
|
||||
value-format="yyyyMMdd"
|
||||
placeholder="选择同步月"/>
|
||||
placeholder="选择同步日期"/>
|
||||
</el-table-column>
|
||||
<el-form-item style="padding-top: 30px">
|
||||
地区:
|
||||
|
|
@ -178,6 +216,37 @@
|
|||
<el-button :loading="loadingGs" type="primary" @click="sysGsdjxx">提交</el-button>
|
||||
</span>
|
||||
</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>
|
||||
<customer-detail
|
||||
v-if="showDview"
|
||||
|
|
@ -197,8 +266,8 @@ import { crmCustomerPoolNameListAPI, crmCustomerPoolQueryAuthAPI } from '@/api/c
|
|||
|
||||
import CustomerDetail from '../customer/Detail'
|
||||
import TableMixin from '../mixins/Table'
|
||||
import {getXzqhList} from "../../../api/crm/xzqh";
|
||||
import {syGsdjxx} from "../../../api/crm/gsdjxx";
|
||||
import { getXzqhList } from '../../../api/crm/xzqh'
|
||||
import { queryGsdjxxByDate, syGsdjxx } from '../../../api/crm/gsdjxx'
|
||||
|
||||
export default {
|
||||
/** 客户管理 的 公海列表 */
|
||||
|
|
@ -224,10 +293,19 @@ export default {
|
|||
poolAuth: {},
|
||||
poolList: [],
|
||||
openXky: false,
|
||||
uploadVisible: false,
|
||||
uploadFiles: [],
|
||||
xzqhList: [],
|
||||
month: '',
|
||||
xzqhDm: '',
|
||||
loadingGs: false
|
||||
loadingGs: false,
|
||||
currentDateTime: '', // 初始时间绑定值
|
||||
submitSuccess: false, // 提交成功标识
|
||||
submitError: false, // 提交错误标识
|
||||
isSubmitting: false, // 提交状态标识
|
||||
autoCloseDelay: 3000, // 新增:提示信息自动关闭的延迟时间,单位毫秒,这里设为3秒
|
||||
successTimer: null, // 新增:用于存储成功提示的定时器
|
||||
errorTimer: null // 新增:用于存储错误提示的定时器
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -271,6 +349,11 @@ export default {
|
|||
immediate: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// 设置默认值为当天日期时间
|
||||
this.setDefaultDateTime()
|
||||
this.queryGsdjxxByDate()
|
||||
},
|
||||
created() {
|
||||
this.getPoolList()
|
||||
},
|
||||
|
|
@ -282,7 +365,59 @@ export default {
|
|||
deactivated() {
|
||||
this.$refs.elMenu.activeIndex = 'seas'
|
||||
},
|
||||
beforeDestroy() {
|
||||
// 组件销毁前清除定时器,防止内存泄漏
|
||||
clearTimeout(this.successTimer)
|
||||
clearTimeout(this.errorTimer)
|
||||
},
|
||||
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() {
|
||||
let xzqhMc = null
|
||||
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
|
||||
}
|
||||
}
|
||||
|
|
@ -321,6 +456,14 @@ export default {
|
|||
this.$message.success(`同步成功,请稍后刷新界面`)
|
||||
this.openXky = false
|
||||
},
|
||||
//
|
||||
// 提交上传
|
||||
submitUpload() {
|
||||
if (this.uploadFiles.length === 0) {
|
||||
this.$message.warning('请先选择要上传的文件')
|
||||
return
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 左侧菜单选择
|
||||
*/
|
||||
|
|
@ -367,4 +510,19 @@ export default {
|
|||
|
||||
<style lang="scss" scoped>
|
||||
@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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue