调整
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -20,5 +20,5 @@ export interface ContractFile {
|
||||
* 合同搜索条件
|
||||
*/
|
||||
export interface ContractFileParam extends PageParam {
|
||||
contactId?: string;
|
||||
contractId?: string;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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<ApiResult<unknown>>(
|
||||
'/tower/tower-equipment/qr',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@ export interface TowerFall {
|
||||
factory?: string;
|
||||
factoryDate?: string;
|
||||
discardDate?: string;
|
||||
|
||||
checkDate?: string;
|
||||
file1?: string;
|
||||
file2?: string;
|
||||
file3?: string;
|
||||
|
||||
129
src/api/tower/finalSettle/index.ts
Normal file
129
src/api/tower/finalSettle/index.ts
Normal file
@@ -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<ApiResult<PageResult<FinalSettle>>>(
|
||||
'/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<ApiResult<FinalSettle[]>>(
|
||||
'/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<ApiResult<FinalSettle>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/tower/tower-contract-final-settle/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
31
src/api/tower/finalSettle/model/index.ts
Normal file
31
src/api/tower/finalSettle/model/index.ts
Normal file
@@ -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;
|
||||
}
|
||||
129
src/api/tower/finalSettleLost/index.ts
Normal file
129
src/api/tower/finalSettleLost/index.ts
Normal file
@@ -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<ApiResult<PageResult<FinalSettleLost>>>(
|
||||
'/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<ApiResult<FinalSettleLost[]>>(
|
||||
'/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<ApiResult<FinalSettleLost>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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));
|
||||
}
|
||||
22
src/api/tower/finalSettleLost/model/index.ts
Normal file
22
src/api/tower/finalSettleLost/model/index.ts
Normal file
@@ -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;
|
||||
}
|
||||
129
src/api/tower/income/index.ts
Normal file
129
src/api/tower/income/index.ts
Normal file
@@ -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<ApiResult<PageResult<Income>>>(
|
||||
'/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<ApiResult<Income[]>>(
|
||||
'/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<ApiResult<Income>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/tower/tower-income/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
43
src/api/tower/income/model/index.ts
Normal file
43
src/api/tower/income/model/index.ts
Normal file
@@ -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 = ['已收款', '已作废']
|
||||
129
src/api/tower/incomeEquipment/index.ts
Normal file
129
src/api/tower/incomeEquipment/index.ts
Normal file
@@ -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<ApiResult<PageResult<IncomeEquipment>>>(
|
||||
'/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<ApiResult<IncomeEquipment[]>>(
|
||||
'/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<ApiResult<IncomeEquipment>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/tower/tower-income-equipment/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
30
src/api/tower/incomeEquipment/model/index.ts
Normal file
30
src/api/tower/incomeEquipment/model/index.ts
Normal file
@@ -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;
|
||||
}
|
||||
|
||||
129
src/api/tower/invoicing/index.ts
Normal file
129
src/api/tower/invoicing/index.ts
Normal file
@@ -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<ApiResult<PageResult<Invoicing>>>(
|
||||
'/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<ApiResult<Invoicing[]>>(
|
||||
'/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<ApiResult<Invoicing>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/tower/tower-invoicing/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
35
src/api/tower/invoicing/model/index.ts
Normal file
35
src/api/tower/invoicing/model/index.ts
Normal file
@@ -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 = ['已开票', '已作废']
|
||||
129
src/api/tower/invoicingSettle/index.ts
Normal file
129
src/api/tower/invoicingSettle/index.ts
Normal file
@@ -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<ApiResult<PageResult<InvoicingSettle>>>(
|
||||
'/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<ApiResult<InvoicingSettle[]>>(
|
||||
'/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<ApiResult<InvoicingSettle>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/tower/tower-invoicing-settle/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
21
src/api/tower/invoicingSettle/model/index.ts
Normal file
21
src/api/tower/invoicingSettle/model/index.ts
Normal file
@@ -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;
|
||||
}
|
||||
129
src/api/tower/lending/index.ts
Normal file
129
src/api/tower/lending/index.ts
Normal file
@@ -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<ApiResult<PageResult<Lending>>>(
|
||||
'/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<ApiResult<Lending[]>>(
|
||||
'/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<ApiResult<Lending>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/tower/tower-lending/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
28
src/api/tower/lending/model/index.ts
Normal file
28
src/api/tower/lending/model/index.ts
Normal file
@@ -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;
|
||||
}
|
||||
129
src/api/tower/lendingSettle/index.ts
Normal file
129
src/api/tower/lendingSettle/index.ts
Normal file
@@ -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<ApiResult<PageResult<LendingSettle>>>(
|
||||
'/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<ApiResult<LendingSettle[]>>(
|
||||
'/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<ApiResult<LendingSettle>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/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<ApiResult<unknown>>(
|
||||
'/tower/tower-lending-settle/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
40
src/api/tower/lendingSettle/model/index.ts
Normal file
40
src/api/tower/lendingSettle/model/index.ts
Normal file
@@ -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;
|
||||
}
|
||||
@@ -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<ApiResult<unknown>>(
|
||||
'/tower/tower-project/batch',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改仓库
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 = ["未认证", "已认证", "已失效"];
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
143
src/api/tower/worksheet/index.ts
Normal file
143
src/api/tower/worksheet/index.ts
Normal file
@@ -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<ApiResult<PageResult<Worksheet>>>(
|
||||
"/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<ApiResult<Worksheet[]>>(
|
||||
"/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<ApiResult<Worksheet>>(
|
||||
"/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<ApiResult<Worksheet[]>>(
|
||||
"/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<ApiResult<unknown>>(
|
||||
"/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<ApiResult<unknown>>(
|
||||
"/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<ApiResult<unknown>>(
|
||||
"/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<ApiResult<unknown>>(
|
||||
"/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<ApiResult<unknown>>(
|
||||
"/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<ApiResult<unknown>>(
|
||||
"/tower/tower-worksheet/batch",
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
66
src/api/tower/worksheet/model/index.ts
Normal file
66
src/api/tower/worksheet/model/index.ts
Normal file
@@ -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 = [
|
||||
"无需审核",
|
||||
"待审核",
|
||||
"审核通过",
|
||||
"审核解决",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user