材料
This commit is contained in:
@ -5,7 +5,7 @@ VITE_APP_TITLE = 新能源项目管理平台
|
|||||||
VITE_APP_ENV = 'development'
|
VITE_APP_ENV = 'development'
|
||||||
|
|
||||||
# 开发环境
|
# 开发环境
|
||||||
VITE_APP_BASE_API = 'http://192.168.110.148:8899'
|
VITE_APP_BASE_API = 'http://192.168.110.119:8899'
|
||||||
|
|
||||||
# 无人机接口地址
|
# 无人机接口地址
|
||||||
|
|
||||||
|
63
src/api/materials/materialIssue/index.ts
Normal file
63
src/api/materials/materialIssue/index.ts
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import { AxiosPromise } from 'axios';
|
||||||
|
import { MaterialIssueVO, MaterialIssueForm, MaterialIssueQuery } from '@/api/materials/materialIssue/types';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物料领料单列表
|
||||||
|
* @param query
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
|
||||||
|
export const listMaterialIssue = (query?: MaterialIssueQuery): AxiosPromise<MaterialIssueVO[]> => {
|
||||||
|
return request({
|
||||||
|
url: '/materials/materialIssue/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物料领料单详细
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
export const getMaterialIssue = (id: string | number): AxiosPromise<MaterialIssueVO> => {
|
||||||
|
return request({
|
||||||
|
url: '/materials/materialIssue/' + id,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增物料领料单
|
||||||
|
* @param data
|
||||||
|
*/
|
||||||
|
export const addMaterialIssue = (data: MaterialIssueForm) => {
|
||||||
|
return request({
|
||||||
|
url: '/materials/materialIssue',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改物料领料单
|
||||||
|
* @param data
|
||||||
|
*/
|
||||||
|
export const updateMaterialIssue = (data: MaterialIssueForm) => {
|
||||||
|
return request({
|
||||||
|
url: '/materials/materialIssue',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除物料领料单
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
export const delMaterialIssue = (id: string | number | Array<string | number>) => {
|
||||||
|
return request({
|
||||||
|
url: '/materials/materialIssue/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
});
|
||||||
|
};
|
226
src/api/materials/materialIssue/types.ts
Normal file
226
src/api/materials/materialIssue/types.ts
Normal file
@ -0,0 +1,226 @@
|
|||||||
|
export interface MaterialIssueVO {
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
id: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
projectId: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 材料来源(1甲供 2乙供)
|
||||||
|
*/
|
||||||
|
materialSource: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表单编号
|
||||||
|
*/
|
||||||
|
formCode: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工程名称
|
||||||
|
*/
|
||||||
|
projectName: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备材料名称
|
||||||
|
*/
|
||||||
|
materialName: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订货单位
|
||||||
|
*/
|
||||||
|
orderingUnit: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供货单位
|
||||||
|
*/
|
||||||
|
supplierUnit: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 领料单位
|
||||||
|
*/
|
||||||
|
issueUnit: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保管单位
|
||||||
|
*/
|
||||||
|
storageUnit: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 缺陷情况(承包单位填写)
|
||||||
|
*/
|
||||||
|
defectDescription: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
remark: string;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface MaterialIssueForm extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
id?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
projectId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 材料来源(1甲供 2乙供)
|
||||||
|
*/
|
||||||
|
materialSource?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表单编号
|
||||||
|
*/
|
||||||
|
formCode?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工程名称
|
||||||
|
*/
|
||||||
|
projectName?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备材料名称
|
||||||
|
*/
|
||||||
|
materialName?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订货单位
|
||||||
|
*/
|
||||||
|
orderingUnit?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供货单位
|
||||||
|
*/
|
||||||
|
supplierUnit?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 领料单位
|
||||||
|
*/
|
||||||
|
issueUnit?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保管单位
|
||||||
|
*/
|
||||||
|
storageUnit?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 缺陷情况(承包单位填写)
|
||||||
|
*/
|
||||||
|
defectDescription?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合格证份数
|
||||||
|
*/
|
||||||
|
certCount?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合格证文件
|
||||||
|
*/
|
||||||
|
certCountFileId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出厂报告份数
|
||||||
|
*/
|
||||||
|
reportCount?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出厂报告文件
|
||||||
|
*/
|
||||||
|
reportCountFileId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 技术资料份数
|
||||||
|
*/
|
||||||
|
techDocCount?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 技术资料文件
|
||||||
|
*/
|
||||||
|
techDocCountFileId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 厂家资质文件份数
|
||||||
|
*/
|
||||||
|
licenseCount?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 厂家资质文件
|
||||||
|
*/
|
||||||
|
licenseCountFileId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
remark?: string;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface MaterialIssueQuery extends PageQuery {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
projectId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 材料来源(1甲供 2乙供)
|
||||||
|
*/
|
||||||
|
materialSource?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表单编号
|
||||||
|
*/
|
||||||
|
formCode?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工程名称
|
||||||
|
*/
|
||||||
|
projectName?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备材料名称
|
||||||
|
*/
|
||||||
|
materialName?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订货单位
|
||||||
|
*/
|
||||||
|
orderingUnit?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供货单位
|
||||||
|
*/
|
||||||
|
supplierUnit?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 领料单位
|
||||||
|
*/
|
||||||
|
issueUnit?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保管单位
|
||||||
|
*/
|
||||||
|
storageUnit?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 缺陷情况(承包单位填写)
|
||||||
|
*/
|
||||||
|
defectDescription?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日期范围参数
|
||||||
|
*/
|
||||||
|
params?: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
63
src/api/materials/materialReceive/index.ts
Normal file
63
src/api/materials/materialReceive/index.ts
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import { AxiosPromise } from 'axios';
|
||||||
|
import { MaterialReceiveVO, MaterialReceiveForm, MaterialReceiveQuery } from '@/api/materials/materialReceive/types';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物料接收单列表
|
||||||
|
* @param query
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
|
||||||
|
export const listMaterialReceive = (query?: MaterialReceiveQuery): AxiosPromise<MaterialReceiveVO[]> => {
|
||||||
|
return request({
|
||||||
|
url: '/materials/materialReceive/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物料接收单详细
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
export const getMaterialReceive = (id: string | number): AxiosPromise<MaterialReceiveVO> => {
|
||||||
|
return request({
|
||||||
|
url: '/materials/materialReceive/' + id,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增物料接收单
|
||||||
|
* @param data
|
||||||
|
*/
|
||||||
|
export const addMaterialReceive = (data: MaterialReceiveForm) => {
|
||||||
|
return request({
|
||||||
|
url: '/materials/materialReceive',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改物料接收单
|
||||||
|
* @param data
|
||||||
|
*/
|
||||||
|
export const updateMaterialReceive = (data: MaterialReceiveForm) => {
|
||||||
|
return request({
|
||||||
|
url: '/materials/materialReceive',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除物料接收单
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
export const delMaterialReceive = (id: string | number | Array<string | number>) => {
|
||||||
|
return request({
|
||||||
|
url: '/materials/materialReceive/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
});
|
||||||
|
};
|
211
src/api/materials/materialReceive/types.ts
Normal file
211
src/api/materials/materialReceive/types.ts
Normal file
@ -0,0 +1,211 @@
|
|||||||
|
export interface MaterialReceiveVO {
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
id: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
projectId: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 材料来源(1甲供 2乙供)
|
||||||
|
*/
|
||||||
|
materialSource: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表单编号
|
||||||
|
*/
|
||||||
|
formCode: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工程名称
|
||||||
|
*/
|
||||||
|
projectName: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备材料名称
|
||||||
|
*/
|
||||||
|
materialName: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同名称
|
||||||
|
*/
|
||||||
|
contractName: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订货单位
|
||||||
|
*/
|
||||||
|
orderingUnit: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供货单位
|
||||||
|
*/
|
||||||
|
supplierUnit: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备材料入库/移交
|
||||||
|
*/
|
||||||
|
storageType: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
remark: string;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface MaterialReceiveForm extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
id?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
projectId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 材料来源(1甲供 2乙供)
|
||||||
|
*/
|
||||||
|
materialSource?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表单编号
|
||||||
|
*/
|
||||||
|
formCode?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工程名称
|
||||||
|
*/
|
||||||
|
projectName?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备材料名称
|
||||||
|
*/
|
||||||
|
materialName?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同名称
|
||||||
|
*/
|
||||||
|
contractName?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订货单位
|
||||||
|
*/
|
||||||
|
orderingUnit?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供货单位
|
||||||
|
*/
|
||||||
|
supplierUnit?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 缺陷情况(承包单位填写)
|
||||||
|
*/
|
||||||
|
defectDescription?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合格证份数
|
||||||
|
*/
|
||||||
|
certCount?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合格证文件
|
||||||
|
*/
|
||||||
|
certCountFileId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出厂报告份数
|
||||||
|
*/
|
||||||
|
reportCount?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出厂报告文件
|
||||||
|
*/
|
||||||
|
reportCountFileId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 技术资料份数
|
||||||
|
*/
|
||||||
|
techDocCount?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 技术资料文件
|
||||||
|
*/
|
||||||
|
techDocCountFileId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 厂家资质文件份数
|
||||||
|
*/
|
||||||
|
licenseCount?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 厂家资质文件
|
||||||
|
*/
|
||||||
|
licenseCountFileId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备材料入库/移交
|
||||||
|
*/
|
||||||
|
storageType?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
remark?: string;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface MaterialReceiveQuery extends PageQuery {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
projectId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 材料来源(1甲供 2乙供)
|
||||||
|
*/
|
||||||
|
materialSource?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表单编号
|
||||||
|
*/
|
||||||
|
formCode?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工程名称
|
||||||
|
*/
|
||||||
|
projectName?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备材料名称
|
||||||
|
*/
|
||||||
|
materialName?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同名称
|
||||||
|
*/
|
||||||
|
contractName?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订货单位
|
||||||
|
*/
|
||||||
|
orderingUnit?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供货单位
|
||||||
|
*/
|
||||||
|
supplierUnit?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日期范围参数
|
||||||
|
*/
|
||||||
|
params?: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,6 +1,3 @@
|
|||||||
|
|
||||||
import { click } from 'ol/events/condition';
|
|
||||||
import { includes } from 'lodash'; import { map } from 'lodash';
|
|
||||||
<template>
|
<template>
|
||||||
<el-dialog v-model="isShowDialog" title="变更单详情" draggable width="60vw" :close-on-click-modal="false" :destroy-on-close="true">
|
<el-dialog v-model="isShowDialog" title="变更单详情" draggable width="60vw" :close-on-click-modal="false" :destroy-on-close="true">
|
||||||
<el-card :body-style="{ padding: '20px' }" style="border: none; box-shadow: none">
|
<el-card :body-style="{ padding: '20px' }" style="border: none; box-shadow: none">
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
<!-- <el-table-column label="变更费用估算" align="center" prop="costEstimation" /> -->
|
<!-- <el-table-column label="变更费用估算" align="center" prop="costEstimation" /> -->
|
||||||
<el-table-column label="变更文件" align="center" prop="fileId">
|
<el-table-column label="变更文件" align="center" prop="fileId">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span style="color: rgb(41 145 255);cursor: pointer" @click="onOpen(scope.row.file.originalName)"> {{ scope.row.file.originalName }}</span>
|
<span style="color: rgb(41 145 255);cursor: pointer" @click="onOpen(scope.row.file.url)"> {{ scope.row.file.originalName }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
|
@ -0,0 +1,484 @@
|
|||||||
|
<template>
|
||||||
|
<div class="p-2">
|
||||||
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
|
<el-card shadow="hover">
|
||||||
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||||
|
<el-form-item label="表单编号" prop="formCode">
|
||||||
|
<el-input v-model="queryParams.formCode" placeholder="请输入表单编号" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="工程名称" prop="projectName">
|
||||||
|
<el-input v-model="queryParams.projectName" placeholder="请输入工程名称" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="材料名称" prop="materialName">
|
||||||
|
<el-input v-model="queryParams.materialName" placeholder="请输入设备材料名称" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="订货单位" prop="orderingUnit">
|
||||||
|
<el-input v-model="queryParams.orderingUnit" placeholder="请输入订货单位" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="供货单位" prop="supplierUnit">
|
||||||
|
<el-input v-model="queryParams.supplierUnit" placeholder="请输入供货单位" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="领料单位" prop="issueUnit">
|
||||||
|
<el-input v-model="queryParams.issueUnit" placeholder="请输入领料单位" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="保管单位" prop="storageUnit">
|
||||||
|
<el-input v-model="queryParams.storageUnit" placeholder="请输入保管单位" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="缺陷情况" prop="defectDescription">
|
||||||
|
<el-input v-model="queryParams.defectDescription" placeholder="请输入缺陷情况" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<template #header>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['materials:materialIssue:add']">新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['materials:materialIssue:remove']"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
<el-table v-loading="loading" :data="materialIssueList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="表单编号" align="center" prop="formCode" />
|
||||||
|
<el-table-column label="工程名称" align="center" prop="projectName" />
|
||||||
|
<el-table-column label="设备材料名称" align="center" prop="materialName" />
|
||||||
|
<el-table-column label="订货单位" align="center" prop="orderingUnit" />
|
||||||
|
<el-table-column label="供货单位" align="center" prop="supplierUnit" />
|
||||||
|
<el-table-column label="领料单位" align="center" prop="issueUnit" />
|
||||||
|
<el-table-column label="保管单位" align="center" prop="storageUnit" />
|
||||||
|
<el-table-column label="缺陷情况" align="center" prop="defectDescription" />
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tooltip content="查看" placement="top">
|
||||||
|
<el-button link type="primary" icon="View" @click="handleView(scope.row)"></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="修改" placement="top">
|
||||||
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['materials:materialIssue:edit']"></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="删除" placement="top">
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
icon="Delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['materials:materialIssue:remove']"
|
||||||
|
></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
|
</el-card>
|
||||||
|
<el-dialog
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
|
:title="dialog.title"
|
||||||
|
v-model="dialog.visible"
|
||||||
|
width="800px"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
|
<el-form ref="materialIssueFormRef" :model="form" :rules="rules" label-width="110px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="表单编号" prop="formCode">
|
||||||
|
<el-input v-model="form.formCode" placeholder="请输入表单编号" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="工程名称" prop="projectName">
|
||||||
|
<el-input v-model="form.projectName" placeholder="请输入工程名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="设备材料名称" prop="materialName">
|
||||||
|
<el-input v-model="form.materialName" placeholder="请输入设备材料名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="订货单位" prop="orderingUnit">
|
||||||
|
<el-input v-model="form.orderingUnit" placeholder="请输入订货单位" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="供货单位" prop="supplierUnit">
|
||||||
|
<el-input v-model="form.supplierUnit" placeholder="请输入供货单位" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="领料单位" prop="issueUnit">
|
||||||
|
<el-input v-model="form.issueUnit" placeholder="请输入领料单位" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="保管单位" prop="storageUnit">
|
||||||
|
<el-input v-model="form.storageUnit" placeholder="请输入保管单位" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="缺陷情况" prop="defectDescription">
|
||||||
|
<el-input v-model="form.defectDescription" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<div class="detail">
|
||||||
|
<div class="detail-header">
|
||||||
|
<span>数量验收</span>
|
||||||
|
<el-button type="primary" link @click="addItem" icon="Plus">添加一行</el-button>
|
||||||
|
</div>
|
||||||
|
<div v-for="(item, index) in form.itemList" :key="index" class="detail-item">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
:label="index === 0 ? '名称' : ''"
|
||||||
|
:prop="`itemList.${index}.name`"
|
||||||
|
:rules="[{ required: true, message: '名称不能为空', trigger: 'blur' }]"
|
||||||
|
>
|
||||||
|
<el-input v-model="item.name" placeholder="请输入名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
:label="index === 0 ? '规格' : ''"
|
||||||
|
:prop="`itemList.${index}.specification`"
|
||||||
|
:rules="[{ required: true, message: '规格不能为空', trigger: 'blur' }]"
|
||||||
|
>
|
||||||
|
<el-input v-model="item.specification" placeholder="请输入规格" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
:label="index === 0 ? '单位' : ''"
|
||||||
|
:prop="`itemList.${index}.unit`"
|
||||||
|
:rules="[{ required: true, message: '单位不能为空', trigger: 'blur' }]"
|
||||||
|
>
|
||||||
|
<el-input v-model="item.unit" placeholder="请输入单位" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
:label="index === 0 ? '库存' : ''"
|
||||||
|
:prop="`itemList.${index}.stockQuantity`"
|
||||||
|
:rules="[{ required: true, message: '库存不能为空', trigger: 'blur' }]"
|
||||||
|
>
|
||||||
|
<el-input v-model="item.stockQuantity" placeholder="请输入库存" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
:label="index === 0 ? '领取' : ''"
|
||||||
|
:prop="`itemList.${index}.issuedQuantity`"
|
||||||
|
:rules="[{ required: true, message: '领取数量不能为空', trigger: 'blur' }]"
|
||||||
|
>
|
||||||
|
<el-input v-model="item.issuedQuantity" placeholder="请输入领取数量" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
:label="index === 0 ? '剩余' : ''"
|
||||||
|
:prop="`itemList.${index}.remainingQuantity`"
|
||||||
|
:rules="[{ required: true, message: '剩余数量不能为空', trigger: 'blur' }]"
|
||||||
|
>
|
||||||
|
<el-input v-model="item.remainingQuantity" placeholder="请输入剩余数量" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item :label="index === 0 ? '备注' : ''" prop="remark">
|
||||||
|
<el-input v-model="item.remark" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" v-if="form.itemList.length > 1">
|
||||||
|
<div class="item-actions">
|
||||||
|
<el-button type="danger" link @click="removeItem(index)" icon="Delete">删除</el-button>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="合格证文件" prop="certCountFileId">
|
||||||
|
<file-upload :isShowTip="false" v-model="form.certCountFileId" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="出厂报告文件" prop="reportCountFileId">
|
||||||
|
<file-upload :isShowTip="false" v-model="form.reportCountFileId" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="技术资料文件" prop="techDocCountFileId">
|
||||||
|
<file-upload :isShowTip="false" v-model="form.techDocCountFileId" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="厂家资质文件" prop="licenseCountFileId">
|
||||||
|
<file-upload :isShowTip="false" v-model="form.licenseCountFileId" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<span style="color:#ff0000ab;margin-bottom: 10px;display: block;">注意:请上传doc/xls/ppt/txt/pdf/png/jpg/jpeg/zip格式文件</span>
|
||||||
|
</el-col><el-col :span="24">
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
<wordllssue ref="wordllssueRef"></wordllssue>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="MaterialIssue" lang="ts">
|
||||||
|
import { listMaterialIssue, getMaterialIssue, delMaterialIssue, addMaterialIssue, updateMaterialIssue } from '@/api/materials/materialIssue';
|
||||||
|
import { MaterialIssueVO, MaterialIssueQuery, MaterialIssueForm } from '@/api/materials/materialIssue/types';
|
||||||
|
import { useUserStoreHook } from '@/store/modules/user';
|
||||||
|
import wordllssue from './word/index.vue';
|
||||||
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
// 获取用户 store
|
||||||
|
const userStore = useUserStoreHook();
|
||||||
|
// 从 store 中获取项目列表和当前选中的项目
|
||||||
|
const currentProject = computed(() => userStore.selectedProject);
|
||||||
|
|
||||||
|
const materialIssueList = ref<MaterialIssueVO[]>([]);
|
||||||
|
const buttonLoading = ref(false);
|
||||||
|
const loading = ref(true);
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const ids = ref<Array<string | number>>([]);
|
||||||
|
const single = ref(true);
|
||||||
|
const multiple = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
const wordllssueRef = ref<InstanceType<typeof wordllssue>>();
|
||||||
|
const queryFormRef = ref<ElFormInstance>();
|
||||||
|
const materialIssueFormRef = ref<ElFormInstance>();
|
||||||
|
|
||||||
|
const dialog = reactive<DialogOption>({
|
||||||
|
visible: false,
|
||||||
|
title: ''
|
||||||
|
});
|
||||||
|
|
||||||
|
const initFormData: MaterialIssueForm = {
|
||||||
|
id: undefined,
|
||||||
|
projectId: currentProject.value?.id,
|
||||||
|
materialSource: '1',
|
||||||
|
formCode: undefined,
|
||||||
|
projectName: undefined,
|
||||||
|
materialName: undefined,
|
||||||
|
orderingUnit: undefined,
|
||||||
|
supplierUnit: undefined,
|
||||||
|
issueUnit: undefined,
|
||||||
|
storageUnit: undefined,
|
||||||
|
defectDescription: undefined,
|
||||||
|
certCount: undefined,
|
||||||
|
certCountFileId: undefined,
|
||||||
|
reportCount: undefined,
|
||||||
|
reportCountFileId: undefined,
|
||||||
|
techDocCount: undefined,
|
||||||
|
techDocCountFileId: undefined,
|
||||||
|
licenseCount: undefined,
|
||||||
|
licenseCountFileId: undefined,
|
||||||
|
remark: undefined,
|
||||||
|
itemList: [
|
||||||
|
{
|
||||||
|
id: undefined,
|
||||||
|
specification: undefined,
|
||||||
|
unit: undefined,
|
||||||
|
stockQuantity: undefined,
|
||||||
|
issuedQuantity: undefined,
|
||||||
|
remainingQuantity: undefined,
|
||||||
|
name: undefined,
|
||||||
|
remark: undefined
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
const data = reactive<PageData<MaterialIssueForm, MaterialIssueQuery>>({
|
||||||
|
form: { ...initFormData },
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
projectId: currentProject.value?.id,
|
||||||
|
materialSource: '1',
|
||||||
|
formCode: undefined,
|
||||||
|
projectName: undefined,
|
||||||
|
materialName: undefined,
|
||||||
|
orderingUnit: undefined,
|
||||||
|
supplierUnit: undefined,
|
||||||
|
issueUnit: undefined,
|
||||||
|
storageUnit: undefined,
|
||||||
|
defectDescription: undefined,
|
||||||
|
params: {}
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
id: [{ required: true, message: '主键id不能为空', trigger: 'blur' }]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const { queryParams, form, rules } = toRefs(data);
|
||||||
|
|
||||||
|
/** 查询物料领料单列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
const res = await listMaterialIssue(queryParams.value);
|
||||||
|
materialIssueList.value = res.rows;
|
||||||
|
total.value = res.total;
|
||||||
|
loading.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 取消按钮 */
|
||||||
|
const cancel = () => {
|
||||||
|
reset();
|
||||||
|
dialog.visible = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 表单重置 */
|
||||||
|
const reset = () => {
|
||||||
|
form.value = { ...initFormData };
|
||||||
|
materialIssueFormRef.value?.resetFields();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
const resetQuery = () => {
|
||||||
|
queryFormRef.value?.resetFields();
|
||||||
|
handleQuery();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 多选框选中数据 */
|
||||||
|
const handleSelectionChange = (selection: MaterialIssueVO[]) => {
|
||||||
|
ids.value = selection.map((item) => item.id);
|
||||||
|
single.value = selection.length != 1;
|
||||||
|
multiple.value = !selection.length;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
const handleAdd = () => {
|
||||||
|
reset();
|
||||||
|
dialog.visible = true;
|
||||||
|
dialog.title = '添加物料领料单';
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
const handleUpdate = async (row?: MaterialIssueVO) => {
|
||||||
|
reset();
|
||||||
|
const _id = row?.id || ids.value[0];
|
||||||
|
const res = await getMaterialIssue(_id);
|
||||||
|
Object.assign(form.value, res.data);
|
||||||
|
dialog.visible = true;
|
||||||
|
dialog.title = '修改物料领料单';
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 提交按钮 */
|
||||||
|
const submitForm = () => {
|
||||||
|
materialIssueFormRef.value?.validate(async (valid: boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
buttonLoading.value = true;
|
||||||
|
if (form.value.id) {
|
||||||
|
await updateMaterialIssue(form.value).finally(() => (buttonLoading.value = false));
|
||||||
|
} else {
|
||||||
|
await addMaterialIssue(form.value).finally(() => (buttonLoading.value = false));
|
||||||
|
}
|
||||||
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
|
dialog.visible = false;
|
||||||
|
await getList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 添加数量验收条目
|
||||||
|
const addItem = () => {
|
||||||
|
form.value.itemList.push({
|
||||||
|
id: undefined,
|
||||||
|
specification: undefined,
|
||||||
|
unit: undefined,
|
||||||
|
stockQuantity: undefined,
|
||||||
|
issuedQuantity: undefined,
|
||||||
|
remainingQuantity: undefined,
|
||||||
|
name: undefined,
|
||||||
|
remark: undefined
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 删除数量验收条目
|
||||||
|
const removeItem = (index: number) => {
|
||||||
|
if (form.value.itemList.length > 1) {
|
||||||
|
form.value.itemList.splice(index, 1);
|
||||||
|
} else {
|
||||||
|
proxy?.$modal.msgWarning('至少需要保留一条数量验收记录');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
const handleDelete = async (row?: MaterialIssueVO) => {
|
||||||
|
const _ids = row?.id || ids.value;
|
||||||
|
await proxy?.$modal.confirm('是否确认删除物料领料单编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
||||||
|
await delMaterialIssue(_ids);
|
||||||
|
proxy?.$modal.msgSuccess('删除成功');
|
||||||
|
await getList();
|
||||||
|
};
|
||||||
|
const handleView = (row) => {
|
||||||
|
// 查看详情
|
||||||
|
wordllssueRef.value?.openDialog(row);
|
||||||
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.detail {
|
||||||
|
border-bottom: 1px solid #ececec;
|
||||||
|
border-top: 1px solid #ececec;
|
||||||
|
margin: 10px 0;
|
||||||
|
padding: 10px 0;
|
||||||
|
|
||||||
|
&-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #1eaaff;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-item {
|
||||||
|
padding: 10px;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-actions {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
padding-top: 6px;
|
||||||
|
}
|
||||||
|
</style>
|
Binary file not shown.
After Width: | Height: | Size: 922 B |
@ -0,0 +1,301 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-model="isShowDialog" title="变更单详情" draggable width="60vw" :close-on-click-modal="false" :destroy-on-close="true">
|
||||||
|
<el-card :body-style="{ padding: '20px' }" style="border: none; box-shadow: none">
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<div class="btn-item" @click="onLoad">
|
||||||
|
<img src="./icon/down.png" />
|
||||||
|
<span>导出</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-form ref="formRef" :model="formData" label-width="100px" id="formContent" style="width: 75%; margin-left: 10%">
|
||||||
|
<div class="table-content" id="table-content">
|
||||||
|
<el-row class="mb20" style="display: flex; justify-content: center">
|
||||||
|
<h2>设计材料设备领料单</h2>
|
||||||
|
</el-row>
|
||||||
|
<el-row class="mb10" style="display: flex; justify-content: space-between">
|
||||||
|
<div class="head-text">
|
||||||
|
<span>工程名称:</span>
|
||||||
|
<span>{{ formData.projectName }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="head-text">
|
||||||
|
<span>编号:</span>
|
||||||
|
<span>{{ formData.formCode }}</span>
|
||||||
|
</div>
|
||||||
|
</el-row>
|
||||||
|
<table style="width: 100%" border="1" cellspacing="1">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">设备材料名称</th>
|
||||||
|
<td class="th-bg" colspan="2">{{ formData.materialName }}</td>
|
||||||
|
<th colspan="2">规格及数量</th>
|
||||||
|
<td class="th-bg" colspan="2">见下表</td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">供货单位</th>
|
||||||
|
<td class="th-bg" colspan="2">{{ formData.supplierUnit }}</td>
|
||||||
|
<th colspan="2">订货单位</th>
|
||||||
|
<td class="th-bg" colspan="2">{{ formData.orderingUnit }}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">领料单位</th>
|
||||||
|
<td class="th-bg" colspan="2">{{ formData.placeholder }}</td>
|
||||||
|
<th colspan="2">保管单位</th>
|
||||||
|
<td class="th-bg" colspan="2">{{ formData.storageUnit }}</td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th width="150" colspan="8">数量验收</th>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th width="150">序号</th>
|
||||||
|
<th width="150">名称</th>
|
||||||
|
<th width="150">规格</th>
|
||||||
|
<th width="150">单位</th>
|
||||||
|
<th width="150">库存</th>
|
||||||
|
<th width="150">领取</th>
|
||||||
|
<th width="150">剩余</th>
|
||||||
|
<th width="150">备注</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="(item, i) of formData.itemList" :key="i">
|
||||||
|
<th width="150">{{ i + 1 }}</th>
|
||||||
|
<th width="150">{{ item.name }}</th>
|
||||||
|
<th width="150">{{ item.specification }}</th>
|
||||||
|
<th width="150">{{ item.unit }}</th>
|
||||||
|
<th width="150">{{ item.stockQuantity }}</th>
|
||||||
|
<th width="150">{{ item.issuedQuantity }}</th>
|
||||||
|
<th width="150">{{ item.remainingQuantity }}</th>
|
||||||
|
<th width="150">{{ item.remark }}</th>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td colspan="7">
|
||||||
|
<div style="margin-bottom: 10px;">缺陷情况:</div>
|
||||||
|
{{ formData.defectDescription }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<!-- <th width="150"></th> -->
|
||||||
|
<td colspan="8">
|
||||||
|
<span>是否附带以下随机资料</span>
|
||||||
|
<div class="file_detail">
|
||||||
|
<span>(1) 合格证 {{ formData.certCountFile ? formData.certCountFile.length : 0 }} 份</span>
|
||||||
|
<span>(2) 出厂报告 {{ formData.reportCountFileId ? formData.reportCountFileId.length : 0 }} 份</span>
|
||||||
|
<span>(3) 技术资料文件 {{ formData.techDocCountFileId ? formData.techDocCountFileId.length : 0 }} 份</span>
|
||||||
|
<span>(4) 厂家资质文件 {{ formData.licenseCountFileId ? formData.licenseCountFileId.length : 0 }} 份</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, reactive } from 'vue';
|
||||||
|
import { getMaterialIssue } from '@/api/materials/materialIssue';
|
||||||
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
import { downLoadOss } from '@/api/system/oss';
|
||||||
|
// 响应式状态
|
||||||
|
const isShowDialog = ref(false);
|
||||||
|
const initFormData = {
|
||||||
|
id: undefined,
|
||||||
|
materialSource: '1',
|
||||||
|
formCode: undefined,
|
||||||
|
projectName: undefined,
|
||||||
|
materialName: undefined,
|
||||||
|
orderingUnit: undefined,
|
||||||
|
supplierUnit: undefined,
|
||||||
|
issueUnit: undefined,
|
||||||
|
storageUnit: undefined,
|
||||||
|
defectDescription: undefined,
|
||||||
|
certCount: undefined,
|
||||||
|
certCountFileId: undefined,
|
||||||
|
reportCount: undefined,
|
||||||
|
reportCountFileId: undefined,
|
||||||
|
techDocCount: undefined,
|
||||||
|
techDocCountFileId: undefined,
|
||||||
|
licenseCount: undefined,
|
||||||
|
licenseCountFileId: undefined,
|
||||||
|
remark: undefined,
|
||||||
|
itemList: [
|
||||||
|
{
|
||||||
|
id: undefined,
|
||||||
|
specification: undefined,
|
||||||
|
unit: undefined,
|
||||||
|
stockQuantity: undefined,
|
||||||
|
issuedQuantity: undefined,
|
||||||
|
remainingQuantity: undefined,
|
||||||
|
name: undefined,
|
||||||
|
remark: undefined
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
const data = reactive({
|
||||||
|
formData: { ...initFormData }
|
||||||
|
});
|
||||||
|
const design_change_reason_type = ref([]);
|
||||||
|
const { formData } = toRefs(data);
|
||||||
|
// 打开弹窗
|
||||||
|
const openDialog = (row?: any, types) => {
|
||||||
|
resetForm();
|
||||||
|
design_change_reason_type.value = types;
|
||||||
|
if (row?.id) {
|
||||||
|
getInfos(row.id, types);
|
||||||
|
}
|
||||||
|
isShowDialog.value = true;
|
||||||
|
};
|
||||||
|
// 获取详情数据
|
||||||
|
const getInfos = async (id: string, types) => {
|
||||||
|
const res = await getMaterialIssue(id);
|
||||||
|
Object.assign(formData.value, res.data);
|
||||||
|
// 数据处理
|
||||||
|
if (formData.value.changeReason) {
|
||||||
|
let arr = formData.value.changeReason.split(',');
|
||||||
|
var changeReason = types.filter((item) => arr.includes(item.value.toString())).map((item) => item.label);
|
||||||
|
formData.value.changeReason = changeReason.join(',');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// 重置表单
|
||||||
|
const resetForm = () => {
|
||||||
|
Object.keys(formData.value).forEach((key) => {
|
||||||
|
formData[key] = undefined;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 下载文件
|
||||||
|
const onOpen = (path: string) => {
|
||||||
|
window.open(path, '_blank');
|
||||||
|
};
|
||||||
|
// 导出
|
||||||
|
const onLoad = async () => {
|
||||||
|
await downLoadOss({ id: formData.value.id }, '/design/designChange/export/word', '设计变更单.zip');
|
||||||
|
};
|
||||||
|
|
||||||
|
// 关闭弹窗
|
||||||
|
const closeDialog = () => {
|
||||||
|
isShowDialog.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 暴露方法给父组件
|
||||||
|
defineExpose({
|
||||||
|
openDialog,
|
||||||
|
closeDialog
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.pic-block {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
.file-block {
|
||||||
|
width: 100%;
|
||||||
|
border: 1px solid var(--el-border-color);
|
||||||
|
border-radius: 6px;
|
||||||
|
cursor: pointer;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: var(--el-transition-duration-fast);
|
||||||
|
margin-bottom: 5px;
|
||||||
|
padding: 3px 6px;
|
||||||
|
}
|
||||||
|
.ml-2 {
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
::v-deep .el-icon svg {
|
||||||
|
height: 100% !important;
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
::v-deep .el-step__icon-inner {
|
||||||
|
font-size: 14px !important;
|
||||||
|
font-weight: 700 !important;
|
||||||
|
}
|
||||||
|
.dialog-footer {
|
||||||
|
height: 100px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
position: absolute;
|
||||||
|
top: 14%;
|
||||||
|
right: 10%;
|
||||||
|
background: #fff;
|
||||||
|
box-shadow: 0px 0px 10px #ddd;
|
||||||
|
text-align: center;
|
||||||
|
padding: 20px 10px;
|
||||||
|
.btn-item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
cursor: pointer;
|
||||||
|
> span {
|
||||||
|
padding-top: 5px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: rgba(51, 51, 51, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.file_detail{
|
||||||
|
|
||||||
|
>span{
|
||||||
|
width: 40%;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
border-collapse: collapse; //合并为一个单一的边框
|
||||||
|
border-color: rgba(199, 199, 199, 1); //边框颜色按实际自定义即可
|
||||||
|
}
|
||||||
|
thead {
|
||||||
|
tr {
|
||||||
|
th {
|
||||||
|
background-color: rgba(247, 247, 247, 1); //设置表格标题背景色
|
||||||
|
height: 35px; //设置单元格最小高度
|
||||||
|
text-align: center;
|
||||||
|
letter-spacing: 5px;
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
td {
|
||||||
|
text-align: left;
|
||||||
|
height: 35px; //设置单元格最小高度
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
.th-bg {
|
||||||
|
background-color: rgba(247, 247, 247, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tbody {
|
||||||
|
tr {
|
||||||
|
td {
|
||||||
|
text-align: left;
|
||||||
|
height: 40px; //设置单元格最小高度
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
th {
|
||||||
|
height: 35px; //设置单元格最小高度
|
||||||
|
text-align: center;
|
||||||
|
letter-spacing: 5px;
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.table-content {
|
||||||
|
box-shadow: 0px 0px 10px #ddd;
|
||||||
|
padding: 20px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,496 @@
|
|||||||
|
<template>
|
||||||
|
<div class="p-2">
|
||||||
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
|
<el-card shadow="hover">
|
||||||
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||||
|
<el-form-item label="表单编号" prop="formCode">
|
||||||
|
<el-input v-model="queryParams.formCode" placeholder="请输入表单编号" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="工程名称" prop="projectName">
|
||||||
|
<el-input v-model="queryParams.projectName" placeholder="请输入工程名称" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="材料名称" prop="materialName">
|
||||||
|
<el-input v-model="queryParams.materialName" placeholder="请输入设备材料名称" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="合同名称" prop="contractName">
|
||||||
|
<el-input v-model="queryParams.contractName" placeholder="请输入合同名称" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="订货单位" prop="orderingUnit">
|
||||||
|
<el-input v-model="queryParams.orderingUnit" placeholder="请输入订货单位" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="供货单位" prop="supplierUnit">
|
||||||
|
<el-input v-model="queryParams.supplierUnit" placeholder="请输入供货单位" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
|
|
||||||
|
<el-card shadow="never">
|
||||||
|
<template #header>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['materials:materialReceive:add']">新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="Delete"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete()"
|
||||||
|
v-hasPermi="['materials:materialReceive:remove']"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="materialReceiveList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="表单编号" align="center" prop="formCode" />
|
||||||
|
<el-table-column label="工程名称" align="center" prop="projectName" />
|
||||||
|
<el-table-column label="设备材料名称" align="center" prop="materialName" />
|
||||||
|
<el-table-column label="合同名称" align="center" prop="contractName" />
|
||||||
|
<el-table-column label="订货单位" align="center" prop="orderingUnit" />
|
||||||
|
<el-table-column label="供货单位" align="center" prop="supplierUnit" />
|
||||||
|
<el-table-column label="设备材料入库/移交" align="center" prop="storageType">
|
||||||
|
<template #default="scope">
|
||||||
|
<dict-tag :options="storage_type" :value="scope.row.storageType ? scope.row.storageType.split(',') : []" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tooltip content="查看" placement="top">
|
||||||
|
<el-button link type="primary" icon="View" @click="handleView(scope.row)"></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="修改" placement="top">
|
||||||
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['materials:materialReceive:edit']"></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="删除" placement="top">
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
icon="Delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['materials:materialReceive:remove']"
|
||||||
|
></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
|
</el-card>
|
||||||
|
<!-- 添加或修改物料接收单对话框 -->
|
||||||
|
<el-dialog :title="dialog.title" v-model="dialog.visible" width="800px" append-to-body>
|
||||||
|
<el-form ref="materialReceiveFormRef" :model="form" :rules="rules" label-width="110px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="表单编号" prop="formCode">
|
||||||
|
<el-input v-model="form.formCode" placeholder="请输入表单编号" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12"
|
||||||
|
><el-form-item label="工程名称" prop="projectName">
|
||||||
|
<el-input v-model="form.projectName" placeholder="请输入工程名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="设备材料名称" prop="materialName">
|
||||||
|
<el-input v-model="form.materialName" placeholder="请输入设备材料名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="合同名称" prop="contractName">
|
||||||
|
<el-input v-model="form.contractName" placeholder="请输入合同名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="订货单位" prop="orderingUnit">
|
||||||
|
<el-input v-model="form.orderingUnit" placeholder="请输入订货单位" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="供货单位" prop="supplierUnit">
|
||||||
|
<el-input v-model="form.supplierUnit" placeholder="请输入供货单位" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="缺陷情况" prop="defectDescription">
|
||||||
|
<el-input v-model="form.defectDescription" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<div class="detail">
|
||||||
|
<div class="detail-header">
|
||||||
|
<span>数量验收</span>
|
||||||
|
<el-button type="primary" link @click="addItem" icon="Plus">添加一行</el-button>
|
||||||
|
</div>
|
||||||
|
<div v-for="(item, index) in form.itemList" :key="index" class="detail-item">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
:label="index === 0 ? '名称' : ''"
|
||||||
|
:prop="`itemList.${index}.name`"
|
||||||
|
:rules="{ required: true, message: '名称不能为空', trigger: 'blur' }"
|
||||||
|
>
|
||||||
|
<el-input v-model="item.name" placeholder="请输入名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
:label="index === 0 ? '规格' : ''"
|
||||||
|
:prop="`itemList.${index}.specification`"
|
||||||
|
:rules="{ required: true, message: '规格不能为空', trigger: 'blur' }"
|
||||||
|
>
|
||||||
|
<el-input v-model="item.specification" placeholder="请输入规格" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
:label="index === 0 ? '单位' : ''"
|
||||||
|
:prop="`itemList.${index}.unit`"
|
||||||
|
:rules="{ required: true, message: '单位不能为空', trigger: 'blur' }"
|
||||||
|
>
|
||||||
|
<el-input v-model="item.unit" placeholder="请输入单位" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
:label="index === 0 ? '数量' : ''"
|
||||||
|
:prop="`itemList.${index}.quantity`"
|
||||||
|
:rules="{ required: true, message: '数量不能为空', trigger: 'blur' }"
|
||||||
|
>
|
||||||
|
<el-input v-model="item.quantity" placeholder="请输入数量" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
:label="index === 0 ? '验收' : ''"
|
||||||
|
:prop="`itemList.${index}.acceptedQuantity`"
|
||||||
|
:rules="{ required: true, message: '验收数量不能为空', trigger: 'blur' }"
|
||||||
|
>
|
||||||
|
<el-input v-model="item.acceptedQuantity" placeholder="请输入验收" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
:label="index === 0 ? '缺件' : ''"
|
||||||
|
:prop="`itemList.${index}.shortageQuantity`"
|
||||||
|
:rules="{ required: true, message: '缺件数量不能为空', trigger: 'blur' }"
|
||||||
|
>
|
||||||
|
<el-input v-model="item.shortageQuantity" placeholder="请输入缺件" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item :label="index === 0 ? '备注' : ''" prop="remark">
|
||||||
|
<el-input v-model="item.remark" placeholder="请输入备注" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" v-if="form.itemList.length > 1">
|
||||||
|
<div class="item-actions">
|
||||||
|
<el-button type="danger" link @click="removeItem(index)" icon="Delete">删除</el-button>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="合格证文件" prop="certCountFileId">
|
||||||
|
<file-upload :isShowTip="false" v-model="form.certCountFileId" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="出厂报告文件" prop="reportCountFileId">
|
||||||
|
<file-upload :isShowTip="false" v-model="form.reportCountFileId" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="技术资料文件" prop="techDocCountFileId">
|
||||||
|
<file-upload :isShowTip="false" v-model="form.techDocCountFileId" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="厂家资质文件" prop="licenseCountFileId">
|
||||||
|
<file-upload :isShowTip="false" v-model="form.licenseCountFileId" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<span style="color:#ff0000ab;margin-bottom: 10px;display: block;">注意:请上传doc/xls/ppt/txt/pdf/png/jpg/jpeg/zip格式文件</span>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="设备材料入库/移交" prop="storageType">
|
||||||
|
<el-checkbox-group v-model="form.storageType">
|
||||||
|
<el-checkbox v-for="dict in storage_type" :key="dict.value" :label="dict.value">
|
||||||
|
{{ dict.label }}
|
||||||
|
</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</el-form-item> </el-col
|
||||||
|
><el-col :span="24"
|
||||||
|
><el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
<wordllReceive ref="wordllReceiveRef"></wordllReceive>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="MaterialReceive" lang="ts">
|
||||||
|
import {
|
||||||
|
listMaterialReceive,
|
||||||
|
getMaterialReceive,
|
||||||
|
delMaterialReceive,
|
||||||
|
addMaterialReceive,
|
||||||
|
updateMaterialReceive
|
||||||
|
} from '@/api/materials/materialReceive';
|
||||||
|
import { MaterialReceiveVO, MaterialReceiveQuery, MaterialReceiveForm } from '@/api/materials/materialReceive/types';
|
||||||
|
import { useUserStoreHook } from '@/store/modules/user';
|
||||||
|
import wordllReceive from './word/index.vue';
|
||||||
|
|
||||||
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
const { storage_type } = toRefs<any>(proxy?.useDict('storage_type'));
|
||||||
|
// 获取用户 store
|
||||||
|
const userStore = useUserStoreHook();
|
||||||
|
// 从 store 中获取项目列表和当前选中的项目
|
||||||
|
const currentProject = computed(() => userStore.selectedProject);
|
||||||
|
const wordllReceiveRef = ref<InstanceType<typeof wordllReceive>>();
|
||||||
|
const materialReceiveList = ref<MaterialReceiveVO[]>([]);
|
||||||
|
const buttonLoading = ref(false);
|
||||||
|
const loading = ref(true);
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const ids = ref<Array<string | number>>([]);
|
||||||
|
const single = ref(true);
|
||||||
|
const multiple = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
|
||||||
|
const queryFormRef = ref<ElFormInstance>();
|
||||||
|
const materialReceiveFormRef = ref<ElFormInstance>();
|
||||||
|
|
||||||
|
const dialog = reactive<DialogOption>({
|
||||||
|
visible: false,
|
||||||
|
title: ''
|
||||||
|
});
|
||||||
|
|
||||||
|
const initFormData: MaterialReceiveForm = {
|
||||||
|
id: undefined,
|
||||||
|
projectId: currentProject.value?.id,
|
||||||
|
materialSource: '1',
|
||||||
|
formCode: undefined,
|
||||||
|
projectName: undefined,
|
||||||
|
materialName: undefined,
|
||||||
|
contractName: undefined,
|
||||||
|
orderingUnit: undefined,
|
||||||
|
supplierUnit: undefined,
|
||||||
|
defectDescription: undefined,
|
||||||
|
certCount: undefined,
|
||||||
|
certCountFileId: undefined,
|
||||||
|
reportCount: undefined,
|
||||||
|
reportCountFileId: undefined,
|
||||||
|
techDocCount: undefined,
|
||||||
|
techDocCountFileId: undefined,
|
||||||
|
licenseCount: undefined,
|
||||||
|
licenseCountFileId: undefined,
|
||||||
|
storageType: [],
|
||||||
|
remark: undefined,
|
||||||
|
itemList: [
|
||||||
|
{
|
||||||
|
name: undefined,
|
||||||
|
specification: undefined,
|
||||||
|
unit: undefined,
|
||||||
|
quantity: undefined,
|
||||||
|
acceptedQuantity: undefined,
|
||||||
|
shortageQuantity: undefined,
|
||||||
|
remark: undefined
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
const data = reactive<PageData<MaterialReceiveForm, MaterialReceiveQuery>>({
|
||||||
|
form: { ...initFormData },
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
projectId: currentProject.value?.id,
|
||||||
|
materialSource: '1',
|
||||||
|
formCode: undefined,
|
||||||
|
projectName: undefined,
|
||||||
|
materialName: undefined,
|
||||||
|
contractName: undefined,
|
||||||
|
orderingUnit: undefined,
|
||||||
|
supplierUnit: undefined,
|
||||||
|
params: {}
|
||||||
|
},
|
||||||
|
rules: {}
|
||||||
|
});
|
||||||
|
|
||||||
|
const { queryParams, form, rules } = toRefs(data);
|
||||||
|
|
||||||
|
/** 查询物料接收单列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
const res = await listMaterialReceive(queryParams.value);
|
||||||
|
materialReceiveList.value = res.rows;
|
||||||
|
total.value = res.total;
|
||||||
|
loading.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 取消按钮 */
|
||||||
|
const cancel = () => {
|
||||||
|
reset();
|
||||||
|
dialog.visible = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 表单重置 */
|
||||||
|
const reset = () => {
|
||||||
|
form.value = { ...initFormData };
|
||||||
|
materialReceiveFormRef.value?.resetFields();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
const resetQuery = () => {
|
||||||
|
queryFormRef.value?.resetFields();
|
||||||
|
handleQuery();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 多选框选中数据 */
|
||||||
|
const handleSelectionChange = (selection: MaterialReceiveVO[]) => {
|
||||||
|
ids.value = selection.map((item) => item.id);
|
||||||
|
single.value = selection.length != 1;
|
||||||
|
multiple.value = !selection.length;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
const handleAdd = () => {
|
||||||
|
reset();
|
||||||
|
dialog.visible = true;
|
||||||
|
dialog.title = '添加物料接收单';
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
const handleUpdate = async (row?: MaterialReceiveVO) => {
|
||||||
|
reset();
|
||||||
|
const _id = row?.id || ids.value[0];
|
||||||
|
const res = await getMaterialReceive(_id);
|
||||||
|
Object.assign(form.value, res.data);
|
||||||
|
if(form.value.storageType.length){
|
||||||
|
form.value.storageType = form.value.storageType.split(',');
|
||||||
|
}else{
|
||||||
|
form.value.storageType=[]
|
||||||
|
}
|
||||||
|
dialog.visible = true;
|
||||||
|
dialog.title = '修改物料接收单';
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 提交按钮 */
|
||||||
|
const submitForm = () => {
|
||||||
|
materialReceiveFormRef.value?.validate(async (valid: boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
buttonLoading.value = true;
|
||||||
|
form.value.storageType = form.value.storageType.join(',');
|
||||||
|
if (form.value.id) {
|
||||||
|
await updateMaterialReceive(form.value).finally(() => (buttonLoading.value = false));
|
||||||
|
} else {
|
||||||
|
await addMaterialReceive(form.value).finally(() => (buttonLoading.value = false));
|
||||||
|
}
|
||||||
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
|
dialog.visible = false;
|
||||||
|
await getList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
const handleDelete = async (row?: MaterialReceiveVO) => {
|
||||||
|
const _ids = row?.id || ids.value;
|
||||||
|
await proxy?.$modal.confirm('是否确认删除物料接收单编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
||||||
|
await delMaterialReceive(_ids);
|
||||||
|
proxy?.$modal.msgSuccess('删除成功');
|
||||||
|
await getList();
|
||||||
|
};
|
||||||
|
// 添加数量验收条目
|
||||||
|
const addItem = () => {
|
||||||
|
form.value.itemList.push({
|
||||||
|
name: undefined,
|
||||||
|
specification: undefined,
|
||||||
|
unit: undefined,
|
||||||
|
quantity: undefined,
|
||||||
|
acceptedQuantity: undefined,
|
||||||
|
shortageQuantity: undefined,
|
||||||
|
remark: undefined
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 删除数量验收条目
|
||||||
|
const removeItem = (index: number) => {
|
||||||
|
if (form.value.itemList.length > 1) {
|
||||||
|
form.value.itemList.splice(index, 1);
|
||||||
|
} else {
|
||||||
|
proxy?.$modal.msgWarning('至少需要保留一条数量验收记录');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const handleView = (row) => {
|
||||||
|
// 查看详情
|
||||||
|
wordllReceiveRef.value?.openDialog(row);
|
||||||
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.detail {
|
||||||
|
border-bottom: 1px solid #ececec;
|
||||||
|
border-top: 1px solid #ececec;
|
||||||
|
margin: 10px 0;
|
||||||
|
padding: 10px 0;
|
||||||
|
|
||||||
|
&-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #1eaaff;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-item {
|
||||||
|
padding: 10px;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-actions {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
padding-top: 6px;
|
||||||
|
}
|
||||||
|
</style>
|
Binary file not shown.
After Width: | Height: | Size: 922 B |
@ -0,0 +1,290 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-model="isShowDialog" title="变更单详情" draggable width="60vw" :close-on-click-modal="false" :destroy-on-close="true">
|
||||||
|
<el-card :body-style="{ padding: '20px' }" style="border: none; box-shadow: none">
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<div class="btn-item" @click="onLoad">
|
||||||
|
<img src="./icon/down.png" />
|
||||||
|
<span>导出</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-form ref="formRef" :model="formData" label-width="100px" id="formContent" style="width: 75%; margin-left: 10%">
|
||||||
|
<div class="table-content" id="table-content">
|
||||||
|
<el-row class="mb20" style="display: flex; justify-content: center">
|
||||||
|
<h2>材料设备验收单</h2>
|
||||||
|
</el-row>
|
||||||
|
<el-row class="mb10" style="display: flex; justify-content: space-between">
|
||||||
|
<div class="head-text">
|
||||||
|
<span>工程名称:</span>
|
||||||
|
<span>{{ formData.projectName }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="head-text">
|
||||||
|
<span>编号:</span>
|
||||||
|
<span>{{ formData.formCode }}</span>
|
||||||
|
</div>
|
||||||
|
</el-row>
|
||||||
|
<table style="width: 100%" border="1" cellspacing="1">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">设备材料名称</th>
|
||||||
|
<td class="th-bg" colspan="2">{{ formData.materialName }}</td>
|
||||||
|
<th colspan="2">合同名称</th>
|
||||||
|
<td class="th-bg" colspan="2">{{ formData.contractName }}</td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">订货单位</th>
|
||||||
|
<td class="th-bg" colspan="2">{{ formData.orderingUnit }}</td>
|
||||||
|
<th colspan="2">供货单位</th>
|
||||||
|
<td class="th-bg" colspan="2">{{ formData.supplierUnit }}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th width="150" colspan="8">数量验收(验收、缺件数量由承包单位填写)</th>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th width="150">序号</th>
|
||||||
|
<th width="150">名称</th>
|
||||||
|
<th width="150">规格</th>
|
||||||
|
<th width="150">单位</th>
|
||||||
|
<th width="150">数量</th>
|
||||||
|
<th width="150">验收</th>
|
||||||
|
<th width="150">缺件</th>
|
||||||
|
<th width="150">备注</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="(item, i) of formData.itemList" :key="i">
|
||||||
|
<th width="150">{{ i + 1 }}</th>
|
||||||
|
<th width="150">{{ item.name }}</th>
|
||||||
|
<th width="150">{{ item.specification }}</th>
|
||||||
|
<th width="150">{{ item.unit }}</th>
|
||||||
|
<th width="150">{{ item.quantity }}</th>
|
||||||
|
<th width="150">{{ item.acceptedQuantity }}</th>
|
||||||
|
<th width="150">{{ item.shortageQuantity }}</th>
|
||||||
|
<th width="150">{{ item.remark }}</th>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td colspan="7">
|
||||||
|
<div style="margin-bottom: 10px">缺陷情况:</div>
|
||||||
|
{{ formData.defectDescription }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td colspan="8">
|
||||||
|
<span>是否附带以下随机资料</span>
|
||||||
|
<div class="file_detail">
|
||||||
|
<span>(1) 合格证 {{ formData.certCountFile ? formData.certCountFile.length : 0 }} 份</span>
|
||||||
|
<span>(2) 出厂报告 {{ formData.reportCountFileId ? formData.reportCountFileId.length : 0 }} 份</span>
|
||||||
|
<span>(3) 技术资料文件 {{ formData.techDocCountFileId ? formData.techDocCountFileId.length : 0 }} 份</span>
|
||||||
|
<span>(4) 厂家资质文件 {{ formData.licenseCountFileId ? formData.licenseCountFileId.length : 0 }} 份</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, reactive } from 'vue';
|
||||||
|
import { getMaterialReceive } from '@/api/materials/materialReceive';
|
||||||
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
import { downLoadOss } from '@/api/system/oss';
|
||||||
|
// 响应式状态
|
||||||
|
const isShowDialog = ref(false);
|
||||||
|
const initFormData = {
|
||||||
|
id: undefined,
|
||||||
|
materialSource: '1',
|
||||||
|
formCode: undefined,
|
||||||
|
projectName: undefined,
|
||||||
|
materialName: undefined,
|
||||||
|
contractName: undefined,
|
||||||
|
orderingUnit: undefined,
|
||||||
|
supplierUnit: undefined,
|
||||||
|
defectDescription: undefined,
|
||||||
|
certCount: undefined,
|
||||||
|
certCountFileId: undefined,
|
||||||
|
reportCount: undefined,
|
||||||
|
reportCountFileId: undefined,
|
||||||
|
techDocCount: undefined,
|
||||||
|
techDocCountFileId: undefined,
|
||||||
|
licenseCount: undefined,
|
||||||
|
licenseCountFileId: undefined,
|
||||||
|
storageType: [],
|
||||||
|
remark: undefined,
|
||||||
|
itemList: [
|
||||||
|
{
|
||||||
|
name: undefined,
|
||||||
|
specification: undefined,
|
||||||
|
unit: undefined,
|
||||||
|
quantity: undefined,
|
||||||
|
acceptedQuantity: undefined,
|
||||||
|
shortageQuantity: undefined,
|
||||||
|
remark: undefined
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
const data = reactive({
|
||||||
|
formData: { ...initFormData }
|
||||||
|
});
|
||||||
|
const design_change_reason_type = ref([]);
|
||||||
|
const { formData } = toRefs(data);
|
||||||
|
// 打开弹窗
|
||||||
|
const openDialog = (row?: any, types) => {
|
||||||
|
resetForm();
|
||||||
|
design_change_reason_type.value = types;
|
||||||
|
if (row?.id) {
|
||||||
|
getInfos(row.id, types);
|
||||||
|
}
|
||||||
|
isShowDialog.value = true;
|
||||||
|
};
|
||||||
|
// 获取详情数据
|
||||||
|
const getInfos = async (id: string, types) => {
|
||||||
|
const res = await getMaterialReceive(id);
|
||||||
|
Object.assign(formData.value, res.data);
|
||||||
|
// 数据处理
|
||||||
|
if (formData.value.changeReason) {
|
||||||
|
let arr = formData.value.changeReason.split(',');
|
||||||
|
var changeReason = types.filter((item) => arr.includes(item.value.toString())).map((item) => item.label);
|
||||||
|
formData.value.changeReason = changeReason.join(',');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// 重置表单
|
||||||
|
const resetForm = () => {
|
||||||
|
Object.keys(formData.value).forEach((key) => {
|
||||||
|
formData[key] = undefined;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 下载文件
|
||||||
|
const onOpen = (path: string) => {
|
||||||
|
window.open(path, '_blank');
|
||||||
|
};
|
||||||
|
// 导出
|
||||||
|
const onLoad = async () => {
|
||||||
|
await downLoadOss({ id: formData.value.id }, '/design/designChange/export/word', '设计变更单.zip');
|
||||||
|
};
|
||||||
|
|
||||||
|
// 关闭弹窗
|
||||||
|
const closeDialog = () => {
|
||||||
|
isShowDialog.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 暴露方法给父组件
|
||||||
|
defineExpose({
|
||||||
|
openDialog,
|
||||||
|
closeDialog
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.pic-block {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
.file-block {
|
||||||
|
width: 100%;
|
||||||
|
border: 1px solid var(--el-border-color);
|
||||||
|
border-radius: 6px;
|
||||||
|
cursor: pointer;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: var(--el-transition-duration-fast);
|
||||||
|
margin-bottom: 5px;
|
||||||
|
padding: 3px 6px;
|
||||||
|
}
|
||||||
|
.ml-2 {
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
::v-deep .el-icon svg {
|
||||||
|
height: 100% !important;
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
::v-deep .el-step__icon-inner {
|
||||||
|
font-size: 14px !important;
|
||||||
|
font-weight: 700 !important;
|
||||||
|
}
|
||||||
|
.dialog-footer {
|
||||||
|
height: 100px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
position: absolute;
|
||||||
|
top: 14%;
|
||||||
|
right: 10%;
|
||||||
|
background: #fff;
|
||||||
|
box-shadow: 0px 0px 10px #ddd;
|
||||||
|
text-align: center;
|
||||||
|
padding: 20px 10px;
|
||||||
|
.btn-item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
cursor: pointer;
|
||||||
|
> span {
|
||||||
|
padding-top: 5px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: rgba(51, 51, 51, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.file_detail {
|
||||||
|
> span {
|
||||||
|
width: 40%;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
border-collapse: collapse; //合并为一个单一的边框
|
||||||
|
border-color: rgba(199, 199, 199, 1); //边框颜色按实际自定义即可
|
||||||
|
}
|
||||||
|
thead {
|
||||||
|
tr {
|
||||||
|
th {
|
||||||
|
background-color: rgba(247, 247, 247, 1); //设置表格标题背景色
|
||||||
|
height: 35px; //设置单元格最小高度
|
||||||
|
text-align: center;
|
||||||
|
letter-spacing: 5px;
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
td {
|
||||||
|
text-align: left;
|
||||||
|
height: 35px; //设置单元格最小高度
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
.th-bg {
|
||||||
|
background-color: rgba(247, 247, 247, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tbody {
|
||||||
|
tr {
|
||||||
|
td {
|
||||||
|
text-align: left;
|
||||||
|
height: 40px; //设置单元格最小高度
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
th {
|
||||||
|
height: 35px; //设置单元格最小高度
|
||||||
|
text-align: center;
|
||||||
|
letter-spacing: 5px;
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.table-content {
|
||||||
|
box-shadow: 0px 0px 10px #ddd;
|
||||||
|
padding: 20px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,484 @@
|
|||||||
|
<template>
|
||||||
|
<div class="p-2">
|
||||||
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
|
<el-card shadow="hover">
|
||||||
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||||
|
<el-form-item label="表单编号" prop="formCode">
|
||||||
|
<el-input v-model="queryParams.formCode" placeholder="请输入表单编号" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="工程名称" prop="projectName">
|
||||||
|
<el-input v-model="queryParams.projectName" placeholder="请输入工程名称" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="材料名称" prop="materialName">
|
||||||
|
<el-input v-model="queryParams.materialName" placeholder="请输入设备材料名称" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="订货单位" prop="orderingUnit">
|
||||||
|
<el-input v-model="queryParams.orderingUnit" placeholder="请输入订货单位" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="供货单位" prop="supplierUnit">
|
||||||
|
<el-input v-model="queryParams.supplierUnit" placeholder="请输入供货单位" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="领料单位" prop="issueUnit">
|
||||||
|
<el-input v-model="queryParams.issueUnit" placeholder="请输入领料单位" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="保管单位" prop="storageUnit">
|
||||||
|
<el-input v-model="queryParams.storageUnit" placeholder="请输入保管单位" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="缺陷情况" prop="defectDescription">
|
||||||
|
<el-input v-model="queryParams.defectDescription" placeholder="请输入缺陷情况" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<template #header>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['materials:materialIssue:add']">新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['materials:materialIssue:remove']"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
<el-table v-loading="loading" :data="materialIssueList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="表单编号" align="center" prop="formCode" />
|
||||||
|
<el-table-column label="工程名称" align="center" prop="projectName" />
|
||||||
|
<el-table-column label="设备材料名称" align="center" prop="materialName" />
|
||||||
|
<el-table-column label="订货单位" align="center" prop="orderingUnit" />
|
||||||
|
<el-table-column label="供货单位" align="center" prop="supplierUnit" />
|
||||||
|
<el-table-column label="领料单位" align="center" prop="issueUnit" />
|
||||||
|
<el-table-column label="保管单位" align="center" prop="storageUnit" />
|
||||||
|
<el-table-column label="缺陷情况" align="center" prop="defectDescription" />
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tooltip content="查看" placement="top">
|
||||||
|
<el-button link type="primary" icon="View" @click="handleView(scope.row)"></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="修改" placement="top">
|
||||||
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['materials:materialIssue:edit']"></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="删除" placement="top">
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
icon="Delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['materials:materialIssue:remove']"
|
||||||
|
></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
|
</el-card>
|
||||||
|
<el-dialog
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
|
:title="dialog.title"
|
||||||
|
v-model="dialog.visible"
|
||||||
|
width="800px"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
|
<el-form ref="materialIssueFormRef" :model="form" :rules="rules" label-width="110px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="表单编号" prop="formCode">
|
||||||
|
<el-input v-model="form.formCode" placeholder="请输入表单编号" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="工程名称" prop="projectName">
|
||||||
|
<el-input v-model="form.projectName" placeholder="请输入工程名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="设备材料名称" prop="materialName">
|
||||||
|
<el-input v-model="form.materialName" placeholder="请输入设备材料名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="订货单位" prop="orderingUnit">
|
||||||
|
<el-input v-model="form.orderingUnit" placeholder="请输入订货单位" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="供货单位" prop="supplierUnit">
|
||||||
|
<el-input v-model="form.supplierUnit" placeholder="请输入供货单位" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="领料单位" prop="issueUnit">
|
||||||
|
<el-input v-model="form.issueUnit" placeholder="请输入领料单位" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="保管单位" prop="storageUnit">
|
||||||
|
<el-input v-model="form.storageUnit" placeholder="请输入保管单位" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="缺陷情况" prop="defectDescription">
|
||||||
|
<el-input v-model="form.defectDescription" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<div class="detail">
|
||||||
|
<div class="detail-header">
|
||||||
|
<span>数量验收</span>
|
||||||
|
<el-button type="primary" link @click="addItem" icon="Plus">添加一行</el-button>
|
||||||
|
</div>
|
||||||
|
<div v-for="(item, index) in form.itemList" :key="index" class="detail-item">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
:label="index === 0 ? '名称' : ''"
|
||||||
|
:prop="`itemList.${index}.name`"
|
||||||
|
:rules="[{ required: true, message: '名称不能为空', trigger: 'blur' }]"
|
||||||
|
>
|
||||||
|
<el-input v-model="item.name" placeholder="请输入名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
:label="index === 0 ? '规格' : ''"
|
||||||
|
:prop="`itemList.${index}.specification`"
|
||||||
|
:rules="[{ required: true, message: '规格不能为空', trigger: 'blur' }]"
|
||||||
|
>
|
||||||
|
<el-input v-model="item.specification" placeholder="请输入规格" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
:label="index === 0 ? '单位' : ''"
|
||||||
|
:prop="`itemList.${index}.unit`"
|
||||||
|
:rules="[{ required: true, message: '单位不能为空', trigger: 'blur' }]"
|
||||||
|
>
|
||||||
|
<el-input v-model="item.unit" placeholder="请输入单位" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
:label="index === 0 ? '库存' : ''"
|
||||||
|
:prop="`itemList.${index}.stockQuantity`"
|
||||||
|
:rules="[{ required: true, message: '库存不能为空', trigger: 'blur' }]"
|
||||||
|
>
|
||||||
|
<el-input v-model="item.stockQuantity" placeholder="请输入库存" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
:label="index === 0 ? '领取' : ''"
|
||||||
|
:prop="`itemList.${index}.issuedQuantity`"
|
||||||
|
:rules="[{ required: true, message: '领取数量不能为空', trigger: 'blur' }]"
|
||||||
|
>
|
||||||
|
<el-input v-model="item.issuedQuantity" placeholder="请输入领取数量" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
:label="index === 0 ? '剩余' : ''"
|
||||||
|
:prop="`itemList.${index}.remainingQuantity`"
|
||||||
|
:rules="[{ required: true, message: '剩余数量不能为空', trigger: 'blur' }]"
|
||||||
|
>
|
||||||
|
<el-input v-model="item.remainingQuantity" placeholder="请输入剩余数量" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item :label="index === 0 ? '备注' : ''" prop="remark">
|
||||||
|
<el-input v-model="item.remark" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" v-if="form.itemList.length > 1">
|
||||||
|
<div class="item-actions">
|
||||||
|
<el-button type="danger" link @click="removeItem(index)" icon="Delete">删除</el-button>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="合格证文件" prop="certCountFileId">
|
||||||
|
<file-upload :isShowTip="false" v-model="form.certCountFileId" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="出厂报告文件" prop="reportCountFileId">
|
||||||
|
<file-upload :isShowTip="false" v-model="form.reportCountFileId" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="技术资料文件" prop="techDocCountFileId">
|
||||||
|
<file-upload :isShowTip="false" v-model="form.techDocCountFileId" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="厂家资质文件" prop="licenseCountFileId">
|
||||||
|
<file-upload :isShowTip="false" v-model="form.licenseCountFileId" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<span style="color:#ff0000ab;margin-bottom: 10px;display: block;">注意:请上传doc/xls/ppt/txt/pdf/png/jpg/jpeg/zip格式文件</span>
|
||||||
|
</el-col><el-col :span="24">
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
<wordllssue ref="wordllssueRef"></wordllssue>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="MaterialIssue" lang="ts">
|
||||||
|
import { listMaterialIssue, getMaterialIssue, delMaterialIssue, addMaterialIssue, updateMaterialIssue } from '@/api/materials/materialIssue';
|
||||||
|
import { MaterialIssueVO, MaterialIssueQuery, MaterialIssueForm } from '@/api/materials/materialIssue/types';
|
||||||
|
import { useUserStoreHook } from '@/store/modules/user';
|
||||||
|
import wordllssue from './word/index.vue';
|
||||||
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
// 获取用户 store
|
||||||
|
const userStore = useUserStoreHook();
|
||||||
|
// 从 store 中获取项目列表和当前选中的项目
|
||||||
|
const currentProject = computed(() => userStore.selectedProject);
|
||||||
|
|
||||||
|
const materialIssueList = ref<MaterialIssueVO[]>([]);
|
||||||
|
const buttonLoading = ref(false);
|
||||||
|
const loading = ref(true);
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const ids = ref<Array<string | number>>([]);
|
||||||
|
const single = ref(true);
|
||||||
|
const multiple = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
const wordllssueRef = ref<InstanceType<typeof wordllssue>>();
|
||||||
|
const queryFormRef = ref<ElFormInstance>();
|
||||||
|
const materialIssueFormRef = ref<ElFormInstance>();
|
||||||
|
|
||||||
|
const dialog = reactive<DialogOption>({
|
||||||
|
visible: false,
|
||||||
|
title: ''
|
||||||
|
});
|
||||||
|
|
||||||
|
const initFormData: MaterialIssueForm = {
|
||||||
|
id: undefined,
|
||||||
|
projectId: currentProject.value?.id,
|
||||||
|
materialSource: '2',
|
||||||
|
formCode: undefined,
|
||||||
|
projectName: undefined,
|
||||||
|
materialName: undefined,
|
||||||
|
orderingUnit: undefined,
|
||||||
|
supplierUnit: undefined,
|
||||||
|
issueUnit: undefined,
|
||||||
|
storageUnit: undefined,
|
||||||
|
defectDescription: undefined,
|
||||||
|
certCount: undefined,
|
||||||
|
certCountFileId: undefined,
|
||||||
|
reportCount: undefined,
|
||||||
|
reportCountFileId: undefined,
|
||||||
|
techDocCount: undefined,
|
||||||
|
techDocCountFileId: undefined,
|
||||||
|
licenseCount: undefined,
|
||||||
|
licenseCountFileId: undefined,
|
||||||
|
remark: undefined,
|
||||||
|
itemList: [
|
||||||
|
{
|
||||||
|
id: undefined,
|
||||||
|
specification: undefined,
|
||||||
|
unit: undefined,
|
||||||
|
stockQuantity: undefined,
|
||||||
|
issuedQuantity: undefined,
|
||||||
|
remainingQuantity: undefined,
|
||||||
|
name: undefined,
|
||||||
|
remark: undefined
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
const data = reactive<PageData<MaterialIssueForm, MaterialIssueQuery>>({
|
||||||
|
form: { ...initFormData },
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
projectId: currentProject.value?.id,
|
||||||
|
materialSource: '2',
|
||||||
|
formCode: undefined,
|
||||||
|
projectName: undefined,
|
||||||
|
materialName: undefined,
|
||||||
|
orderingUnit: undefined,
|
||||||
|
supplierUnit: undefined,
|
||||||
|
issueUnit: undefined,
|
||||||
|
storageUnit: undefined,
|
||||||
|
defectDescription: undefined,
|
||||||
|
params: {}
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
id: [{ required: true, message: '主键id不能为空', trigger: 'blur' }]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const { queryParams, form, rules } = toRefs(data);
|
||||||
|
|
||||||
|
/** 查询物料领料单列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
const res = await listMaterialIssue(queryParams.value);
|
||||||
|
materialIssueList.value = res.rows;
|
||||||
|
total.value = res.total;
|
||||||
|
loading.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 取消按钮 */
|
||||||
|
const cancel = () => {
|
||||||
|
reset();
|
||||||
|
dialog.visible = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 表单重置 */
|
||||||
|
const reset = () => {
|
||||||
|
form.value = { ...initFormData };
|
||||||
|
materialIssueFormRef.value?.resetFields();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
const resetQuery = () => {
|
||||||
|
queryFormRef.value?.resetFields();
|
||||||
|
handleQuery();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 多选框选中数据 */
|
||||||
|
const handleSelectionChange = (selection: MaterialIssueVO[]) => {
|
||||||
|
ids.value = selection.map((item) => item.id);
|
||||||
|
single.value = selection.length != 1;
|
||||||
|
multiple.value = !selection.length;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
const handleAdd = () => {
|
||||||
|
reset();
|
||||||
|
dialog.visible = true;
|
||||||
|
dialog.title = '添加物料领料单';
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
const handleUpdate = async (row?: MaterialIssueVO) => {
|
||||||
|
reset();
|
||||||
|
const _id = row?.id || ids.value[0];
|
||||||
|
const res = await getMaterialIssue(_id);
|
||||||
|
Object.assign(form.value, res.data);
|
||||||
|
dialog.visible = true;
|
||||||
|
dialog.title = '修改物料领料单';
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 提交按钮 */
|
||||||
|
const submitForm = () => {
|
||||||
|
materialIssueFormRef.value?.validate(async (valid: boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
buttonLoading.value = true;
|
||||||
|
if (form.value.id) {
|
||||||
|
await updateMaterialIssue(form.value).finally(() => (buttonLoading.value = false));
|
||||||
|
} else {
|
||||||
|
await addMaterialIssue(form.value).finally(() => (buttonLoading.value = false));
|
||||||
|
}
|
||||||
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
|
dialog.visible = false;
|
||||||
|
await getList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 添加数量验收条目
|
||||||
|
const addItem = () => {
|
||||||
|
form.value.itemList.push({
|
||||||
|
id: undefined,
|
||||||
|
specification: undefined,
|
||||||
|
unit: undefined,
|
||||||
|
stockQuantity: undefined,
|
||||||
|
issuedQuantity: undefined,
|
||||||
|
remainingQuantity: undefined,
|
||||||
|
name: undefined,
|
||||||
|
remark: undefined
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 删除数量验收条目
|
||||||
|
const removeItem = (index: number) => {
|
||||||
|
if (form.value.itemList.length > 1) {
|
||||||
|
form.value.itemList.splice(index, 1);
|
||||||
|
} else {
|
||||||
|
proxy?.$modal.msgWarning('至少需要保留一条数量验收记录');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
const handleDelete = async (row?: MaterialIssueVO) => {
|
||||||
|
const _ids = row?.id || ids.value;
|
||||||
|
await proxy?.$modal.confirm('是否确认删除物料领料单编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
||||||
|
await delMaterialIssue(_ids);
|
||||||
|
proxy?.$modal.msgSuccess('删除成功');
|
||||||
|
await getList();
|
||||||
|
};
|
||||||
|
const handleView = (row) => {
|
||||||
|
// 查看详情
|
||||||
|
wordllssueRef.value?.openDialog(row);
|
||||||
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.detail {
|
||||||
|
border-bottom: 1px solid #ececec;
|
||||||
|
border-top: 1px solid #ececec;
|
||||||
|
margin: 10px 0;
|
||||||
|
padding: 10px 0;
|
||||||
|
|
||||||
|
&-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #1eaaff;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-item {
|
||||||
|
padding: 10px;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-actions {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
padding-top: 6px;
|
||||||
|
}
|
||||||
|
</style>
|
Binary file not shown.
After Width: | Height: | Size: 922 B |
@ -0,0 +1,301 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-model="isShowDialog" title="变更单详情" draggable width="60vw" :close-on-click-modal="false" :destroy-on-close="true">
|
||||||
|
<el-card :body-style="{ padding: '20px' }" style="border: none; box-shadow: none">
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<div class="btn-item" @click="onLoad">
|
||||||
|
<img src="./icon/down.png" />
|
||||||
|
<span>导出</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-form ref="formRef" :model="formData" label-width="100px" id="formContent" style="width: 75%; margin-left: 10%">
|
||||||
|
<div class="table-content" id="table-content">
|
||||||
|
<el-row class="mb20" style="display: flex; justify-content: center">
|
||||||
|
<h2>设计材料设备领料单</h2>
|
||||||
|
</el-row>
|
||||||
|
<el-row class="mb10" style="display: flex; justify-content: space-between">
|
||||||
|
<div class="head-text">
|
||||||
|
<span>工程名称:</span>
|
||||||
|
<span>{{ formData.projectName }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="head-text">
|
||||||
|
<span>编号:</span>
|
||||||
|
<span>{{ formData.formCode }}</span>
|
||||||
|
</div>
|
||||||
|
</el-row>
|
||||||
|
<table style="width: 100%" border="1" cellspacing="1">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">设备材料名称</th>
|
||||||
|
<td class="th-bg" colspan="2">{{ formData.materialName }}</td>
|
||||||
|
<th colspan="2">规格及数量</th>
|
||||||
|
<td class="th-bg" colspan="2">见下表</td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">供货单位</th>
|
||||||
|
<td class="th-bg" colspan="2">{{ formData.supplierUnit }}</td>
|
||||||
|
<th colspan="2">订货单位</th>
|
||||||
|
<td class="th-bg" colspan="2">{{ formData.orderingUnit }}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">领料单位</th>
|
||||||
|
<td class="th-bg" colspan="2">{{ formData.placeholder }}</td>
|
||||||
|
<th colspan="2">保管单位</th>
|
||||||
|
<td class="th-bg" colspan="2">{{ formData.storageUnit }}</td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th width="150" colspan="8">数量验收</th>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th width="150">序号</th>
|
||||||
|
<th width="150">名称</th>
|
||||||
|
<th width="150">规格</th>
|
||||||
|
<th width="150">单位</th>
|
||||||
|
<th width="150">库存</th>
|
||||||
|
<th width="150">领取</th>
|
||||||
|
<th width="150">剩余</th>
|
||||||
|
<th width="150">备注</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="(item, i) of formData.itemList" :key="i">
|
||||||
|
<th width="150">{{ i + 1 }}</th>
|
||||||
|
<th width="150">{{ item.name }}</th>
|
||||||
|
<th width="150">{{ item.specification }}</th>
|
||||||
|
<th width="150">{{ item.unit }}</th>
|
||||||
|
<th width="150">{{ item.stockQuantity }}</th>
|
||||||
|
<th width="150">{{ item.issuedQuantity }}</th>
|
||||||
|
<th width="150">{{ item.remainingQuantity }}</th>
|
||||||
|
<th width="150">{{ item.remark }}</th>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td colspan="7">
|
||||||
|
<div style="margin-bottom: 10px;">缺陷情况:</div>
|
||||||
|
{{ formData.defectDescription }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<!-- <th width="150"></th> -->
|
||||||
|
<td colspan="8">
|
||||||
|
<span>是否附带以下随机资料</span>
|
||||||
|
<div class="file_detail">
|
||||||
|
<span>(1) 合格证 {{ formData.certCountFile ? formData.certCountFile.length : 0 }} 份</span>
|
||||||
|
<span>(2) 出厂报告 {{ formData.reportCountFileId ? formData.reportCountFileId.length : 0 }} 份</span>
|
||||||
|
<span>(3) 技术资料文件 {{ formData.techDocCountFileId ? formData.techDocCountFileId.length : 0 }} 份</span>
|
||||||
|
<span>(4) 厂家资质文件 {{ formData.licenseCountFileId ? formData.licenseCountFileId.length : 0 }} 份</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, reactive } from 'vue';
|
||||||
|
import { getMaterialIssue } from '@/api/materials/materialIssue';
|
||||||
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
import { downLoadOss } from '@/api/system/oss';
|
||||||
|
// 响应式状态
|
||||||
|
const isShowDialog = ref(false);
|
||||||
|
const initFormData = {
|
||||||
|
id: undefined,
|
||||||
|
materialSource: '1',
|
||||||
|
formCode: undefined,
|
||||||
|
projectName: undefined,
|
||||||
|
materialName: undefined,
|
||||||
|
orderingUnit: undefined,
|
||||||
|
supplierUnit: undefined,
|
||||||
|
issueUnit: undefined,
|
||||||
|
storageUnit: undefined,
|
||||||
|
defectDescription: undefined,
|
||||||
|
certCount: undefined,
|
||||||
|
certCountFileId: undefined,
|
||||||
|
reportCount: undefined,
|
||||||
|
reportCountFileId: undefined,
|
||||||
|
techDocCount: undefined,
|
||||||
|
techDocCountFileId: undefined,
|
||||||
|
licenseCount: undefined,
|
||||||
|
licenseCountFileId: undefined,
|
||||||
|
remark: undefined,
|
||||||
|
itemList: [
|
||||||
|
{
|
||||||
|
id: undefined,
|
||||||
|
specification: undefined,
|
||||||
|
unit: undefined,
|
||||||
|
stockQuantity: undefined,
|
||||||
|
issuedQuantity: undefined,
|
||||||
|
remainingQuantity: undefined,
|
||||||
|
name: undefined,
|
||||||
|
remark: undefined
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
const data = reactive({
|
||||||
|
formData: { ...initFormData }
|
||||||
|
});
|
||||||
|
const design_change_reason_type = ref([]);
|
||||||
|
const { formData } = toRefs(data);
|
||||||
|
// 打开弹窗
|
||||||
|
const openDialog = (row?: any, types) => {
|
||||||
|
resetForm();
|
||||||
|
design_change_reason_type.value = types;
|
||||||
|
if (row?.id) {
|
||||||
|
getInfos(row.id, types);
|
||||||
|
}
|
||||||
|
isShowDialog.value = true;
|
||||||
|
};
|
||||||
|
// 获取详情数据
|
||||||
|
const getInfos = async (id: string, types) => {
|
||||||
|
const res = await getMaterialIssue(id);
|
||||||
|
Object.assign(formData.value, res.data);
|
||||||
|
// 数据处理
|
||||||
|
if (formData.value.changeReason) {
|
||||||
|
let arr = formData.value.changeReason.split(',');
|
||||||
|
var changeReason = types.filter((item) => arr.includes(item.value.toString())).map((item) => item.label);
|
||||||
|
formData.value.changeReason = changeReason.join(',');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// 重置表单
|
||||||
|
const resetForm = () => {
|
||||||
|
Object.keys(formData.value).forEach((key) => {
|
||||||
|
formData[key] = undefined;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 下载文件
|
||||||
|
const onOpen = (path: string) => {
|
||||||
|
window.open(path, '_blank');
|
||||||
|
};
|
||||||
|
// 导出
|
||||||
|
const onLoad = async () => {
|
||||||
|
await downLoadOss({ id: formData.value.id }, '/design/designChange/export/word', '设计变更单.zip');
|
||||||
|
};
|
||||||
|
|
||||||
|
// 关闭弹窗
|
||||||
|
const closeDialog = () => {
|
||||||
|
isShowDialog.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 暴露方法给父组件
|
||||||
|
defineExpose({
|
||||||
|
openDialog,
|
||||||
|
closeDialog
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.pic-block {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
.file-block {
|
||||||
|
width: 100%;
|
||||||
|
border: 1px solid var(--el-border-color);
|
||||||
|
border-radius: 6px;
|
||||||
|
cursor: pointer;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: var(--el-transition-duration-fast);
|
||||||
|
margin-bottom: 5px;
|
||||||
|
padding: 3px 6px;
|
||||||
|
}
|
||||||
|
.ml-2 {
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
::v-deep .el-icon svg {
|
||||||
|
height: 100% !important;
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
::v-deep .el-step__icon-inner {
|
||||||
|
font-size: 14px !important;
|
||||||
|
font-weight: 700 !important;
|
||||||
|
}
|
||||||
|
.dialog-footer {
|
||||||
|
height: 100px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
position: absolute;
|
||||||
|
top: 14%;
|
||||||
|
right: 10%;
|
||||||
|
background: #fff;
|
||||||
|
box-shadow: 0px 0px 10px #ddd;
|
||||||
|
text-align: center;
|
||||||
|
padding: 20px 10px;
|
||||||
|
.btn-item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
cursor: pointer;
|
||||||
|
> span {
|
||||||
|
padding-top: 5px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: rgba(51, 51, 51, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.file_detail{
|
||||||
|
|
||||||
|
>span{
|
||||||
|
width: 40%;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
border-collapse: collapse; //合并为一个单一的边框
|
||||||
|
border-color: rgba(199, 199, 199, 1); //边框颜色按实际自定义即可
|
||||||
|
}
|
||||||
|
thead {
|
||||||
|
tr {
|
||||||
|
th {
|
||||||
|
background-color: rgba(247, 247, 247, 1); //设置表格标题背景色
|
||||||
|
height: 35px; //设置单元格最小高度
|
||||||
|
text-align: center;
|
||||||
|
letter-spacing: 5px;
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
td {
|
||||||
|
text-align: left;
|
||||||
|
height: 35px; //设置单元格最小高度
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
.th-bg {
|
||||||
|
background-color: rgba(247, 247, 247, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tbody {
|
||||||
|
tr {
|
||||||
|
td {
|
||||||
|
text-align: left;
|
||||||
|
height: 40px; //设置单元格最小高度
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
th {
|
||||||
|
height: 35px; //设置单元格最小高度
|
||||||
|
text-align: center;
|
||||||
|
letter-spacing: 5px;
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.table-content {
|
||||||
|
box-shadow: 0px 0px 10px #ddd;
|
||||||
|
padding: 20px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,486 @@
|
|||||||
|
<template>
|
||||||
|
<div class="p-2">
|
||||||
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
|
<el-card shadow="hover">
|
||||||
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||||
|
<el-form-item label="表单编号" prop="formCode">
|
||||||
|
<el-input v-model="queryParams.formCode" placeholder="请输入表单编号" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="工程名称" prop="projectName">
|
||||||
|
<el-input v-model="queryParams.projectName" placeholder="请输入工程名称" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="材料名称" prop="materialName">
|
||||||
|
<el-input v-model="queryParams.materialName" placeholder="请输入设备材料名称" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="合同名称" prop="contractName">
|
||||||
|
<el-input v-model="queryParams.contractName" placeholder="请输入合同名称" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="订货单位" prop="orderingUnit">
|
||||||
|
<el-input v-model="queryParams.orderingUnit" placeholder="请输入订货单位" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="供货单位" prop="supplierUnit">
|
||||||
|
<el-input v-model="queryParams.supplierUnit" placeholder="请输入供货单位" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
|
|
||||||
|
<el-card shadow="never">
|
||||||
|
<template #header>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['materials:materialReceive:add']">新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="Delete"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete()"
|
||||||
|
v-hasPermi="['materials:materialReceive:remove']"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="materialReceiveList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="表单编号" align="center" prop="formCode" />
|
||||||
|
<el-table-column label="工程名称" align="center" prop="projectName" />
|
||||||
|
<el-table-column label="设备材料名称" align="center" prop="materialName" />
|
||||||
|
<el-table-column label="合同名称" align="center" prop="contractName" />
|
||||||
|
<el-table-column label="订货单位" align="center" prop="orderingUnit" />
|
||||||
|
<el-table-column label="供货单位" align="center" prop="supplierUnit" />
|
||||||
|
<el-table-column label="设备材料入库/移交" align="center" prop="storageType">
|
||||||
|
<template #default="scope">
|
||||||
|
<dict-tag :options="storage_type" :value="scope.row.storageType ? scope.row.storageType.split(',') : []" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tooltip content="查看" placement="top">
|
||||||
|
<el-button link type="primary" icon="View" @click="handleView(scope.row)"></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="修改" placement="top">
|
||||||
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['materials:materialReceive:edit']"></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="删除" placement="top">
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
icon="Delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['materials:materialReceive:remove']"
|
||||||
|
></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
|
</el-card>
|
||||||
|
<!-- 添加或修改物料接收单对话框 -->
|
||||||
|
<el-dialog :title="dialog.title" v-model="dialog.visible" width="800px" append-to-body>
|
||||||
|
<el-form ref="materialReceiveFormRef" :model="form" :rules="rules" label-width="110px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="表单编号" prop="formCode">
|
||||||
|
<el-input v-model="form.formCode" placeholder="请输入表单编号" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12"
|
||||||
|
><el-form-item label="工程名称" prop="projectName">
|
||||||
|
<el-input v-model="form.projectName" placeholder="请输入工程名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="设备材料名称" prop="materialName">
|
||||||
|
<el-input v-model="form.materialName" placeholder="请输入设备材料名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="合同名称" prop="contractName">
|
||||||
|
<el-input v-model="form.contractName" placeholder="请输入合同名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="订货单位" prop="orderingUnit">
|
||||||
|
<el-input v-model="form.orderingUnit" placeholder="请输入订货单位" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="供货单位" prop="supplierUnit">
|
||||||
|
<el-input v-model="form.supplierUnit" placeholder="请输入供货单位" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="缺陷情况" prop="defectDescription">
|
||||||
|
<el-input v-model="form.defectDescription" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<div class="detail">
|
||||||
|
<div class="detail-header">
|
||||||
|
<span>数量验收</span>
|
||||||
|
<el-button type="primary" link @click="addItem" icon="Plus">添加一行</el-button>
|
||||||
|
</div>
|
||||||
|
<div v-for="(item, index) in form.itemList" :key="index" class="detail-item">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
:label="index === 0 ? '名称' : ''"
|
||||||
|
:prop="`itemList.${index}.name`"
|
||||||
|
:rules="{ required: true, message: '名称不能为空', trigger: 'blur' }"
|
||||||
|
>
|
||||||
|
<el-input v-model="item.name" placeholder="请输入名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
:label="index === 0 ? '规格' : ''"
|
||||||
|
:prop="`itemList.${index}.specification`"
|
||||||
|
:rules="{ required: true, message: '规格不能为空', trigger: 'blur' }"
|
||||||
|
>
|
||||||
|
<el-input v-model="item.specification" placeholder="请输入规格" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
:label="index === 0 ? '单位' : ''"
|
||||||
|
:prop="`itemList.${index}.unit`"
|
||||||
|
:rules="{ required: true, message: '单位不能为空', trigger: 'blur' }"
|
||||||
|
>
|
||||||
|
<el-input v-model="item.unit" placeholder="请输入单位" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
:label="index === 0 ? '数量' : ''"
|
||||||
|
:prop="`itemList.${index}.quantity`"
|
||||||
|
:rules="{ required: true, message: '数量不能为空', trigger: 'blur' }"
|
||||||
|
>
|
||||||
|
<el-input v-model="item.quantity" placeholder="请输入数量" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
:label="index === 0 ? '验收' : ''"
|
||||||
|
:prop="`itemList.${index}.acceptedQuantity`"
|
||||||
|
:rules="{ required: true, message: '验收数量不能为空', trigger: 'blur' }"
|
||||||
|
>
|
||||||
|
<el-input v-model="item.acceptedQuantity" placeholder="请输入验收" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
:label="index === 0 ? '缺件' : ''"
|
||||||
|
:prop="`itemList.${index}.shortageQuantity`"
|
||||||
|
:rules="{ required: true, message: '缺件数量不能为空', trigger: 'blur' }"
|
||||||
|
>
|
||||||
|
<el-input v-model="item.shortageQuantity" placeholder="请输入缺件" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item :label="index === 0 ? '备注' : ''" prop="remark">
|
||||||
|
<el-input v-model="item.remark" placeholder="请输入备注" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" v-if="form.itemList.length > 1">
|
||||||
|
<div class="item-actions">
|
||||||
|
<el-button type="danger" link @click="removeItem(index)" icon="Delete">删除</el-button>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="合格证文件" prop="certCountFileId">
|
||||||
|
<file-upload :isShowTip="false" v-model="form.certCountFileId" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="出厂报告文件" prop="reportCountFileId">
|
||||||
|
<file-upload :isShowTip="false" v-model="form.reportCountFileId" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="技术资料文件" prop="techDocCountFileId">
|
||||||
|
<file-upload :isShowTip="false" v-model="form.techDocCountFileId" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="厂家资质文件" prop="licenseCountFileId">
|
||||||
|
<file-upload :isShowTip="false" v-model="form.licenseCountFileId" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<span style="color:#ff0000ab;margin-bottom: 10px;display: block;">注意:请上传doc/xls/ppt/txt/pdf/png/jpg/jpeg/zip格式文件</span>
|
||||||
|
</el-col><el-col :span="24"
|
||||||
|
><el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
<wordllReceive ref="wordllReceiveRef"></wordllReceive>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="MaterialReceive" lang="ts">
|
||||||
|
import {
|
||||||
|
listMaterialReceive,
|
||||||
|
getMaterialReceive,
|
||||||
|
delMaterialReceive,
|
||||||
|
addMaterialReceive,
|
||||||
|
updateMaterialReceive
|
||||||
|
} from '@/api/materials/materialReceive';
|
||||||
|
import { MaterialReceiveVO, MaterialReceiveQuery, MaterialReceiveForm } from '@/api/materials/materialReceive/types';
|
||||||
|
import { useUserStoreHook } from '@/store/modules/user';
|
||||||
|
import wordllReceive from './word/index.vue';
|
||||||
|
|
||||||
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
const { storage_type } = toRefs<any>(proxy?.useDict('storage_type'));
|
||||||
|
// 获取用户 store
|
||||||
|
const userStore = useUserStoreHook();
|
||||||
|
// 从 store 中获取项目列表和当前选中的项目
|
||||||
|
const currentProject = computed(() => userStore.selectedProject);
|
||||||
|
const wordllReceiveRef = ref<InstanceType<typeof wordllReceive>>();
|
||||||
|
const materialReceiveList = ref<MaterialReceiveVO[]>([]);
|
||||||
|
const buttonLoading = ref(false);
|
||||||
|
const loading = ref(true);
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const ids = ref<Array<string | number>>([]);
|
||||||
|
const single = ref(true);
|
||||||
|
const multiple = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
|
||||||
|
const queryFormRef = ref<ElFormInstance>();
|
||||||
|
const materialReceiveFormRef = ref<ElFormInstance>();
|
||||||
|
|
||||||
|
const dialog = reactive<DialogOption>({
|
||||||
|
visible: false,
|
||||||
|
title: ''
|
||||||
|
});
|
||||||
|
|
||||||
|
const initFormData: MaterialReceiveForm = {
|
||||||
|
id: undefined,
|
||||||
|
projectId: currentProject.value?.id,
|
||||||
|
materialSource: '2',
|
||||||
|
formCode: undefined,
|
||||||
|
projectName: undefined,
|
||||||
|
materialName: undefined,
|
||||||
|
contractName: undefined,
|
||||||
|
orderingUnit: undefined,
|
||||||
|
supplierUnit: undefined,
|
||||||
|
defectDescription: undefined,
|
||||||
|
certCount: undefined,
|
||||||
|
certCountFileId: undefined,
|
||||||
|
reportCount: undefined,
|
||||||
|
reportCountFileId: undefined,
|
||||||
|
techDocCount: undefined,
|
||||||
|
techDocCountFileId: undefined,
|
||||||
|
licenseCount: undefined,
|
||||||
|
licenseCountFileId: undefined,
|
||||||
|
storageType: [],
|
||||||
|
remark: undefined,
|
||||||
|
itemList: [
|
||||||
|
{
|
||||||
|
name: undefined,
|
||||||
|
specification: undefined,
|
||||||
|
unit: undefined,
|
||||||
|
quantity: undefined,
|
||||||
|
acceptedQuantity: undefined,
|
||||||
|
shortageQuantity: undefined,
|
||||||
|
remark: undefined
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
const data = reactive<PageData<MaterialReceiveForm, MaterialReceiveQuery>>({
|
||||||
|
form: { ...initFormData },
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
projectId: currentProject.value?.id,
|
||||||
|
materialSource: '2',
|
||||||
|
formCode: undefined,
|
||||||
|
projectName: undefined,
|
||||||
|
materialName: undefined,
|
||||||
|
contractName: undefined,
|
||||||
|
orderingUnit: undefined,
|
||||||
|
supplierUnit: undefined,
|
||||||
|
params: {}
|
||||||
|
},
|
||||||
|
rules: {}
|
||||||
|
});
|
||||||
|
|
||||||
|
const { queryParams, form, rules } = toRefs(data);
|
||||||
|
|
||||||
|
/** 查询物料接收单列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
const res = await listMaterialReceive(queryParams.value);
|
||||||
|
materialReceiveList.value = res.rows;
|
||||||
|
total.value = res.total;
|
||||||
|
loading.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 取消按钮 */
|
||||||
|
const cancel = () => {
|
||||||
|
reset();
|
||||||
|
dialog.visible = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 表单重置 */
|
||||||
|
const reset = () => {
|
||||||
|
form.value = { ...initFormData };
|
||||||
|
materialReceiveFormRef.value?.resetFields();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
const resetQuery = () => {
|
||||||
|
queryFormRef.value?.resetFields();
|
||||||
|
handleQuery();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 多选框选中数据 */
|
||||||
|
const handleSelectionChange = (selection: MaterialReceiveVO[]) => {
|
||||||
|
ids.value = selection.map((item) => item.id);
|
||||||
|
single.value = selection.length != 1;
|
||||||
|
multiple.value = !selection.length;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
const handleAdd = () => {
|
||||||
|
reset();
|
||||||
|
dialog.visible = true;
|
||||||
|
dialog.title = '添加物料接收单';
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
const handleUpdate = async (row?: MaterialReceiveVO) => {
|
||||||
|
reset();
|
||||||
|
const _id = row?.id || ids.value[0];
|
||||||
|
const res = await getMaterialReceive(_id);
|
||||||
|
Object.assign(form.value, res.data);
|
||||||
|
if(form.value.storageType.length){
|
||||||
|
form.value.storageType = form.value.storageType.split(',');
|
||||||
|
}else{
|
||||||
|
form.value.storageType=[]
|
||||||
|
}
|
||||||
|
dialog.visible = true;
|
||||||
|
dialog.title = '修改物料接收单';
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 提交按钮 */
|
||||||
|
const submitForm = () => {
|
||||||
|
materialReceiveFormRef.value?.validate(async (valid: boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
buttonLoading.value = true;
|
||||||
|
form.value.storageType = form.value.storageType.join(',');
|
||||||
|
if (form.value.id) {
|
||||||
|
await updateMaterialReceive(form.value).finally(() => (buttonLoading.value = false));
|
||||||
|
} else {
|
||||||
|
await addMaterialReceive(form.value).finally(() => (buttonLoading.value = false));
|
||||||
|
}
|
||||||
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
|
dialog.visible = false;
|
||||||
|
await getList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
const handleDelete = async (row?: MaterialReceiveVO) => {
|
||||||
|
const _ids = row?.id || ids.value;
|
||||||
|
await proxy?.$modal.confirm('是否确认删除物料接收单编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
||||||
|
await delMaterialReceive(_ids);
|
||||||
|
proxy?.$modal.msgSuccess('删除成功');
|
||||||
|
await getList();
|
||||||
|
};
|
||||||
|
// 添加数量验收条目
|
||||||
|
const addItem = () => {
|
||||||
|
form.value.itemList.push({
|
||||||
|
name: undefined,
|
||||||
|
specification: undefined,
|
||||||
|
unit: undefined,
|
||||||
|
quantity: undefined,
|
||||||
|
acceptedQuantity: undefined,
|
||||||
|
shortageQuantity: undefined,
|
||||||
|
remark: undefined
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 删除数量验收条目
|
||||||
|
const removeItem = (index: number) => {
|
||||||
|
if (form.value.itemList.length > 1) {
|
||||||
|
form.value.itemList.splice(index, 1);
|
||||||
|
} else {
|
||||||
|
proxy?.$modal.msgWarning('至少需要保留一条数量验收记录');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const handleView = (row) => {
|
||||||
|
// 查看详情
|
||||||
|
wordllReceiveRef.value?.openDialog(row);
|
||||||
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.detail {
|
||||||
|
border-bottom: 1px solid #ececec;
|
||||||
|
border-top: 1px solid #ececec;
|
||||||
|
margin: 10px 0;
|
||||||
|
padding: 10px 0;
|
||||||
|
|
||||||
|
&-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #1eaaff;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-item {
|
||||||
|
padding: 10px;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-actions {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
padding-top: 6px;
|
||||||
|
}
|
||||||
|
</style>
|
Binary file not shown.
After Width: | Height: | Size: 922 B |
@ -0,0 +1,290 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-model="isShowDialog" title="变更单详情" draggable width="60vw" :close-on-click-modal="false" :destroy-on-close="true">
|
||||||
|
<el-card :body-style="{ padding: '20px' }" style="border: none; box-shadow: none">
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<div class="btn-item" @click="onLoad">
|
||||||
|
<img src="./icon/down.png" />
|
||||||
|
<span>导出</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-form ref="formRef" :model="formData" label-width="100px" id="formContent" style="width: 75%; margin-left: 10%">
|
||||||
|
<div class="table-content" id="table-content">
|
||||||
|
<el-row class="mb20" style="display: flex; justify-content: center">
|
||||||
|
<h2>材料设备验收单</h2>
|
||||||
|
</el-row>
|
||||||
|
<el-row class="mb10" style="display: flex; justify-content: space-between">
|
||||||
|
<div class="head-text">
|
||||||
|
<span>工程名称:</span>
|
||||||
|
<span>{{ formData.projectName }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="head-text">
|
||||||
|
<span>编号:</span>
|
||||||
|
<span>{{ formData.formCode }}</span>
|
||||||
|
</div>
|
||||||
|
</el-row>
|
||||||
|
<table style="width: 100%" border="1" cellspacing="1">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">设备材料名称</th>
|
||||||
|
<td class="th-bg" colspan="2">{{ formData.materialName }}</td>
|
||||||
|
<th colspan="2">合同名称</th>
|
||||||
|
<td class="th-bg" colspan="2">{{ formData.contractName }}</td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">订货单位</th>
|
||||||
|
<td class="th-bg" colspan="2">{{ formData.orderingUnit }}</td>
|
||||||
|
<th colspan="2">供货单位</th>
|
||||||
|
<td class="th-bg" colspan="2">{{ formData.supplierUnit }}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th width="150" colspan="8">数量验收(验收、缺件数量由承包单位填写)</th>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th width="150">序号</th>
|
||||||
|
<th width="150">名称</th>
|
||||||
|
<th width="150">规格</th>
|
||||||
|
<th width="150">单位</th>
|
||||||
|
<th width="150">数量</th>
|
||||||
|
<th width="150">验收</th>
|
||||||
|
<th width="150">缺件</th>
|
||||||
|
<th width="150">备注</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="(item, i) of formData.itemList" :key="i">
|
||||||
|
<th width="150">{{ i + 1 }}</th>
|
||||||
|
<th width="150">{{ item.name }}</th>
|
||||||
|
<th width="150">{{ item.specification }}</th>
|
||||||
|
<th width="150">{{ item.unit }}</th>
|
||||||
|
<th width="150">{{ item.quantity }}</th>
|
||||||
|
<th width="150">{{ item.acceptedQuantity }}</th>
|
||||||
|
<th width="150">{{ item.shortageQuantity }}</th>
|
||||||
|
<th width="150">{{ item.remark }}</th>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td colspan="7">
|
||||||
|
<div style="margin-bottom: 10px">缺陷情况:</div>
|
||||||
|
{{ formData.defectDescription }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td colspan="8">
|
||||||
|
<span>是否附带以下随机资料</span>
|
||||||
|
<div class="file_detail">
|
||||||
|
<span>(1) 合格证 {{ formData.certCountFile ? formData.certCountFile.length : 0 }} 份</span>
|
||||||
|
<span>(2) 出厂报告 {{ formData.reportCountFileId ? formData.reportCountFileId.length : 0 }} 份</span>
|
||||||
|
<span>(3) 技术资料文件 {{ formData.techDocCountFileId ? formData.techDocCountFileId.length : 0 }} 份</span>
|
||||||
|
<span>(4) 厂家资质文件 {{ formData.licenseCountFileId ? formData.licenseCountFileId.length : 0 }} 份</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, reactive } from 'vue';
|
||||||
|
import { getMaterialReceive } from '@/api/materials/materialReceive';
|
||||||
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
import { downLoadOss } from '@/api/system/oss';
|
||||||
|
// 响应式状态
|
||||||
|
const isShowDialog = ref(false);
|
||||||
|
const initFormData = {
|
||||||
|
id: undefined,
|
||||||
|
materialSource: '1',
|
||||||
|
formCode: undefined,
|
||||||
|
projectName: undefined,
|
||||||
|
materialName: undefined,
|
||||||
|
contractName: undefined,
|
||||||
|
orderingUnit: undefined,
|
||||||
|
supplierUnit: undefined,
|
||||||
|
defectDescription: undefined,
|
||||||
|
certCount: undefined,
|
||||||
|
certCountFileId: undefined,
|
||||||
|
reportCount: undefined,
|
||||||
|
reportCountFileId: undefined,
|
||||||
|
techDocCount: undefined,
|
||||||
|
techDocCountFileId: undefined,
|
||||||
|
licenseCount: undefined,
|
||||||
|
licenseCountFileId: undefined,
|
||||||
|
storageType: [],
|
||||||
|
remark: undefined,
|
||||||
|
itemList: [
|
||||||
|
{
|
||||||
|
name: undefined,
|
||||||
|
specification: undefined,
|
||||||
|
unit: undefined,
|
||||||
|
quantity: undefined,
|
||||||
|
acceptedQuantity: undefined,
|
||||||
|
shortageQuantity: undefined,
|
||||||
|
remark: undefined
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
const data = reactive({
|
||||||
|
formData: { ...initFormData }
|
||||||
|
});
|
||||||
|
const design_change_reason_type = ref([]);
|
||||||
|
const { formData } = toRefs(data);
|
||||||
|
// 打开弹窗
|
||||||
|
const openDialog = (row?: any, types) => {
|
||||||
|
resetForm();
|
||||||
|
design_change_reason_type.value = types;
|
||||||
|
if (row?.id) {
|
||||||
|
getInfos(row.id, types);
|
||||||
|
}
|
||||||
|
isShowDialog.value = true;
|
||||||
|
};
|
||||||
|
// 获取详情数据
|
||||||
|
const getInfos = async (id: string, types) => {
|
||||||
|
const res = await getMaterialReceive(id);
|
||||||
|
Object.assign(formData.value, res.data);
|
||||||
|
// 数据处理
|
||||||
|
if (formData.value.changeReason) {
|
||||||
|
let arr = formData.value.changeReason.split(',');
|
||||||
|
var changeReason = types.filter((item) => arr.includes(item.value.toString())).map((item) => item.label);
|
||||||
|
formData.value.changeReason = changeReason.join(',');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// 重置表单
|
||||||
|
const resetForm = () => {
|
||||||
|
Object.keys(formData.value).forEach((key) => {
|
||||||
|
formData[key] = undefined;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 下载文件
|
||||||
|
const onOpen = (path: string) => {
|
||||||
|
window.open(path, '_blank');
|
||||||
|
};
|
||||||
|
// 导出
|
||||||
|
const onLoad = async () => {
|
||||||
|
await downLoadOss({ id: formData.value.id }, '/design/designChange/export/word', '设计变更单.zip');
|
||||||
|
};
|
||||||
|
|
||||||
|
// 关闭弹窗
|
||||||
|
const closeDialog = () => {
|
||||||
|
isShowDialog.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 暴露方法给父组件
|
||||||
|
defineExpose({
|
||||||
|
openDialog,
|
||||||
|
closeDialog
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.pic-block {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
.file-block {
|
||||||
|
width: 100%;
|
||||||
|
border: 1px solid var(--el-border-color);
|
||||||
|
border-radius: 6px;
|
||||||
|
cursor: pointer;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: var(--el-transition-duration-fast);
|
||||||
|
margin-bottom: 5px;
|
||||||
|
padding: 3px 6px;
|
||||||
|
}
|
||||||
|
.ml-2 {
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
::v-deep .el-icon svg {
|
||||||
|
height: 100% !important;
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
::v-deep .el-step__icon-inner {
|
||||||
|
font-size: 14px !important;
|
||||||
|
font-weight: 700 !important;
|
||||||
|
}
|
||||||
|
.dialog-footer {
|
||||||
|
height: 100px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
position: absolute;
|
||||||
|
top: 14%;
|
||||||
|
right: 10%;
|
||||||
|
background: #fff;
|
||||||
|
box-shadow: 0px 0px 10px #ddd;
|
||||||
|
text-align: center;
|
||||||
|
padding: 20px 10px;
|
||||||
|
.btn-item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
cursor: pointer;
|
||||||
|
> span {
|
||||||
|
padding-top: 5px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: rgba(51, 51, 51, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.file_detail {
|
||||||
|
> span {
|
||||||
|
width: 40%;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
border-collapse: collapse; //合并为一个单一的边框
|
||||||
|
border-color: rgba(199, 199, 199, 1); //边框颜色按实际自定义即可
|
||||||
|
}
|
||||||
|
thead {
|
||||||
|
tr {
|
||||||
|
th {
|
||||||
|
background-color: rgba(247, 247, 247, 1); //设置表格标题背景色
|
||||||
|
height: 35px; //设置单元格最小高度
|
||||||
|
text-align: center;
|
||||||
|
letter-spacing: 5px;
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
td {
|
||||||
|
text-align: left;
|
||||||
|
height: 35px; //设置单元格最小高度
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
.th-bg {
|
||||||
|
background-color: rgba(247, 247, 247, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tbody {
|
||||||
|
tr {
|
||||||
|
td {
|
||||||
|
text-align: left;
|
||||||
|
height: 40px; //设置单元格最小高度
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
th {
|
||||||
|
height: 35px; //设置单元格最小高度
|
||||||
|
text-align: center;
|
||||||
|
letter-spacing: 5px;
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.table-content {
|
||||||
|
box-shadow: 0px 0px 10px #ddd;
|
||||||
|
padding: 20px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
</style>
|
@ -22,10 +22,6 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
|
|
||||||
>>>>>>> 64b04286e36ef42ab8a27f17406454b185d48e80
|
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
|
Reference in New Issue
Block a user