From 4bcc94dbcbe08275c740acc887eed46701debb8d Mon Sep 17 00:00:00 2001 From: LiJianZhao Date: Tue, 27 May 2025 16:04:19 +0800 Subject: [PATCH] dev --- src/components/social/inventoryUp/List_3501.vue | 5 +++-- src/components/social/inventoryUp/List_3502.vue | 5 +++-- src/components/social/inventoryUp/List_3503.vue | 5 +++-- src/components/social/inventoryUp/List_3505.vue | 5 +++-- .../reconciliation/ArtificialReconciliation.vue | 3 ++- .../social/reconciliation/ReversalEdit.vue | 3 ++- src/views/social/accountRecords.vue | 5 +++-- src/views/social/directory.vue | 13 +++++++------ src/views/social/inventoryUp.vue | 7 ++++--- src/views/social/reconciliationRecord.vue | 3 ++- src/views/social/update.vue | 7 ++++--- 11 files changed, 36 insertions(+), 25 deletions(-) diff --git a/src/components/social/inventoryUp/List_3501.vue b/src/components/social/inventoryUp/List_3501.vue index c8de44c..62d632f 100644 --- a/src/components/social/inventoryUp/List_3501.vue +++ b/src/components/social/inventoryUp/List_3501.vue @@ -4,6 +4,7 @@ import {ElInput, ElTable, ElTableColumn, ElPagination} from 'element-plus' import {post} from "@/utils/request.ts"; import {Search} from "@element-plus/icons-vue"; import {formatDate} from "@/utils/dateUtils"; +import {API} from "@/assets/config/API.ts"; interface TableItem { name: string; @@ -44,7 +45,7 @@ let init = () => { pageSize: pageSize.value, code: code.value } - post("social/upload/get3501List", {query: query}).then((res: any) => { + post(API.Social.Upload.Get3501List, {query: query}).then((res: any) => { tableData.value = res.list total.value = res.total_count }) @@ -55,7 +56,7 @@ let changePage = (value: number) => { pageNum: value, pageSize: pageSize.value, } - post("social/upload/get3501List", {query: query}).then((res: any) => { + post(API.Social.Upload.Get3501List, {query: query}).then((res: any) => { tableData.value = res.list total.value = res.total_count }) diff --git a/src/components/social/inventoryUp/List_3502.vue b/src/components/social/inventoryUp/List_3502.vue index 2955564..82d0e01 100644 --- a/src/components/social/inventoryUp/List_3502.vue +++ b/src/components/social/inventoryUp/List_3502.vue @@ -118,6 +118,7 @@ import {ref, computed, onMounted} from 'vue' import {ElInput, ElTable, ElTableColumn, ElPagination} from 'element-plus' import {post} from "@/utils/request.ts"; import {Minus, Plus, Search} from "@element-plus/icons-vue"; +import {API} from "@/assets/config/API.ts"; // 模拟数据 const tableData = ref([]) @@ -191,7 +192,7 @@ let init = () => { createTimeBefore: value1.value ? formatDate(value1.value[0]) : null, createTimeAfter: value1.value ? formatDate(value1.value[1]) : null, } - post("social/upload/get3502List", {query: query}).then((res: any) => { + post(API.Social.Upload.Get3502List, {query: query}).then((res: any) => { tableData.value = res.list total.value = res.total_count }) @@ -203,7 +204,7 @@ let changePage = (value: number) => { pageNum: value, pageSize: pageSize.value, } - post("social/upload/get3502List", {query: query}).then((res: any) => { + post(API.Social.Upload.Get3502List, {query: query}).then((res: any) => { tableData.value = res.list total.value = res.total_count }) diff --git a/src/components/social/inventoryUp/List_3503.vue b/src/components/social/inventoryUp/List_3503.vue index 5bef593..5ea14c3 100644 --- a/src/components/social/inventoryUp/List_3503.vue +++ b/src/components/social/inventoryUp/List_3503.vue @@ -82,6 +82,7 @@ import {ElInput, ElTable, ElTableColumn, ElPagination} from 'element-plus' import {post} from "@/utils/request.ts"; import {Minus, Plus} from "@element-plus/icons-vue"; import {formatDate} from "@/utils/dateUtils.ts"; +import {API} from "@/assets/config/API.ts"; // 模拟数据 const tableData = ref([]) @@ -126,7 +127,7 @@ let init = () => { socialType: searchInfo.value.socialType || null, uploadStatus: searchStatus.value.uploadStatus || null, } - post("social/upload/get3503List", {query: query}).then((res: any) => { + post(API.Social.Upload.Get3503List, {query: query}).then((res: any) => { tableData.value = res.list total.value = res.total_count }) @@ -137,7 +138,7 @@ let changePage = (value: number) => { pageNum: value, pageSize: pageSize.value, } - post("social/upload/get3503List", {query: query}).then((res: any) => { + post(API.Social.Upload.Get3503List, {query: query}).then((res: any) => { tableData.value = res.list total.value = res.total_count }) diff --git a/src/components/social/inventoryUp/List_3505.vue b/src/components/social/inventoryUp/List_3505.vue index d926696..ada4a0c 100644 --- a/src/components/social/inventoryUp/List_3505.vue +++ b/src/components/social/inventoryUp/List_3505.vue @@ -4,6 +4,7 @@ import {ElInput, ElTable, ElTableColumn, ElPagination} from 'element-plus' import {post} from "@/utils/request.ts"; import {Search} from "@element-plus/icons-vue"; import {formatDate} from "@/utils/dateUtils.ts"; +import {API} from "@/assets/config/API.ts"; // 模拟数据 const tableData = ref([]) @@ -22,7 +23,7 @@ let init = () => { pageSize: pageSize.value, code: code.value } - post("social/upload/get3505List", {query: query}).then((res: any) => { + post(API.Social.Upload.Get3505List, {query: query}).then((res: any) => { tableData.value = res.list total.value = res.total_count }) @@ -34,7 +35,7 @@ let changePage = (value: number) => { pageSize: pageSize.value, code: code.value } - post("social/upload/get3505List", {query: query}).then((res: any) => { + post(API.Social.Upload.Get3505List, {query: query}).then((res: any) => { tableData.value = res.list total.value = res.total_count }) diff --git a/src/components/social/reconciliation/ArtificialReconciliation.vue b/src/components/social/reconciliation/ArtificialReconciliation.vue index 23ee966..dbdc518 100644 --- a/src/components/social/reconciliation/ArtificialReconciliation.vue +++ b/src/components/social/reconciliation/ArtificialReconciliation.vue @@ -74,6 +74,7 @@ import {ElMessage} from "element-plus"; import {formatDateArray, getEndOfDay} from "@/utils/dateUtils.ts"; import clrType from "@/assets/config/directory/clrType.json" import insutypes from "@/assets/config/directory/insutypes.json" +import {API} from "@/assets/config/API.ts"; interface ClrType { [key: string]: string; @@ -123,7 +124,7 @@ const submitForm = () => { const accountRecordDo = () => { let data = {...formData.value}; - post("social/reconciliation/totalDo", {data: data}).then((res: any) => { + post(API.Social.Reconciliation.DoTotal, {data: data}).then((res: any) => { let msg = res.stmtinfo.stmt_rslt_dscr; if (res.stmtinfo.stmt_rslt == 0) { msg = "对平" diff --git a/src/components/social/reconciliation/ReversalEdit.vue b/src/components/social/reconciliation/ReversalEdit.vue index 1ae91e0..14b3fc9 100644 --- a/src/components/social/reconciliation/ReversalEdit.vue +++ b/src/components/social/reconciliation/ReversalEdit.vue @@ -26,6 +26,7 @@ import CloseBtn from "@/components/CloseBtn.vue"; import {post} from "@/utils/request.ts"; import {ElMessage, ElMessageBox} from "element-plus"; + import {API} from "@/assets/config/API.ts"; const show = ref(false) const close = ()=>{ @@ -76,7 +77,7 @@ ).then(() => { // 如果验证通过,发送请求 // alert("提交冲正,代码注释了,防止在正式库冲正") - post("social/reconciliation/reversal", {data: formData.value}).then((res: any) => { + post(API.Social.Reconciliation.Reversal, {data: formData.value}).then((res: any) => { ElMessage({ message: "冲正成功", type: 'success', diff --git a/src/views/social/accountRecords.vue b/src/views/social/accountRecords.vue index 85181fd..147aa64 100644 --- a/src/views/social/accountRecords.vue +++ b/src/views/social/accountRecords.vue @@ -47,6 +47,7 @@ import ArtificialReconciliation from "@/components/social/reconciliation/Artific import {getKey} from "@/utils/discrotyUtil.ts"; import clrType from "@/assets/config/directory/clrType.json" import insutypes from "@/assets/config/directory/insutypes.json" +import {API} from "@/assets/config/API.ts"; const selectDate = ref(); const changeDate = (dates: Date[]) => { @@ -68,7 +69,7 @@ const accountRecordResult: TypeMapping = { }; const list = ref(); const getList = () => { - post("social/reconciliation/getList", {beginTime: selectDate.value[0], endTime: selectDate.value[1]}).then( + post(API.Social.Reconciliation.List, {beginTime: selectDate.value[0], endTime: selectDate.value[1]}).then( res => { list.value = res; } @@ -79,7 +80,7 @@ const detailsDo = (row: any) => { let data = {...row}; data.beginTime = selectDate.value[0]; data.endTime = selectDate.value[1]; - post("social/reconciliation/detailDo", {data: data}).then((res: any) => { + post(API.Social.Reconciliation.DoDetail, {data: data}).then((res: any) => { openDetailList(res) }) } diff --git a/src/views/social/directory.vue b/src/views/social/directory.vue index 1c3ba12..171f819 100644 --- a/src/views/social/directory.vue +++ b/src/views/social/directory.vue @@ -165,6 +165,7 @@ import {ElNotification, type TabsPaneContext} from 'element-plus' import {post} from '@/utils/request.ts' import {Search} from '@element-plus/icons-vue' import Mask from "@/components/common/Mask.vue"; +import {API} from "@/assets/config/API.ts"; let isUpdate1312 = ref(false) let isUpdate1318 = ref(false) @@ -200,7 +201,7 @@ let update1312 = (current_page: number) => { if (current_page == 1) { tip.value = "开始更新第1页" } - post("social/directory_upinfo/get_page", { + post(API.Social.Directory_upinfo.Get_page, { updt_time: updt_time.value, page: current_page }, {catch_error: true}).then((res: any) => { @@ -249,7 +250,7 @@ function init() { } function set_tab() { - post("social/directory/column_list", {type: current_tab.value}) + post(API.Social.Directory.Column_list, {type: current_tab.value}) .then((res: any) => { column_list.value = res; get_data_list(); @@ -260,7 +261,7 @@ function get_data_list() { isDownLoading.value = true; let content_height = content.value.clientHeight; let rows = Math.floor(content_height / 40); - post("social/directory/get_doc_list", { + post(API.Social.Directory.Get_doc_list, { type: current_tab.value, page: current_page.value, size: 30, @@ -294,7 +295,7 @@ let UpdateDirectoryLoading = ref(false) const tip_message = ref("正在更新目录,请稍后...") const start_type = () => { UpdateDirectoryLoading.value = true - post("social/directory_version/get_current", {type: current_tab.value}, {catch_error: true}).then((res: any) => { + post(API.Social.Directory_version.Get_current, {type: current_tab.value}, {catch_error: true}).then((res: any) => { tip_message.value = "正在更新目录,上一个版本:" + res.currentVersionName + ",请不要强制关闭程序,否则数据不完整"; download(res.currentVersionName, current_tab.value); }).catch((err: any) => { @@ -307,7 +308,7 @@ const start_type = () => { }) } let download = (ver: any, type: any) => { - post("social/directory/download", {ver: ver, type: type}).then((res: any) => { + post(API.Social.Directory.Download, {ver: ver, type: type}).then((res: any) => { if (res == null || res == "") { UpdateDirectoryLoading.value = false; ElNotification({ @@ -388,7 +389,7 @@ const syncCache = () => { if (syncCachePage.value == 1) { tip_message.value = "开始同步第1页"; } - post("social/directory/syncToMongo", {page: syncCachePage.value}).then((res: any) => { + post(API.Social.Directory.SyncToMongo, {page: syncCachePage.value}).then((res: any) => { if (res.total_page) { syncCacheTotalPage.value = res.total_page } diff --git a/src/views/social/inventoryUp.vue b/src/views/social/inventoryUp.vue index 13d325d..c420ea5 100644 --- a/src/views/social/inventoryUp.vue +++ b/src/views/social/inventoryUp.vue @@ -46,6 +46,7 @@ import List_3503 from "@/components/social/inventoryUp/List_3503.vue"; import List_3505 from "@/components/social/inventoryUp/List_3505.vue"; import {post} from "@/utils/request.ts"; import Mask from "@/components/Mask.vue"; +import {API} from "@/assets/config/API.ts"; let current_tab = ref(3501); const tabs = ref([ @@ -64,7 +65,7 @@ onMounted(() => { }); function init() { - post("social/upload/getNotDoNumber",).then((res: any) => { + post(API.Social.Upload.GetNotDoNumber).then((res: any) => { tabs.value.forEach((tab: any) => { tab.notDoNumber = res['number' + tab.name] }) @@ -78,7 +79,7 @@ let totalNumber = 0; let startUpload = () => { loading.value = true uploadMsg.value = "正在初始化上传"; - post("social/upload/getNotDoNumber", {catch_error: true}).then((res: any) => { + post(API.Social.Upload.GetNotDoNumber, {catch_error: true}).then((res: any) => { totalNumber = res.totalNumber; uploadMsg.value = "正在初始化上传,总条数" + totalNumber; upload_data() @@ -89,7 +90,7 @@ let startUpload = () => { } let upload_data = () => { - post("social/upload/quickUpload", {}, {catch_error: true}).then((res: any) => { + post(API.Social.Upload.QuickUpload, {}, {catch_error: true}).then((res: any) => { if (res.totalNumber > 0) { upload_data() uploadMsg.value = "正在上传,进度:" + (totalNumber - res.totalNumber) + "/" + totalNumber; diff --git a/src/views/social/reconciliationRecord.vue b/src/views/social/reconciliationRecord.vue index 9b50050..03e1ef1 100644 --- a/src/views/social/reconciliationRecord.vue +++ b/src/views/social/reconciliationRecord.vue @@ -114,6 +114,7 @@ import clrType from "@/assets/config/directory/clrType.json" import insutypes from "@/assets/config/directory/insutypes.json" import {getKey} from "@/utils/discrotyUtil.ts"; import {formatDate} from "@/utils/dateUtils.ts"; +import {API} from "@/assets/config/API.ts"; const pageSize = ref(20); const pageNum = ref(1); @@ -163,7 +164,7 @@ const getList = () => { pageSize: pageSize.value, ...searchModel.value } - post("social/reconciliation/pageHistory", {query: query}).then( + post(API.Social.Reconciliation.HistoryList, {query: query}).then( (res: any) => { list.value = res.list; total.value = res.total_count; diff --git a/src/views/social/update.vue b/src/views/social/update.vue index 897eee2..958e76f 100644 --- a/src/views/social/update.vue +++ b/src/views/social/update.vue @@ -54,6 +54,7 @@ import {ref, reactive, onMounted} from 'vue'; import {ElNotification, type TabsPaneContext} from 'element-plus' import {post} from '@/utils/request.ts' import { Loading, SuccessFilled } from '@element-plus/icons-vue'; +import {API} from "@/assets/config/API.ts"; const format = (percentage: number) => ('正在更新') let updt_time = ref(getDate30DaysAgo()) let current_page = ref(1); @@ -143,7 +144,7 @@ let start_updatetime = () => { } let update_time = () => { - post("social/directory_upinfo/get_page", { + post(API.Social.Directory_upinfo.Get_page, { updt_time: updt_time.value, page: current_up_page.value }, {catch_error: true}).then((res: any) => { @@ -186,7 +187,7 @@ let start_download = (type: number) => { } canDownload.value = false; tip_message.value = "正在获取版本信息" + ",请不要强制关闭程序,否则数据不完整"; - post("social/directory_version/get_current", {type: type}, {catch_error: true}).then((res: any) => { + post(API.Social.Directory_version.Get_current, {type: type}, {catch_error: true}).then((res: any) => { tip_message.value = "正在更新目录,上一个版本:" + res.currentVersionName + ",请不要强制关闭程序,否则数据不完整"; download(res.currentVersionName, type); }).catch((err: any) => { @@ -206,7 +207,7 @@ let stop_download = () => { function download(ver: String, type: any) { isDownLoading.value = true; - post("social/directory/download", {ver: ver, type: type}, {catch_error: true}) + post(API.Social.Directory.Download, {ver: ver, type: type}, {catch_error: true}) .then((res: any) => { isDownLoading.value = false; if (res == null) {