diff --git a/src/api/crm/customer.js b/src/api/crm/customer.js index ed047a3a..15b50e60 100644 --- a/src/api/crm/customer.js +++ b/src/api/crm/customer.js @@ -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' + } + }) +} diff --git a/src/api/crm/gsdjxx.js b/src/api/crm/gsdjxx.js index fb65e385..3fc518c1 100644 --- a/src/api/crm/gsdjxx.js +++ b/src/api/crm/gsdjxx.js @@ -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' + } + }) +} diff --git a/src/views/crm/components/CRMTableHead.vue b/src/views/crm/components/CRMTableHead.vue index 79f140eb..4beadc12 100644 --- a/src/views/crm/components/CRMTableHead.vue +++ b/src/views/crm/components/CRMTableHead.vue @@ -27,12 +27,6 @@ @scene-handle="sceneHandle" @hidden-scene="showScene=false" /> - 高级筛选 + 高级筛选 同步数据 + + + + + + 查询 + + + + + + + + + + + + 导入Excel + - - 同步月份: + + 同步日期: + placeholder="选择同步日期"/> 地区: @@ -178,6 +216,37 @@ 提交 + + + + + + 将文件拖到此处,或点击选择文件 + + 只能上传特定格式的文件(可选),且不超过2MB + + + + + 取 消 + 确 定 上 传 + + { + 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 {