diff --git a/src/api/calibration/department/index.ts b/src/api/calibration/department/index.ts index e3badcb..c5416fa 100644 --- a/src/api/calibration/department/index.ts +++ b/src/api/calibration/department/index.ts @@ -1,6 +1,10 @@ import request from "@/utils/request"; const AUTH_BASE_URL = "/api2"; +/* + * 部门管理 + * */ + // 公司部门列表 export const UserDepartment = (name: string) => { const formData = new FormData(); @@ -43,7 +47,7 @@ export const UserDeleteDepartment = (id: string) => { }); }; -// 部门分页 +// 部门分页查询 export const UserPersonlist = (data: any) => { const formData = new FormData(); formData.append("per_page", data.pageSize); diff --git a/src/api/calibration/invoiceApplication/index.ts b/src/api/calibration/invoiceApplication/index.ts new file mode 100644 index 0000000..1ae6c97 --- /dev/null +++ b/src/api/calibration/invoiceApplication/index.ts @@ -0,0 +1,43 @@ +import request from "@/utils/request"; +const AUTH_BASE_URL = "/api2"; + +/* + * 开票申请 + * */ + +// 开发票申请 +export const FinanceIssueInvoice = (data: any) => { + const formData = new FormData(); + formData.append("ContractNo", data.ContractNo); + formData.append("personincharge", data.personincharge); + formData.append("amount", data.amount); + formData.append("type", data.type); + formData.append("unit", data.unit); + formData.append("number", data.number); + formData.append("address_telephone", data.address_telephone); + formData.append("bank", data.bank); + formData.append("username", data.username); + return request({ + url: `${AUTH_BASE_URL}/finance/issue-invoice`, + method: "post", + data: formData, + headers: { + "Content-Type": "multipart/form-data", + }, + }); +}; + +// 开票分页查询 +export const FinanceIssueDetail = (data: any) => { + const formData = new FormData(); + formData.append("page", data.page); + formData.append("per_page", data.per_page); + return request({ + url: `${AUTH_BASE_URL}/finance/issue-Detail`, + method: "post", + data: formData, + headers: { + "Content-Type": "multipart/form-data", + }, + }); +}; diff --git a/src/api/calibration/login/index.ts b/src/api/calibration/login/index.ts index ffd5d54..cfc59ac 100644 --- a/src/api/calibration/login/index.ts +++ b/src/api/calibration/login/index.ts @@ -1,5 +1,9 @@ import request from "@/utils/request"; +/* + * 登录 + * */ + // const AUTH_BASE_URL = "http://8.137.99.82:8006"; const AUTH_BASE_URL = "/api2"; export const userLogin = (data: any) => { diff --git a/src/api/calibration/onboardingRegistration/index.ts b/src/api/calibration/onboardingRegistration/index.ts new file mode 100644 index 0000000..d70a44f --- /dev/null +++ b/src/api/calibration/onboardingRegistration/index.ts @@ -0,0 +1,25 @@ +import request from "@/utils/request"; +const AUTH_BASE_URL = "/api2"; + +/* + * 入职财务登记 + * */ + +// 入职财务 +export const FinanceUserRegister = (data: any) => { + const formData = new FormData(); + formData.append("username", data.username); + formData.append("card", data.card); + formData.append("Dateofjoining", data.Dateofjoining); + formData.append("position", data.position); + formData.append("salary", data.salary); + formData.append("personincharge", data.personincharge); + return request({ + url: `${AUTH_BASE_URL}/finance/user-register`, + method: "post", + data: formData, + headers: { + "Content-Type": "multipart/form-data", + }, + }); +}; diff --git a/src/api/calibration/personnelManagement/index.ts b/src/api/calibration/personnelManagement/index.ts index f045238..1b18368 100644 --- a/src/api/calibration/personnelManagement/index.ts +++ b/src/api/calibration/personnelManagement/index.ts @@ -2,7 +2,11 @@ import { isFile, isString } from "@/utils/auxiliaryFunction"; import request from "@/utils/request"; const AUTH_BASE_URL = "/api2"; -// 人员列表 +/* + * 人事管理 + * */ + +// 人员分页查询 export const UserPersonnelList = (data: any) => { const formData = new FormData(); formData.append("page", data.pageNum); diff --git a/src/router/index.ts b/src/router/index.ts index 46a5007..9560a18 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -72,7 +72,7 @@ export const constantRoutes: RouteRecordRaw[] = [ { path: "user", name: "PersonnelUser", - component: () => import("@/views/system/user/index.vue"), + component: () => import("@/views/calibration/personnelManagement/index.vue"), meta: { title: "人事管理", }, @@ -80,7 +80,7 @@ export const constantRoutes: RouteRecordRaw[] = [ { path: "role", name: "PersonnelRole", - component: () => import("@/views/system/role/index.vue"), + component: () => import("@/views/calibration/department/index.vue"), meta: { title: "角色管理", }, @@ -98,9 +98,10 @@ export const constantRoutes: RouteRecordRaw[] = [ }, children: [ { - path: "joining", - name: "Joining", - component: () => import("@/views/system/user/index.vue"), + path: "onboardingRegistration", + name: "OnboardingRegistration", + component: () => import("@/views/calibration/onboardingRegistration/index.vue"), + // component: () => import("@/views/system/user/index.vue"), meta: { title: "入职财务登记", }, @@ -108,7 +109,7 @@ export const constantRoutes: RouteRecordRaw[] = [ { path: "departure ", name: "Departure", - component: () => import("@/views/system/user/index.vue"), + component: () => import("@/views/calibration/departureFinancialRegistration/index.vue"), meta: { title: "离职财务登记", }, @@ -116,7 +117,7 @@ export const constantRoutes: RouteRecordRaw[] = [ { path: "invoiceApplication", name: "InvoiceApplication", - component: () => import("@/views/system/user/index.vue"), + component: () => import("@/views/calibration/invoiceApplication/index.vue"), meta: { title: "开票申请", }, @@ -124,7 +125,7 @@ export const constantRoutes: RouteRecordRaw[] = [ { path: "revenueRecognition", name: "RevenueRecognition", - component: () => import("@/views/system/user/index.vue"), + component: () => import("@/views/calibration/revenueRecognition/index.vue"), meta: { title: "收入确认", }, @@ -132,7 +133,7 @@ export const constantRoutes: RouteRecordRaw[] = [ { path: "accountAdjustmentApplication", name: "AccountAdjustmentApplication", - component: () => import("@/views/system/user/index.vue"), + component: () => import("@/views/calibration/accountAdjustmentApplication/index.vue"), meta: { title: "调账申请", }, @@ -140,7 +141,7 @@ export const constantRoutes: RouteRecordRaw[] = [ { path: "paymentApplicationForm", name: "PaymentApplicationForm", - component: () => import("@/views/system/user/index.vue"), + component: () => import("@/views/calibration/paymentApplicationForm/index.vue"), meta: { title: "付款申请单", }, @@ -148,7 +149,7 @@ export const constantRoutes: RouteRecordRaw[] = [ { path: "reimbursement", name: "Reimbursement", - component: () => import("@/views/system/user/index.vue"), + component: () => import("@/views/calibration/reimbursement/index.vue"), meta: { title: "报销", }, @@ -156,7 +157,7 @@ export const constantRoutes: RouteRecordRaw[] = [ { path: "salaryBonusAdjustment", name: "SalaryBonusAdjustment", - component: () => import("@/views/system/user/index.vue"), + component: () => import("@/views/calibration/salaryBonusAdjustment/index.vue"), meta: { title: "工资/奖金变更", }, diff --git a/src/utils/auxiliaryFunction/index.ts b/src/utils/auxiliaryFunction/index.ts index b40ae71..213c2ef 100644 --- a/src/utils/auxiliaryFunction/index.ts +++ b/src/utils/auxiliaryFunction/index.ts @@ -33,68 +33,6 @@ export function throttle any>( }; } -// 处理后端返回的JSON字符串 正确格式化 -export function formatJsonString(jsonString: string) { - // 移除首尾空白字符 - jsonString = jsonString.trim(); - - // 首先检查是否为空字符串 - if (!jsonString) return '""'; - - try { - // 尝试直接解析(处理标准JSON) - return JSON.stringify(JSON.parse(jsonString), null, 2); - } catch (error) { - // 增强版处理策略,特别优化对单引号数组的处理 - try { - // 针对数组类型的特殊处理 - if (jsonString.startsWith("[") && jsonString.endsWith("]")) { - // 处理数组中的单引号元素 - const arrayFixed = jsonString - // 替换数组中所有单引号包裹的元素为双引号 - .replace(/'([^']*)'/g, '"$1"'); - - try { - return JSON.stringify(JSON.parse(arrayFixed), null, 2); - } catch (arrayError) { - // 如果仍失败,尝试更细致的处理 - const detailedFixed = jsonString - // 1. 先处理特殊情况:确保数组元素之间的逗号正确处理 - .replace(/',\s*'/g, '", "') - // 2. 处理数组首尾的单引号 - .replace(/^\['/, '["') - .replace(/'\]$/, '"]'); - - return JSON.stringify(JSON.parse(detailedFixed), null, 2); - } - } - - // 通用处理策略 - const fixedJson = jsonString - // 1. 处理对象键名的单引号 - .replace(/([{\[,\s])\s*'([^']+?)'\s*:/g, '$1"$2":') - // 2. 处理数组元素的单引号 - .replace(/(\[|,)\s*'([^']*?)'(?=\s*[\],])/g, '$1"$2"') - // 3. 处理对象值的单引号 - .replace(/:\s*'([^']*?)'\s*([}\],]|$)/g, ': "$1"$2'); - - return JSON.stringify(JSON.parse(fixedJson), null, 2); - } catch (secondError) { - // 最后的尝试:使用更简单直接的方法 - try { - // 最基础的处理:将所有单引号替换为双引号 - // 这对于简单的单引号格式JSON很有效 - const basicFix = jsonString.replace(/'/g, '"'); - return JSON.stringify(JSON.parse(basicFix), null, 2); - } catch (finalError) { - // 如果所有尝试都失败,返回原始字符串 - console.warn("无法解析的JSON字符串:", jsonString); - return jsonString; - } - } - } -} - /** * 将文件路径数组转换为对象数组 * @param filePaths 文件路径数组或单个文件路径字符串 diff --git a/src/views/calibration/accountAdjustmentApplication/components/DeptTree.vue b/src/views/calibration/accountAdjustmentApplication/components/DeptTree.vue new file mode 100644 index 0000000..caa9061 --- /dev/null +++ b/src/views/calibration/accountAdjustmentApplication/components/DeptTree.vue @@ -0,0 +1,83 @@ + + + + diff --git a/src/views/calibration/accountAdjustmentApplication/components/UserImport.vue b/src/views/calibration/accountAdjustmentApplication/components/UserImport.vue new file mode 100644 index 0000000..0f00f9e --- /dev/null +++ b/src/views/calibration/accountAdjustmentApplication/components/UserImport.vue @@ -0,0 +1,198 @@ + + + diff --git a/src/views/calibration/accountAdjustmentApplication/index.vue b/src/views/calibration/accountAdjustmentApplication/index.vue new file mode 100644 index 0000000..8586592 --- /dev/null +++ b/src/views/calibration/accountAdjustmentApplication/index.vue @@ -0,0 +1,994 @@ + + + + + + + diff --git a/src/views/calibration/department/index.vue b/src/views/calibration/department/index.vue new file mode 100644 index 0000000..013748d --- /dev/null +++ b/src/views/calibration/department/index.vue @@ -0,0 +1,444 @@ + + + diff --git a/src/views/calibration/departureFinancialRegistration/components/DeptTree.vue b/src/views/calibration/departureFinancialRegistration/components/DeptTree.vue new file mode 100644 index 0000000..caa9061 --- /dev/null +++ b/src/views/calibration/departureFinancialRegistration/components/DeptTree.vue @@ -0,0 +1,83 @@ + + + + diff --git a/src/views/calibration/departureFinancialRegistration/components/UserImport.vue b/src/views/calibration/departureFinancialRegistration/components/UserImport.vue new file mode 100644 index 0000000..0f00f9e --- /dev/null +++ b/src/views/calibration/departureFinancialRegistration/components/UserImport.vue @@ -0,0 +1,198 @@ + + + diff --git a/src/views/calibration/departureFinancialRegistration/index.vue b/src/views/calibration/departureFinancialRegistration/index.vue new file mode 100644 index 0000000..8586592 --- /dev/null +++ b/src/views/calibration/departureFinancialRegistration/index.vue @@ -0,0 +1,994 @@ + + + + + + + diff --git a/src/views/calibration/invoiceApplication/components/DeptTree.vue b/src/views/calibration/invoiceApplication/components/DeptTree.vue new file mode 100644 index 0000000..caa9061 --- /dev/null +++ b/src/views/calibration/invoiceApplication/components/DeptTree.vue @@ -0,0 +1,83 @@ + + + + diff --git a/src/views/calibration/invoiceApplication/components/UserImport.vue b/src/views/calibration/invoiceApplication/components/UserImport.vue new file mode 100644 index 0000000..0f00f9e --- /dev/null +++ b/src/views/calibration/invoiceApplication/components/UserImport.vue @@ -0,0 +1,198 @@ + + + diff --git a/src/views/calibration/invoiceApplication/index.vue b/src/views/calibration/invoiceApplication/index.vue new file mode 100644 index 0000000..8586592 --- /dev/null +++ b/src/views/calibration/invoiceApplication/index.vue @@ -0,0 +1,994 @@ + + + + + + + diff --git a/src/views/calibration/onboardingRegistration/components/DeptTree.vue b/src/views/calibration/onboardingRegistration/components/DeptTree.vue new file mode 100644 index 0000000..caa9061 --- /dev/null +++ b/src/views/calibration/onboardingRegistration/components/DeptTree.vue @@ -0,0 +1,83 @@ + + + + diff --git a/src/views/calibration/onboardingRegistration/components/UserImport.vue b/src/views/calibration/onboardingRegistration/components/UserImport.vue new file mode 100644 index 0000000..0f00f9e --- /dev/null +++ b/src/views/calibration/onboardingRegistration/components/UserImport.vue @@ -0,0 +1,198 @@ + + + diff --git a/src/views/calibration/onboardingRegistration/index.vue b/src/views/calibration/onboardingRegistration/index.vue new file mode 100644 index 0000000..8586592 --- /dev/null +++ b/src/views/calibration/onboardingRegistration/index.vue @@ -0,0 +1,994 @@ + + + + + + + diff --git a/src/views/calibration/paymentApplicationForm/components/DeptTree.vue b/src/views/calibration/paymentApplicationForm/components/DeptTree.vue new file mode 100644 index 0000000..caa9061 --- /dev/null +++ b/src/views/calibration/paymentApplicationForm/components/DeptTree.vue @@ -0,0 +1,83 @@ + + + + diff --git a/src/views/calibration/paymentApplicationForm/components/UserImport.vue b/src/views/calibration/paymentApplicationForm/components/UserImport.vue new file mode 100644 index 0000000..0f00f9e --- /dev/null +++ b/src/views/calibration/paymentApplicationForm/components/UserImport.vue @@ -0,0 +1,198 @@ + + + diff --git a/src/views/calibration/paymentApplicationForm/index.vue b/src/views/calibration/paymentApplicationForm/index.vue new file mode 100644 index 0000000..8586592 --- /dev/null +++ b/src/views/calibration/paymentApplicationForm/index.vue @@ -0,0 +1,994 @@ + + + + + + + diff --git a/src/views/calibration/personnelManagement/components/DeptTree.vue b/src/views/calibration/personnelManagement/components/DeptTree.vue new file mode 100644 index 0000000..caa9061 --- /dev/null +++ b/src/views/calibration/personnelManagement/components/DeptTree.vue @@ -0,0 +1,83 @@ + + + + diff --git a/src/views/calibration/personnelManagement/components/UserImport.vue b/src/views/calibration/personnelManagement/components/UserImport.vue new file mode 100644 index 0000000..0f00f9e --- /dev/null +++ b/src/views/calibration/personnelManagement/components/UserImport.vue @@ -0,0 +1,198 @@ + + + diff --git a/src/views/calibration/personnelManagement/index.vue b/src/views/calibration/personnelManagement/index.vue new file mode 100644 index 0000000..00fa666 --- /dev/null +++ b/src/views/calibration/personnelManagement/index.vue @@ -0,0 +1,1024 @@ + + + + + + + diff --git a/src/views/calibration/reimbursement/components/DeptTree.vue b/src/views/calibration/reimbursement/components/DeptTree.vue new file mode 100644 index 0000000..caa9061 --- /dev/null +++ b/src/views/calibration/reimbursement/components/DeptTree.vue @@ -0,0 +1,83 @@ + + + + diff --git a/src/views/calibration/reimbursement/components/UserImport.vue b/src/views/calibration/reimbursement/components/UserImport.vue new file mode 100644 index 0000000..0f00f9e --- /dev/null +++ b/src/views/calibration/reimbursement/components/UserImport.vue @@ -0,0 +1,198 @@ + + + diff --git a/src/views/calibration/reimbursement/index.vue b/src/views/calibration/reimbursement/index.vue new file mode 100644 index 0000000..8586592 --- /dev/null +++ b/src/views/calibration/reimbursement/index.vue @@ -0,0 +1,994 @@ + + + + + + + diff --git a/src/views/calibration/revenueRecognition/components/DeptTree.vue b/src/views/calibration/revenueRecognition/components/DeptTree.vue new file mode 100644 index 0000000..caa9061 --- /dev/null +++ b/src/views/calibration/revenueRecognition/components/DeptTree.vue @@ -0,0 +1,83 @@ + + + + diff --git a/src/views/calibration/revenueRecognition/components/UserImport.vue b/src/views/calibration/revenueRecognition/components/UserImport.vue new file mode 100644 index 0000000..0f00f9e --- /dev/null +++ b/src/views/calibration/revenueRecognition/components/UserImport.vue @@ -0,0 +1,198 @@ + + + diff --git a/src/views/calibration/revenueRecognition/index.vue b/src/views/calibration/revenueRecognition/index.vue new file mode 100644 index 0000000..8586592 --- /dev/null +++ b/src/views/calibration/revenueRecognition/index.vue @@ -0,0 +1,994 @@ + + + + + + + diff --git a/src/views/calibration/salaryBonusAdjustment/components/DeptTree.vue b/src/views/calibration/salaryBonusAdjustment/components/DeptTree.vue new file mode 100644 index 0000000..caa9061 --- /dev/null +++ b/src/views/calibration/salaryBonusAdjustment/components/DeptTree.vue @@ -0,0 +1,83 @@ + + + + diff --git a/src/views/calibration/salaryBonusAdjustment/components/UserImport.vue b/src/views/calibration/salaryBonusAdjustment/components/UserImport.vue new file mode 100644 index 0000000..0f00f9e --- /dev/null +++ b/src/views/calibration/salaryBonusAdjustment/components/UserImport.vue @@ -0,0 +1,198 @@ + + + diff --git a/src/views/calibration/salaryBonusAdjustment/index.vue b/src/views/calibration/salaryBonusAdjustment/index.vue new file mode 100644 index 0000000..8586592 --- /dev/null +++ b/src/views/calibration/salaryBonusAdjustment/index.vue @@ -0,0 +1,994 @@ + + + + + + +