2 Commits
lt ... ljj

Author SHA1 Message Date
Teo
fe872490d5 解决冲突 2025-08-02 16:51:07 +08:00
Teo
7154bbbbcc 材料管理 2025-08-02 16:45:51 +08:00
13 changed files with 105 additions and 105 deletions

View File

@ -15,6 +15,8 @@ VITE_APP_SNAILJOB_ADMIN = '/snail-job'
# 生产环境
VITE_APP_BASE_API = 'http://58.17.134.85:8899'
# GO生产环境
VITE_APP_BASE_API_GO = 'http://58.17.134.85:7363'
# 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip

View File

@ -1,4 +1,4 @@
import request from '@/utils/request';
import request from '@/utils/request-go';
import { AxiosPromise } from 'axios';
import { CompanyForm, CompanyQuery, CompanyVO } from '@/api/materials/company/types';
@ -10,7 +10,7 @@ import { CompanyForm, CompanyQuery, CompanyVO } from '@/api/materials/company/ty
export const listCompany = (query?: CompanyQuery): AxiosPromise<CompanyVO[]> => {
return request({
url: '/materials/company/list',
url: '/zm/api/v1/system/busCompany/list',
method: 'get',
params: query
});

View File

@ -1,4 +1,4 @@
import request from '@/utils/request';
import request from '@/utils/request-go';
import { AxiosPromise } from 'axios';
import { MaterialsForm, MaterialsQuery, MaterialsVO } from '@/api/materials/materials/types';
@ -9,7 +9,7 @@ import { MaterialsForm, MaterialsQuery, MaterialsVO } from '@/api/materials/mate
*/
export const listMaterials = (query?: MaterialsQuery): AxiosPromise<MaterialsVO[]> => {
return request({
url: '/materials/materials/list',
url: '/zm/api/v1/system/busEquipmentMaterials/list',
method: 'get',
params: query
});
@ -21,8 +21,11 @@ export const listMaterials = (query?: MaterialsQuery): AxiosPromise<MaterialsVO[
*/
export const getMaterials = (id: string | number): AxiosPromise<MaterialsVO> => {
return request({
url: '/materials/materials/' + id,
method: 'get'
url: '/zm/api/v1/system/busEquipmentMaterials/get',
method: 'get',
params: {
equipmentMaterialsId: id
}
});
};

View File

@ -1,4 +1,4 @@
import request from '@/utils/request';
import request from '@/utils/request-go';
import { AxiosPromise } from 'axios';
import { MaterialsInventoryForm, MaterialsInventoryQuery, MaterialsInventoryVO } from '@/api/materials/materialsInventory/types';
@ -10,7 +10,7 @@ import { MaterialsInventoryForm, MaterialsInventoryQuery, MaterialsInventoryVO }
export const listMaterialsInventory = (query?: MaterialsInventoryQuery): AxiosPromise<MaterialsInventoryVO[]> => {
return request({
url: '/materials/materialsInventory/list',
url: '/zm/api/v1/system/busEquipmentMaterialsInventory/excellist',
method: 'get',
params: query
});

View File

@ -1,6 +1,7 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { childProjectQuery, ProjectForm, ProjectQuery, ProjectVO } from '@/api/project/project/types';
import requestGo from '@/utils/request-go';
/**
* 查询项目列表
@ -9,10 +10,10 @@ import { childProjectQuery, ProjectForm, ProjectQuery, ProjectVO } from '@/api/p
*/
export const listProject = (query?: ProjectQuery): AxiosPromise<ProjectVO[]> => {
return request({
url: '/project/project/list',
return requestGo({
url: '/zm/api/v1/system/sysProject/list',
method: 'get',
params: query
params: { ...query, isShow: '2' }
});
};

View File

@ -0,0 +1,16 @@
<template>
<div>init</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
export default defineComponent({
setup() {
// todo
return {};
}
});
</script>
<style lang="stylus" scoped></style>

View File

@ -24,7 +24,7 @@
<el-card shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['materials:company:add']">新增 </el-button>
</el-col>
<el-col :span="1.5">
@ -36,7 +36,7 @@
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['materials:company:remove']"
>删除
</el-button>
</el-col>
</el-col> -->
<el-col :span="1.5">
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['materials:company:export']">导出 </el-button>
</el-col>
@ -49,24 +49,20 @@
<!-- <el-table-column label="主键id" align="center" prop="id" v-if="true" /> -->
<el-table-column label="序号" type="index" width="60" align="center" />
<el-table-column label="公司名称" align="center" prop="companyName" />
<el-table-column label="负责人" align="center" prop="principal" />
<el-table-column label="负责人电话" align="center" prop="principalPhone" />
<el-table-column label="公司状态" align="center" prop="status">
<template #default="scope">
<dict-tag :options="sys_normal_disable" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="资质情况" align="center" prop="qualification" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column label="创建时间" align="center" prop="createdAt" width="180" />
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-space wrap>
<el-button link type="success" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['materials:company:edit']">修改 </el-button>
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['materials:company:remove']">删除 </el-button>
</el-space>
</template>
</el-table-column>
</el-table-column> -->
</el-table>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
@ -134,7 +130,7 @@ const dialog = reactive<DialogOption>({
const initFormData: CompanyForm = {
id: undefined,
companyName: undefined,
projectId: currentProject.value.id,
projectId: currentProject.value.goId,
status: undefined,
remark: undefined,
qualification: undefined,
@ -147,7 +143,7 @@ const data = reactive<PageData<CompanyForm, CompanyQuery>>({
pageNum: 1,
pageSize: 10,
companyName: undefined,
projectId: currentProject.value.id,
projectId: currentProject.value.goId,
status: undefined,
qualification: undefined,
principalPhone: undefined,
@ -168,8 +164,8 @@ const { queryParams, form, rules } = toRefs(data);
const getList = async () => {
loading.value = true;
const res = await listCompany(queryParams.value);
companyList.value = res.rows;
total.value = res.total;
companyList.value = res.data.list;
total.value = res.data.total;
loading.value = false;
};
@ -261,7 +257,7 @@ const handleExport = () => {
//监听项目id刷新数据
const listeningProject = watch(
() => currentProject.value.id,
() => currentProject.value.goId,
(nid, oid) => {
queryParams.value.projectId = nid;
form.value.projectId = nid;

View File

@ -52,8 +52,12 @@
</el-table-column>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" type="index" width="60" align="center" />
<el-table-column label="材料名称" align="center" prop="materialsName" />
<el-table-column label="公司名称" align="center" prop="companyVo.companyName" />
<el-table-column label="材料名称" align="center" prop="equipmentMaterialsName" />
<el-table-column label="公司名称" align="center" prop="companyId">
<template #default="scope">
<dict-tag :options="companyOptions" :value="scope.row.companyId" />
</template>
</el-table-column>
<el-table-column label="规格型号" align="center" prop="typeSpecificationName" />
<el-table-column label="使用部位" align="center" prop="usePart" />
<el-table-column label="计量单位" align="center" prop="weightId" />
@ -64,8 +68,8 @@
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180" />
<el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width" width="320">
<el-table-column label="创建时间" align="center" prop="createdAt" width="180" />
<!-- <el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width" width="320">
<template #default="scope">
<el-space>
<el-button link type="primary" icon="View" @click="handleShowDrawer(scope.row)" v-hasPermi="['materials:materials:query']">
@ -78,7 +82,7 @@
<el-button link type="primary" icon="Plus" @click="handleAddMaterialsInventory(scope.row)"> 出入库 </el-button>
</el-space>
</template>
</el-table-column>
</el-table-column> -->
</el-table>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
@ -177,7 +181,7 @@ const initFormData: MaterialsForm = {
id: undefined,
materialsName: undefined,
companyId: undefined,
projectId: currentProject.value.id,
projectId: currentProject.value.goId,
typeSpecificationName: undefined,
fileOssIdMap: undefined,
usePart: undefined,
@ -193,7 +197,7 @@ const data = reactive<PageData<MaterialsForm, MaterialsQuery>>({
pageSize: 10,
materialsName: undefined,
companyId: undefined,
projectId: currentProject.value.id,
projectId: currentProject.value.goId,
typeSpecificationName: undefined,
fileOssIdMap: undefined,
usePart: undefined,
@ -214,8 +218,8 @@ const companyOptions = ref([]);
const getList = async () => {
loading.value = true;
const res = await listMaterials(queryParams.value);
materialsList.value = res.rows;
total.value = res.total;
materialsList.value = res.data.list;
total.value = res.data.total;
loading.value = false;
};
@ -227,10 +231,12 @@ const getCompanyList = async () => {
pageSize: 1000,
projectId: currentProject.value.id
});
companyOptions.value = companyRes.rows.map((company: CompanyVO) => ({
value: company.id,
label: company.companyName
companyOptions.value = companyRes.data.list.map((company: CompanyVO) => ({
value: company.companyId + '',
label: company.companyName,
elTagType: 'default'
}));
console.log('🚀 ~ getCompanyList ~ companyOptions.value:', companyOptions.value);
loading.value = false;
};
@ -268,7 +274,7 @@ const handleSelectionChange = (selection: MaterialsVO[]) => {
/** 展开材料详情抽屉操作 */
const showDetailDrawer = ref<boolean>(false);
const handleShowDrawer = (row?: MaterialsVO) => {
currentMaterialsId.value = row.id;
currentMaterialsId.value = row.companyId;
showDetailDrawer.value = true;
};
@ -354,7 +360,7 @@ const handleOssUpdate = (ossId: string, value: string) => {
//监听项目id刷新数据
const listeningProject = watch(
() => currentProject.value.id,
() => currentProject.value.goId,
(nid, oid) => {
queryParams.value.projectId = nid;
form.value.projectId = nid;

View File

@ -31,53 +31,53 @@
<el-table v-loading="loading" :data="materialsInventoryList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" type="index" width="60" align="center" />
<el-table-column label="材料名称" align="center" prop="materialsName" />
<el-table-column label="材料名称" align="center" prop="equipmentMaterialsName" />
<el-table-column label="入库登记" align="center">
<el-table-column label="数量" align="center" prop="number">
<template #default="scope">
<span v-if="scope.row.outPut === '0'">{{ scope.row.number }}</span>
<span v-else></span>
<span>{{ scope.row.inventory.number }}</span>
</template>
</el-table-column>
<el-table-column label="签收人" align="center" prop="operator">
<template #default="scope">
<span v-if="scope.row.outPut === '0'">{{ scope.row.operator }}</span>
<span v-else></span>
<span>{{ scope.row.inventory.operator }}</span>
</template>
</el-table-column>
<el-table-column label="日期" align="center" prop="outPutTime" width="160">
<template #default="scope">
<span v-if="scope.row.outPut === '0'">{{ parseTime(scope.row.outPutTime, '{y}{m}{d}') }}</span>
<span v-else></span>
<span>{{ parseTime(scope.row.inventory.outPutTime, '{y}年{m}月{d}日') }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="出库登记" align="center">
<el-table-column label="交接单位" align="center" prop="recipient" />
<el-table-column label="出库登记" align="center" prop="outbound">
<el-table-column label="交接单位" align="center" prop="recipient">
<template #default="scope">
<span>{{ scope.row.outbound.recipient }}</span>
</template>
</el-table-column>
<el-table-column label="数量" align="center" prop="number">
<template #default="scope">
<span v-if="scope.row.outPut === '1'">{{ scope.row.number }}</span>
<span v-else></span>
<span>{{ scope.row.outbound.number }}</span>
</template>
</el-table-column>
<el-table-column label="出库人" align="center" prop="operator">
<template #default="scope">
<span v-if="scope.row.outPut === '1'">{{ scope.row.operator }}</span>
<span v-else></span>
<span>{{ scope.row.outbound.operator }}</span>
</template>
</el-table-column>
<el-table-column label="领用人" align="center" prop="shipper">
<template #default="scope">
<span>{{ scope.row.outbound.shipper }}</span>
</template>
</el-table-column>
<el-table-column label="领用人" align="center" prop="shipper" />
<el-table-column label="日期" align="center" prop="outPutTime" width="160">
<template #default="scope">
<span v-if="scope.row.outPut === '1'">{{ parseTime(scope.row.outPutTime, '{y}{m}{d}') }}</span>
<span v-else></span>
<span>{{ parseTime(scope.row.outbound.outPutTime, '{y}年{m}月{d}日') }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="剩余处理" align="center">
<el-table-column label="剩余量" align="center" prop="residue" />
<el-table-column label="处理方式" align="center" prop="disposition" />
</el-table-column>
<el-table-column label="剩余" align="center" prop="residue" />
<el-table-column label="备注" align="center" prop="remark" />
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
@ -179,7 +179,7 @@ const dialog = reactive<DialogOption>({
const initFormData: MaterialsInventoryForm = {
id: undefined,
materialsId: undefined,
projectId: currentProject.value.id,
projectId: currentProject.value.goId,
outPut: undefined,
number: undefined,
outPutTime: undefined,
@ -197,7 +197,7 @@ const data = reactive<PageData<MaterialsInventoryForm, MaterialsInventoryQuery>>
pageNum: 1,
pageSize: 10,
materialsId: undefined,
projectId: currentProject.value.id,
projectId: currentProject.value.goId,
outPut: undefined,
number: undefined,
outPutTime: undefined,
@ -222,8 +222,8 @@ const materialsOptions = ref([]);
const getList = async () => {
loading.value = true;
const res = await listMaterialsInventory(queryParams.value);
materialsInventoryList.value = res.rows;
total.value = res.total;
materialsInventoryList.value = res.data.list;
total.value = res.data.total;
const materialsMap = new Map();
materialsOptions.value = Array.from(materialsMap.values());
loading.value = false;
@ -310,7 +310,7 @@ const handleExport = () => {
//监听项目id刷新数据
const listeningProject = watch(
() => currentProject.value.id,
() => currentProject.value.goId,
(nid, oid) => {
queryParams.value.projectId = nid;
form.value.projectId = nid;

View File

@ -153,6 +153,7 @@ import { useUserStoreHook } from '@/store/modules/user';
import { listContractor } from '@/api/project/contractor';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { contractor_material_type } = toRefs<any>(proxy?.useDict('contractor_material_type'));
console.log('🚀 ~ contractor_material_type:', contractor_material_type);
// 获取用户 store
const userStore = useUserStoreHook();
const currentProject = computed(() => userStore.selectedProject);

View File

@ -22,7 +22,7 @@
<el-card shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['project:project:add']">新增 </el-button>
</el-col>
<el-col :span="1.5">
@ -37,13 +37,13 @@
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['project:project:export']">导出 </el-button>
</el-col>
</el-col> -->
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
</template>
<el-table v-loading="loading" :data="projectList" @selection-change="handleSelectionChange">
<el-table-column type="expand" width="50">
<!-- <el-table-column type="expand" width="50">
<template #default="{ row }">
<div class="w212.25 ml-12.5">
<el-button class="mb" type="primary" size="small" @click="handleOpenSetChild(row.id)" icon="plus">添加子项目</el-button>
@ -92,34 +92,24 @@
</el-table>
</div>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" type="index" width="60" align="center" />
<el-table-column label="项目名称" align="center" prop="projectName">
<!-- <template #default="scope">
<el-link
:type="scope.row.designId ? 'primary' : 'default'"
:disabled="!scope.row.designId"
@click="handleOpenLayer(scope.row)"
v-loading.fullscreen.lock="fullscreenLoading"
>{{ scope.row.projectName }}</el-link
>
</template> -->
</el-table-column>
<!-- <el-table-column label="项目名称" align="center" prop="projectName"/> -->
<el-table-column label="项目简称" align="center" prop="shortName" />
<el-table-column label="状态" align="center" prop="status">
<template #default="scope">
<dict-tag :options="sys_normal_disable" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="项目类型" align="center" prop="projectType" width="120">
<el-table-column label="项目类型" align="center" prop="type" width="120">
<template #default="scope">
<dict-tag :options="project_type" :value="scope.row.projectType" />
<dict-tag :options="project_type" :value="scope.row.type" />
</template>
</el-table-column>
<el-table-column label="项目类别" align="center" prop="projectCategory">
<el-table-column label="项目类别" align="center" prop="isType">
<template #default="scope">
<dict-tag :options="project_category_type" :value="scope.row.projectCategory" />
<dict-tag :options="project_category_type" :value="scope.row.isType" />
</template>
</el-table-column>
<el-table-column label="负责人" align="center" prop="principal" />
@ -128,7 +118,7 @@
<el-table-column label="计划容量(M)" align="center" prop="plan" width="100" />
<el-table-column label="开工时间" align="center" prop="onStreamTime" width="120" />
<el-table-column label="打卡范围" align="center" prop="punchRange" />
<el-table-column label="设计总量" align="center" prop="designTotal" />
<!-- <el-table-column label="设计总量" align="center" prop="designTotal" /> -->
<!-- <el-table-column label="是否上传DXF" align="center" prop="designId" width="140">
<template #default="scope">
<el-link
@ -140,9 +130,9 @@
>
</template>
</el-table-column> -->
<el-table-column label="备注" align="center" prop="remark" />
<!-- <el-table-column label="备注" align="center" prop="remark" /> -->
<el-table-column label="创建时间" align="center" prop="createTime" width="180" />
<el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width" width="400">
<!-- <el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width" width="400">
<template #default="scope">
<el-space>
<el-button link type="primary" icon="FolderOpened" @click="handleShowUpload(scope.row)">导入安全协议书 </el-button>
@ -151,7 +141,7 @@
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['project:project:remove']">删除 </el-button>
</el-space>
</template>
</el-table-column>
</el-table-column> -->
</el-table>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
@ -460,8 +450,8 @@ const { queryParams, form, rules } = toRefs(data);
const getList = async () => {
loading.value = true;
const res = await listProject(queryParams.value);
projectList.value = res.rows;
total.value = res.total;
projectList.value = res.data.list;
total.value = res.data.total;
loading.value = false;
};
/** 取消按钮 */

View File

@ -517,6 +517,7 @@ const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { type_of_work, user_sex_type, user_clock_type, user_file_type, user_status_type, wage_measure_unit_type } = toRefs<any>(
proxy?.useDict('type_of_work', 'user_sex_type', 'user_clock_type', 'user_file_type', 'user_status_type', 'wage_measure_unit_type')
);
console.log('🚀 ~ user_sex_type:', user_sex_type);
// 获取用户 store
const userStore = useUserStoreHook();
// 从 store 中获取项目列表和当前选中的项目

View File

@ -241,20 +241,12 @@ const { queryParams, form, rules } = toRefs(data);
const teamOpt = ref([]);
const foremanOpt = ref([]);
const teamList = ref<ProjectTeamForemanResp[]>();
/** 查询安全巡检工单列表 */
const getList = async () => {
loading.value = true;
const res = await listSafetyInspection(queryParams.value);
safetyInspectionList.value = res.data.list;
total.value = res.data.total;
// // 获取项目班组信息
// const teamRes = await listProjectTeamForeman(currentProject.value.id);
// teamList.value = teamRes.data;
// teamOpt.value = teamList.value.map((team: ProjectTeamForemanResp) => ({
// label: team.teamName,
// value: team.id
// }));
loading.value = false;
};
@ -265,14 +257,6 @@ const getDictDataList = async () => {
const res1 = await getDictData('tour_type');
safety_inspection_violation_type.value = res1.data.values;
};
const changeForeman = (value: string | number) => {
const team = teamList.value.filter((team) => team.id === value)[0];
foremanOpt.value = team.foremanList?.map((foreman: foremanQuery) => ({
label: foreman.foremanName,
value: foreman.foremanId
}));
form.value.correctorId = '';
};
/** 展开安全巡检工单详情对话框操作 */
const currentSafetyInspectionId = ref<string | number>();