diff --git a/.editorconfig b/.editorconfig
index 3454886..be55119 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -4,7 +4,7 @@ root = true
[*]
charset = utf-8
indent_style = space
-indent_size = 2
+indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
diff --git a/src/App.vue b/src/App.vue
index 0252b48..05e62de 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -11,33 +11,33 @@
diff --git a/src/api/oa/customer/index.ts b/src/api/oa/customer/index.ts
index 734b3e0..a8c691c 100644
--- a/src/api/oa/customer/index.ts
+++ b/src/api/oa/customer/index.ts
@@ -75,6 +75,20 @@ export async function updateCustomer(data: Customer) {
return Promise.reject(new Error(res.data.message));
}
+/**
+ * 批量添加客户
+ */
+export async function addBatchCustomer(data: Customer[]) {
+ const res = await request.post>(
+ '/tower/tower-customer/batch',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
/**
* 批量修改客户
*/
diff --git a/src/api/system/user/model/index.ts b/src/api/system/user/model/index.ts
index 2fb4698..69d3c38 100644
--- a/src/api/system/user/model/index.ts
+++ b/src/api/system/user/model/index.ts
@@ -1,7 +1,7 @@
-import type { PageParam } from '@/api';
-import type { Role } from '../../role/model';
-import type { Menu } from '../../menu/model';
-import { Company } from '@/api/system/company/model';
+import type { PageParam } from "@/api";
+import type { Role } from "../../role/model";
+import type { Menu } from "../../menu/model";
+import { Company } from "@/api/system/company/model";
/**
* 用户
@@ -37,6 +37,8 @@ export interface User {
introduction?: string;
// 机构id
organizationId?: number;
+ // 用户等级
+ userLevel?: number;
// 状态, 0正常, 1冻结
status?: number;
// 性别名称
@@ -98,3 +100,5 @@ export interface UserParam extends PageParam {
roleId?: string;
isStaff?: boolean;
}
+
+export const USER_LEVEL_LIST = ["无权限", "场地主管", "资料员", "经营人员", "生产主管", "审核人", "资产员", "车辆调度员", "维保人员", "财务"];
diff --git a/src/api/tower/accessory/model/index.ts b/src/api/tower/accessory/model/index.ts
index 85e228b..367d63e 100644
--- a/src/api/tower/accessory/model/index.ts
+++ b/src/api/tower/accessory/model/index.ts
@@ -1,40 +1,43 @@
-import type { PageParam } from '@/api';
+import type { PageParam } from "@/api";
+import { Dayjs } from "dayjs";
export interface Accessory {
- accessoryId?: undefined;
- accessoryName?: string;
- accessoryNo?: string;
- accessoryCategory?: object;
- accessoryModel?: string;
- accessoryModelMultiple?: string[];
- accessorySpecs?: string;
- accessoryPrice?: number;
- accessoryUnit?: string;
- accessoryStock?: string;
- companyNo?: string;
- companyName?: string;
- manufactor?: string;
- manufactorNo?: string;
- accessoryWeight?: string;
- lifeYear?: number;
- factoryDate?: string;
- scrapDate?: string;
- status?: number;
- comments?: string;
- sortNumber?: number;
- userId?: number;
- deleted?: number;
- tenantId?: number;
- createTime?: string;
- updateTime?: string;
+ accessoryId?: undefined;
+ accessoryName?: string;
+ accessoryNo?: string;
+ accessoryCategory?: object;
+ accessoryModel?: string;
+ accessoryModelMultiple?: string[];
+ accessorySpecs?: string;
+ accessoryPrice?: number;
+ accessoryNum?: number;
+ accessoryUnit?: string;
+ accessoryStock?: string;
+ companyNo?: string;
+ companyName?: string;
+ manufactor?: string;
+ manufactorNo?: string;
+ accessoryWeight?: string;
+ lifeYear?: number;
+ factoryDate?: string;
+ scrapDate?: string;
+ status?: number;
+ comments?: string;
+ sortNumber?: number;
+ userId?: number;
+ deleted?: number;
+ tenantId?: number;
+ createTime?: string;
+ updateTime?: string;
+ buyDate?: string | Dayjs;
}
/**
* 搜索条件
*/
export interface AccessoryParam extends PageParam {
- accessoryId?: number;
- accessoryName?: string;
- status?: number;
- keywords?: string;
+ accessoryId?: number;
+ accessoryName?: string;
+ status?: number;
+ keywords?: string;
}
diff --git a/src/api/tower/contract/model/index.ts b/src/api/tower/contract/model/index.ts
index 42f729f..50b2144 100644
--- a/src/api/tower/contract/model/index.ts
+++ b/src/api/tower/contract/model/index.ts
@@ -17,11 +17,11 @@ export interface Contract {
// 合同编号
contactNumber?: string;
// 签订日期
- signDate?: string;
+ signDate?: any;
// 开始日期
- startDate?: string;
+ startDate?: any;
// 截止日期
- endDate?: string;
+ endDate?: any;
// 合同金额
contractAmount?: number;
// 合同约定金额
@@ -31,13 +31,20 @@ export interface Contract {
// 是否自动结算
autoSettle?: number;
// 结算方式
- settleMethod?: number;
+ settleMethod?: any;
// 跨月结算日期
extendMonthDate?: number;
userId?: any;
projectName?: any;
customerName?: any;
companyName?: any;
+ totalInvoicingAmount?: any;
+ totalIncomeAmount?: any;
+ totalReceivableAmount?: any;
+ totalSettleAmount?: any;
+ payRate?: any;
+ remark?: string;
+ fileList?: string;
}
@@ -46,6 +53,7 @@ export interface Contract {
*/
export interface ContractParam extends PageParam {
contactNumber?: string;
+ projectName?: string;
createTimeStart?: string;
createTimeEnd?: string;
betweenTime?: any;
diff --git a/src/api/tower/contractEquipment/model/index.ts b/src/api/tower/contractEquipment/model/index.ts
index e2af015..3cc7bff 100644
--- a/src/api/tower/contractEquipment/model/index.ts
+++ b/src/api/tower/contractEquipment/model/index.ts
@@ -8,9 +8,15 @@ export interface ContractEquipment {
// 合同id
contractId: any;
// 设备名
+ equipmentId: any;
equipmentName: string;
+ name?: string;
+ model?: string;
// 规格
- equipmentModel: string;
+ equipmentModel?: string;
+ factoryNo?: string;
+ equipmentNo?: string;
+ filingNo?: string;
// 数量
num: any;
// 租期
@@ -35,5 +41,5 @@ export interface ContractEquipment {
* 合同搜索条件
*/
export interface ContractEquipmentParam extends PageParam {
- contactId?: string;
+ contractId?: string;
}
diff --git a/src/api/tower/contractFile/model/index.ts b/src/api/tower/contractFile/model/index.ts
index 24d2a7d..33b7d0e 100644
--- a/src/api/tower/contractFile/model/index.ts
+++ b/src/api/tower/contractFile/model/index.ts
@@ -20,5 +20,5 @@ export interface ContractFile {
* 合同搜索条件
*/
export interface ContractFileParam extends PageParam {
- contactId?: string;
+ contractId?: string;
}
diff --git a/src/api/tower/contractSettle/equipment/model/index.ts b/src/api/tower/contractSettle/equipment/model/index.ts
index 444fd42..bfb875f 100644
--- a/src/api/tower/contractSettle/equipment/model/index.ts
+++ b/src/api/tower/contractSettle/equipment/model/index.ts
@@ -5,6 +5,7 @@ import type { PageParam } from '@/api';
*/
export interface ContractSettleEquipment {
contractSettleId?: any;
+ equipmentId: any;
// 合同id
contractId: any;
// 设备名
@@ -13,6 +14,8 @@ export interface ContractSettleEquipment {
equipmentModel: string;
// 进场编号
factoryNo: any;
+ // 备案号
+ filingNo: any;
// 自编号
equipmentNo: any;
// 租期
@@ -25,10 +28,15 @@ export interface ContractSettleEquipment {
workerAmount: any;
// 其他费用
otherAmount: any;
+ // 其他费用计算模式
+ otherAmountCalMode: any;
+ // 预埋费
+ preBuryAmount: any;
// 备注
remark?: any;
userId?: any;
+
}
/**
diff --git a/src/api/tower/equipment/index.ts b/src/api/tower/equipment/index.ts
index 094435d..3d2a343 100644
--- a/src/api/tower/equipment/index.ts
+++ b/src/api/tower/equipment/index.ts
@@ -4,6 +4,19 @@ import type {
TowerEquipment,
TowerEquipmentParam
} from '@/api/tower/equipment/model';
+/**
+ * 设备数据
+ */
+export async function towerEquipmentData() {
+ const res = await request.get(
+ '/tower/tower-equipment/data'
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
/**
* 分页查询设备
*/
@@ -134,3 +147,16 @@ export async function removeBatchTowerEquipment(data: (number | undefined)[]) {
}
return Promise.reject(new Error(res.data.message));
}
+
+export async function towerEquipmentQr(params: TowerEquipmentParam) {
+ const res = await request.get>(
+ '/tower/tower-equipment/qr',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/src/api/tower/equipment/model/index.ts b/src/api/tower/equipment/model/index.ts
index ab2d7bb..1966e94 100644
--- a/src/api/tower/equipment/model/index.ts
+++ b/src/api/tower/equipment/model/index.ts
@@ -1,55 +1,61 @@
-import type { PageParam } from '@/api';
+import type { PageParam } from "@/api";
+import { Project } from "@/api/tower/project/model";
export interface TowerEquipment {
- equipmentId?: number;
- name?: string;
- model?: string;
- equipmentNo?: string;
- factoryNo?: string;
- factoryDate?: string;
- manufactor?: string;
- lifeYear?: number;
- surplusYear?: number;
- scrapDate?: string;
- beianNo?: string;
- licenceNo?: string;
- company?: string;
- organization?: string;
- warehouse?: string;
- source?: string;
- filingNo?: string;
- machineNo?: string;
- maxLiftingHeight?: string;
- armLength?: string;
- isOutOrg?: boolean;
- buyDate?: string;
- currentLocation?: string;
- designHeight?: number;
- height?: number;
- ratedLoad?: string;
- files?: string;
- file1?: string;
- file2?: string;
- file3?: string;
- file4?: string;
- file5?: string;
- file6?: string;
- file7?: string;
- users?: string;
- status?: number;
- comments?: string;
- userId?: number;
- deleted?: number;
- tenantId?: number;
- createTime?: number;
- maxRatedLoad?: string;
+ equipmentId?: number;
+ name?: string;
+ model?: string;
+ equipmentNo?: string;
+ factoryNo?: string;
+ factoryDate?: string;
+ manufactor?: string;
+ lifeYear?: any;
+ surplusYear?: number;
+ scrapDate?: string;
+ beianNo?: string;
+ licenceNo?: string;
+ company?: string;
+ organization?: string;
+ warehouse?: string;
+ source?: string;
+ filingNo?: string;
+ machineNo?: string;
+ maxLiftingHeight?: string;
+ armLength?: string;
+ isOutOrg?: boolean;
+ buyDate?: string;
+ currentLocation?: string;
+ designHeight?: number;
+ height?: number;
+ ratedLoad?: string;
+ files?: string;
+ file1?: string;
+ file2?: string;
+ file3?: string;
+ file4?: string;
+ file5?: string;
+ file6?: string;
+ file7?: string;
+ users?: string;
+ status?: number;
+ comments?: string;
+ userId?: number;
+ deleted?: number;
+ tenantId?: number;
+ createTime?: number;
+ maxRatedLoad?: string;
+ securityStatus?: string;
+ projectName?: string;
+ competentDepartment?: string;
+ projectList?: Project[];
}
/**
* 搜索条件
*/
export interface TowerEquipmentParam extends PageParam {
- equipmentId?: number;
- name?: string;
- status?: number;
+ equipmentId?: number;
+ name?: string;
+ status?: number;
+ yearFilter?: number;
}
diff --git a/src/api/tower/fall/model/index.ts b/src/api/tower/fall/model/index.ts
index c18ba4d..077960e 100644
--- a/src/api/tower/fall/model/index.ts
+++ b/src/api/tower/fall/model/index.ts
@@ -9,6 +9,8 @@ export interface TowerFall {
factory?: string;
factoryDate?: string;
discardDate?: string;
+
+ checkDate?: string;
file1?: string;
file2?: string;
file3?: string;
diff --git a/src/api/tower/finalSettle/index.ts b/src/api/tower/finalSettle/index.ts
new file mode 100644
index 0000000..6a70b69
--- /dev/null
+++ b/src/api/tower/finalSettle/index.ts
@@ -0,0 +1,129 @@
+import request from '@/utils/request';
+import type {ApiResult, PageResult} from '@/api';
+import type {FinalSettle, FinalSettleParam} from './model';
+
+/**
+ * 分页查询结算
+ */
+export async function pageFinalSettle(params: FinalSettleParam) {
+ const res = await request.get>>(
+ '/tower/tower-contract-final-settle/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询合同列表
+ */
+export async function listFinalSettle(params?: FinalSettleParam) {
+ const res = await request.get>(
+ '/tower/tower-contract-final-settle',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询合同
+ */
+export async function getFinalSettle(id: number) {
+ const res = await request.get>(
+ '/tower/tower-contract-final-settle/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加合同
+ */
+export async function addFinalSettle(data: FinalSettle) {
+ const res = await request.post>(
+ '/tower/tower-contract-final-settle',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改合同
+ */
+export async function updateFinalSettle(data: FinalSettle) {
+ const res = await request.put>(
+ '/tower/tower-contract-final-settle',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量修改合同
+ */
+export async function updateBatchFinalSettle(data: FinalSettle[]) {
+ const res = await request.put>(
+ '/tower/tower-contract-final-settle/batch',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+export async function addBatchFinalSettle(data: FinalSettle[]) {
+ const res = await request.post>(
+ '/tower/tower-contract-final-settle/batch',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除合同
+ */
+export async function removeFinalSettle(id?: number) {
+ const res = await request.delete>(
+ '/tower/tower-contract-final-settle/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除合同
+ */
+export async function removeBatchFinalSettle(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ '/tower/tower-contract-final-settle/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/src/api/tower/finalSettle/model/index.ts b/src/api/tower/finalSettle/model/index.ts
new file mode 100644
index 0000000..2368f19
--- /dev/null
+++ b/src/api/tower/finalSettle/model/index.ts
@@ -0,0 +1,31 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 合同
+ */
+export interface FinalSettle {
+ contractFinalSettleId?: any;
+ contractId?: any;
+ settleCompanyId?: any;
+ fileList?: any;
+ signName?: any;
+ signDate?: any;
+ remark?: any;
+ userId?: any;
+ settleCompanyName?: any;
+ contractNumber?: any;
+ companyName?: any;
+ customerName?: any;
+ projectName?: any;
+ totalSettleAmount?: any;
+ totalInvoicingAmount?: any;
+ totalIncomeAmount?: any;
+}
+
+/**
+ * 合同搜索条件
+ */
+export interface FinalSettleParam extends PageParam {
+ projectName?: string;
+ contractNo?: string;
+}
diff --git a/src/api/tower/finalSettleLost/index.ts b/src/api/tower/finalSettleLost/index.ts
new file mode 100644
index 0000000..2f4dd77
--- /dev/null
+++ b/src/api/tower/finalSettleLost/index.ts
@@ -0,0 +1,129 @@
+import request from '@/utils/request';
+import type {ApiResult, PageResult} from '@/api';
+import type {FinalSettleLost, FinalSettleLostParam} from './model';
+
+/**
+ * 分页查询结算
+ */
+export async function pageFinalSettleLost(params: FinalSettleLostParam) {
+ const res = await request.get>>(
+ '/tower/tower-contract-final-settle-lost/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询合同列表
+ */
+export async function listFinalSettleLost(params?: FinalSettleLostParam) {
+ const res = await request.get>(
+ '/tower/tower-contract-final-settle-lost',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询合同
+ */
+export async function getFinalSettleLost(id: number) {
+ const res = await request.get>(
+ '/tower/tower-contract-final-settle-lost/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加合同
+ */
+export async function addFinalSettleLost(data: FinalSettleLost) {
+ const res = await request.post>(
+ '/tower/tower-contract-final-settle-lost',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改合同
+ */
+export async function updateFinalSettleLost(data: FinalSettleLost) {
+ const res = await request.put>(
+ '/tower/tower-contract-final-settle-lost',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量修改合同
+ */
+export async function updateBatchFinalSettleLost(data: FinalSettleLost[]) {
+ const res = await request.put>(
+ '/tower/tower-contract-final-settle-lost/batch',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+export async function addBatchFinalSettleLost(data: FinalSettleLost[]) {
+ const res = await request.post>(
+ '/tower/tower-contract-final-settle-lost/batch',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除合同
+ */
+export async function removeFinalSettleLost(id?: number) {
+ const res = await request.delete>(
+ '/tower/tower-contract-final-settle-lost/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除合同
+ */
+export async function removeBatchFinalSettleLost(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ '/tower/tower-contract-final-settle-lost/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/src/api/tower/finalSettleLost/model/index.ts b/src/api/tower/finalSettleLost/model/index.ts
new file mode 100644
index 0000000..b75c846
--- /dev/null
+++ b/src/api/tower/finalSettleLost/model/index.ts
@@ -0,0 +1,22 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 合同
+ */
+export interface FinalSettleLost {
+ finalSettleLostId?: any;
+ finalSettleId?: any;
+ itemId?: any;
+ itemName?: any;
+ amount?: any;
+ num?: any;
+ total?: any;
+ userId?: any;
+}
+
+/**
+ * 合同搜索条件
+ */
+export interface FinalSettleLostParam extends PageParam {
+ finalSettleId?: string;
+}
diff --git a/src/api/tower/income/index.ts b/src/api/tower/income/index.ts
new file mode 100644
index 0000000..ce2a5e0
--- /dev/null
+++ b/src/api/tower/income/index.ts
@@ -0,0 +1,129 @@
+import request from '@/utils/request';
+import type {ApiResult, PageResult} from '@/api';
+import type {Income, IncomeParam} from './model';
+
+/**
+ * 分页查询结算
+ */
+export async function pageIncome(params: IncomeParam) {
+ const res = await request.get>>(
+ '/tower/tower-income/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询合同列表
+ */
+export async function listIncome(params?: IncomeParam) {
+ const res = await request.get>(
+ '/tower/tower-income',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询合同
+ */
+export async function getIncome(id: number) {
+ const res = await request.get>(
+ '/tower/tower-income/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加合同
+ */
+export async function addIncome(data: Income) {
+ const res = await request.post>(
+ '/tower/tower-income',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改合同
+ */
+export async function updateIncome(data: Income) {
+ const res = await request.put>(
+ '/tower/tower-income',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量修改合同
+ */
+export async function updateBatchIncome(data: Income[]) {
+ const res = await request.put>(
+ '/tower/tower-income/batch',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+export async function addBatchIncome(data: Income[]) {
+ const res = await request.post>(
+ '/tower/tower-income/batch',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除合同
+ */
+export async function removeIncome(id?: number) {
+ const res = await request.delete>(
+ '/tower/tower-income/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除合同
+ */
+export async function removeBatchIncome(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ '/tower/tower-income/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/src/api/tower/income/model/index.ts b/src/api/tower/income/model/index.ts
new file mode 100644
index 0000000..e55a9e1
--- /dev/null
+++ b/src/api/tower/income/model/index.ts
@@ -0,0 +1,43 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 合同
+ */
+export interface Income {
+ incomeId?: any;
+ contractId?: any;
+ incomeNo?: any;
+ incomeDate?: any;
+ incomeCompanyId?: any;
+ payCompanyId?: any;
+ payCompanyName?: any;
+ amount?: any;
+ companyName?: any;
+ totalIncomeAmount?: any;
+ totalInvoicingAmount?: any;
+ incomeType?: any;
+ expectIncomeDate?: any;
+ expectIncomeAmount?: any;
+ incomeMethod?: any;
+ invoicingNo?: any;
+ fileList?: any;
+ remark?: any;
+ status?: any;
+ userId?: any;
+ signName?: any;
+ signDate?: any;
+ contractNumber?: any;
+ projectName?: any;
+ incomeCompanyName?: any;
+ customerName?: any;
+}
+
+/**
+ * 合同搜索条件
+ */
+export interface IncomeParam extends PageParam {
+ projectName?: string;
+ contractNo?: string;
+}
+
+export const INCOME_STATUS_LIST = ['已收款', '已作废']
diff --git a/src/api/tower/incomeEquipment/index.ts b/src/api/tower/incomeEquipment/index.ts
new file mode 100644
index 0000000..82c61e2
--- /dev/null
+++ b/src/api/tower/incomeEquipment/index.ts
@@ -0,0 +1,129 @@
+import request from '@/utils/request';
+import type {ApiResult, PageResult} from '@/api';
+import type {IncomeEquipment, IncomeEquipmentParam} from './model';
+
+/**
+ * 分页查询结算
+ */
+export async function pageIncomeEquipment(params: IncomeEquipmentParam) {
+ const res = await request.get>>(
+ '/tower/tower-income-equipment/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询合同列表
+ */
+export async function listIncomeEquipment(params?: IncomeEquipmentParam) {
+ const res = await request.get>(
+ '/tower/tower-income-equipment',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询合同
+ */
+export async function getIncomeEquipment(id: number) {
+ const res = await request.get>(
+ '/tower/tower-income-equipment/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加合同
+ */
+export async function addIncomeEquipment(data: IncomeEquipment) {
+ const res = await request.post>(
+ '/tower/tower-income-equipment',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改合同
+ */
+export async function updateIncomeEquipment(data: IncomeEquipment) {
+ const res = await request.put>(
+ '/tower/tower-income-equipment',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量修改合同
+ */
+export async function updateBatchIncomeEquipment(data: IncomeEquipment[]) {
+ const res = await request.put>(
+ '/tower/tower-income-equipment/batch',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+export async function addBatchIncomeEquipment(data: IncomeEquipment[]) {
+ const res = await request.post>(
+ '/tower/tower-income-equipment/batch',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除合同
+ */
+export async function removeIncomeEquipment(id?: number) {
+ const res = await request.delete>(
+ '/tower/tower-income-equipment/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除合同
+ */
+export async function removeBatchIncomeEquipment(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ '/tower/tower-income-equipment/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/src/api/tower/incomeEquipment/model/index.ts b/src/api/tower/incomeEquipment/model/index.ts
new file mode 100644
index 0000000..2af09c2
--- /dev/null
+++ b/src/api/tower/incomeEquipment/model/index.ts
@@ -0,0 +1,30 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 合同
+ */
+export interface IncomeEquipment {
+ incomeEquipmentId?: any;
+ incomeId?: any;
+ equipmentId?: any;
+ equipmentName?: any;
+ equipmentModel?: any;
+ // 进场编号
+ factoryNo?: any;
+ // 自编号
+ equipmentNo?: any;
+ filingNo?: string;
+ rentAmount?: string;
+ shareAmount?: any;
+ userId?: any;
+}
+
+/**
+ * 合同搜索条件
+ */
+export interface IncomeEquipmentParam extends PageParam {
+ projectName?: string;
+ contractNo?: string;
+ incomeId?: string;
+}
+
diff --git a/src/api/tower/invoicing/index.ts b/src/api/tower/invoicing/index.ts
new file mode 100644
index 0000000..c7edad7
--- /dev/null
+++ b/src/api/tower/invoicing/index.ts
@@ -0,0 +1,129 @@
+import request from '@/utils/request';
+import type {ApiResult, PageResult} from '@/api';
+import type {Invoicing, InvoicingParam} from './model';
+
+/**
+ * 分页查询结算
+ */
+export async function pageInvoicing(params: InvoicingParam) {
+ const res = await request.get>>(
+ '/tower/tower-invoicing/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询合同列表
+ */
+export async function listInvoicing(params?: InvoicingParam) {
+ const res = await request.get>(
+ '/tower/tower-invoicing',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询合同
+ */
+export async function getInvoicing(id: number) {
+ const res = await request.get>(
+ '/tower/tower-invoicing/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加合同
+ */
+export async function addInvoicing(data: Invoicing) {
+ const res = await request.post>(
+ '/tower/tower-invoicing',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改合同
+ */
+export async function updateInvoicing(data: Invoicing) {
+ const res = await request.put>(
+ '/tower/tower-invoicing',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量修改合同
+ */
+export async function updateBatchInvoicing(data: Invoicing[]) {
+ const res = await request.put>(
+ '/tower/tower-invoicing/batch',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+export async function addBatchInvoicing(data: Invoicing[]) {
+ const res = await request.post>(
+ '/tower/tower-invoicing/batch',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除合同
+ */
+export async function removeInvoicing(id?: number) {
+ const res = await request.delete>(
+ '/tower/tower-invoicing/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除合同
+ */
+export async function removeBatchInvoicing(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ '/tower/tower-invoicing/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/src/api/tower/invoicing/model/index.ts b/src/api/tower/invoicing/model/index.ts
new file mode 100644
index 0000000..dd80384
--- /dev/null
+++ b/src/api/tower/invoicing/model/index.ts
@@ -0,0 +1,35 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 合同
+ */
+export interface Invoicing {
+ invoicingId?: any;
+ contractId?: any;
+ invoicingDate?: any;
+ invoicingCompany?: any;
+ requestName?: any;
+ signName?: any;
+ invoicingAmount?: any;
+ invoicingNo?: any;
+ fileList?: any;
+ remark?: any;
+ status?: any;
+ userId?: any;
+ contractNumber?: any;
+ projectName?: any;
+ signDate?: any;
+ companyName?: any;
+ customerName?: any;
+ totalInvoicingAmount?: any;
+}
+
+/**
+ * 合同搜索条件
+ */
+export interface InvoicingParam extends PageParam {
+ projectName?: string;
+ contractNo?: string;
+}
+
+export const INVOICING_STATUS_LIST = ['已开票', '已作废']
diff --git a/src/api/tower/invoicingSettle/index.ts b/src/api/tower/invoicingSettle/index.ts
new file mode 100644
index 0000000..960db27
--- /dev/null
+++ b/src/api/tower/invoicingSettle/index.ts
@@ -0,0 +1,129 @@
+import request from '@/utils/request';
+import type {ApiResult, PageResult} from '@/api';
+import type {InvoicingSettle, InvoicingSettleParam} from './model';
+
+/**
+ * 分页查询结算
+ */
+export async function pageInvoicingSettle(params: InvoicingSettleParam) {
+ const res = await request.get>>(
+ '/tower/tower-invoicing-settle/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询合同列表
+ */
+export async function listInvoicingSettle(params?: InvoicingSettleParam) {
+ const res = await request.get>(
+ '/tower/tower-invoicing-settle',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询合同
+ */
+export async function getInvoicingSettle(id: number) {
+ const res = await request.get>(
+ '/tower/tower-invoicing-settle/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加合同
+ */
+export async function addInvoicingSettle(data: InvoicingSettle) {
+ const res = await request.post>(
+ '/tower/tower-invoicing-settle',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改合同
+ */
+export async function updateInvoicingSettle(data: InvoicingSettle) {
+ const res = await request.put>(
+ '/tower/tower-invoicing-settle',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量修改合同
+ */
+export async function updateBatchInvoicingSettle(data: InvoicingSettle[]) {
+ const res = await request.put>(
+ '/tower/tower-invoicing-settle/batch',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+export async function addBatchInvoicingSettle(data: InvoicingSettle[]) {
+ const res = await request.post>(
+ '/tower/tower-invoicing-settle/batch',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除合同
+ */
+export async function removeInvoicingSettle(id?: number) {
+ const res = await request.delete>(
+ '/tower/tower-InvoicingSettle/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除合同
+ */
+export async function removeBatchInvoicingSettle(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ '/tower/tower-invoicing-settle/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/src/api/tower/invoicingSettle/model/index.ts b/src/api/tower/invoicingSettle/model/index.ts
new file mode 100644
index 0000000..70c8e13
--- /dev/null
+++ b/src/api/tower/invoicingSettle/model/index.ts
@@ -0,0 +1,21 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 合同
+ */
+export interface InvoicingSettle {
+ invoicingSettleId?: any;
+ invoicingId?: any;
+ settleId?: any;
+ shareAmount?: any;
+ settleNumber?: any;
+ startDate?: any;
+ settleAmount?: any;
+}
+
+/**
+ * 合同搜索条件
+ */
+export interface InvoicingSettleParam extends PageParam {
+ invoicingId?: string;
+}
diff --git a/src/api/tower/lending/index.ts b/src/api/tower/lending/index.ts
new file mode 100644
index 0000000..947a199
--- /dev/null
+++ b/src/api/tower/lending/index.ts
@@ -0,0 +1,129 @@
+import request from '@/utils/request';
+import type {ApiResult, PageResult} from '@/api';
+import type {Lending, LendingParam} from './model';
+
+/**
+ * 分页查询结算
+ */
+export async function pageLending(params: LendingParam) {
+ const res = await request.get>>(
+ '/tower/tower-lending/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询合同列表
+ */
+export async function listLending(params?: LendingParam) {
+ const res = await request.get>(
+ '/tower/tower-lending',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询合同
+ */
+export async function getLending(id: number) {
+ const res = await request.get>(
+ '/tower/tower-lending/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加合同
+ */
+export async function addLending(data: Lending) {
+ const res = await request.post>(
+ '/tower/tower-lending',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改合同
+ */
+export async function updateLending(data: Lending) {
+ const res = await request.put>(
+ '/tower/tower-lending',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量修改合同
+ */
+export async function updateBatchLending(data: Lending[]) {
+ const res = await request.put>(
+ '/tower/tower-lending/batch',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+export async function addBatchLending(data: Lending[]) {
+ const res = await request.post>(
+ '/tower/tower-lending/batch',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除合同
+ */
+export async function removeLending(id?: number) {
+ const res = await request.delete>(
+ '/tower/tower-lending/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除合同
+ */
+export async function removeBatchLending(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ '/tower/tower-lending/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/src/api/tower/lending/model/index.ts b/src/api/tower/lending/model/index.ts
new file mode 100644
index 0000000..419cb0e
--- /dev/null
+++ b/src/api/tower/lending/model/index.ts
@@ -0,0 +1,28 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 合同
+ */
+export interface Lending {
+ lendingId?: any;
+ contractId?: any;
+ contactNumber?: any;
+ signDate?: any;
+ projectName?: any;
+ customerName?: any;
+ companyName?: any;
+ propertyCompany?: any;
+ settleDate?: any;
+ settleAmount?: any;
+ fileList?: any;
+ remark?: any;
+ userId?: any;
+}
+
+/**
+ * 合同搜索条件
+ */
+export interface LendingParam extends PageParam {
+ projectName?: string;
+ contractNo?: string;
+}
diff --git a/src/api/tower/lendingSettle/index.ts b/src/api/tower/lendingSettle/index.ts
new file mode 100644
index 0000000..b33030d
--- /dev/null
+++ b/src/api/tower/lendingSettle/index.ts
@@ -0,0 +1,129 @@
+import request from '@/utils/request';
+import type {ApiResult, PageResult} from '@/api';
+import type {LendingSettle, LendingSettleParam} from './model';
+
+/**
+ * 分页查询结算
+ */
+export async function pageLendingSettle(params: LendingSettleParam) {
+ const res = await request.get>>(
+ '/tower/tower-lending-settle/page',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询合同列表
+ */
+export async function listLendingSettle(params?: LendingSettleParam) {
+ const res = await request.get>(
+ '/tower/tower-lending-settle',
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询合同
+ */
+export async function getLendingSettle(id: number) {
+ const res = await request.get>(
+ '/tower/tower-lending-settle/' + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加合同
+ */
+export async function addLendingSettle(data: LendingSettle) {
+ const res = await request.post>(
+ '/tower/tower-lending-settle',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改合同
+ */
+export async function updateLendingSettle(data: LendingSettle) {
+ const res = await request.put>(
+ '/tower/tower-lending-settle',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量修改合同
+ */
+export async function updateBatchLending(data: LendingSettle[]) {
+ const res = await request.put>(
+ '/tower/tower-lending-settle/batch',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+export async function addBatchLendingSettle(data: LendingSettle[]) {
+ const res = await request.post>(
+ '/tower/tower-lending-settle/batch',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除合同
+ */
+export async function removeLendingSettle(id?: number) {
+ const res = await request.delete>(
+ '/tower/tower-lending-settle/' + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除合同
+ */
+export async function removeBatchLendingSettle(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ '/tower/tower-lending-settle/batch',
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/src/api/tower/lendingSettle/model/index.ts b/src/api/tower/lendingSettle/model/index.ts
new file mode 100644
index 0000000..9821ac2
--- /dev/null
+++ b/src/api/tower/lendingSettle/model/index.ts
@@ -0,0 +1,40 @@
+import type { PageParam } from '@/api';
+
+/**
+ * 合同
+ */
+export interface LendingSettle {
+ lendingSettleListId?: any;
+ lendingId?: any;
+ equipmentId?: any;
+ lendingPath?: any;
+ coopWay?: any;
+ startDate?: any;
+ stopDate?: any;
+ calDay?: any;
+ isFullMonth?: any;
+ daysInMonth?: any;
+ monthRentAmount?: any;
+ shouldPayRentAmount?: any;
+ dailyRentAmount?: any;
+ shouldSupplementAmount?: any;
+ shouldDeductionAmount?: any;
+ paidAmount?: any;
+ taxRate?: any;
+ taxAmount?: any;
+ totalAmountWithTax?: any;
+ remark?: any;
+ userId?: any;
+ equipmentName?: any;
+ equipmentModel?: any;
+ equipmentNo?: any;
+}
+
+/**
+ * 合同搜索条件
+ */
+export interface LendingSettleParam extends PageParam {
+ projectName?: string;
+ contractNo?: string;
+ lendingId?: string;
+}
diff --git a/src/api/tower/project/index.ts b/src/api/tower/project/index.ts
index 7954867..df73f77 100644
--- a/src/api/tower/project/index.ts
+++ b/src/api/tower/project/index.ts
@@ -1,6 +1,19 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Project, ProjectParam } from '@/api/tower/project/model';
+
+/**
+ * 项目数据
+ */
+export async function towerProjectData() {
+ const res = await request.get(
+ '/tower/tower-project/data'
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
/**
* 分页查询仓库
*/
@@ -43,6 +56,16 @@ export async function addProject(data: Project) {
}
return Promise.reject(new Error(res.data.message));
}
+export async function addBatchProject(data: Project[]) {
+ const res = await request.post>(
+ '/tower/tower-project/batch',
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
/**
* 修改仓库
diff --git a/src/api/tower/project/model/index.ts b/src/api/tower/project/model/index.ts
index fa5dcf4..08f6dbd 100644
--- a/src/api/tower/project/model/index.ts
+++ b/src/api/tower/project/model/index.ts
@@ -17,11 +17,16 @@ export interface Project {
projectId?: number;
projectName?: string;
projectImage?: string;
+ filingNo?: string;
files?: FileItem[];
companyName?: string;
+ companyId?: number;
customerName?: string;
+ customerId?: number;
projectRegion?: string;
+ placeList?: string;
projectAddress?: string;
+ projectCity?: string;
longitude?: string;
latitude?: string;
superviseNo?: string;
diff --git a/src/api/tower/project/order/model/index.ts b/src/api/tower/project/order/model/index.ts
index 7b51c75..c8b2b6c 100644
--- a/src/api/tower/project/order/model/index.ts
+++ b/src/api/tower/project/order/model/index.ts
@@ -6,9 +6,12 @@ import type { PageParam } from '@/api';
export interface ProjectOrder {
// 合同预定设备清单id
projectOrderId?: number;
+ equipmentId?: number;
equipmentName?: string;
equipmentModel?: string;
equipmentNum?: number;
+ filingNo?: string;
+ factoryNo?: string;
key?: string;
unit?: string;
startTime?: string;
diff --git a/src/api/tower/settle/model/index.ts b/src/api/tower/settle/model/index.ts
index 984f631..b11f0d8 100644
--- a/src/api/tower/settle/model/index.ts
+++ b/src/api/tower/settle/model/index.ts
@@ -1,4 +1,4 @@
-import type { PageParam } from '@/api';
+import type { PageParam } from "@/api";
/**
* 合同
@@ -9,12 +9,13 @@ export interface Settle {
status?: any;
contractId?: any;
startDate?: any;
- endDate?: string;
- settleMethod?: number;
+ endDate?: any;
+ settleMethod?: any;
extendMonthDate?: number;
totalAmount?: number;
userId?: any;
contactNumber?: any;
+ projectName?: any;
}
@@ -25,3 +26,5 @@ export interface SettleParam extends PageParam {
settleNo?: string;
contractId?: string;
}
+
+export const SETTLE_STATUS_LIST = ["未认证", "已认证", "已失效"];
diff --git a/src/api/tower/settleDetail/model/index.ts b/src/api/tower/settleDetail/model/index.ts
index c38e29a..e9e3220 100644
--- a/src/api/tower/settleDetail/model/index.ts
+++ b/src/api/tower/settleDetail/model/index.ts
@@ -22,6 +22,12 @@ export interface SettleDetail {
userId?: any;
days?: any;
dailyAmount?: any;
+ month?: any;
+ day?: any;
+ payRate?: any;
+ inDate?: any;
+ outDate?: any;
+ realAmount?: any;
}
/**
diff --git a/src/api/tower/worksheet/index.ts b/src/api/tower/worksheet/index.ts
new file mode 100644
index 0000000..fc87704
--- /dev/null
+++ b/src/api/tower/worksheet/index.ts
@@ -0,0 +1,143 @@
+import request from "@/utils/request";
+import type { ApiResult, PageResult } from "@/api";
+import type { Worksheet, WorksheetParam } from "./model";
+
+/**
+ * 分页查询结算
+ */
+export async function pageWorksheet(params: WorksheetParam) {
+ const res = await request.get>>(
+ "/tower/tower-worksheet/page",
+ {
+ params
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询合同列表
+ */
+export async function listWorksheet(params?: WorksheetParam) {
+ const res = await request.get>(
+ "/tower/tower-worksheet",
+ {
+ params
+ }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询合同
+ */
+export async function getWorksheet(id: number) {
+ const res = await request.get>(
+ "/tower/tower-worksheet/" + id
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 根据id查询合同
+ */
+export async function getWorksheetByWordType(projectId: number, workType: number) {
+ const res = await request.post>(
+ "/tower/tower-worksheet/by-work-type", { projectId, workType }
+ );
+ if (res.data.code === 0 && res.data.data) {
+ return res.data.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 添加合同
+ */
+export async function addWorksheet(data: Worksheet) {
+ const res = await request.post>(
+ "/tower/tower-worksheet",
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 修改合同
+ */
+export async function updateWorksheet(data: Worksheet) {
+ const res = await request.put>(
+ "/tower/tower-worksheet",
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量修改合同
+ */
+export async function updateBatchWorksheet(data: Worksheet[]) {
+ const res = await request.put>(
+ "/tower/tower-worksheet/batch",
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+export async function addBatchWorksheet(data: Worksheet[]) {
+ const res = await request.post>(
+ "/tower/tower-worksheet/batch",
+ data
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除合同
+ */
+export async function removeWorksheet(id?: number) {
+ const res = await request.delete>(
+ "/tower/tower-worksheet/" + id
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 批量删除合同
+ */
+export async function removeBatchWorksheet(data: (number | undefined)[]) {
+ const res = await request.delete>(
+ "/tower/tower-worksheet/batch",
+ {
+ data
+ }
+ );
+ if (res.data.code === 0) {
+ return res.data.message;
+ }
+ return Promise.reject(new Error(res.data.message));
+}
diff --git a/src/api/tower/worksheet/model/index.ts b/src/api/tower/worksheet/model/index.ts
new file mode 100644
index 0000000..04f8de9
--- /dev/null
+++ b/src/api/tower/worksheet/model/index.ts
@@ -0,0 +1,66 @@
+import type { PageParam } from "@/api";
+import { User } from "@/api/system/user/model";
+
+/**
+ * 合同
+ */
+export interface Worksheet {
+ worksheetId?: any;
+ type?: any;
+ startUid?: any;
+ projectId?: any;
+ planInDate?: any;
+ receiveDate?: any;
+ equipmentType?: any;
+ workType?: any;
+ auditStatus?: number;
+ status?: number;
+ detail?: any;
+ setUp?: any;
+ parts?: any;
+ check?: any;
+ projectName?: any;
+ projectRegion?: any;
+ projectAddress?: string;
+ address?: string;
+ contactPhone?: any;
+ productionMangerUser?: User;
+ documentUser?: User;
+ classManagerUser?: User;
+ assetUser?: User;
+ fixUser?: User;
+ carDispatchUser?: User;
+ auditList?: any[];
+ carDispatchList?: any[];
+ documentDoneTime?:string,
+ assetDoneTime?:string,
+ fixDoneTime?:string,
+}
+
+/**
+ * 合同搜索条件
+ */
+export interface WorksheetParam extends PageParam {
+ projectName?: string;
+ contractNo?: string;
+}
+
+export const WORKSHEET_STATUS_LIST = [
+ "已取消",
+ "待派单",
+ "待整理资料",
+ "待到场",
+ "待确认",
+ "已完成"
+];
+
+export const WORKSHEET_EQUIPMENT_TYPE = ["塔式起重机", "施工升降机", "物料提升机"];
+export const WORKSHEET_WORK_TYPE = ["安装单", "加高单", "拆卸单"];
+
+export const WORKSHEET_AUDIT_STATUS_LIST = [
+ "无需审核",
+ "待审核",
+ "审核通过",
+ "审核解决",
+]
+
diff --git a/src/components/TowerContractSelectModel/components/select-data.vue b/src/components/TowerContractSelectModel/components/select-data.vue
index 80ebaf7..9037a7b 100644
--- a/src/components/TowerContractSelectModel/components/select-data.vue
+++ b/src/components/TowerContractSelectModel/components/select-data.vue
@@ -89,7 +89,7 @@ const columns = ref([
},
{
title: "合同编号",
- dataIndex: "contractNumber"
+ dataIndex: "contactNumber"
},
{
title: "项目名称",
diff --git a/src/components/TowerEquipmentModel/components/select-data.vue b/src/components/TowerEquipmentModel/components/select-data.vue
index 787b6c2..42b9776 100644
--- a/src/components/TowerEquipmentModel/components/select-data.vue
+++ b/src/components/TowerEquipmentModel/components/select-data.vue
@@ -1,6 +1,6 @@
-
+
+
+ 仅显示未绑定项目设备
+
@@ -38,124 +41,121 @@
diff --git a/src/config/setting.ts b/src/config/setting.ts
index 45f832a..1e7919e 100644
--- a/src/config/setting.ts
+++ b/src/config/setting.ts
@@ -31,7 +31,7 @@ export const LAYOUT_PATH = '/';
export const REDIRECT_PATH = '/redirect';
// 开启页签栏是否缓存组件
//export const TAB_KEEP_ALIVE = !import.meta.env.DEV;
-export const TAB_KEEP_ALIVE = true;
+export const TAB_KEEP_ALIVE = false;
// token 传递的 header 名称
export const TOKEN_HEADER_NAME = 'Authorization';
// token 存储的名称
diff --git a/src/layout/components/header-tools.vue b/src/layout/components/header-tools.vue
index c148dd9..e8693e4 100644
--- a/src/layout/components/header-tools.vue
+++ b/src/layout/components/header-tools.vue
@@ -23,13 +23,13 @@
-
+
+
+
+ 合计
+
+
+
+
+
+
+
+
+ {{ totals.amountWithTax }}
+
+
+ {{ totals.tax }}
+
+
+ {{ totals.amountWithoutTax }}
+
+
+
+
+
@@ -59,7 +100,7 @@ import {
CloseCircleOutlined
} from "@ant-design/icons-vue";
import dayjs from "dayjs";
-import { DictDataParam } from "@/api/system/dict-data/model";
+import { DictData, DictDataParam } from "@/api/system/dict-data/model";
import { listDictData } from "@/api/system/dict-data";
const props = defineProps<{
@@ -67,7 +108,7 @@ const props = defineProps<{
}>();
const tableRef0 = ref | null>(null);
-const dictList = ref([]);
+const dictList = ref([]);
const getDictList = async () => {
dictList.value = await listDictData({ dictId: 147 });
};
@@ -97,6 +138,16 @@ const columns = ref([
dataIndex: "factoryNo",
key: "factoryNo"
},
+ {
+ title: "实际进场日期",
+ dataIndex: "inDate",
+ key: "inDate"
+ },
+ {
+ title: "实际出场日期",
+ dataIndex: "outDate",
+ key: "outDate"
+ },
{
title: "费用类型",
dataIndex: "settleCostType",
@@ -117,6 +168,11 @@ const columns = ref([
dataIndex: "unit",
key: "unit"
},
+ {
+ title: "支付比例",
+ dataIndex: "payRate",
+ key: "payRate"
+ },
{
title: "含税金额(元)",
dataIndex: "amountWithTax",
@@ -148,21 +204,42 @@ const dataList = ref([]);
const del = (index: number) => {
dataList.value.splice(index, 1);
+ calTotals();
+};
+
+const totals = ref({ amountWithTax: 0, tax: 0, amountWithoutTax: 0 });
+const calTotals = () => {
+ let amountWithTax = 0;
+ let tax = 0;
+ let amountWithoutTax = 0;
+ if (dataList.value && dataList.value.length > 0 && (dataList.value[0].taxRate !== undefined)) {
+ const taxRate = dataList.value[0].taxRate;
+ dataList.value.forEach(({ singleAmount, num, payRate }) => {
+ amountWithTax += singleAmount * num * payRate / 100;
+ });
+ amountWithTax = Number(amountWithTax.toFixed(2));
+ tax = amountWithTax * (taxRate / 100);
+ tax = Number(tax.toFixed(2));
+ amountWithoutTax = amountWithTax - tax;
+ amountWithoutTax = Number(amountWithoutTax.toFixed(2));
+ }
+ totals.value = { amountWithTax, tax, amountWithoutTax };
};
watch(
() => props.dataSource,
(dataSource) => {
dataList.value = dataSource;
- console.log(dataList.value);
+ calTotals();
},
{ deep: true }
);
onMounted(() => {
getDictList();
+ dataList.value = props.dataSource;
});
-defineExpose({ dataList })
+defineExpose({ dataList });
diff --git a/src/views/tower/settle/components/settle-edit.vue b/src/views/tower/settle/components/settle-edit.vue
index ea7b156..6d8034b 100644
--- a/src/views/tower/settle/components/settle-edit.vue
+++ b/src/views/tower/settle/components/settle-edit.vue
@@ -35,7 +35,7 @@
@@ -44,167 +44,168 @@
-
-
-
-
-
-
- {{ item }}
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
每月
-
-
- {{ item }}
-
-
-
号
-
至下月
-
{{ form.extendMonthDate - 1 }}号
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
- 选择结算设备
-
-
一键加载结算设备
-
-
同步结算起止日期
-
-
-
- 税率
- %
-
+
+
+
+
+
-
-
-
-
-
-
-
-
- 选择结算设备
-
-
一键加载结算设备
-
-
同步结算起止日期
-
-
-
- 税率
- %
-
+
+ 税率
+ %
+
+
+
+
+
+
+
+
+
+
+ 选择结算设备
+
+
一键加载结算设备
+
+
同步结算起止日期
+
-
-
-
-
-
-
-
-
- 选择结算设备
-
-
一键加载结算设备
-
-
同步结算起止日期
-
-
-
- 税率
- %
-
+
+ 税率
+ %
+
+
+
+
+
+
+
+
+
+
+ 选择结算设备
+
+
一键加载结算设备
+
+
+
+
-
-
-
-
-
-
-
-
- 选择结算设备
-
-
一键加载结算设备
-
-
同步结算起止日期
-
-
-
- 税率
- %
-
+
+ 税率
+ %
+
+
+
+
+
+
+
+
+
+
+ 选择结算设备
+
+
一键加载结算设备
+
+
+
+
-
-
-
-
-
-
-
-
- 选择结算设备
-
-
一键加载结算设备
-
-
同步结算起止日期
-
-
-
- 税率
- %
-
+
+ 税率
+ %
+
+
+
+
+
+
+
+
+
+
+ 选择结算设备
+
+
一键加载结算设备
+
+
+
+
-
-
-
-
-
+
+ 税率
+ %
+
+
+
+
+
+
{
res.forEach(item => {
if ((item.type === 0 || item.type === 2)) {
const days = dayjs(item.endDate).diff(dayjs(item.startDate), "day");
- item.dailyAmount = (item.monthAmount / 30).toFixed(2);
item = { ...item, ...{ days } };
}
dataSource.value[item.type].push(item);
@@ -339,32 +339,40 @@ const rules = reactive({
trigger: "blur"
}
],
- startDate: [
- {
- required: true,
- message: "请选择开始日期",
- trigger: "blur"
- }
- ],
- endDate: [
- {
- required: true,
- message: "请选择结束日期",
- trigger: "blur"
- }
- ],
+ // startDate: [
+ // {
+ // required: true,
+ // message: "请选择开始日期",
+ // trigger: "blur"
+ // }
+ // ],
+ // endDate: [
+ // {
+ // required: true,
+ // message: "请选择结束日期",
+ // trigger: "blur"
+ // }
+ // ],
settleNo: [
{
required: true,
message: "请输入结算单号",
trigger: "blur"
}
- ]
+ ],
+ dateRange: [
+ {
+ required: true,
+ message: "请选择所属期间",
+ trigger: "blur"
+ }
+ ],
+
});
-const contactNumber = ref("");
+const projectName = ref("");
const chooseContract = (res: Contract) => {
- contactNumber.value = res.contactNumber;
+ projectName.value = res.projectName;
form.contractId = res.contractId;
form.settleMethod = res.settleMethod;
form.startDate = res.startDate;
@@ -374,6 +382,8 @@ const chooseContract = (res: Contract) => {
const { resetFields, validate, validateInfos } = useForm(form, rules);
+const dateRange = ref<[Dayjs, Dayjs] | [string, string]>()
+
/* 保存编辑 */
const save = () => {
validate()
@@ -385,9 +395,12 @@ const save = () => {
let totalAmount = 0;
dataSource.value.forEach(data => {
data.forEach(item => {
- if ((item.type === 0 || item.type === 2) && item.dailyAmount && item.days) totalAmount += item.dailyAmount * item.days;
- else if ((item.type === 1 || item.type === 3) && item.singleAmount && item.num) totalAmount += item.singleAmount * item.num;
- else if (item.type === 4 && item.singleAmount && item.num) totalAmount -= item.singleAmount * item.num;
+ if ((item.type === 0 || item.type === 2) && item.dailyAmount && item.days)
+ totalAmount += (item.dailyAmount * item.day) + (item.monthAmount * item.month);
+ else if ((item.type === 1 || item.type === 3) && item.singleAmount && item.num)
+ totalAmount += item.singleAmount * item.num;
+ else if (item.type === 4 && item.singleAmount && item.num)
+ totalAmount -= item.singleAmount * item.num;
});
});
data.totalAmount = totalAmount;
@@ -446,7 +459,7 @@ const addDataSource = (data: ContractSettleEquipment, index) => {
// factoryNo: data.factoryNo,
startDate: form.startDate ?? "",
endDate: form.endDate ?? "",
- monthAmount: 0,
+ monthAmount: data.rentAmount ?? 0,
taxRate: taxRate.value[index],
singleAmount: 0,
num: 0,
@@ -454,7 +467,10 @@ const addDataSource = (data: ContractSettleEquipment, index) => {
remark: "",
userId: loginUser.value.userId,
days,
- dailyAmount: 0
+ dailyAmount: 0,
+ inDate: "",
+ outDate: "",
+ payRate: 100
});
};
@@ -480,13 +496,15 @@ watch(
loading.value = false;
assignObject(form, props.data);
isUpdate.value = true;
- contactNumber.value = props.data.contactNumber;
+ projectName.value = props.data.projectName;
getDataSource();
+ getContractEquipmentList();
} else {
isUpdate.value = false;
}
} else {
- contactNumber.value = "";
+ projectName.value = "";
+ dataSource.value = [[], [], [], [], []];
resetFields();
}
}
diff --git a/src/views/tower/settle/index.vue b/src/views/tower/settle/index.vue
index 308763f..e2ff614 100644
--- a/src/views/tower/settle/index.vue
+++ b/src/views/tower/settle/index.vue
@@ -27,6 +27,9 @@
{{ timeAgo(record.createTime) }}
+
+ {{ dayjs(record.startDate).format('YYYY-MM') }} ~ {{ dayjs(record.endDate).format('YYYY-MM') }}
+
修改
@@ -73,6 +76,7 @@
import { useUserStore } from '@/store/modules/user';
import { pageSettle, removeBatchSettle, removeSettle } from "@/api/tower/settle";
import { Settle, SettleParam } from "@/api/tower/settle/model";
+ import dayjs from "dayjs";
const userStore = useUserStore();
// 当前用户信息
@@ -122,11 +126,6 @@
hideInSetting: true,
customRender: ({ index }) => index + (tableRef.value?.tableIndex ?? 0)
},
- {
- title: '结算状态',
- dataIndex: 'status',
- key: 'status',
- },
{
title: '项目名称',
dataIndex: 'projectName'
@@ -135,13 +134,17 @@
title: '合同编号',
dataIndex: 'contactNumber'
},
+ // {
+ // title: '结算开始日期',
+ // dataIndex: 'endDate'
+ // },
+ // {
+ // title: '结算结束日期',
+ // dataIndex: 'endDate'
+ // },
{
- title: '结算开始日期',
- dataIndex: 'endDate'
- },
- {
- title: '结算结束日期',
- dataIndex: 'endDate'
+ title: '所属期间',
+ key: 'date'
},
{
title: '本次结算总额',