新增历史结算;
新增租单管理
This commit is contained in:
@@ -35,6 +35,9 @@ export interface Contract {
|
||||
// 跨月结算日期
|
||||
extendMonthDate?: number;
|
||||
userId?: any;
|
||||
projectName?: any;
|
||||
customerName?: any;
|
||||
companyName?: any;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ export interface TowerFall {
|
||||
id?: number;
|
||||
code?: string;
|
||||
model?: string;
|
||||
companyId?: number;
|
||||
// companyId?: number;
|
||||
companyName: string;
|
||||
factory?: string;
|
||||
factoryDate?: string;
|
||||
|
||||
129
src/api/tower/historySettle/index.ts
Normal file
129
src/api/tower/historySettle/index.ts
Normal file
@@ -0,0 +1,129 @@
|
||||
import request from '@/utils/request';
|
||||
import type {ApiResult, PageResult} from '@/api';
|
||||
import type {HistorySettle, HistorySettleParam} from './model';
|
||||
|
||||
/**
|
||||
* 分页查询结算
|
||||
*/
|
||||
export async function pageHistorySettle(params: HistorySettleParam) {
|
||||
const res = await request.get<ApiResult<PageResult<HistorySettle>>>(
|
||||
'/tower/tower-history-settle/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询合同列表
|
||||
*/
|
||||
export async function listHistorySettle(params?: HistorySettleParam) {
|
||||
const res = await request.get<ApiResult<HistorySettle[]>>(
|
||||
'/tower/tower-history-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 getHistorySettle(id: number) {
|
||||
const res = await request.get<ApiResult<HistorySettle>>(
|
||||
'/tower/tower-history-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 addHistorySettle(data: HistorySettle) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/tower/tower-history-settle',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改合同
|
||||
*/
|
||||
export async function updateHistorySettle(data: HistorySettle) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/tower/tower-history-settle',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量修改合同
|
||||
*/
|
||||
export async function updateBatchHistorySettle(data: HistorySettle[]) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/tower/tower-history-settle/batch',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
export async function addBatchHistorySettle(data: HistorySettle[]) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/tower/tower-history-settle/batch',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除合同
|
||||
*/
|
||||
export async function removeHistorySettle(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/tower/tower-history-settle/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除合同
|
||||
*/
|
||||
export async function removeBatchHistorySettle(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/tower/tower-history-settle/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
36
src/api/tower/historySettle/model/index.ts
Normal file
36
src/api/tower/historySettle/model/index.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 合同
|
||||
*/
|
||||
export interface HistorySettle {
|
||||
historySettleId?: any;
|
||||
projectId?: any;
|
||||
projectName?: any;
|
||||
equipmentName?: any;
|
||||
equipmentModel?: any;
|
||||
factoryNo?: any;
|
||||
filingNo?: any;
|
||||
equipmentNo?: any;
|
||||
contractNo?: any;
|
||||
equipmentId?: any;
|
||||
amountWithTax?: any;
|
||||
taxAmount?: any;
|
||||
inOutWithTax?: any;
|
||||
inOutTax?: any;
|
||||
workerAmountWithTax?: any;
|
||||
workerTax?: any;
|
||||
otherAmountWithTax?: string;
|
||||
otherTax?: string;
|
||||
startDate?: any;
|
||||
endDate?: any;
|
||||
userId?: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* 合同搜索条件
|
||||
*/
|
||||
export interface HistorySettleParam extends PageParam {
|
||||
projectId?: string;
|
||||
contractNo?: string;
|
||||
}
|
||||
129
src/api/tower/rentRecord/index.ts
Normal file
129
src/api/tower/rentRecord/index.ts
Normal file
@@ -0,0 +1,129 @@
|
||||
import request from '@/utils/request';
|
||||
import type {ApiResult, PageResult} from '@/api';
|
||||
import type {RentRecord, RentRecordParam} from './model';
|
||||
|
||||
/**
|
||||
* 分页查询结算
|
||||
*/
|
||||
export async function pageRentRecord(params: RentRecordParam) {
|
||||
const res = await request.get<ApiResult<PageResult<RentRecord>>>(
|
||||
'/tower/tower-rent-record/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询合同列表
|
||||
*/
|
||||
export async function listRentRecord(params?: RentRecordParam) {
|
||||
const res = await request.get<ApiResult<RentRecord[]>>(
|
||||
'/tower/tower-rent-record',
|
||||
{
|
||||
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 getRentRecord(id: number) {
|
||||
const res = await request.get<ApiResult<RentRecord>>(
|
||||
'/tower/tower-rent-record/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加合同
|
||||
*/
|
||||
export async function addRentRecord(data: RentRecord) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/tower/tower-rent-record',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改合同
|
||||
*/
|
||||
export async function updateRentRecord(data: RentRecord) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/tower/tower-rent-record',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量修改合同
|
||||
*/
|
||||
export async function updateBatchRentRecord(data: RentRecord[]) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/tower/tower-rent-record/batch',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
export async function addBatchRentRecord(data: RentRecord[]) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/tower/tower-rent-record/batch',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除合同
|
||||
*/
|
||||
export async function removeRentRecord(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/tower/tower-rent-record/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除合同
|
||||
*/
|
||||
export async function removeBatchRentRecord(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/tower/tower-rent-record/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
33
src/api/tower/rentRecord/model/index.ts
Normal file
33
src/api/tower/rentRecord/model/index.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import type { PageParam } from "@/api";
|
||||
|
||||
export interface RentRecord {
|
||||
rentRecordId?: any;
|
||||
projectId?: any;
|
||||
contractNo?: any;
|
||||
equipmentId?: any;
|
||||
startDate?: any;
|
||||
stopDate?: any;
|
||||
checkDate?: any;
|
||||
reportStopDate?: any;
|
||||
reportStopType?: string;
|
||||
restoreDate?: string;
|
||||
reportMonitorNo?: any;
|
||||
companyId?: any;
|
||||
status?: any;
|
||||
userId?: any;
|
||||
projectName?: any;
|
||||
companyName?: any;
|
||||
equipmentName?: any;
|
||||
equipmentModel?: any;
|
||||
filingNo?: any;
|
||||
equipmentNo?: any;
|
||||
factoryNo?: any;
|
||||
}
|
||||
|
||||
export interface RentRecordParam extends PageParam {
|
||||
projectId?: string;
|
||||
contractNo?: string;
|
||||
status?: string;
|
||||
}
|
||||
|
||||
export const rentRecordStatusList = ["未起租", "起租", "中途报停", "报停复工", "拆卸停租"];
|
||||
Reference in New Issue
Block a user