From 5cfebd652f1bef841a02fe5f32428b43767316aa Mon Sep 17 00:00:00 2001 From: Teo <2642673902@qq.com> Date: Thu, 28 Aug 2025 20:15:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- src/api/login.ts | 10 +- src/api/menu.ts | 4 +- src/api/project/attendance/echarts.ts | 63 ++ src/api/project/attendance/index.ts | 99 +++ src/api/project/attendance/types.ts | 210 ++++++ src/api/project/attendanceRecords/index.ts | 63 ++ src/api/project/attendanceRecords/types.ts | 146 +++++ .../project/constructionBlacklist/index.ts | 63 ++ .../project/constructionBlacklist/types.ts | 69 ++ src/api/project/constructionUser/index.ts | 205 ++++++ src/api/project/constructionUser/types.ts | 605 ++++++++++++++++++ src/api/project/constructionUserFile/index.ts | 40 ++ src/api/project/constructionUserFile/types.ts | 137 ++++ src/api/project/contractor/index.ts | 63 ++ src/api/project/contractor/types.ts | 147 +++++ .../contractorMaterialRecord/index.ts | 63 ++ .../contractorMaterialRecord/types.ts | 141 ++++ src/api/project/contractorMaterial/index.ts | 63 ++ src/api/project/contractorMaterial/types.ts | 126 ++++ .../contractorToolEntry/index.ts | 63 ++ .../contractorToolEntry/types.ts | 156 +++++ src/api/project/contractorTool/index.ts | 63 ++ src/api/project/contractorTool/types.ts | 136 ++++ src/api/project/leave/index.ts | 76 +++ src/api/project/leave/types.ts | 206 ++++++ src/api/project/project/index.ts | 199 ++++++ src/api/project/project/types.ts | 385 +++++++++++ src/api/project/projectRelevancy/index.ts | 103 +++ src/api/project/projectRelevancy/types.ts | 72 +++ src/api/project/projectTeam/index.ts | 74 +++ src/api/project/projectTeam/types.ts | 109 ++++ src/api/project/projectTeamMember/index.ts | 63 ++ src/api/project/projectTeamMember/types.ts | 105 +++ src/api/project/reissueCard/index.ts | 75 +++ src/api/project/reissueCard/types.ts | 173 +++++ src/api/project/subcontract/index.ts | 63 ++ src/api/project/subcontract/types.ts | 136 ++++ src/api/project/workWage/index.ts | 63 ++ src/api/project/workWage/types.ts | 131 ++++ src/api/project/workerDailyReport/index.ts | 63 ++ src/api/project/workerDailyReport/types.ts | 132 ++++ src/api/types.ts | 16 + src/components/ProjectSelector/index.vue | 164 +++++ src/layout/components/Navbar.vue | 36 +- src/permission.ts | 91 +-- src/store/modules/permission.ts | 37 +- src/store/modules/user.ts | 115 +++- src/views/login.vue | 13 +- 49 files changed, 5345 insertions(+), 92 deletions(-) create mode 100644 src/api/project/attendance/echarts.ts create mode 100644 src/api/project/attendance/index.ts create mode 100644 src/api/project/attendance/types.ts create mode 100644 src/api/project/attendanceRecords/index.ts create mode 100644 src/api/project/attendanceRecords/types.ts create mode 100644 src/api/project/constructionBlacklist/index.ts create mode 100644 src/api/project/constructionBlacklist/types.ts create mode 100644 src/api/project/constructionUser/index.ts create mode 100644 src/api/project/constructionUser/types.ts create mode 100644 src/api/project/constructionUserFile/index.ts create mode 100644 src/api/project/constructionUserFile/types.ts create mode 100644 src/api/project/contractor/index.ts create mode 100644 src/api/project/contractor/types.ts create mode 100644 src/api/project/contractorMaterial/contractorMaterialRecord/index.ts create mode 100644 src/api/project/contractorMaterial/contractorMaterialRecord/types.ts create mode 100644 src/api/project/contractorMaterial/index.ts create mode 100644 src/api/project/contractorMaterial/types.ts create mode 100644 src/api/project/contractorTool/contractorToolEntry/index.ts create mode 100644 src/api/project/contractorTool/contractorToolEntry/types.ts create mode 100644 src/api/project/contractorTool/index.ts create mode 100644 src/api/project/contractorTool/types.ts create mode 100644 src/api/project/leave/index.ts create mode 100644 src/api/project/leave/types.ts create mode 100644 src/api/project/project/index.ts create mode 100644 src/api/project/project/types.ts create mode 100644 src/api/project/projectRelevancy/index.ts create mode 100644 src/api/project/projectRelevancy/types.ts create mode 100644 src/api/project/projectTeam/index.ts create mode 100644 src/api/project/projectTeam/types.ts create mode 100644 src/api/project/projectTeamMember/index.ts create mode 100644 src/api/project/projectTeamMember/types.ts create mode 100644 src/api/project/reissueCard/index.ts create mode 100644 src/api/project/reissueCard/types.ts create mode 100644 src/api/project/subcontract/index.ts create mode 100644 src/api/project/subcontract/types.ts create mode 100644 src/api/project/workWage/index.ts create mode 100644 src/api/project/workWage/types.ts create mode 100644 src/api/project/workerDailyReport/index.ts create mode 100644 src/api/project/workerDailyReport/types.ts create mode 100644 src/components/ProjectSelector/index.vue diff --git a/.env.development b/.env.development index 14e1335..de8c02f 100644 --- a/.env.development +++ b/.env.development @@ -5,7 +5,7 @@ VITE_APP_TITLE = RuoYi-Vue-Plus多租户管理系统 VITE_APP_ENV = 'development' # 开发环境 -VITE_APP_BASE_API = '/dev-api' +VITE_APP_BASE_API = 'http://192.168.110.209:8899' # 应用访问路径 例如使用前缀 /admin/ VITE_APP_CONTEXT_PATH = '/' diff --git a/src/api/login.ts b/src/api/login.ts index 35e6a4e..854b387 100644 --- a/src/api/login.ts +++ b/src/api/login.ts @@ -1,6 +1,6 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; -import { LoginData, LoginResult, VerifyCodeResult, TenantInfo } from './types'; +import { LoginData, LoginResult, TenantInfo, UserProject, VerifyCodeResult } from './types'; import { UserInfo } from '@/api/system/user/types'; // pc端固定客户端授权id @@ -111,3 +111,11 @@ export function getTenantList(isToken: boolean): AxiosPromise { method: 'get' }); } + +//获取用户项目信息 +export function getUserProject(): AxiosPromise { + return request({ + url: '/project/projectRelevancy/login/list', + method: 'get' + }); +} diff --git a/src/api/menu.ts b/src/api/menu.ts index a3ae80e..fc1d542 100644 --- a/src/api/menu.ts +++ b/src/api/menu.ts @@ -3,9 +3,9 @@ import { AxiosPromise } from 'axios'; import { RouteRecordRaw } from 'vue-router'; // 获取路由 -export function getRouters(): AxiosPromise { +export function getRouters(id: string): AxiosPromise { return request({ - url: '/system/menu/getRouters', + url: '/system/menu/getRouters/' + id, method: 'get' }); } diff --git a/src/api/project/attendance/echarts.ts b/src/api/project/attendance/echarts.ts new file mode 100644 index 0000000..3a66873 --- /dev/null +++ b/src/api/project/attendance/echarts.ts @@ -0,0 +1,63 @@ +const grid = { + left: 100, + right: 100, + top: 30, + bottom: 50 +}; + +const color = ['#4FD6A9', '#409EFF', '#ECF5FF', '#FFC069']; +const titleList = [ + { name: '全勤人数', color: '#fff' }, + { name: '半勤人数', color: '#fff' }, + { name: '缺勤人数', color: '#000' }, + { name: '请假人数', color: '#000' } +]; + +// export const echartsConfig = (ref: any, list?: any) => { +// const commandstatsIntance = echarts.init(ref, 'macarons'); +// }; + +export const option = (list?: any) => { + const attendanceArray = list.map((item) => item.attendance); + const halfAttendanceArray = list.map((item) => item.halfAttendance); + const absenteeismArray = list.map((item) => item.absenteeism); + const leaveArray = list.map((item) => item.leave); + + const rawData = [attendanceArray, halfAttendanceArray, absenteeismArray, leaveArray]; + const series: any = titleList.map((item, sid) => { + return { + name: item.name, + type: 'bar', + stack: 'total', + barWidth: '25', + label: { + show: true, + color: item.color, + fontSize: 10, + formatter: function (params) { + return params.value > 0 ? params.value : ''; + } + }, + data: rawData[sid] + }; + }); + const data = list.map((item) => item.clockDate); + const option = { + legend: { + selectedMode: false, + right: 0 + }, + grid, + yAxis: { + type: 'value', + show: false + }, + xAxis: { + type: 'category', + data + }, + series, + color + }; + return option; +}; diff --git a/src/api/project/attendance/index.ts b/src/api/project/attendance/index.ts new file mode 100644 index 0000000..87866a6 --- /dev/null +++ b/src/api/project/attendance/index.ts @@ -0,0 +1,99 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { + AttendanceVO, + AttendanceForm, + AttendanceQuery, + AttendanceTwoWeekQuery, + AttendanceTwoWeekVO, + AttendanceMonthVO, + AttendanceMonthQuery +} from '@/api/project/attendance/types'; + +/** + * 查询考勤列表 + * @param query + * @returns {*} + */ + +export const listAttendance = (query?: AttendanceQuery): AxiosPromise => { + return request({ + url: '/contractor/constructionUser/list/attendance/total', + method: 'get', + params: query + }); +}; + +/** + * 查询近两周考勤列表 + * @param query + * @returns {*} + */ + +export const listAttendanceTwoWeek = (query?: AttendanceTwoWeekQuery): AxiosPromise => { + return request({ + url: '/project/attendance/list/clockDate/twoWeek', + method: 'get', + params: query + }); +}; + +/** + * 查询施工人员月份考勤列表 + * @param query + * @returns {*} + */ + +export const listAttendanceMonth = (query?: AttendanceMonthQuery): AxiosPromise => { + return request({ + url: '/project/attendance/list/month/byUserId', + method: 'get', + params: query + }); +}; + +/** + * 查询考勤详细 + * @param id + */ +export const getAttendance = (id: string | number): AxiosPromise => { + return request({ + url: '/project/attendance/' + id, + method: 'get' + }); +}; + +/** + * 新增考勤 + * @param data + */ +export const addAttendance = (data: AttendanceForm) => { + return request({ + url: '/project/attendance', + method: 'post', + data: data + }); +}; + +/** + * 修改考勤 + * @param data + */ +export const updateAttendance = (data: AttendanceForm) => { + return request({ + url: '/project/attendance', + method: 'put', + data: data + }); +}; + +/** + * 删除考勤 + * @param id + */ +export const delAttendance = (id: string | number | Array) => { + return request({ + url: '/project/attendance/' + id, + method: 'delete' + }); +}; diff --git a/src/api/project/attendance/types.ts b/src/api/project/attendance/types.ts new file mode 100644 index 0000000..1dd03cd --- /dev/null +++ b/src/api/project/attendance/types.ts @@ -0,0 +1,210 @@ +export interface AttendanceVO { + /** + * 人员姓名 + */ + userName: string; + + id?: string | number; + + /** + * 人员id + */ + + /** + * 上班打卡时间 + */ + onClockTime: string; + + /** + * 下班打卡时间 + */ + offClockTime: string; + + /** + * 打卡日期 + */ + clockDate: string; + + /** + * 1正常,2迟到,3早退,4缺勤,5补卡 + */ + clockStatus: string; + + /** + * 上下班(1上班,2下班) + */ + commuter: string; + + /** + * 备注 + */ + remark: string; +} + +export interface AttendanceTwoWeekQuery { + projectId?: string | number; +} + +export interface AttendanceMonthQuery { + userId: string | number; + clockMonth?: string; +} + +export interface AttendanceMonthVO { + id: string | number; + clockDate: string; + status: string; + attendanceList?: monthList[]; + clockList?: clockObject; +} + +interface clockObject { + downClockTime?: string; + downClockPic?: string; + upClockTime?: string; + upClockPic?: string; +} + +interface monthList { + commuter: string; + clockTime: string; + clockStatus: string; +} + +export interface AttendanceTwoWeekVO { + /** + * 出勤人数 + */ + attendance: string; + + /** + * 半勤人数 + + */ + halfAttendance: string; + + /** + * 打卡日期 + */ + clockDate: string; + + /** + * 缺勤人数 + + */ + absenteeism: string; +} + +export interface AttendanceForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + + /** + * 人员id + */ + userId?: string | number; + typeOfWork?: string; + teamId?: string; + clockDate?: string; + + /** + * 人脸照 + */ + facePic?: string; + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 上班打卡时间 + */ + onClockTime?: string; + + /** + * 下班打卡时间 + */ + offClockTime?: string; + + /** + * 打卡日期 + */ + clockDate?: string; + + /** + * 1正常,2迟到,3早退,4缺勤,5补卡 + */ + clockStatus?: string; + + /** + * 代打人员id + */ + pinchUserId?: string | number; + + /** + * 多次打卡时间记录 + */ + clockRecord?: string; + + /** + * 上下班(1上班,2下班) + */ + commuter?: string; + + /** + * 日薪 + */ + dailyWage?: number; + + /** + * 经度 + */ + lng?: string; + + /** + * 纬度 + */ + lat?: string; + + /** + * 备注 + */ + remark?: string; +} + +export interface AttendanceQuery extends PageQuery { + /** + * 人员姓名 + */ + userName?: string; + + /** + * 项目id + */ + projectId?: string | number; + typeOfWork?: string | number; + teamId?: string | number; + + /** + * 打卡日期 + */ + clockDate?: string; + + /** + * 1正常,2迟到,3早退,4缺勤,5补卡 + */ + clockStatus?: string; + + /** + * 上下班(1上班,2下班) + */ + commuter?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/api/project/attendanceRecords/index.ts b/src/api/project/attendanceRecords/index.ts new file mode 100644 index 0000000..edd9542 --- /dev/null +++ b/src/api/project/attendanceRecords/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { AttendanceVO, AttendanceForm, AttendanceQuery } from '@/api/project/attendance/types'; + +/** + * 查询考勤列表 + * @param query + * @returns {*} + */ + +export const listAttendance = (query?: AttendanceQuery): AxiosPromise => { + return request({ + url: '/project/attendance/list', + method: 'get', + params: query + }); +}; + +/** + * 查询考勤详细 + * @param id + */ +export const getAttendance = (id: string | number): AxiosPromise => { + return request({ + url: '/project/attendance/' + id, + method: 'get' + }); +}; + +/** + * 新增考勤 + * @param data + */ +export const addAttendance = (data: AttendanceForm) => { + return request({ + url: '/project/attendance', + method: 'post', + data: data + }); +}; + +/** + * 修改考勤 + * @param data + */ +export const updateAttendance = (data: AttendanceForm) => { + return request({ + url: '/project/attendance', + method: 'put', + data: data + }); +}; + +/** + * 删除考勤 + * @param id + */ +export const delAttendance = (id: string | number | Array) => { + return request({ + url: '/project/attendance/' + id, + method: 'delete' + }); +}; diff --git a/src/api/project/attendanceRecords/types.ts b/src/api/project/attendanceRecords/types.ts new file mode 100644 index 0000000..d51f73d --- /dev/null +++ b/src/api/project/attendanceRecords/types.ts @@ -0,0 +1,146 @@ +export interface AttendanceVO { + /** + * 人员姓名 + */ + userName: string; + + /** + * 上班打卡时间 + */ + onClockTime: string; + + /** + * 下班打卡时间 + */ + offClockTime: string; + + /** + * 打卡日期 + */ + clockDate: string; + + /** + * 1正常,2迟到,3早退,4缺勤,5补卡 + */ + clockStatus: string; + + /** + * 上下班(1上班,2下班) + */ + commuter: string; + + /** + * 备注 + */ + remark: string; +} + +export interface AttendanceForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + + /** + * 人员id + */ + userId?: string | number; + + /** + * 人脸照 + */ + facePic?: string; + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 上班打卡时间 + */ + onClockTime?: string; + + /** + * 下班打卡时间 + */ + offClockTime?: string; + + /** + * 打卡日期 + */ + clockDate?: string; + + /** + * 1正常,2迟到,3早退,4缺勤,5补卡 + */ + clockStatus?: string; + + /** + * 代打人员id + */ + pinchUserId?: string | number; + + /** + * 多次打卡时间记录 + */ + clockRecord?: string; + + /** + * 上下班(1上班,2下班) + */ + commuter?: string; + + /** + * 日薪 + */ + dailyWage?: number; + + /** + * 经度 + */ + lng?: string; + + /** + * 纬度 + */ + lat?: string; + + /** + * 备注 + */ + remark?: string; +} + +export interface AttendanceQuery extends PageQuery { + /** + * 人员姓名 + */ + userName?: string; + teamId?: string | number; + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 打卡日期 + */ + clockDate?: string; + + /** + * 1正常,2迟到,3早退,4缺勤,5补卡 + */ + clockStatus?: string; + + /** + * 上下班(1上班,2下班) + */ + commuter?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/api/project/constructionBlacklist/index.ts b/src/api/project/constructionBlacklist/index.ts new file mode 100644 index 0000000..3407e0d --- /dev/null +++ b/src/api/project/constructionBlacklist/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { ConstructionBlacklistVO, ConstructionBlacklistForm, ConstructionBlacklistQuery } from '@/api/project/constructionBlacklist/types'; + +/** + * 查询黑名单列表 + * @param query + * @returns {*} + */ + +export const listConstructionBlacklist = (query?: ConstructionBlacklistQuery): AxiosPromise => { + return request({ + url: '/project/constructionBlacklist/list', + method: 'get', + params: query + }); +}; + +/** + * 查询黑名单详细 + * @param id + */ +export const getConstructionBlacklist = (id: string | number): AxiosPromise => { + return request({ + url: '/project/constructionBlacklist/' + id, + method: 'get' + }); +}; + +/** + * 新增黑名单 + * @param data + */ +export const addConstructionBlacklist = (data: ConstructionBlacklistForm) => { + return request({ + url: '/project/constructionBlacklist', + method: 'post', + data: data + }); +}; + +/** + * 修改黑名单 + * @param data + */ +export const updateConstructionBlacklist = (data: ConstructionBlacklistForm) => { + return request({ + url: '/project/constructionBlacklist', + method: 'put', + data: data + }); +}; + +/** + * 删除黑名单 + * @param id + */ +export const delConstructionBlacklist = (id: string | number | Array) => { + return request({ + url: '/project/constructionBlacklist/' + id, + method: 'delete' + }); +}; diff --git a/src/api/project/constructionBlacklist/types.ts b/src/api/project/constructionBlacklist/types.ts new file mode 100644 index 0000000..890f194 --- /dev/null +++ b/src/api/project/constructionBlacklist/types.ts @@ -0,0 +1,69 @@ +export interface ConstructionBlacklistVO { + /** + * id + */ + id: string | number; + /** + * 名字 + */ + userName: string; + + /** + * 身份证号码 + */ + sfzNumber: string; + + /** + * 备注 + */ + remark: string; +} + +export interface ConstructionBlacklistForm extends BaseEntity { + /** + * 项目id + */ + projectId?: string | number; + + /** + * 用户id + */ + userId?: string | number; + + /** + * 备注 + */ + remark?: string; +} + +export interface ConstructionBlacklistQuery extends PageQuery { + /** + * 主键id + */ + id?: string | number; + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 用户id + */ + userId?: string | number; + + /** + * 名字 + */ + userName?: string; + + /** + * 身份证号码 + */ + sfzNumber?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/api/project/constructionUser/index.ts b/src/api/project/constructionUser/index.ts new file mode 100644 index 0000000..35ec956 --- /dev/null +++ b/src/api/project/constructionUser/index.ts @@ -0,0 +1,205 @@ +import request, { download } from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { + ConstructionUserForm, + ConstructionUserQuery, + ConstructionUserVO, + skipType, + ConstructionUserStatusForm, + ConstructionUserPlayCardForm, + ConstructionUserSalaryForm, + ConstructionUserExitForm, + ConstructionUserTemplateForm, + ConstructionUserMembeForm, + ConstructionMonthQuery +} from '@/api/project/constructionUser/types'; +import { AttendanceMonthVO } from '../attendance/types'; + +/** + * 查询施工人员月份考勤列表 + * @param query + * @returns {*} + */ + +export const listConstructionMonth = (query?: ConstructionMonthQuery): AxiosPromise => { + return request({ + url: '/contractor/constructionUser/list/attendance/month', + method: 'get', + params: query + }); +}; +/** + * 查询施工人员列表 + * @param query + * @returns {*} + */ + +export const listConstructionUser = (query?: ConstructionUserQuery): AxiosPromise => { + return request({ + url: '/contractor/constructionUser/list', + method: 'get', + params: query + }); +}; + +/** + * 查询施工人员详细 + * @param id + */ +export const getConstructionUser = (id: string | number): AxiosPromise => { + return request({ + url: '/contractor/constructionUser/' + id, + method: 'get' + }); +}; + +/** + * 人员迁移 + * @param data + */ +export const transferConstructionUser = (data: skipType) => { + return request({ + url: '/contractor/constructionUser/change/project', + method: 'put', + data: data + }); +}; + +/** + * 查询项目以及项目下的分包公司列表 + */ +export const getProjectContractorList = () => { + return request({ + url: '/project/project/list/project/contractorList', + method: 'get' + }); +}; + +/** + * 新增施工人员 + * @param data + */ +export const addConstructionUser = (data: ConstructionUserForm): AxiosPromise => { + return request({ + url: '/contractor/constructionUser', + method: 'post', + data: data + }); +}; + +/** + * 修改施工人员 + * @param data + */ +export const updateConstructionUser = (data: ConstructionUserForm) => { + return request({ + url: '/contractor/constructionUser', + method: 'put', + data: data + }); +}; + +/** + * 删除施工人员 + * @param id + */ +export const delConstructionUser = (id: string | number | Array) => { + return request({ + url: '/contractor/constructionUser/' + id, + method: 'delete' + }); +}; + +/** + * 修改施工人员在职状态 + * @param data + */ +export const updateConstructionUserStatus = (data: ConstructionUserStatusForm) => { + return request({ + url: '/contractor/constructionUser/batch/status', + method: 'put', + data: data + }); +}; + +/** + * 根据项目id批量修改施工人员打卡状态 + * @param data + */ +export const updateConstructionUserPlayCardStatus = (data: ConstructionUserPlayCardForm) => { + return request({ + url: '/contractor/constructionUser/batch/clock', + method: 'put', + data: data + }); +}; + +/** + * 修改施工人员打卡状态 + * @param data + */ +export const updateConstructionUserPlayCardOneStatus = (data: ConstructionUserPlayCardForm) => { + return request({ + url: '/contractor/constructionUser/clock', + method: 'put', + data: data + }); +}; + +/** + * 修改施工人员工资 + * @param data + */ +export const updateConstructionUserSalary = (data: ConstructionUserSalaryForm) => { + return request({ + url: '/contractor/constructionUser/salary', + method: 'put', + data: data + }); +}; + +/** + * 查询施工人员入退场记录 + * @param query + */ +export const getConstructionUserExit = (query: ConstructionUserExitForm) => { + return request({ + url: '/contractor/constructionUserExit/list', + method: 'get', + params: query + }); +}; + +/** + * 下载施工人员文件存储模板 + * @param query + */ +export const dowloadConstructionUserTemplate = (query: ConstructionUserTemplateForm) => { + let { projectId } = query; + const fileName = projectId + '_project.zip'; + return download('/contractor/constructionUserFile/exportFileTemplate', query, fileName); +}; + +/** + * 施工人员退场 + * @param data + */ +export const delConstructionUserMember = (data: ConstructionUserMembeForm) => { + return request({ + url: '/contractor/projectTeamMember/', + method: 'delete', + data + }); +}; + +/** + * 上传施工人员文件压缩包,批量导入存储施工人员文件 + * @param data + */ +export const importConstructionUserInfo = (file: string) => { + return request({ + url: '/contractor/constructionUserFile/upload/zip', + method: 'post', + data: { file } + }); +}; diff --git a/src/api/project/constructionUser/types.ts b/src/api/project/constructionUser/types.ts new file mode 100644 index 0000000..b65e23f --- /dev/null +++ b/src/api/project/constructionUser/types.ts @@ -0,0 +1,605 @@ +import { ContractorVO } from '@/api/project/contractor/types'; +import { ProjectTeamVO } from '@/api/project/projectTeam/types'; +import { S } from 'node_modules/vite/dist/node/types.d-aGj9QkWt'; + +export interface ConstructionUserVO { + /** + * 主键id + */ + id: string | number; + + /** + * 微信id + */ + openid: string | number; + + /** + * 微信名称 + */ + nickName: string; + + /** + * 人脸照 + */ + facePic: string; + + /** + * 人脸照url + */ + facePicUrl: string; + + /** + * 人员姓名 + */ + userName: string; + + /** + * 项目id + */ + projectId: string | number; + + /** + * 分包公司id + */ + contractorId: string | number; + + /** + * 分包公司 + */ + contractorVo: ContractorVO; + + /** + * 班组id + */ + teamId: string | number; + + /** + * 班组 + */ + teamVo: ProjectTeamVO; + + /** + * 状态(0在职 1离职) + */ + status: number; + + /** + * 是否代打 + */ + isPinch: number; + + /** + * 联系电话 + */ + phone: string; + + /** + * 0:保密 1:男 2女 + */ + sex: number; + + /** + * 民族 + */ + nation: string; + + /** + * 身份证正面照片 + */ + sfzFrontPic: string; + + /** + * 身份证背面照片 + */ + sfzBackPic: string; + + /** + * 身份证号码 + */ + sfzNumber: string; + + /** + * 身份证有效开始期 + */ + sfzStart: string; + + /** + * 身份证有效结束期 + */ + sfzEnd: string; + + /** + * 身份证地址 + */ + sfzSite: string; + + /** + * 身份证出生日期 + */ + sfzBirth: string; + + /** + * 籍贯 + */ + nativePlace: string; + + /** + * 银行卡图片 + */ + yhkPic: string; + + /** + * 银行卡号 + */ + yhkNumber: string; + + /** + * 开户行 + */ + yhkOpeningBank: string; + + /** + * 持卡人 + */ + yhkCardholder: string; + + /** + * 工种(字典type_of_work) + */ + typeOfWork: number; + + /** + * 特种工作证图片 + */ + specialWorkPic: string; + + /** + * 打卡(0启用打卡 1禁止打卡) + */ + clock: number; + + /** + * 入场时间 + */ + entryDate: string; + + /** + * 离场时间 + */ + leaveDate: string; + + /** + * 薪水 + */ + salary: number; + + /** + * 备注 + */ + remark: string; + + /** + * 创建时间 + */ + createTime: string; +} +export interface skipType { + /** + * 项目id + */ + projectId: string | number; + + /** + * 分包id + */ + contractorId: string | number; + id: string | number; +} + +export interface ConstructionMonthQuery { + /** + * id + */ + userId: string | number; + + /** + * 打卡月份 + + */ + clockMonth?: string | number; +} + +export interface ConstructionUserMembeForm { + /** + * 用户id + */ + id: string | number; + /** + * 用户姓名 + */ + userName: string | number; + /** + * 文件路径 + */ + filePath: string; + /** + * 备注 + */ + remark: string | number; +} + +export interface ConstructionUserTemplateForm { + /** + * 项目id + */ + projectId: string | number; +} + +export interface ConstructionUserExitForm { + /** + * userId + */ + userId: number | string; +} + +export interface ConstructionUserSalaryForm { + /** + * 列表 + */ + id: number | string; + + /** + * 工资 + */ + salary?: number | string; +} + +export interface ConstructionUserPlayCardForm { + /** + * 项目 + */ + projectId?: string | number; + /** + * 用户id + */ + id?: string | number; + /** + * 打卡状态 + */ + clock: number | string; +} + +export interface skipOptionType { + /** + * 名称 + */ + projectName: string | number; + + /** + * id + */ + id: string | number; + /** + * 子项 + */ + contractorList: Array; +} +export interface skipTeamType { + /** + * 名称 + */ + name: string | number; + + /** + * id + */ + id: string | number; +} + +export interface ConstructionUserForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + + /** + * 微信id + */ + openid?: string | number; + + /** + * 微信名称 + */ + nickName?: string; + + /** + * 人脸照 + */ + facePic?: string; + + /** + * 人员姓名 + */ + userName?: string; + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 分包公司id + */ + contractorId?: string | number; + /** + * 结算方式 + */ + wageMeasureUnit?: string | number; + + /** + * 班组id + */ + teamId?: string | number; + + /** + * 状态(0在职 1离职) + */ + status?: number; + + /** + * 是否代打 + */ + isPinch?: number; + + /** + * 联系电话 + */ + phone?: string; + + /** + * 0:保密 1:男 2女 + */ + sex?: number; + + /** + * 民族 + */ + nation?: string; + + /** + * 身份证正面照片 + */ + sfzFrontPic: string; + + /** + * 身份证背面照片 + */ + sfzBackPic: string; + + /** + * 身份证号码 + */ + sfzNumber?: string; + + /** + * 身份证有效开始期 + */ + sfzStart?: string; + + /** + * 身份证有效结束期 + */ + sfzEnd?: string; + + /** + * 身份证地址 + */ + sfzSite?: string; + + /** + * 身份证出生日期 + */ + sfzBirth?: string; + + /** + * 籍贯 + */ + nativePlace?: string; + + /** + * 银行卡图片 + */ + yhkPic: string; + + /** + * 银行卡号 + */ + yhkNumber?: string; + + /** + * 开户行 + */ + yhkOpeningBank?: string; + + /** + * 持卡人 + */ + yhkCardholder?: string; + + /** + * 工种(字典type_of_work) + */ + typeOfWork?: number; + + /** + * 特种工作证图片 + */ + specialWorkPic: string; + + /** + * 打卡(0启用打卡 1禁止打卡) + */ + clock?: number; + + /** + * 入场时间 + */ + entryDate?: string; + + /** + * 离场时间 + */ + leaveDate?: string; + + /** + * 薪水 + */ + salary?: number; + + /** + * 备注 + */ + remark?: string; +} + +export interface ConstructionUserStatusForm { + status: number | string; + idList: Array; +} + +export interface ConstructionUserQuery extends PageQuery { + /** + * 微信id + */ + openid?: string | number; + + /** + * 微信名称 + */ + nickName?: string; + + /** + * 人员姓名 + */ + userName?: string; + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 分包公司id + */ + contractorId?: string | number; + + /** + * 班组id + */ + teamId?: string | number; + + /** + * 不在班组id + */ + notTeamId?: string | number; + + /** + * 状态(0在职 1离职) + */ + status?: number; + + /** + * 是否代打 + */ + isPinch?: number; + + /** + * 联系电话 + */ + phone?: string; + + /** + * 0:保密 1:男 2女 + */ + sex?: number; + + /** + * 民族 + */ + nation?: string; + + /** + * 身份证号码 + */ + sfzNumber?: string; + + /** + * 身份证有效开始期 + */ + sfzStart?: string; + + /** + * 身份证有效结束期 + */ + sfzEnd?: string; + + /** + * 身份证地址 + */ + sfzSite?: string; + + /** + * 身份证出生日期 + */ + sfzBirth?: string; + + /** + * 籍贯 + */ + nativePlace?: string; + + /** + * 银行卡号 + */ + yhkNumber?: string; + + /** + * 开户行 + */ + yhkOpeningBank?: string; + + /** + * 持卡人 + */ + yhkCardholder?: string; + + /** + * 工种(字典type_of_work) + */ + typeOfWork?: number; + + /** + * 打卡(0启用打卡 1禁止打卡) + */ + clock?: number; + + /** + * 入场时间 + */ + entryDate?: string; + + /** + * 离场时间 + */ + leaveDate?: string; + + /** + * 薪水 + */ + salary?: number; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/api/project/constructionUserFile/index.ts b/src/api/project/constructionUserFile/index.ts new file mode 100644 index 0000000..ef40d02 --- /dev/null +++ b/src/api/project/constructionUserFile/index.ts @@ -0,0 +1,40 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { ConstructionUserFileVO, ConstructionUserFileForm, ConstructionUserFileQuery } from '@/api/project/constructionUserFile/types'; + +/** + * 查询施工人员文件存储列表 + * @param query + * @returns {*} + */ + +export const listConstructionUserFile = (query?: ConstructionUserFileQuery): AxiosPromise => { + return request({ + url: '/project/constructionUserFile/list', + method: 'get', + params: query + }); +}; + +/** + * 查询施工人员文件存储详细 + * @param data + */ +export const setConstructionUserFile = (data: ConstructionUserFileForm): AxiosPromise => { + return request({ + url: '/project/constructionUserFile/save', + method: 'post', + data + }); +}; + +/** + * 删除施工人员文件存储 + * @param id + */ +export const delConstructionUserFile = (id: string | number | Array) => { + return request({ + url: '/project/constructionUserFile/' + id, + method: 'delete' + }); +}; diff --git a/src/api/project/constructionUserFile/types.ts b/src/api/project/constructionUserFile/types.ts new file mode 100644 index 0000000..30c4473 --- /dev/null +++ b/src/api/project/constructionUserFile/types.ts @@ -0,0 +1,137 @@ +export interface ConstructionUserFileVO { + /** + * 主键id + */ + id: string | number; + + /** + * 用户id + */ + userId: string | number; + + /** + * 文件类型 + */ + fileType: string; + + /** + * 文件名称 + */ + fileName: string; + + /** + * 文件路径 + */ + path: string; + + /** + * 备注 + */ + remark: string; +} + +export interface ConstructionUserExitVO { + /** + * 主键id + */ + id: string | number; + + /** + * 用户id + */ + userId: string | number; + /** + * 文件路径地址 + */ + pathUrl: Array; + + /** + * 身份证号码 + + */ + sfzNumber: string; + + /** + * 项目id + */ + projectId: string; + /** + * 班组id + */ + teamId: string; + /** + * 入场时间 + + */ + entryDate: string; + /** + * 退场时间 + + */ + leaveDate: string; + + /** + * 退场文件 + + */ + path: string; + + /** + * 备注 + */ + remark: string; +} + +export interface ConstructionUserFileForm extends BaseEntity { + /** + * 用户id + */ + userId?: string | number; + + /** + * 文件类型 + */ + fileList?: Array; +} + +interface fileListType { + fileId: string | number; + fileType: string | number; +} + +export interface ConstructionUserFileQuery { + /** + * 主键id + */ + id?: string | number; + + /** + * 用户id + */ + userId?: string | number; + + /** + * 文件类型 + */ + fileType?: string; + + /** + * 文件名称 + */ + fileName?: string; + + /** + * 文件路径 + */ + path?: string; + + /** + * 备注 + */ + remark?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/api/project/contractor/index.ts b/src/api/project/contractor/index.ts new file mode 100644 index 0000000..e63b992 --- /dev/null +++ b/src/api/project/contractor/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { ContractorForm, ContractorQuery, ContractorVO } from '@/api/project/contractor/types'; + +/** + * 查询分包单位列表 + * @param query + * @returns {*} + */ + +export const listContractor = (query?: ContractorQuery): AxiosPromise => { + return request({ + url: '/contractor/contractor/list', + method: 'get', + params: query + }); +}; + +/** + * 查询分包单位详细 + * @param id + */ +export const getContractor = (id: string | number): AxiosPromise => { + return request({ + url: '/contractor/contractor/' + id, + method: 'get' + }); +}; + +/** + * 新增分包单位 + * @param data + */ +export const addContractor = (data: ContractorForm): AxiosPromise => { + return request({ + url: '/contractor/contractor', + method: 'post', + data: data + }); +}; + +/** + * 修改分包单位 + * @param data + */ +export const updateContractor = (data: ContractorForm) => { + return request({ + url: '/contractor/contractor', + method: 'put', + data: data + }); +}; + +/** + * 删除分包单位 + * @param id + */ +export const delContractor = (id: string | number | Array) => { + return request({ + url: '/contractor/contractor/' + id, + method: 'delete' + }); +}; diff --git a/src/api/project/contractor/types.ts b/src/api/project/contractor/types.ts new file mode 100644 index 0000000..0d4ab3f --- /dev/null +++ b/src/api/project/contractor/types.ts @@ -0,0 +1,147 @@ +export interface ContractorVO { + /** + * 主键id + */ + id: string | number; + + /** + * 公司名称 + */ + name: string; + + /** + * 负责人 + */ + principal: string; + + /** + * 负责人联系电话 + */ + principalPhone: string; + + /** + * 管理人 + */ + custodian: string; + + /** + * 管理人联系电话 + */ + custodianPhone: string; + /** + * 分包类型 + */ + contractorType?: string; + + /** + * 公司相关文件 + */ + fileMap: Record; + + /** + * 备注 + */ + remark: string; + + /** + * 创建时间 + */ + createTime: string; +} + +export interface ContractorForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + /** + * 供应商id + */ + supplierId?: string | number; + /** + * 供应商 + */ + supplier?: string; + + /** + * 主键id + */ + projectId?: string | number; + + /** + * 公司名称 + */ + name?: string; + + /** + * 负责人 + */ + principal?: string; + + /** + * 负责人联系电话 + */ + principalPhone?: string; + + /** + * 管理人 + */ + custodian?: string; + + /** + * 管理人联系电话 + */ + custodianPhone?: string; + /** + * 分包类型 + */ + contractorType?: string; + /** + * 公司相关文件 + */ + fileMap: Record; + + /** + * 备注 + */ + remark?: string; +} + +export interface ContractorQuery extends PageQuery { + /** + * 公司名称 + */ + name?: string; + + /** + * 负责人 + */ + principal?: string; + /** + * 项目id + */ + projectId: string | number; + /** + * 负责人联系电话 + */ + principalPhone?: string; + + /** + * 管理人 + */ + custodian?: string; + + /** + * 管理人联系电话 + */ + custodianPhone?: string; + /** + * 分包类型 + */ + contractorType?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/api/project/contractorMaterial/contractorMaterialRecord/index.ts b/src/api/project/contractorMaterial/contractorMaterialRecord/index.ts new file mode 100644 index 0000000..2be6a25 --- /dev/null +++ b/src/api/project/contractorMaterial/contractorMaterialRecord/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { ContractorMaterialRecordVO, ContractorMaterialRecordForm, ContractorMaterialRecordQuery } from '@/api/contractor/contractorMaterialRecord/types'; + +/** + * 查询分包方物料记录列表 + * @param query + * @returns {*} + */ + +export const listContractorMaterialRecord = (query?: ContractorMaterialRecordQuery): AxiosPromise => { + return request({ + url: '/contractor/contractorMaterialRecord/list', + method: 'get', + params: query + }); +}; + +/** + * 查询分包方物料记录详细 + * @param id + */ +export const getContractorMaterialRecord = (id: string | number): AxiosPromise => { + return request({ + url: '/contractor/contractorMaterialRecord/' + id, + method: 'get' + }); +}; + +/** + * 新增分包方物料记录 + * @param data + */ +export const addContractorMaterialRecord = (data: ContractorMaterialRecordForm) => { + return request({ + url: '/contractor/contractorMaterialRecord', + method: 'post', + data: data + }); +}; + +/** + * 修改分包方物料记录 + * @param data + */ +export const updateContractorMaterialRecord = (data: ContractorMaterialRecordForm) => { + return request({ + url: '/contractor/contractorMaterialRecord', + method: 'put', + data: data + }); +}; + +/** + * 删除分包方物料记录 + * @param id + */ +export const delContractorMaterialRecord = (id: string | number | Array) => { + return request({ + url: '/contractor/contractorMaterialRecord/' + id, + method: 'delete' + }); +}; diff --git a/src/api/project/contractorMaterial/contractorMaterialRecord/types.ts b/src/api/project/contractorMaterial/contractorMaterialRecord/types.ts new file mode 100644 index 0000000..ec71dbc --- /dev/null +++ b/src/api/project/contractorMaterial/contractorMaterialRecord/types.ts @@ -0,0 +1,141 @@ +export interface ContractorMaterialRecordVO { + /** + * 主键id + */ + id: string | number; + + /** + * 项目id + */ + projectId: string | number; + + /** + * 分包方id + */ + contractorId: string | number; + + /** + * 物料id + */ + contractorMaterialId: string | number; + + /** + * 记录类型(1到货计划 2使用情况) + */ + recordType: string; + + /** + * 记录时间 + */ + recordTime: string; + + /** + * 数量 + */ + recordNumber: number; + + /** + * 剩余数量(到货 使用) + */ + remainingNumber: number; + + /** + * 使用位置或构件部位(使用情况) + */ + usedPosition: string; + + /** + * 相关附件 + */ + file: string; + + /** + * 备注 + */ + remark: string; + +} + +export interface ContractorMaterialRecordForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + + /** + * 物料id + */ + contractorMaterialId?: string | number; + + /** + * 记录类型(1到货计划 2使用情况) + */ + recordType?: string; + + /** + * 记录时间 + */ + recordTime?: string; + + /** + * 数量 + */ + recordNumber?: number; + + /** + * 剩余数量(到货 使用) + */ + remainingNumber?: number; + + /** + * 使用位置或构件部位(使用情况) + */ + usedPosition?: string; + + /** + * 相关附件 + */ + file?: string; + + /** + * 备注 + */ + remark?: string; + +} + +export interface ContractorMaterialRecordQuery extends PageQuery { + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 分包方id + */ + contractorId?: string | number; + + /** + * 物料id + */ + contractorMaterialId?: string | number; + + /** + * 记录类型(1到货计划 2使用情况) + */ + recordType?: string; + + /** + * 使用位置或构件部位(使用情况) + */ + usedPosition?: string; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/api/project/contractorMaterial/index.ts b/src/api/project/contractorMaterial/index.ts new file mode 100644 index 0000000..330eec4 --- /dev/null +++ b/src/api/project/contractorMaterial/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { ContractorMaterialVO, ContractorMaterialForm, ContractorMaterialQuery } from '@/api/project/contractorMaterial/types'; + +/** + * 查询分包方物料列表 + * @param query + * @returns {*} + */ + +export const listContractorMaterial = (query?: ContractorMaterialQuery): AxiosPromise => { + return request({ + url: '/contractor/contractorMaterial/list', + method: 'get', + params: query + }); +}; + +/** + * 查询分包方物料详细 + * @param id + */ +export const getContractorMaterial = (id: string | number): AxiosPromise => { + return request({ + url: '/contractor/contractorMaterial/' + id, + method: 'get' + }); +}; + +/** + * 新增分包方物料 + * @param data + */ +export const addContractorMaterial = (data: ContractorMaterialForm) => { + return request({ + url: '/contractor/contractorMaterial', + method: 'post', + data: data + }); +}; + +/** + * 修改分包方物料 + * @param data + */ +export const updateContractorMaterial = (data: ContractorMaterialForm) => { + return request({ + url: '/contractor/contractorMaterial', + method: 'put', + data: data + }); +}; + +/** + * 删除分包方物料 + * @param id + */ +export const delContractorMaterial = (id: string | number | Array) => { + return request({ + url: '/contractor/contractorMaterial/' + id, + method: 'delete' + }); +}; diff --git a/src/api/project/contractorMaterial/types.ts b/src/api/project/contractorMaterial/types.ts new file mode 100644 index 0000000..cea393c --- /dev/null +++ b/src/api/project/contractorMaterial/types.ts @@ -0,0 +1,126 @@ +export interface ContractorMaterialVO { + /** + * 分包方id + */ + contractorId: string | number; + + /** + * 物料名称 + */ + materialName: string; + + /** + * 物料类型 + */ + materialType: string; + + /** + * 物料型号 + */ + materialModel: string; + + /** + * 物料数量 + */ + materialNumber: number; + + /** + * 物料单位 + */ + materialUnit: string; + + /** + * 文件 + */ + file: string; + + /** + * 备注 + */ + remark: string; + +} + +export interface ContractorMaterialForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 分包方id + */ + contractorId?: string | number; + + /** + * 物料名称 + */ + materialName?: string; + + /** + * 物料类型 + */ + materialType?: string; + + /** + * 物料型号 + */ + materialModel?: string; + + /** + * 物料单位 + */ + materialUnit?: string; + + /** + * 文件 + */ + file?: string; + + /** + * 备注 + */ + remark?: string; + +} + +export interface ContractorMaterialQuery extends PageQuery { + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 分包方id + */ + contractorId?: string | number; + + /** + * 物料名称 + */ + materialName?: string; + + /** + * 物料类型 + */ + materialType?: string; + + /** + * 物料型号 + */ + materialModel?: string; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/api/project/contractorTool/contractorToolEntry/index.ts b/src/api/project/contractorTool/contractorToolEntry/index.ts new file mode 100644 index 0000000..6a9ddc1 --- /dev/null +++ b/src/api/project/contractorTool/contractorToolEntry/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { ContractorToolEntryVO, ContractorToolEntryForm, ContractorToolEntryQuery } from '@/api/contractor/contractorToolEntry/types'; + +/** + * 查询分包方工器具进场列表 + * @param query + * @returns {*} + */ + +export const listContractorToolEntry = (query?: ContractorToolEntryQuery): AxiosPromise => { + return request({ + url: '/contractor/contractorToolRecord/list', + method: 'get', + params: query + }); +}; + +/** + * 查询分包方工器具进场详细 + * @param id + */ +export const getContractorToolEntry = (id: string | number): AxiosPromise => { + return request({ + url: '/contractor/contractorToolRecord/' + id, + method: 'get' + }); +}; + +/** + * 新增分包方工器具进场 + * @param data + */ +export const addContractorToolEntry = (data: ContractorToolEntryForm) => { + return request({ + url: '/contractor/contractorToolRecord', + method: 'post', + data: data + }); +}; + +/** + * 修改分包方工器具进场 + * @param data + */ +export const updateContractorToolEntry = (data: ContractorToolEntryForm) => { + return request({ + url: '/contractor/contractorToolRecord', + method: 'put', + data: data + }); +}; + +/** + * 删除分包方工器具进场 + * @param id + */ +export const delContractorToolEntry = (id: string | number | Array) => { + return request({ + url: '/contractor/contractorToolRecord/' + id, + method: 'delete' + }); +}; diff --git a/src/api/project/contractorTool/contractorToolEntry/types.ts b/src/api/project/contractorTool/contractorToolEntry/types.ts new file mode 100644 index 0000000..d966cc0 --- /dev/null +++ b/src/api/project/contractorTool/contractorToolEntry/types.ts @@ -0,0 +1,156 @@ +export interface ContractorToolEntryVO { + /** + * 主键id + */ + id: string | number; + + /** + * 项目id + */ + projectId: string | number; + + /** + * 分包方id + */ + contractorId: string | number; + + /** + * 分包方工器具id + */ + contractorToolId: string | number; + + /** + * 进场工器具数量 + */ + toolNumber: string; + + /** + * 检测编号 + */ + checkNum: string; + + /** + * 检测部门 + */ + checkDept: string; + + /** + * 检测时间 + */ + checkTime: string; + + /** + * 合格证 + */ + certificate: string; + + /** + * 备注 + */ + remark: string; + + /** + * 进场时间 + */ + entryTime: string; + +} + +export interface ContractorToolEntryForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + + /** + * 分包方工器具id + */ + contractorToolId?: string | number; + + /** + * 进场工器具数量 + */ + toolNumber?: string; + + /** + * 检测编号 + */ + checkNum?: string; + + /** + * 检测部门 + */ + checkDept?: string; + + /** + * 检测时间 + */ + checkTime?: string; + + /** + * 合格证 + */ + certificate?: string; + + /** + * 备注 + */ + remark?: string; + + /** + * 进场时间 + */ + entryTime?: string; + /** + * 类型 + */ + recordType?: string; + /** + * 工器具数量 + */ + recordNumber?: number; +} + +export interface ContractorToolEntryQuery extends PageQuery { + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 分包方id + */ + contractorId?: string | number; + + /** + * 分包方工器具id + */ + contractorToolId?: string | number; + + /** + * 进场工器具数量 + */ + toolNumber?: string; + + /** + * 检测编号 + */ + checkNum?: string; + /** + * 类型 + */ + recordType?: string; + /** + * 检测部门 + */ + checkDept?: string; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/api/project/contractorTool/index.ts b/src/api/project/contractorTool/index.ts new file mode 100644 index 0000000..c5d423a --- /dev/null +++ b/src/api/project/contractorTool/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { ContractorToolVO, ContractorToolForm, ContractorToolQuery } from '@/api/project/contractorTool/types'; + +/** + * 查询分包方工器具列表 + * @param query + * @returns {*} + */ + +export const listContractorTool = (query?: ContractorToolQuery): AxiosPromise => { + return request({ + url: '/contractor/contractorTool/list', + method: 'get', + params: query + }); +}; + +/** + * 查询分包方工器具详细 + * @param id + */ +export const getContractorTool = (id: string | number): AxiosPromise => { + return request({ + url: '/contractor/contractorTool/' + id, + method: 'get' + }); +}; + +/** + * 新增分包方工器具 + * @param data + */ +export const addContractorTool = (data: ContractorToolForm) => { + return request({ + url: '/contractor/contractorTool', + method: 'post', + data: data + }); +}; + +/** + * 修改分包方工器具 + * @param data + */ +export const updateContractorTool = (data: ContractorToolForm) => { + return request({ + url: '/contractor/contractorTool', + method: 'put', + data: data + }); +}; + +/** + * 删除分包方工器具 + * @param id + */ +export const delContractorTool = (id: string | number | Array) => { + return request({ + url: '/contractor/contractorTool/' + id, + method: 'delete' + }); +}; diff --git a/src/api/project/contractorTool/types.ts b/src/api/project/contractorTool/types.ts new file mode 100644 index 0000000..97d91f4 --- /dev/null +++ b/src/api/project/contractorTool/types.ts @@ -0,0 +1,136 @@ +export interface ContractorToolVO { + /** + * 主键id + */ + id: string | number; + + /** + * 项目id + */ + projectId: string | number; + + /** + * 分包方id + */ + contractorId: string | number; + + /** + * 工具名称 + */ + toolName: string; + + /** + * 工具类型 + */ + toolType: string; + + /** + * 工具型号 + */ + toolModel: string; + + /** + * 工具数量 + */ + toolNumber: string; + + /** + * 备注 + */ + remark: string; + + /** + * 创建时间 + */ + createTime: string; + +} + +export interface ContractorToolForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 分包方id + */ + contractorId?: string | number; + + /** + * 工具名称 + */ + toolName?: string; + + /** + * 工具类型 + */ + toolType?: string; + + /** + * 工具型号 + */ + toolModel?: string; + + /** + * 工具数量 + */ + toolNumber?: string; + + /** + * 文件 + */ + file?: string; + + /** + * 备注 + */ + remark?: string; + +} + +export interface ContractorToolQuery extends PageQuery { + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 分包方id + */ + contractorId?: string | number; + + /** + * 工具名称 + */ + toolName?: string; + + /** + * 工具类型 + */ + toolType?: string; + + /** + * 工具型号 + */ + toolModel?: string; + + /** + * 工具数量 + */ + toolNumber?: string; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/api/project/leave/index.ts b/src/api/project/leave/index.ts new file mode 100644 index 0000000..50bdc04 --- /dev/null +++ b/src/api/project/leave/index.ts @@ -0,0 +1,76 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { LeaveVO, LeaveForm, LeaveQuery } from '@/api/project/leave/types'; +import { AuditReissueCardForm } from '../reissueCard/types'; + +/** + * 查询施工人员请假申请列表 + * @param query + * @returns {*} + */ + +export const listLeave = (query?: LeaveQuery): AxiosPromise => { + return request({ + url: '/project/leave/list', + method: 'get', + params: query + }); +}; + +/** + * 查询施工人员请假申请详细 + * @param id + */ +export const getLeave = (id: string | number): AxiosPromise => { + return request({ + url: '/project/leave/' + id, + method: 'get' + }); +}; + +/** + * 新增施工人员请假申请 + * @param data + */ +export const addLeave = (data: LeaveForm) => { + return request({ + url: '/project/leave', + method: 'post', + data: data + }); +}; + +/** + * 修改施工人员请假申请 + * @param data + */ +export const updateLeave = (data: LeaveForm) => { + return request({ + url: '/project/leave', + method: 'put', + data: data + }); +}; + +/** + * 删除施工人员请假申请 + * @param id + */ +export const delLeave = (id: string | number | Array) => { + return request({ + url: '/project/leave/' + id, + method: 'delete' + }); +}; + +/** + * 管理员审核施工人员请假申请 + * @param data + */ +export const AuditReissueCard = (data: AuditReissueCardForm) => { + return request({ + url: '/project/leave/review/manager', + method: 'put', + data: data + }); +}; diff --git a/src/api/project/leave/types.ts b/src/api/project/leave/types.ts new file mode 100644 index 0000000..c4a0331 --- /dev/null +++ b/src/api/project/leave/types.ts @@ -0,0 +1,206 @@ +export interface LeaveVO { + /** + * 申请人名字 + */ + userName: string; + id?: string | number; + /** + * 申请请假说明 + */ + userExplain: string; + status?: string; + /** + * 请假申请时间 + */ + userTime: string; + + /** + * 请假类型(1事假 2病假) + */ + leaveType: string; + + /** + * 请假开始时间 + */ + startTime: string; + + /** + * 请假结束时间 + */ + endTime: string; + + /** + * 班组长名字 + */ + gangerName: string; + + /** + * 班组长意见(1未读 2同意 3拒绝) + */ + gangerOpinion: string; + + /** + * 班组长说明 + */ + gangerExplain: string; + + /** + * 班组长操作时间 + */ + gangerTime: string; + + /** + * 管理员意见(1未读 2同意 3拒绝) + */ + managerOpinion: string; + + /** + * 管理员说明 + */ + managerExplain: string; + + /** + * 管理员操作时间 + */ + managerTime: string; + + /** + * 备注 + */ + remark: string; + managerName?: string; +} + +export interface LeaveForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + + /** + * 申请人id + */ + userId?: string | number; + + /** + * 申请人名字 + */ + userName?: string; + + /** + * 申请请假说明 + */ + userExplain?: string; + + /** + * 请假申请时间 + */ + userTime?: string; + + /** + * 请假类型(1事假 2病假) + */ + leaveType?: string; + + /** + * 请假开始时间 + */ + startTime?: string; + + /** + * 请假结束时间 + */ + endTime?: string; + + /** + * 班组长 + */ + gangerId?: string | number; + + /** + * 班组长名字 + */ + gangerName?: string; + + /** + * 班组长意见(1未读 2同意 3拒绝) + */ + gangerOpinion?: string; + + /** + * 班组长说明 + */ + gangerExplain?: string; + + /** + * 班组长操作时间 + */ + gangerTime?: string; + + /** + * 管理员意见(1未读 2同意 3拒绝) + */ + managerOpinion?: string; + + /** + * 管理员说明 + */ + managerExplain?: string; + + /** + * 管理员操作时间 + */ + managerTime?: string; + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 班组id + */ + teamId?: string | number; + + /** + * 备注 + */ + remark?: string; +} + +export interface LeaveQuery extends PageQuery { + /** + * 申请人名字 + */ + userName?: string; + + /** + * 请假类型(1事假 2病假) + */ + leaveType?: string; + + /** + * 班组长意见(1未读 2同意 3拒绝) + */ + gangerOpinion?: string; + + /** + * 管理员意见(1未读 2同意 3拒绝) + */ + managerOpinion?: string; + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 班组id + */ + teamId?: string | number; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/api/project/project/index.ts b/src/api/project/project/index.ts new file mode 100644 index 0000000..04d5b65 --- /dev/null +++ b/src/api/project/project/index.ts @@ -0,0 +1,199 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { childProjectQuery, ProjectForm, ProjectQuery, ProjectVO } from '@/api/project/project/types'; + +/** + * 查询项目列表 + * @param query + * @returns {*} + */ + +export const listProject = (query?: ProjectQuery): AxiosPromise => { + return request({ + url: '/project/project/list', + method: 'get', + params: query + }); +}; + +/** + * 查询项目dxf + * @param query + * @returns {*} + */ + +export const listDXFProject = (id: string | number): AxiosPromise => { + return request({ + url: '/project/projectFile/json/' + id, + method: 'get' + }); +}; + +/** + * 查询项目详细 + * @param id + */ +export const getProject = (id: string | number): AxiosPromise => { + return request({ + url: '/project/project/' + id, + method: 'get' + }); +}; + +/** + * 新增项目 + * @param data + */ +export const addProject = (data: ProjectForm): AxiosPromise => { + return request({ + url: '/project/project', + method: 'post', + data: data + }); +}; + +/** + * 修改项目 + * @param data + */ +export const updateProject = (data: ProjectForm) => { + return request({ + url: '/project/project', + method: 'put', + data: data + }); +}; + +/** + * 上传dxf文件 + * @param data + */ +export const upLoadProjectDXF = (data: any) => { + return request({ + url: '/project/projectFile/upload/dxf', + method: 'post', + data: data + }); +}; + +/** + * 通过GeoJson新增设施-光伏板 + * @param data + */ +export const addProjectFacilities = (data: any) => { + return request({ + url: '/facility/photovoltaicPanel/geoJson', + method: 'post', + data: data, + headers: { + 'X-No-Cache': 'true' + } + }); +}; + +/** + * 通过GeoJson新增设施-光伏板桩点、立柱、支架 + * @param data + */ +export const addProjectPilePoint = (data: any) => { + console.log('🚀 ~ addProjectPilePoint ~ data:', data); + + return request({ + url: '/facility/photovoltaicPanelPoint/parts/geoJson', + method: 'post', + data: data + }); +}; + +/** + * 通过GeoJson新增设施-方阵 + * @param data + */ +export const addProjectSquare = (data: any) => { + return request({ + url: '/facility/matrix/geoJson', + method: 'post', + data: data + }); +}; + +/** + * 通过GeoJson新增设施-箱变 + * @param data + */ +export const addBoxTransformer = (data: any) => { + return request({ + url: '/facility/boxTransformer/geoJson', + method: 'post', + data: data + }); +}; + +/** + * 通过GeoJson新增设施-逆变器 + * @param data + */ +export const addInverter = (data: any) => { + return request({ + url: '/facility/inverter/geoJson', + method: 'post', + data: data + }); +}; + +/** + * 删除项目 + * @param id + */ +export const delProject = (id: string | number | Array) => { + return request({ + url: '/project/project/' + id, + method: 'delete' + }); +}; + +/** + * 新增子项目 + * @param data + */ +export const addChildProject = (data: childProjectQuery) => { + return request({ + url: '/project/project/sub', + method: 'post', + data: data + }); +}; + +/** + * 查询项目下的子项目列表 + * @param id + */ +export const getChildProject = (id: string | number): AxiosPromise => { + return request({ + url: '/project/project/list/sub/' + id, + method: 'get' + }); +}; + +/** + * 上传项目文件 + * @param data + */ +export const uploadProjectFile = (data: any) => { + return request({ + url: '/project/project/save/tender/file', + method: 'put', + data: data + }); +}; + +/** + * 切换项目 + * @param id + */ +export const changeProject = (id: string | number) => { + return request({ + url: '/project/project/changeProject/' + id, + method: 'get' + }); +}; diff --git a/src/api/project/project/types.ts b/src/api/project/project/types.ts new file mode 100644 index 0000000..2e21007 --- /dev/null +++ b/src/api/project/project/types.ts @@ -0,0 +1,385 @@ +export interface ProjectVO { + /** + * id + */ + id: string; + + /** + * 项目名称 + */ + projectName: string; + tenderFiles: string; + + /** + * 项目简称 + */ + shortName: string; + designId: string; + /** + * 父项目id + */ + pId: string | number; + + /** + * 状态(0正常 1停用) + */ + status: number; + + /** + * 项目图片 + */ + picUrl: string; + + /** + * 备注 + */ + remark: string; + + /** + * 项目类型 + */ + projectType: string; + + /** + * 项目类型(1光伏 2风电) + */ + projectCategory: number; + + /** + * 删除时间 + */ + deletedAt: string; + + /** + * 项目地址 + */ + projectSite: string; + + /** + * 负责人 + */ + principal: string; + + /** + * 负责人电话 + */ + principalPhone: string; + + /** + * 实际容量 + */ + actual: string; + + /** + * 计划容量 + */ + plan: string; + + /** + * 开工时间 + */ + onStreamTime: string; + + /** + * 打卡范围(09:00,18:00) + */ + punchRange: string; + + /** + * 设计总量 + */ + designTotal: number; + + /** + * 安全协议书 + */ + securityAgreement: string; + + /** + * 排序字段 + */ + sort: number; + + /** + * 显示隐藏(1显示 2隐藏) + */ + showHidden: string | number; + + /** + * 是否删除(0正常 1删除) + */ + isDelete: number; + + /** + * 创建时间 + */ + createTime: string; + type?: string; +} + +export interface locationType { + /** + * 经度 + */ + lng: string; + // 纬度 + lat: string; + // 逆地理编码地址 + + projectSite: string; +} + +export interface childProjectQuery { + projectName: string; + pid: string; + id?: string; +} + +export interface ProjectForm extends BaseEntity { + /** + * + */ + id?: string | number; + + /** + * 项目名称 + */ + projectName?: string; + + /** + * 项目简称 + */ + shortName?: string; + + /** + * 父项目id + */ + pId?: string | number; + + /** + * 状态(0正常 1停用) + */ + status?: number; + + /** + * 项目图片 + */ + picUrl?: string; + + /** + * 经度 + */ + lng?: string; + + /** + * 纬度 + */ + lat?: string; + + /** + * 备注 + */ + remark?: string; + + /** + * 项目类型 + */ + projectType?: string; + + /** + * 项目类型(1光伏 2风电) + */ + projectCategory?: number; + + /** + * 删除时间 + */ + deletedAt?: string; + + /** + * 项目地址 + */ + projectSite?: string; + + /** + * 负责人 + */ + principal?: string; + + /** + * 负责人电话 + */ + principalPhone?: string; + + /** + * 实际容量 + */ + actual?: string; + + /** + * 计划容量 + */ + plan?: string; + + /** + * 开工时间 + */ + onStreamTime?: string; + + /** + * 打卡开始时间(09:00,18:00) + */ + playCardStart?: string; + + /** + * 打卡结束时间(09:00,18:00) + */ + playCardEnd?: string; + + /** + * 设计总量 + */ + designTotal?: number; + + /** + * 安全协议书 + */ + securityAgreement?: string; + + /** + * 排序字段 + */ + sort?: number; + + /** + * 显示隐藏(1显示 2隐藏) + */ + showHidden?: string | number; + + /** + * 是否删除(0正常 1删除) + */ + isDelete?: number; +} + +export interface ProjectQuery extends PageQuery { + /** + * 项目名称 + */ + projectName?: string; + + /** + * 项目简称 + */ + shortName?: string; + + /** + * 父项目id + */ + pId?: string | number; + + /** + * 状态(0正常 1停用) + */ + status?: number; + + /** + * 项目图片 + */ + picUrl?: string; + + /** + * 项目类型 + */ + projectType?: string; + + /** + * 项目类型(1光伏 2风电) + */ + projectCategory?: number; + + /** + * 删除时间 + */ + deletedAt?: string; + + /** + * 项目地址 + */ + projectSite?: string; + + /** + * 经度 + */ + lng?: string; + + /** + * 纬度 + */ + lat?: string; + + /** + * 负责人 + */ + principal?: string; + + /** + * 负责人电话 + */ + principalPhone?: string; + + /** + * 实际容量 + */ + actual?: string; + + /** + * 计划容量 + */ + plan?: string; + + /** + * 开工时间 + */ + onStreamTime?: string; + + /** + * 打卡开始时间(09:00,18:00) + */ + playCardStart?: string; + + /** + * 打卡结束时间(09:00,18:00) + */ + playCardEnd?: string; + + /** + * 设计总量 + */ + designTotal?: number; + + /** + * 安全协议书 + */ + securityAgreement?: string; + + /** + * 排序字段 + */ + sort?: number; + + /** + * 显示隐藏(1显示 2隐藏) + */ + showHidden?: string | number; + + /** + * 是否删除(0正常 1删除) + */ + isDelete?: number; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/api/project/projectRelevancy/index.ts b/src/api/project/projectRelevancy/index.ts new file mode 100644 index 0000000..7577e83 --- /dev/null +++ b/src/api/project/projectRelevancy/index.ts @@ -0,0 +1,103 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { ProjectRelevancyForm, ProjectRelevancyQuery, ProjectRelevancyVO } from '@/api/project/projectRelevancy/types'; + +/** + * 查询系统用户与项目关联列表 + * @param query + * @returns {*} + */ + +export const listProjectRelevancy = (query?: ProjectRelevancyQuery): AxiosPromise => { + return request({ + url: '/project/projectRelevancy/login/page', + method: 'get', + params: query + }); +}; + +/** + * 查询系统用户与项目关联详细 + * @param id + */ +export const getProjectRelevancy = (id: string | number): AxiosPromise => { + return request({ + url: '/project/projectRelevancy/' + id, + method: 'get' + }); +}; + +/** + * 新增系统用户与项目关联 + * @param data + */ +export const addProjectRelevancy = (data: ProjectRelevancyForm): AxiosPromise => { + return request({ + url: '/project/projectRelevancy', + method: 'post', + data: data + }); +}; + +/** + * 修改系统用户与项目关联 + * @param data + */ +export const updateProjectRelevancy = (data: ProjectRelevancyForm) => { + return request({ + url: '/project/projectRelevancy', + method: 'put', + data: data + }); +}; + +/** + * 删除系统用户与项目关联 + * @param id + */ +export const delProjectRelevancy = (id: string | number | Array) => { + return request({ + url: '/project/projectRelevancy/' + id, + method: 'delete' + }); +}; + +/** + * 穿梭框接口 + */ + +/** + * 获取用户已关联的项目列表 + * @param params { userId: number } + */ +export function listUserProjects(params: { userId: number | string }) { + return request({ + url: '/project/projectRelevancy/list', + method: 'get', + params + }); +} + +/** + * 添加项目关联 + * @param data { userId: number; projectIds: number[] } + */ +export function addNewProjectRelevancy(data: { userId: number | string; projectIdList: number[] }) { + return request({ + url: '/project/projectRelevancy/add/project/list', + method: 'post', + data + }); +} + +/** + * 移除项目关联 + * @param data { userId: number; projectIds: number[] } + */ +export function removeNewProjectRelevancy(data: { userId: number | string; projectIdList: number[] }) { + return request({ + url: '/project/projectRelevancy/remove/project/list', + method: 'delete', + data + }); +} diff --git a/src/api/project/projectRelevancy/types.ts b/src/api/project/projectRelevancy/types.ts new file mode 100644 index 0000000..bc84b19 --- /dev/null +++ b/src/api/project/projectRelevancy/types.ts @@ -0,0 +1,72 @@ +import { ProjectVO } from '@/api/project/project/types'; + +export interface ProjectRelevancyVO { + /** + * 主键ID + */ + id: string | number; + + /** + * 用户ID + */ + userId: string | number; + + /** + * 项目ID + */ + projectId: string | number; + + /** + * 项目详情 + */ + project: ProjectVO; + + /** + * 创建时间 + */ + createTime: string; +} + +export interface ProjectRelevancyForm extends BaseEntity { + /** + * 主键ID + */ + id?: string | number; + + /** + * 用户ID + */ + userId?: string | number; + + /** + * 项目ID + */ + projectId?: string | number; + + /** + * 删除时间 + */ + deletedAt?: string; +} + +export interface ProjectRelevancyQuery extends PageQuery { + /** + * 用户ID + */ + userId?: string | number; + + /** + * 项目ID + */ + projectId?: string | number; + + /** + * 删除时间 + */ + deletedAt?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/api/project/projectTeam/index.ts b/src/api/project/projectTeam/index.ts new file mode 100644 index 0000000..8a55f69 --- /dev/null +++ b/src/api/project/projectTeam/index.ts @@ -0,0 +1,74 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { ProjectTeamForemanResp, ProjectTeamForm, ProjectTeamQuery, ProjectTeamVO } from '@/api/project/projectTeam/types'; + +/** + * 查询项目班组列表 + * @param query + * @returns {*} + */ + +export const listProjectTeam = (query?: ProjectTeamQuery): AxiosPromise => { + return request({ + url: '/project/projectTeam/list', + method: 'get', + params: query + }); +}; + +/** + * 根据项目id查询项目班组班组长信息列表 + * @param projectId + */ +export const listProjectTeamForeman = (projectId: string | number): AxiosPromise => { + return request({ + url: '/project/projectTeam/listForeman/' + projectId, + method: 'get' + }); +}; + +/** + * 查询项目班组详细 + * @param id + */ +export const getProjectTeam = (id: string | number): AxiosPromise => { + return request({ + url: '/project/projectTeam/' + id, + method: 'get' + }); +}; + +/** + * 新增项目班组 + * @param data + */ +export const addProjectTeam = (data: ProjectTeamForm): AxiosPromise => { + return request({ + url: '/project/projectTeam', + method: 'post', + data: data + }); +}; + +/** + * 修改项目班组 + * @param data + */ +export const updateProjectTeam = (data: ProjectTeamForm) => { + return request({ + url: '/project/projectTeam', + method: 'put', + data: data + }); +}; + +/** + * 删除项目班组 + * @param id + */ +export const delProjectTeam = (id: string | number | Array) => { + return request({ + url: '/project/projectTeam/' + id, + method: 'delete' + }); +}; diff --git a/src/api/project/projectTeam/types.ts b/src/api/project/projectTeam/types.ts new file mode 100644 index 0000000..d14b582 --- /dev/null +++ b/src/api/project/projectTeam/types.ts @@ -0,0 +1,109 @@ +export interface ProjectTeamVO { + /** + * 主键id + */ + id: string | number; + + /** + * 项目id + */ + projectId: string | number; + + /** + * 班组名称 + */ + teamName: string; + + /** + * 范围内打卡(0范围内打卡 1任何地点打卡)默认为1 + */ + isClockIn: number; + + /** + * 备注 + */ + remark: string; + + /** + * 创建时间 + */ + createTime: string; +} + +export interface ProjectTeamForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + peopleNumber?: string | number; + /** + * 项目id + */ + projectId?: string | number; + + /** + * 班组名称 + */ + teamName?: string; + + /** + * 范围内打卡(0范围内打卡 1任何地点打卡)默认为1 + */ + isClockIn?: number; + + /** + * 备注 + */ + remark?: string; +} + +export interface ProjectTeamQuery extends PageQuery { + /** + * 项目id + */ + projectId?: string | number; + peopleNumber?: string | number; + /** + * 班组名称 + */ + teamName?: string; + + /** + * 范围内打卡(0范围内打卡 1任何地点打卡)默认为1 + */ + isClockIn?: number; + + /** + * 日期范围参数 + */ + params?: any; +} + +export interface ProjectTeamForemanResp { + /** + * 班组id + */ + id: string | number; + foremanList: foremanQuery[]; + /** + * 班组名称 + */ + teamName: string; + + /** + * 项目id + */ + projectId: string | number; +} + +export interface foremanQuery { + /** + * 班组长id + */ + foremanId: string | number; + + /** + * 班组长名字 + */ + foremanName: string; +} diff --git a/src/api/project/projectTeamMember/index.ts b/src/api/project/projectTeamMember/index.ts new file mode 100644 index 0000000..c64cee2 --- /dev/null +++ b/src/api/project/projectTeamMember/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { ProjectTeamMemberForm, ProjectTeamMemberQuery, ProjectTeamMemberVO } from '@/api/project/projectTeamMember/types'; + +/** + * 查询项目班组下的成员列表 + * @param query + * @returns {*} + */ + +export const listProjectTeamMember = (query?: ProjectTeamMemberQuery): AxiosPromise => { + return request({ + url: '/project/projectTeamMember/list', + method: 'get', + params: query + }); +}; + +/** + * 查询项目班组下的成员详细 + * @param id + */ +export const getProjectTeamMember = (id: string | number): AxiosPromise => { + return request({ + url: '/project/projectTeamMember/' + id, + method: 'get' + }); +}; + +/** + * 新增项目班组下的成员 + * @param data + */ +export const addProjectTeamMember = (data: ProjectTeamMemberForm): AxiosPromise => { + return request({ + url: '/project/projectTeamMember', + method: 'post', + data: data + }); +}; + +/** + * 修改项目班组下的成员 + * @param data + */ +export const updateProjectTeamMember = (data: ProjectTeamMemberForm) => { + return request({ + url: '/project/projectTeamMember', + method: 'put', + data: data + }); +}; + +/** + * 删除项目班组下的成员 + * @param id + */ +export const delProjectTeamMember = (id: string | number | Array) => { + return request({ + url: '/project/projectTeamMember/' + id, + method: 'delete' + }); +}; diff --git a/src/api/project/projectTeamMember/types.ts b/src/api/project/projectTeamMember/types.ts new file mode 100644 index 0000000..dc5ba3b --- /dev/null +++ b/src/api/project/projectTeamMember/types.ts @@ -0,0 +1,105 @@ +export interface ProjectTeamMemberVO { + /** + * 主键id + */ + id: string | number; + + /** + * 班组id + */ + teamId: string | number; + + /** + * 项目id + */ + projectId: string | number; + + /** + * 施工人员id + */ + memberId: string | number; + + /** + * 岗位(默认为0普通员工,1组长) + */ + postId: string | number; + + /** + * 施工人员姓名 + */ + memberName: string; + + /** + * 备注 + */ + remark: string; + + /** + * 创建时间 + */ + createTime: string; +} + +export interface ProjectTeamMemberForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + + /** + * 班组id + */ + teamId?: string | number; + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 施工人员id + */ + memberId?: string | number; + + /** + * 岗位(默认为0普通员工,1组长) + */ + postId?: string | number; + + /** + * 备注 + */ + remark?: string; +} + +export interface ProjectTeamMemberQuery extends PageQuery { + /** + * 班组id + */ + teamId?: string | number; + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 施工人员id + */ + memberId?: string | number; + + /** + * 施工人员姓名 + */ + memberName?: string; + + /** + * 岗位(默认为0普通员工,1组长) + */ + postId?: string | number; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/api/project/reissueCard/index.ts b/src/api/project/reissueCard/index.ts new file mode 100644 index 0000000..4709a89 --- /dev/null +++ b/src/api/project/reissueCard/index.ts @@ -0,0 +1,75 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { ReissueCardVO, ReissueCardForm, ReissueCardQuery, AuditReissueCardForm } from '@/api/project/reissueCard/types'; + +/** + * 查询施工人员补卡申请列表 + * @param query + * @returns {*} + */ + +export const listReissueCard = (query?: ReissueCardQuery): AxiosPromise => { + return request({ + url: '/project/reissueCard/list', + method: 'get', + params: query + }); +}; + +/** + * 查询施工人员补卡申请详细 + * @param id + */ +export const getReissueCard = (id: string | number): AxiosPromise => { + return request({ + url: '/project/reissueCard/' + id, + method: 'get' + }); +}; + +/** + * 新增施工人员补卡申请 + * @param data + */ +export const addReissueCard = (data: ReissueCardForm) => { + return request({ + url: '/project/reissueCard', + method: 'post', + data: data + }); +}; + +/** + * 修改施工人员补卡申请 + * @param data + */ +export const updateReissueCard = (data: ReissueCardForm) => { + return request({ + url: '/project/reissueCard', + method: 'put', + data: data + }); +}; + +/** + * 删除施工人员补卡申请 + * @param id + */ +export const delReissueCard = (id: string | number | Array) => { + return request({ + url: '/project/reissueCard/' + id, + method: 'delete' + }); +}; + +/** + * 管理员审核施工人员补卡申请 + * @param data + */ +export const AuditReissueCard = (data: AuditReissueCardForm) => { + return request({ + url: '/project/reissueCard/review/manager', + method: 'put', + data: data + }); +}; diff --git a/src/api/project/reissueCard/types.ts b/src/api/project/reissueCard/types.ts new file mode 100644 index 0000000..3937951 --- /dev/null +++ b/src/api/project/reissueCard/types.ts @@ -0,0 +1,173 @@ +export interface ReissueCardVO { + /** + * 申请人名字 + */ + userName: string; + id?: string | number; + status?: string; + managerName?: string; + /** + * 申请补卡说明 + */ + userExplain: string; + + /** + * 补卡申请时间 + */ + userTime: string; + + /** + * 班组长名字 + */ + gangerName: string; + + /** + * 班组长意见(1未读 2同意 3拒绝) + */ + gangerOpinion: string; + + /** + * 班组长说明 + */ + gangerExplain: string; + + /** + * 班组长操作时间 + */ + gangerTime: string; + + /** + * 管理员意见(1未读 2同意 3拒绝) + */ + managerOpinion: string; + + /** + * 管理员说明 + */ + managerExplain: string; + + /** + * 管理员操作时间 + */ + managerTime: string; + + /** + * 备注 + */ + remark: string; +} +export interface AuditReissueCardForm { + /** + * 主键id + */ + id?: string | number; + + /** + * 管理员意见 + */ + managerOpinion?: string; + + /** + * 管理员说明 + */ + managerExplain?: string; + + /** + * 备注 + */ + remark?: string; +} + +export interface ReissueCardForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + + /** + * 申请人id + */ + userId?: string | number; + + /** + * 申请补卡说明 + */ + userExplain?: string; + + /** + * 班组长 + */ + gangerId?: string | number; + + /** + * 班组长意见(1未读 2同意 3拒绝) + */ + gangerOpinion?: string; + + /** + * 班组长说明 + */ + gangerExplain?: string; + + /** + * 管理员意见(1未读 2同意 3拒绝) + */ + managerOpinion?: string; + + /** + * 管理员说明 + */ + managerExplain?: string; + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 考勤表主键id + */ + attendanceId?: string | number; + + /** + * 备注 + */ + remark?: string; +} + +export interface ReissueCardQuery extends PageQuery { + /** + * 申请人名字 + */ + userName?: string; + + /** + * 班组长意见(1未读 2同意 3拒绝) + */ + gangerOpinion?: string; + + /** + * 管理员意见(1未读 2同意 3拒绝) + */ + managerOpinion?: string; + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 班组id + */ + teamId?: string | number; + + /** + * 补卡类型(1上班 2下班) + */ + reissueCardType?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/api/project/subcontract/index.ts b/src/api/project/subcontract/index.ts new file mode 100644 index 0000000..9ba3ef7 --- /dev/null +++ b/src/api/project/subcontract/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { SubcontractVO, SubcontractForm, SubcontractQuery } from '@/api/project/subcontract/types'; + +/** + * 查询分包合同列表 + * @param query + * @returns {*} + */ + +export const listSubcontract = (query?: SubcontractQuery): AxiosPromise => { + return request({ + url: '/contractor/subcontract/list', + method: 'get', + params: query + }); +}; + +/** + * 查询分包合同详细 + * @param id + */ +export const getSubcontract = (id: string | number): AxiosPromise => { + return request({ + url: '/contractor/subcontract/' + id, + method: 'get' + }); +}; + +/** + * 新增分包合同 + * @param data + */ +export const addSubcontract = (data: SubcontractForm) => { + return request({ + url: '/contractor/subcontract', + method: 'post', + data: data + }); +}; + +/** + * 修改分包合同 + * @param data + */ +export const updateSubcontract = (data: SubcontractForm) => { + return request({ + url: '/contractor/subcontract', + method: 'put', + data: data + }); +}; + +/** + * 删除分包合同 + * @param id + */ +export const delSubcontract = (id: string | number | Array) => { + return request({ + url: '/contractor/subcontract/' + id, + method: 'delete' + }); +}; diff --git a/src/api/project/subcontract/types.ts b/src/api/project/subcontract/types.ts new file mode 100644 index 0000000..fdb6c19 --- /dev/null +++ b/src/api/project/subcontract/types.ts @@ -0,0 +1,136 @@ +export interface SubcontractVO { + /** + * 项目id + */ + projectId: string | number; + + /** + * 分包方id + */ + contractorId: string | number; + + /** + * 合同文件id + */ + contractFileId: string | number; + + /** + * 合同编号 + */ + contractNumber: string; + + /** + * 合同名称 + */ + contractName: string; + + /** + * 合同类型 + */ + contractType: string; + + /** + * 合同金额 + */ + contractAmount: number; + + /** + * 合同时间 + */ + contractTime: string; + + /** + * 备注 + */ + remark: string; + +} + +export interface SubcontractForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 分包方id + */ + contractorId?: string | number; + + /** + * 合同文件id + */ + contractFileId?: string | number; + + /** + * 合同编号 + */ + contractNumber?: string; + + /** + * 合同名称 + */ + contractName?: string; + + /** + * 合同类型 + */ + contractType?: string; + + /** + * 合同金额 + */ + contractAmount?: number; + + /** + * 合同时间 + */ + contractTime?: string; + + /** + * 备注 + */ + remark?: string; + +} + +export interface SubcontractQuery extends PageQuery { + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 分包方id + */ + contractorId?: string | number; + + /** + * 合同编号 + */ + contractNumber?: string; + + /** + * 合同名称 + */ + contractName?: string; + + /** + * 合同类型 + */ + contractType?: string; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/api/project/workWage/index.ts b/src/api/project/workWage/index.ts new file mode 100644 index 0000000..01ed29d --- /dev/null +++ b/src/api/project/workWage/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { WorkWageVO, WorkWageForm, WorkWageQuery } from '@/api/project/workWage/types'; + +/** + * 查询工种薪水列表 + * @param query + * @returns {*} + */ + +export const listWorkWage = (query?: WorkWageQuery): AxiosPromise => { + return request({ + url: '/project/workWage/list', + method: 'get', + params: query + }); +}; + +/** + * 查询工种薪水详细 + * @param id + */ +export const getWorkWage = (id: string | number): AxiosPromise => { + return request({ + url: '/project/workWage/' + id, + method: 'get' + }); +}; + +/** + * 新增工种薪水 + * @param data + */ +export const addWorkWage = (data: WorkWageForm) => { + return request({ + url: '/project/workWage', + method: 'post', + data: data + }); +}; + +/** + * 修改工种薪水 + * @param data + */ +export const updateWorkWage = (data: WorkWageForm) => { + return request({ + url: '/project/workWage', + method: 'put', + data: data + }); +}; + +/** + * 删除工种薪水 + * @param id + */ +export const delWorkWage = (id: string | number | Array) => { + return request({ + url: '/project/workWage/' + id, + method: 'delete' + }); +}; diff --git a/src/api/project/workWage/types.ts b/src/api/project/workWage/types.ts new file mode 100644 index 0000000..75a5989 --- /dev/null +++ b/src/api/project/workWage/types.ts @@ -0,0 +1,131 @@ +export interface WorkWageVO { + /** + * 主键id + */ + id: string | number; + + /** + * 项目id + */ + projectId: string | number; + + /** + * 工种 + */ + workType: string; + + /** + * 是否是特种兵(1是 2否) + */ + isSpecialType: string; + + /** + * 工资计算方式(1计时 2计件) + */ + wageCalculationType: string; + + /** + * 工资标准 + */ + wage: number; + + /** + * 工资计量单位 + */ + wageMeasureUnit: string; + + /** + * 备注 + */ + remark: string; + +} + +export interface SpecialType{ + label:string;//名称 + value:number | string;//id +} + +export interface WorkWageForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 工种 + */ + workType?: string; + + /** + * 是否是特种兵(1是 2否) + */ + isSpecialType?: string; + + /** + * 工资计算方式(1计时 2计件) + */ + wageCalculationType?: string; + + /** + * 工资标准 + */ + wage?: number; + + /** + * 工资计量单位 + */ + wageMeasureUnit?: string; + + /** + * 备注 + */ + remark?: string; + +} + +export interface WorkWageQuery extends PageQuery { + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 工种 + */ + workType?: string; + + /** + * 是否是特种兵(1是 2否) + */ + isSpecialType?: string; + + /** + * 工资计算方式(1计时 2计件) + */ + wageCalculationType?: string; + + /** + * 工资标准 + */ + wage?: number; + + /** + * 工资计量单位 + */ + wageMeasureUnit?: string; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/api/project/workerDailyReport/index.ts b/src/api/project/workerDailyReport/index.ts new file mode 100644 index 0000000..5a6f373 --- /dev/null +++ b/src/api/project/workerDailyReport/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { WorkerDailyReportVO, WorkerDailyReportForm, WorkerDailyReportQuery } from '@/api/project/workerDailyReport/types'; + +/** + * 查询施工人员日报列表 + * @param query + * @returns {*} + */ + +export const listWorkerDailyReport = (query?: WorkerDailyReportQuery): AxiosPromise => { + return request({ + url: '/project/workerDailyReport/list', + method: 'get', + params: query + }); +}; + +/** + * 查询施工人员日报详细 + * @param id + */ +export const getWorkerDailyReport = (id: string | number): AxiosPromise => { + return request({ + url: '/project/workerDailyReport/' + id, + method: 'get' + }); +}; + +/** + * 新增施工人员日报 + * @param data + */ +export const addWorkerDailyReport = (data: WorkerDailyReportForm) => { + return request({ + url: '/project/workerDailyReport', + method: 'post', + data: data + }); +}; + +/** + * 修改施工人员日报 + * @param data + */ +export const updateWorkerDailyReport = (data: WorkerDailyReportForm) => { + return request({ + url: '/project/workerDailyReport', + method: 'put', + data: data + }); +}; + +/** + * 删除施工人员日报 + * @param id + */ +export const delWorkerDailyReport = (id: string | number | Array) => { + return request({ + url: '/project/workerDailyReport/' + id, + method: 'delete' + }); +}; diff --git a/src/api/project/workerDailyReport/types.ts b/src/api/project/workerDailyReport/types.ts new file mode 100644 index 0000000..205f222 --- /dev/null +++ b/src/api/project/workerDailyReport/types.ts @@ -0,0 +1,132 @@ +export interface WorkerDailyReportVO { + /** + * 申请人名字 + */ + userName: string; + userId?: string; + id?: string; + + /** + * 今日完成工作 + */ + todayCompletedWork: string; + + /** + * 未完成工作 + */ + unfinishedWork: string; + + /** + * 明日工作 + */ + tomorrowWork: string; + + /** + * 需协调与帮助 + */ + coordinationHelp: string; +} + +export interface WorkerDailyReportForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + + /** + * 项目id + */ + projectId?: string | number; + teamName?: string; + resubmitReason?: string; + reportDate?: string; + isResubmit: string; + + /** + * 班组id + */ + teamId?: string | number; + + /** + * 申请人id + */ + userId?: string | number; + + /** + * 申请人名字 + */ + userName?: string; + + /** + * 今日完成工作 + */ + todayCompletedWork?: string; + + /** + * 未完成工作 + */ + unfinishedWork?: string; + + /** + * 明日工作 + */ + tomorrowWork?: string; + + /** + * 需协调与帮助 + */ + coordinationHelp?: string; + + /** + * 附件 + */ + fileList?: Array; + dailyPieceItemVoList?: dailyPieceItemVO[]; +} + +interface dailyPieceItemVO { + /** + * 主键id + */ + id?: string | number; + + /** + * 计件类型 + */ + pieceType?: string; + + /** + * 数量 + */ + pieceCount?: number; + pieceUnit?: string; + remark?: string; +} + +export interface WorkerDailyReportQuery extends PageQuery { + /** + * 项目id + */ + projectId?: string | number; + + /** + * 班组id + */ + teamId?: string | number; + + /** + * 申请人id + */ + userId?: string | number; + + /** + * 申请人名字 + */ + userName?: string; + + /** + * 日期范围参数 + */ + params?: any; + isResubmit?: string; +} diff --git a/src/api/types.ts b/src/api/types.ts index 617286c..59f7850 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -57,3 +57,19 @@ export interface TenantInfo { tenantEnabled: boolean; voList: TenantVO[]; } + +/** + * 根据用户获得工程列表 + * */ +export interface UserProject { + id: string; + userId: number; + projectId: string; + projectName: string; + shortName: string; +} + +export interface IdAndNameVO { + id: string | number; + name: string; +} diff --git a/src/components/ProjectSelector/index.vue b/src/components/ProjectSelector/index.vue new file mode 100644 index 0000000..ce7918d --- /dev/null +++ b/src/components/ProjectSelector/index.vue @@ -0,0 +1,164 @@ + + + + + diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index efb1ae3..ce5be12 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -21,19 +21,23 @@ + - + + + +