diff --git a/klp-mes/src/main/java/com/klp/mes/eqp/domain/EqpAuxiliaryMaterial.java b/klp-mes/src/main/java/com/klp/mes/eqp/domain/EqpAuxiliaryMaterial.java index 24e6f172..54135df6 100644 --- a/klp-mes/src/main/java/com/klp/mes/eqp/domain/EqpAuxiliaryMaterial.java +++ b/klp-mes/src/main/java/com/klp/mes/eqp/domain/EqpAuxiliaryMaterial.java @@ -44,6 +44,10 @@ public class EqpAuxiliaryMaterial extends BaseEntity { * 关联设备ID(可为空,通用辅料) */ private Long equipmentId; + /** + * 机组(如:1#机组、2#机组、公用机组等) + */ + private String unitTeam; /** * 当前库存数量 */ diff --git a/klp-mes/src/main/java/com/klp/mes/eqp/domain/EqpSparePart.java b/klp-mes/src/main/java/com/klp/mes/eqp/domain/EqpSparePart.java index cda1a476..cf457334 100644 --- a/klp-mes/src/main/java/com/klp/mes/eqp/domain/EqpSparePart.java +++ b/klp-mes/src/main/java/com/klp/mes/eqp/domain/EqpSparePart.java @@ -44,6 +44,10 @@ public class EqpSparePart extends BaseEntity { * 关联设备ID(可为空,通用备件) */ private Long equipmentId; + /** + * 机组(如:1#机组、2#机组、公用机组等) + */ + private String unitTeam; /** * 当前库存数量 */ diff --git a/klp-mes/src/main/java/com/klp/mes/eqp/domain/bo/EqpAuxiliaryMaterialBo.java b/klp-mes/src/main/java/com/klp/mes/eqp/domain/bo/EqpAuxiliaryMaterialBo.java index 280dd82c..3bc50f53 100644 --- a/klp-mes/src/main/java/com/klp/mes/eqp/domain/bo/EqpAuxiliaryMaterialBo.java +++ b/klp-mes/src/main/java/com/klp/mes/eqp/domain/bo/EqpAuxiliaryMaterialBo.java @@ -47,6 +47,11 @@ public class EqpAuxiliaryMaterialBo extends BaseEntity { */ private Long equipmentId; + /** + * 机组(如:1#机组、2#机组、公用机组等) + */ + private String unitTeam; + /** * 当前库存数量 */ diff --git a/klp-mes/src/main/java/com/klp/mes/eqp/domain/bo/EqpSparePartBo.java b/klp-mes/src/main/java/com/klp/mes/eqp/domain/bo/EqpSparePartBo.java index 9fb11afb..26c28a0b 100644 --- a/klp-mes/src/main/java/com/klp/mes/eqp/domain/bo/EqpSparePartBo.java +++ b/klp-mes/src/main/java/com/klp/mes/eqp/domain/bo/EqpSparePartBo.java @@ -47,6 +47,11 @@ public class EqpSparePartBo extends BaseEntity { */ private Long equipmentId; + /** + * 机组(如:1#机组、2#机组、公用机组等) + */ + private String unitTeam; + /** * 当前库存数量 */ diff --git a/klp-mes/src/main/java/com/klp/mes/eqp/domain/vo/EqpAuxiliaryMaterialVo.java b/klp-mes/src/main/java/com/klp/mes/eqp/domain/vo/EqpAuxiliaryMaterialVo.java index 0c56df6c..9193bdff 100644 --- a/klp-mes/src/main/java/com/klp/mes/eqp/domain/vo/EqpAuxiliaryMaterialVo.java +++ b/klp-mes/src/main/java/com/klp/mes/eqp/domain/vo/EqpAuxiliaryMaterialVo.java @@ -56,6 +56,12 @@ public class EqpAuxiliaryMaterialVo { @ExcelDictFormat(readConverterExp = "可=为空,通用辅料") private Long equipmentId; + /** + * 机组(如:1#机组、2#机组、公用机组等) + */ + @ExcelProperty(value = "机组") + private String unitTeam; + /** * 当前库存数量 */ diff --git a/klp-mes/src/main/java/com/klp/mes/eqp/domain/vo/EqpSparePartVo.java b/klp-mes/src/main/java/com/klp/mes/eqp/domain/vo/EqpSparePartVo.java index d1b19c7a..723789ca 100644 --- a/klp-mes/src/main/java/com/klp/mes/eqp/domain/vo/EqpSparePartVo.java +++ b/klp-mes/src/main/java/com/klp/mes/eqp/domain/vo/EqpSparePartVo.java @@ -56,6 +56,12 @@ public class EqpSparePartVo { @ExcelDictFormat(readConverterExp = "可=为空,通用备件") private Long equipmentId; + /** + * 机组(如:1#机组、2#机组、公用机组等) + */ + @ExcelProperty(value = "机组") + private String unitTeam; + /** * 当前库存数量 */ diff --git a/klp-mes/src/main/java/com/klp/mes/eqp/service/impl/EqpAuxiliaryMaterialServiceImpl.java b/klp-mes/src/main/java/com/klp/mes/eqp/service/impl/EqpAuxiliaryMaterialServiceImpl.java index d25e500c..5b6aac46 100644 --- a/klp-mes/src/main/java/com/klp/mes/eqp/service/impl/EqpAuxiliaryMaterialServiceImpl.java +++ b/klp-mes/src/main/java/com/klp/mes/eqp/service/impl/EqpAuxiliaryMaterialServiceImpl.java @@ -66,6 +66,7 @@ public class EqpAuxiliaryMaterialServiceImpl implements IEqpAuxiliaryMaterialSer lqw.eq(StringUtils.isNotBlank(bo.getAuxiliaryModel()), EqpAuxiliaryMaterial::getAuxiliaryModel, bo.getAuxiliaryModel()); lqw.eq(StringUtils.isNotBlank(bo.getUnit()), EqpAuxiliaryMaterial::getUnit, bo.getUnit()); lqw.eq(bo.getEquipmentId() != null, EqpAuxiliaryMaterial::getEquipmentId, bo.getEquipmentId()); + lqw.like(StringUtils.isNotBlank(bo.getUnitTeam()), EqpAuxiliaryMaterial::getUnitTeam, bo.getUnitTeam()); lqw.eq(bo.getQuantity() != null, EqpAuxiliaryMaterial::getQuantity, bo.getQuantity()); return lqw; } diff --git a/klp-mes/src/main/java/com/klp/mes/eqp/service/impl/EqpSparePartServiceImpl.java b/klp-mes/src/main/java/com/klp/mes/eqp/service/impl/EqpSparePartServiceImpl.java index 75e59fae..b7f9001d 100644 --- a/klp-mes/src/main/java/com/klp/mes/eqp/service/impl/EqpSparePartServiceImpl.java +++ b/klp-mes/src/main/java/com/klp/mes/eqp/service/impl/EqpSparePartServiceImpl.java @@ -58,6 +58,7 @@ public class EqpSparePartServiceImpl implements IEqpSparePartService { qw.eq(StringUtils.isNotBlank(bo.getModel()), "sp.model", bo.getModel()); qw.eq(StringUtils.isNotBlank(bo.getUnit()), "sp.unit", bo.getUnit()); qw.eq(bo.getEquipmentId() != null, "sp.equipment_id", bo.getEquipmentId()); + qw.like(StringUtils.isNotBlank(bo.getUnitTeam()), "sp.unit_team", bo.getUnitTeam()); qw.eq(bo.getQuantity() != null, "sp.quantity", bo.getQuantity()); //逻辑删除 qw.eq("sp.del_flag", 0); @@ -81,6 +82,7 @@ public class EqpSparePartServiceImpl implements IEqpSparePartService { lqw.eq(StringUtils.isNotBlank(bo.getModel()), EqpSparePart::getModel, bo.getModel()); lqw.eq(StringUtils.isNotBlank(bo.getUnit()), EqpSparePart::getUnit, bo.getUnit()); lqw.eq(bo.getEquipmentId() != null, EqpSparePart::getEquipmentId, bo.getEquipmentId()); + lqw.like(StringUtils.isNotBlank(bo.getUnitTeam()), EqpSparePart::getUnitTeam, bo.getUnitTeam()); lqw.eq(bo.getQuantity() != null, EqpSparePart::getQuantity, bo.getQuantity()); return lqw; } diff --git a/klp-mes/src/main/resources/mapper/eqp/EqpAuxiliaryMaterialMapper.xml b/klp-mes/src/main/resources/mapper/eqp/EqpAuxiliaryMaterialMapper.xml index b0b0999f..8d3b6743 100644 --- a/klp-mes/src/main/resources/mapper/eqp/EqpAuxiliaryMaterialMapper.xml +++ b/klp-mes/src/main/resources/mapper/eqp/EqpAuxiliaryMaterialMapper.xml @@ -11,6 +11,7 @@ + diff --git a/klp-mes/src/main/resources/mapper/eqp/EqpSparePartMapper.xml b/klp-mes/src/main/resources/mapper/eqp/EqpSparePartMapper.xml index 6db91329..c861085a 100644 --- a/klp-mes/src/main/resources/mapper/eqp/EqpSparePartMapper.xml +++ b/klp-mes/src/main/resources/mapper/eqp/EqpSparePartMapper.xml @@ -11,6 +11,7 @@ + @@ -27,6 +28,7 @@ sp.model, sp.unit, sp.equipment_id, + sp.unit_team, em.equipment_name AS equipmentName, sp.quantity, sp.remark diff --git a/klp-ui/src/api/wms/approval.js b/klp-ui/src/api/wms/approval.js index 1321f852..5e59786d 100644 --- a/klp-ui/src/api/wms/approval.js +++ b/klp-ui/src/api/wms/approval.js @@ -55,3 +55,14 @@ export function withdrawApproval(approvalId) { } }) } + +/** + * 按业务ID查询审批信息(用于用印等业务) + */ +export function getApprovalByBizId(bizId) { + return request({ + url: '/wms/approval/getByBizId', + method: 'get', + params: { bizId } + }) +} diff --git a/klp-ui/src/components/CoilSelector/index.vue b/klp-ui/src/components/CoilSelector/index.vue index ec344ad4..4939f1cc 100644 --- a/klp-ui/src/components/CoilSelector/index.vue +++ b/klp-ui/src/components/CoilSelector/index.vue @@ -219,7 +219,12 @@ export default { multiple: { type: Boolean, default: false - } + }, + // 是否禁用O卷 + disableO: { + type: Boolean, + default: false + }, }, data() { return { @@ -489,6 +494,10 @@ export default { this.$message.warning('您没有权限选择此钢卷'); return; // 终止后续逻辑 } + if (this.disableO && row.qualityStatus == 'O') { + this.$message.warning('O卷不能选择'); + return; + } this.handleSelect(row); }, diff --git a/klp-ui/src/components/KLPService/Renderer/CoilNo.vue b/klp-ui/src/components/KLPService/Renderer/CoilNo.vue index db005ee5..fea7c2ce 100644 --- a/klp-ui/src/components/KLPService/Renderer/CoilNo.vue +++ b/klp-ui/src/components/KLPService/Renderer/CoilNo.vue @@ -99,7 +99,16 @@ export default { }, supplierCoilNo() { return this.coilInfo.supplierCoilNo || '-' - } + }, + length() { + return this.coilInfo.length || '-' + }, + actualLength() { + return this.coilInfo.actualLength || '-' + }, + actualWidth() { + return this.coilInfo.actualWidth || '-' + }, }, methods: { getCoilInfo() { diff --git a/klp-ui/src/main.js b/klp-ui/src/main.js index 93611be2..c767d1d2 100644 --- a/klp-ui/src/main.js +++ b/klp-ui/src/main.js @@ -48,6 +48,10 @@ import KLPTable from '@/components/KLPUI/KLPTable/index.vue' import MemoInput from '@/components/MemoInput/index.vue' import CurrentCoilNo from '@/components/KLPService/Renderer/CurrentCoilNo.vue' +// 初始化所有列 +import { initAllColumns } from '@/views/wms/report/js/column.js' + + // 全局方法挂载 Vue.prototype.getDicts = getDicts @@ -83,6 +87,9 @@ Vue.use(VueKonva); Vue.use(dashboardBigPlugin) DictData.install() +// 初始化所有列 +initAllColumns() + /** * If you don't want to use mock-server * you want to use MockJs for mock api diff --git a/klp-ui/src/router/index.js b/klp-ui/src/router/index.js index a7cc2ad5..bee1eefd 100644 --- a/klp-ui/src/router/index.js +++ b/klp-ui/src/router/index.js @@ -125,6 +125,19 @@ export const constantRoutes = [ meta: { title: '工厂总日历' } } ] + }, + { + path: '/wms/seal', + component: Layout, + hidden: true, + children: [ + { + path: 'sealDetail/:bizId', + component: () => import('@/views/wms/seal/sealDetail'), + name: 'WmsSealDetail', + meta: { title: '用印详情' } + } + ] } ] diff --git a/klp-ui/src/views/mes/eqp/auxiliary/index.vue b/klp-ui/src/views/mes/eqp/auxiliary/index.vue index 50692f9a..0cf19fc8 100644 --- a/klp-ui/src/views/mes/eqp/auxiliary/index.vue +++ b/klp-ui/src/views/mes/eqp/auxiliary/index.vue @@ -33,11 +33,9 @@ @keyup.enter.native="handleQuery" /> - + + + 搜索 重置 @@ -91,6 +89,7 @@ + @@ -147,11 +146,9 @@ - + + + @@ -196,11 +193,13 @@ import { listAuxiliaryMaterial, getAuxiliaryMaterial, delAuxiliaryMaterial, addAuxiliaryMaterial, updateAuxiliaryMaterial } from "@/api/mes/eqp/auxiliaryMaterial"; import { changeStock } from "@/api/mes/eqp/auxiliaryMaterialChange"; import auxiliaryChange from '../components/pages/auxiliaryChange.vue'; +import dictSelect from '@/components/DictSelect'; export default { name: "Auxiliary", components: { - auxiliaryChange + auxiliaryChange, + dictSelect }, data() { return { diff --git a/klp-ui/src/views/mes/eqp/ready/index.vue b/klp-ui/src/views/mes/eqp/ready/index.vue index 87200548..a7b5ca2d 100644 --- a/klp-ui/src/views/mes/eqp/ready/index.vue +++ b/klp-ui/src/views/mes/eqp/ready/index.vue @@ -38,6 +38,9 @@ + + + 搜索 重置 @@ -92,6 +95,7 @@ + @@ -147,6 +151,9 @@ + + + @@ -197,11 +204,14 @@ import { listSparePart, getSparePart, delSparePart, addSparePart, updateSparePar import { listEquipmentManagement } from "@/api/mes/eqp/equipmentManagement"; import { changeStock } from "@/api/mes/eqp/sparePartsChange"; import partChange from '../components/pages/partChange.vue'; +import dictSelect from '@/components/DictSelect'; + export default { name: "SparePart", components: { - partChange + partChange, + dictSelect }, data() { return { diff --git a/klp-ui/src/views/wms/coil/abnormalCoil.vue b/klp-ui/src/views/wms/coil/abnormalCoil.vue index 10dfd152..ed82590f 100644 --- a/klp-ui/src/views/wms/coil/abnormalCoil.vue +++ b/klp-ui/src/views/wms/coil/abnormalCoil.vue @@ -111,38 +111,7 @@ - - - - - - - {{ - dict.label }} - - - - - - - - - - - {{ - dict.label }} - - - - - {{ - dict.label }} - - - - - - + @@ -161,13 +111,15 @@ import { listCoilAbnormal, getCoilAbnormal, delCoilAbnormal, addCoilAbnormal, updateCoilAbnormal, judgeAbnormalLevel } from "@/api/wms/coilAbnormal"; import CoilSelector from '@/components/CoilSelector' import CoilNo from '@/components/KLPService/Renderer/CoilNo' +import AbnormalForm from './components/AbnormalForm' export default { name: "CoilAbnormal", dicts: ['coil_abnormal_code', 'coil_abnormal_position', 'coil_abnormal_degree', 'coil_abnormal_level'], components: { CoilSelector, - CoilNo + CoilNo, + AbnormalForm }, data() { return { @@ -205,9 +157,6 @@ export default { }, // 表单参数 form: {}, - // 表单校验 - rules: { - }, judgeOpen: false, }; }, @@ -259,7 +208,9 @@ export default { updateTime: undefined, updateBy: undefined }; - this.resetForm("form"); + if (this.$refs.abnormalForm) { + this.$refs.abnormalForm.resetFields(); + } }, /** 搜索按钮操作 */ handleQuery() { @@ -297,7 +248,7 @@ export default { }, /** 提交按钮 */ submitForm() { - this.$refs["form"].validate(valid => { + this.$refs["abnormalForm"].validate(valid => { if (valid) { this.buttonLoading = true; if (this.form.abnormalId != null) { diff --git a/klp-ui/src/views/wms/coil/components/AbnormalForm.vue b/klp-ui/src/views/wms/coil/components/AbnormalForm.vue new file mode 100644 index 00000000..f53972bc --- /dev/null +++ b/klp-ui/src/views/wms/coil/components/AbnormalForm.vue @@ -0,0 +1,113 @@ + + + + + + + + {{ dict.label }} + + + + + + + + + + + {{ dict.label }} + + + + + {{ dict.label }} + + + + + + + + + diff --git a/klp-ui/src/views/wms/coil/merge.vue b/klp-ui/src/views/wms/coil/merge.vue index 8103ca40..df936ef0 100644 --- a/klp-ui/src/views/wms/coil/merge.vue +++ b/klp-ui/src/views/wms/coil/merge.vue @@ -230,11 +230,61 @@ + + + + + + + + {{ getAbnormalPositionText(abnormal.position) }} + {{ getAbnormalCodeText(abnormal.defectCode) }} + + + + + + + + + + + + + + + + @@ -247,6 +297,7 @@ import RawMaterialSelector from "@/components/KLPService/RawMaterialSelect"; import ProductSelector from "@/components/KLPService/ProductSelect"; import WarehouseSelect from "@/components/KLPService/WarehouseSelect"; import TimeInput from "@/components/TimeInput"; +import AbnormalForm from './components/AbnormalForm'; import { generateCoilNoPrefix } from "@/utils/coil/coilNo"; export default { @@ -257,9 +308,10 @@ export default { RawMaterialSelector, ProductSelector, WarehouseSelect, - TimeInput + TimeInput, + AbnormalForm }, - dicts: ['coil_quality_status'], + dicts: ['coil_quality_status', 'coil_abnormal_position', 'coil_abnormal_code', 'coil_abnormal_degree'], data() { const currentCoilNoPrefix = generateCoilNoPrefix() return { @@ -332,7 +384,24 @@ export default { pendingLoading: false, // 待操作ID actionId: null, - currentAction: {} + currentAction: {}, + // 异常信息 + abnormals: [], + // 异常表单弹窗 + abnormalDialogVisible: false, + // 当前编辑的异常索引 + currentAbnormalIndex: -1, + // 异常表单数据 + abnormalForm: { + coilId: null, + position: null, + startPosition: 0, + endPosition: 0, + length: 0, + defectCode: null, + degree: null, + remark: null + } }; }, computed: { @@ -681,6 +750,7 @@ export default { ...this.targetCoil, enterCoilNo: enterCoilNos, // 拼接的入场钢卷号 hasMergeSplit: 2, // 2表示合卷 + abnormals: this.abnormals, newCoils: this.sourceCoils.map(item => ({ coilId: item.coilId, enterCoilNo: item.enterCoilNo, @@ -836,6 +906,78 @@ export default { // closePage 关闭当前页面 closePage() { this.$router.back(); + }, + + // 新增异常 + addAbnormal() { + this.currentAbnormalIndex = -1; + this.abnormalForm = { + coilId: null, + position: null, + startPosition: 0, + endPosition: 0, + length: 0, + defectCode: null, + degree: null, + remark: null + }; + this.abnormalDialogVisible = true; + }, + + // 编辑异常 + editAbnormal(index) { + this.currentAbnormalIndex = index; + this.abnormalForm = { ...this.abnormals[index] }; + this.abnormalDialogVisible = true; + }, + + // 保存异常 + saveAbnormal() { + this.$refs.abnormalForm.validate(valid => { + if (valid) { + // 计算缺陷长度 + this.abnormalForm.length = this.abnormalForm.endPosition - this.abnormalForm.startPosition; + + if (this.currentAbnormalIndex === -1) { + // 新增异常 + this.abnormals.push({ ...this.abnormalForm }); + } else { + // 编辑异常 + this.abnormals[this.currentAbnormalIndex] = { ...this.abnormalForm }; + } + + this.abnormalDialogVisible = false; + } + }); + }, + + // 删除异常 + deleteAbnormal(index) { + this.$confirm('确定要删除这个异常信息吗?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.abnormals.splice(index, 1); + }); + }, + + // 获取异常位置文本 + getAbnormalPositionText(position) { + if (!position) return ''; + const dict = this.dict.type.coil_abnormal_position; + if (!dict) return position; + const item = dict.find(item => item.value === position); + return item ? item.label : position; + }, + + // 获取异常代码文本 + getAbnormalCodeText(code) { + if (!code) return ''; + const dict = this.dict.type.coil_abnormal_code; + if (!dict) return code; + const item = dict.find(item => item.value === code); + return item ? item.label : code; } } }; @@ -1256,4 +1398,86 @@ export default { } } } + + +.abnormal-container { + display: flex; + flex-wrap: wrap; + gap: 10px; + margin-top: 5px; +} + +.abnormal-item { + width: 120px; + height: 80px; + background-color: #fff1f0; + border: 1px solid #ff4d4f; + border-radius: 4px; + cursor: pointer; + transition: all 0.3s ease; + position: relative; + + &:hover { + box-shadow: 0 2px 8px rgba(255, 77, 79, 0.2); + transform: translateY(-2px); + } + + .abnormal-content { + padding: 8px; + height: 100%; + display: flex; + flex-direction: column; + justify-content: space-between; + } + + .abnormal-info { + flex: 1; + } + + .abnormal-position { + font-size: 12px; + font-weight: 500; + color: #ff4d4f; + margin-bottom: 4px; + } + + .abnormal-code { + font-size: 11px; + color: #666; + line-height: 1.3; + } + + .abnormal-delete { + position: absolute; + top: -8px; + right: -8px; + width: 20px; + height: 20px; + padding: 0; + display: flex; + align-items: center; + justify-content: center; + border-radius: 50%; + background-color: #fff; + } +} + +.abnormal-add { + width: 120px; + height: 80px; + border: 2px dashed #ff4d4f; + border-radius: 4px; + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + transition: all 0.3s ease; + color: #ff4d4f; + font-size: 24px; + + &:hover { + background-color: #fff1f0; + transform: translateY(-2px); + } +} diff --git a/klp-ui/src/views/wms/coil/panels/abnormal.vue b/klp-ui/src/views/wms/coil/panels/abnormal.vue index 216817e9..de8567a0 100644 --- a/klp-ui/src/views/wms/coil/panels/abnormal.vue +++ b/klp-ui/src/views/wms/coil/panels/abnormal.vue @@ -58,35 +58,7 @@ - - - - {{ - dict.label }} - - - - - - - - - - - {{ - dict.label }} - - - - - {{ - dict.label }} - - - - - - + @@ -115,6 +73,8 @@ import CoilNo from "@/components/KLPService/Renderer/CoilNo.vue"; import MemoInput from "@/components/MemoInput"; import MutiSelect from "@/components/MutiSelect"; import WarehouseSelect from "@/components/KLPService/WarehouseSelect"; +import ColumnsSetting from "@/views/wms/report/components/setting/columns.vue"; +import CoilTable from "@/views/wms/report/components/coilTable/index.vue"; export default { components: { @@ -123,7 +83,9 @@ export default { CoilNo, MemoInput, MutiSelect, - WarehouseSelect + WarehouseSelect, + ColumnsSetting, + CoilTable, }, dicts: ['product_coil_status', 'coil_material', 'coil_itemname', 'coil_manufacturer'], data() { @@ -149,6 +111,8 @@ export default { const startTime = `${yesYear}-${yesMonth}-${yesDay} 07:00:00` const endTime = `${nowYear}-${nowMonth}-${nowDay} 07:00:00` return { + activeColumnConfig: 'coil-report-delivery', + settingVisible: false, list: [], queryParams: { pageNum: 1, @@ -168,6 +132,8 @@ export default { includeBindInfo: true, }, loading: false, + + deliveryColumns: [], } }, computed: { @@ -184,6 +150,14 @@ export default { } }, methods: { + // 加载列设置 + loadColumns() { + this.deliveryColumns = JSON.parse(localStorage.getItem('preference-tableColumns-coil-report-delivery') || '[]') || [] + }, + // 统一查询入口 + handleQuery() { + this.getList() + }, getList() { this.loading = true listCoilWithIds({ @@ -212,6 +186,7 @@ export default { }, mounted() { this.getList() + this.loadColumns() } } diff --git a/klp-ui/src/views/wms/report/js/column.js b/klp-ui/src/views/wms/report/js/column.js new file mode 100644 index 00000000..9a35b44c --- /dev/null +++ b/klp-ui/src/views/wms/report/js/column.js @@ -0,0 +1,293 @@ +const defaultColumns = { + // 消耗报表明细表格 + "coil-report-loss": [ + { + title: "入场钢卷号", + prop: "enterCoilNo", + align: "center", + }, + { + title: "当前钢卷号", + prop: "currentCoilNo", + align: "center", + }, + { + title: "操作完成时间", + prop: "actionCompleteTime", + align: "center", + }, + { + title: "生产开始时间", + prop: "productionStartTime", + align: "center", + }, + { + title: "生产结束时间", + prop: "productionEndTime", + align: "center", + }, + { + title: "逻辑库区", + prop: "warehouseName", + align: "center", + }, + { + title: "产品类型", + prop: "itemId", + width: "150", + align: "center", + }, + { + title: "宽度", + prop: "computedWidth", + width: "70", + align: "center", + }, + { + title: "厚度", + prop: "computedThickness", + width: "70", + align: "center", + }, + { + title: "重量", + prop: "netWeight", + align: "center", + }, + { + title: "长度", + prop: "length", + align: "center", + }, + { + title: "生产线速度", + prop: "productionSpeed", + align: "center", + }, + { + title: "备注", + prop: "remark", + align: "center", + }, + ], + // 产出报表明细表格 + "coil-report-output": [ + { + title: "入场钢卷号", + prop: "enterCoilNo", + align: "center", + }, + { + title: "当前钢卷号", + prop: "currentCoilNo", + align: "center", + }, + { + title: "生产时间", + prop: "createTime", + align: "center", + }, + { + title: "逻辑库区", + prop: "warehouseName", + align: "center", + }, + { + title: "产品类型", + prop: "itemId", + width: "150", + align: "center", + }, + { + title: "宽度", + prop: "computedWidth", + width: "70", + align: "center", + }, + { + title: "厚度", + prop: "computedThickness", + width: "70", + align: "center", + }, + { + title: "重量", + prop: "netWeight", + align: "center", + }, + { + title: "长度", + prop: "length", + align: "center", + }, + { + title: "在库状态", + prop: "status", + align: "center", + }, + ], + // 收货明细表格 + "coil-report-receive": [ + { + title: "入场钢卷号", + prop: "enterCoilNo", + align: "center", + }, + { + title: "当前钢卷号", + prop: "currentCoilNo", + align: "center", + }, + { + title: "生产时间", + prop: "createTime", + align: "center", + }, + { + title: "逻辑库区", + prop: "warehouseName", + align: "center", + }, + { + title: "产品类型", + prop: "itemId", + width: "150", + align: "center", + }, + { + title: "宽度", + prop: "computedWidth", + width: "70", + align: "center", + }, + { + title: "厚度", + prop: "computedThickness", + width: "70", + align: "center", + }, + { + title: "重量", + prop: "netWeight", + align: "center", + }, + { + title: "长度", + prop: "length", + align: "center", + }, + { + title: "在库状态", + prop: "status", + align: "center", + }, + { + title: "更新人", + prop: "updateByName", + align: "center", + }, + { + title: "更新时间", + prop: "updateTime", + align: "center", + }, + ], + // 发货明细表格 + "coil-report-delivery": [ + { + title: "入场钢卷号", + prop: "enterCoilNo", + align: "center", + }, + { + title: "当前钢卷号", + prop: "currentCoilNo", + align: "center", + }, + { + title: "逻辑库区", + prop: "warehouseName", + align: "center", + }, + { + title: "产品类型", + prop: "itemId", + width: "150", + align: "center", + }, + { + title: "宽度", + prop: "computedWidth", + width: "70", + align: "center", + }, + { + title: "厚度", + prop: "computedThickness", + width: "70", + align: "center", + }, + { + title: "重量", + prop: "netWeight", + align: "center", + }, + { + title: "长度", + prop: "length", + align: "center", + }, + { + title: "在库状态", + prop: "status", + align: "center", + }, + { + title: "发货时间", + prop: "exportTime", + align: "center", + }, + { + title: "车牌号", + prop: "bindLicensePlate", + align: "center", + }, + { + title: "目标客户", + prop: "bindConsigneeUnit", + align: "center", + }, + { + title: "发货单位", + prop: "bindSenderUnit", + align: "center", + }, + { + title: "发货负责人", + prop: "bindPrincipal", + align: "center", + }, + ] +} + +export const initColumns = (key) => { + // 如果没有存储,初始化默认列 + if (!localStorage.getItem('preference-tableColumns-' + key)) { + localStorage.setItem('preference-tableColumns-' + key, JSON.stringify(defaultColumns[key])) + } +} + +export const resetColumns = (key) => { + localStorage.removeItem('preference-tableColumns-' + key) + initColumns(key) +} + +export const initAllColumns = () => { + Object.keys(defaultColumns).forEach(key => initColumns(key)) +} + +export const resetAllColumns = () => { + Object.keys(defaultColumns).forEach(key => resetColumns(key)) +} + + diff --git a/klp-ui/src/views/wms/report/merge/index.vue b/klp-ui/src/views/wms/report/merge/index.vue index 6231d613..8bf716de 100644 --- a/klp-ui/src/views/wms/report/merge/index.vue +++ b/klp-ui/src/views/wms/report/merge/index.vue @@ -38,6 +38,7 @@ 查询 导出产出钢卷 导出消耗钢卷 + 列设置 @@ -66,72 +67,20 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ scope.row.status === 0 ? '在库' : '已出库' }} - - - - - + + + + + 投入明细配置 + 产出明细配置 + + + @@ -146,6 +95,8 @@ import ProductInfo from "@/components/KLPService/Renderer/ProductInfo"; import RawMaterialInfo from "@/components/KLPService/Renderer/RawMaterialInfo"; import CoilNo from "@/components/KLPService/Renderer/CoilNo.vue"; import { calcSummary } from "@/views/wms/report/js/calc"; +import CoilTable from "@/views/wms/report/components/coilTable"; +import ColumnsSetting from "@/views/wms/report/components/setting/columns"; export default { name: 'MergeTemplate', @@ -161,6 +112,8 @@ export default { ProductInfo, RawMaterialInfo, CoilNo, + CoilTable, + ColumnsSetting }, dicts: ['product_coil_status', 'coil_material', 'coil_itemname', 'coil_manufacturer'], data() { @@ -214,6 +167,8 @@ export default { lossList: [], outList: [], activeTab: 'loss', + activeColumnConfig: 'coil-report-loss', + settingVisible: false, loading: false, queryParams: { startTime: start, @@ -227,7 +182,9 @@ export default { itemManufacturer: '', pageSize: 9999, pageNum: 1, - } + }, + lossColumns: [], + outputColumns: [] } }, computed: { @@ -237,6 +194,7 @@ export default { }, created() { this.handleQuery() + this.loadColumns() }, methods: { handleQuery() { @@ -271,8 +229,24 @@ export default { listCoilWithIds({ ...this.queryParams, coilIds: lossIds.join(',') || '' }), listCoilWithIds({ ...this.queryParams, coilIds: outIds.join(',') || '' }), ]); - this.lossList = lossRes.rows; - this.outList = outRes.rows; + this.lossList = lossRes.rows.map(item => { + // 计算宽度和厚度,将规格按照*分割,*前的是厚度,*后的是宽度 + const [thickness, width] = item.specification.split('*') + return { + ...item, + computedThickness: parseFloat(thickness), + computedWidth: parseFloat(width), + } + }); + this.outList = outRes.rows.map(item => { + // 计算宽度和厚度,将规格按照*分割,*前的是厚度,*后的是宽度 + const [thickness, width] = item.specification.split('*') + return { + ...item, + computedThickness: parseFloat(thickness), + computedWidth: parseFloat(width), + } + }); this.loading = false; }, // 导出 @@ -294,6 +268,11 @@ export default { coilIds: this.lossList.map(item => item.coilId).join(',') }, `materialCoil_${new Date().getTime()}.xlsx`) }, + // 加载列设置 + loadColumns() { + this.lossColumns = JSON.parse(localStorage.getItem('preference-tableColumns-coil-report-loss') || '[]') || [] + this.outputColumns = JSON.parse(localStorage.getItem('preference-tableColumns-coil-report-output') || '[]') || [] + } } } diff --git a/klp-ui/src/views/wms/report/receive.vue b/klp-ui/src/views/wms/report/receive.vue index 69cc886a..4c3697c1 100644 --- a/klp-ui/src/views/wms/report/receive.vue +++ b/klp-ui/src/views/wms/report/receive.vue @@ -48,6 +48,7 @@ 查询 导出 + 列设置 @@ -60,40 +61,14 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ scope.row.status === 0 ? '在库' : '已出库' }} - - - - - + + + + + 收货明细配置 + + + @@ -109,6 +84,8 @@ import MemoInput from "@/components/MemoInput"; import MutiSelect from "@/components/MutiSelect"; import WarehouseSelect from "@/components/KLPService/WarehouseSelect"; import { listDeliveryPlan } from '@/api/wms/deliveryPlan' +import ColumnsSetting from "@/views/wms/report/components/setting/columns.vue"; +import CoilTable from "@/views/wms/report/components/coilTable/index.vue"; export default { components: { @@ -118,6 +95,8 @@ export default { MemoInput, MutiSelect, WarehouseSelect, + ColumnsSetting, + CoilTable, }, dicts: ['product_coil_status', 'coil_material', 'coil_itemname', 'coil_manufacturer'], data() { @@ -143,6 +122,8 @@ export default { const startTime = `${yesYear}-${yesMonth}-${yesDay} 07:00:00` const endTime = `${nowYear}-${nowMonth}-${nowDay} 07:00:00` return { + activeColumnConfig: 'coil-report-receive', + settingVisible: false, list: [], queryParams: { pageNum: 1, @@ -162,6 +143,8 @@ export default { }, planList: [], loading: false, + + receiveColumns: [], } }, computed: { @@ -178,6 +161,14 @@ export default { } }, methods: { + // 加载列设置 + loadColumns() { + this.receiveColumns = JSON.parse(localStorage.getItem('preference-tableColumns-coil-report-receive') || '[]') || [] + }, + // 统一查询入口 + handleQuery() { + this.getList() + }, remoteMethod(query) { listDeliveryPlan({ planName: query, pageNum: 1, pageSize: 5, planType: 1 }).then(res => { this.planList = res.rows @@ -233,6 +224,7 @@ export default { mounted() { this.getList() this.remoteMethod('') + this.loadColumns() } } diff --git a/klp-ui/src/views/wms/report/template/day.vue b/klp-ui/src/views/wms/report/template/day.vue index 83213b0d..88e37c14 100644 --- a/klp-ui/src/views/wms/report/template/day.vue +++ b/klp-ui/src/views/wms/report/template/day.vue @@ -39,6 +39,7 @@ 查询 导出产出钢卷 导出消耗钢卷 + 列设置 @@ -73,73 +74,20 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ scope.row.status === 0 ? '在库' : '已出库' }} - - - - - + + + + 投入明细配置 + 产出明细配置 + + + @@ -155,6 +103,8 @@ import MemoInput from "@/components/MemoInput"; import MutiSelect from "@/components/MutiSelect"; import WarehouseSelect from "@/components/KLPService/WarehouseSelect"; import { calcSummary, calcAbSummary } from "@/views/wms/report/js/calc"; +import ColumnsSetting from "@/views/wms/report/components/setting/columns.vue"; +import CoilTable from "@/views/wms/report/components/coilTable/index.vue"; export default { name: 'DayTemplate', @@ -165,6 +115,8 @@ export default { MemoInput, MutiSelect, WarehouseSelect, + ColumnsSetting, + CoilTable, }, props: { actionTypes: { @@ -205,6 +157,8 @@ export default { return { activeTab: 'loss', + activeColumnConfig: 'coil-report-loss', + settingVisible: false, list: [], lossList: [], queryParams: { @@ -233,7 +187,10 @@ export default { '2019583429955104769', '2019583137616310273', ], - getDayTimeRange // 挂载时间范围生成函数 + getDayTimeRange, // 挂载时间范围生成函数 + + lossColumns: [], + outputColumns: [], } }, watch: { @@ -255,6 +212,11 @@ export default { } }, methods: { + // 加载列设置 + loadColumns() { + this.lossColumns = JSON.parse(localStorage.getItem('preference-tableColumns-coil-report-loss') || '[]') || [] + this.outputColumns = JSON.parse(localStorage.getItem('preference-tableColumns-coil-report-output') || '[]') || [] + }, // 日期变更处理:更新开始/结束时间 handleDateChange(date) { if (!date) return @@ -372,6 +334,7 @@ export default { mounted() { this.getList() this.getLossList() + this.loadColumns() } } diff --git a/klp-ui/src/views/wms/report/template/loss.vue b/klp-ui/src/views/wms/report/template/loss.vue index 8843d427..fe9cdd4f 100644 --- a/klp-ui/src/views/wms/report/template/loss.vue +++ b/klp-ui/src/views/wms/report/template/loss.vue @@ -47,6 +47,7 @@ 查询 导出 + 列设置 @@ -59,39 +60,14 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + 消耗明细配置 + + + @@ -107,6 +83,8 @@ import MemoInput from "@/components/MemoInput"; import MutiSelect from "@/components/MutiSelect"; import WarehouseSelect from "@/components/KLPService/WarehouseSelect"; import { listDeliveryPlan } from '@/api/wms/deliveryPlan' +import ColumnsSetting from "@/views/wms/report/components/setting/columns.vue"; +import CoilTable from "@/views/wms/report/components/coilTable/index.vue"; export default { name: 'LossTemplate', @@ -117,6 +95,8 @@ export default { MemoInput, MutiSelect, WarehouseSelect, + ColumnsSetting, + CoilTable, }, props: { actionTypes: { @@ -152,6 +132,8 @@ export default { const startTime = `${yesYear}-${yesMonth}-${yesDay} 07:00:00` const endTime = `${nowYear}-${nowMonth}-${nowDay} 07:00:00` return { + activeColumnConfig: 'coil-report-loss', + settingVisible: false, list: [], queryParams: { pageNum: 1, @@ -171,6 +153,8 @@ export default { }, planList: [], loading: false, + + lossColumns: [], } }, computed: { @@ -187,6 +171,14 @@ export default { } }, methods: { + // 加载列设置 + loadColumns() { + this.lossColumns = JSON.parse(localStorage.getItem('preference-tableColumns-coil-report-loss') || '[]') || [] + }, + // 统一查询入口 + handleQuery() { + this.getList() + }, remoteMethod(query) { listDeliveryPlan({ planName: query, pageNum: 1, pageSize: 5, planType: 1 }).then(res => { this.planList = res.rows @@ -207,8 +199,8 @@ export default { }) })) const actions = resultList.flatMap(item => item.rows) - const coilIds = actions.map(item => item.coilId).join(',') - if (!coilIds) { + const actionIds = actions.map(item => item.actionId).join(',') + if (!actionIds) { this.$message({ message: '暂无数据', type: 'warning', @@ -217,15 +209,26 @@ export default { this.loading = false return } + // const coilIds = actions.map(item => item.coilId).join(',') + // if (!coilIds) { + // this.$message({ + // message: '暂无数据', + // type: 'warning', + // }) + // this.list = [] + // this.loading = false + // return + // } listCoilWithIds({ ...this.queryParams, byCreateTimeStart: undefined, byCreateTimeEnd: undefined, - coilIds: coilIds, + actionIds: actionIds, + // coilIds: coilIds, }).then(res => { this.list = res.rows.map(item => { // 计算宽度和厚度,将规格按照*分割,*前的是厚度,*后的是宽度 - const [thickness, width] = item.specification.split('*') + const [thickness, width] = item.specification?.split('*') || [undefined, undefined] return { ...item, computedThickness: parseFloat(thickness), @@ -245,6 +248,7 @@ export default { mounted() { this.getList() this.remoteMethod('') + this.loadColumns() } } diff --git a/klp-ui/src/views/wms/report/template/merge.vue b/klp-ui/src/views/wms/report/template/merge.vue index 24555b6e..6ea97bcc 100644 --- a/klp-ui/src/views/wms/report/template/merge.vue +++ b/klp-ui/src/views/wms/report/template/merge.vue @@ -38,6 +38,7 @@ 查询 导出产出钢卷 导出消耗钢卷 + 列设置 @@ -66,72 +67,20 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ scope.row.status === 0 ? '在库' : '已出库' }} - - - - - + + + + + 投入明细配置 + 产出明细配置 + + + @@ -146,6 +95,8 @@ import ProductInfo from "@/components/KLPService/Renderer/ProductInfo"; import RawMaterialInfo from "@/components/KLPService/Renderer/RawMaterialInfo"; import CoilNo from "@/components/KLPService/Renderer/CoilNo.vue"; import { calcSummary } from "@/views/wms/report/js/calc"; +import CoilTable from "@/views/wms/report/components/coilTable"; +import ColumnsSetting from "@/views/wms/report/components/setting/columns"; export default { name: 'MergeTemplate', @@ -161,6 +112,8 @@ export default { ProductInfo, RawMaterialInfo, CoilNo, + CoilTable, + ColumnsSetting }, dicts: ['product_coil_status', 'coil_material', 'coil_itemname', 'coil_manufacturer'], data() { @@ -214,6 +167,8 @@ export default { lossList: [], outList: [], activeTab: 'loss', + activeColumnConfig: 'coil-report-loss', + settingVisible: false, loading: false, queryParams: { startTime: start, @@ -227,7 +182,9 @@ export default { itemManufacturer: '', pageSize: 9999, pageNum: 1, - } + }, + lossColumns: [], + outColumns: [] } }, computed: { @@ -237,6 +194,7 @@ export default { }, created() { this.handleQuery() + this.loadColumns() }, methods: { handleQuery() { @@ -302,6 +260,11 @@ export default { coilIds: this.lossList.map(item => item.coilId).join(',') }, `materialCoil_${new Date().getTime()}.xlsx`) }, + // 加载列设置 + loadColumns() { + this.lossColumns = JSON.parse(localStorage.getItem('preference-tableColumns-coil-report-loss') || '[]') || [] + this.outputColumns = JSON.parse(localStorage.getItem('preference-tableColumns-coil-report-output') || '[]') || [] + } } } diff --git a/klp-ui/src/views/wms/report/template/month.vue b/klp-ui/src/views/wms/report/template/month.vue index 860da92d..d2405d58 100644 --- a/klp-ui/src/views/wms/report/template/month.vue +++ b/klp-ui/src/views/wms/report/template/month.vue @@ -39,6 +39,7 @@ 查询 导出产出钢卷 导出消耗钢卷 + 列设置 @@ -73,73 +74,20 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ scope.row.status === 0 ? '在库' : '已出库' }} - - - - - + + + + 投入明细配置 + 产出明细配置 + + + @@ -155,6 +103,8 @@ import MemoInput from "@/components/MemoInput"; import MutiSelect from "@/components/MutiSelect"; import WarehouseSelect from "@/components/KLPService/WarehouseSelect"; import { calcSummary, calcAbSummary } from "@/views/wms/report/js/calc"; +import ColumnsSetting from "@/views/wms/report/components/setting/columns.vue"; +import CoilTable from "@/views/wms/report/components/coilTable/index.vue"; export default { name: 'MonthTemplate', @@ -165,6 +115,8 @@ export default { MemoInput, MutiSelect, WarehouseSelect, + ColumnsSetting, + CoilTable, }, props: { actionTypes: { @@ -235,6 +187,8 @@ export default { return { activeTab: 'loss', + activeColumnConfig: 'coil-report-loss', + settingVisible: false, list: [], lossList: [], queryParams: { @@ -263,7 +217,10 @@ export default { '2019583429955104769', '2019583137616310273', ], - getDayTimeRange // 挂载时间范围生成函数 + getDayTimeRange, // 挂载时间范围生成函数 + + lossColumns: [], + outputColumns: [], } }, watch: { @@ -285,6 +242,11 @@ export default { } }, methods: { + // 加载列设置 + loadColumns() { + this.lossColumns = JSON.parse(localStorage.getItem('preference-tableColumns-coil-report-loss') || '[]') || [] + this.outputColumns = JSON.parse(localStorage.getItem('preference-tableColumns-coil-report-output') || '[]') || [] + }, // 日期变更处理:更新开始/结束时间 handleDateChange(date) { if (!date) return @@ -402,6 +364,7 @@ export default { mounted() { this.getList() this.getLossList() + this.loadColumns() } } diff --git a/klp-ui/src/views/wms/report/template/out.vue b/klp-ui/src/views/wms/report/template/out.vue index f9bfe699..af1631a1 100644 --- a/klp-ui/src/views/wms/report/template/out.vue +++ b/klp-ui/src/views/wms/report/template/out.vue @@ -44,6 +44,7 @@ 查询 导出 + 列设置 @@ -56,40 +57,14 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ scope.row.status === 0 ? '在库' : '已出库' }} - - - - - + + + + + 产出明细配置 + + + @@ -101,7 +76,8 @@ import CoilNo from "@/components/KLPService/Renderer/CoilNo.vue"; import MemoInput from "@/components/MemoInput"; import MutiSelect from "@/components/MutiSelect"; import WarehouseSelect from "@/components/KLPService/WarehouseSelect"; - +import ColumnsSetting from "@/views/wms/report/components/setting/columns.vue"; +import CoilTable from "@/views/wms/report/components/coilTable/index.vue"; export default { name: 'OutTemplate', @@ -112,6 +88,8 @@ export default { MemoInput, MutiSelect, WarehouseSelect, + ColumnsSetting, + CoilTable, }, props: { baseQueryParams: { @@ -147,6 +125,8 @@ export default { const startTime = `${yesYear}-${yesMonth}-${yesDay} 07:00:00` const endTime = `${nowYear}-${nowMonth}-${nowDay} 07:00:00` return { + activeColumnConfig: 'coil-report-output', + settingVisible: false, list: [], queryParams: { pageNum: 1, @@ -173,6 +153,8 @@ export default { '2019583429955104769', '2019583137616310273', ], + + outputColumns: [], } }, watch: { @@ -200,6 +182,14 @@ export default { } }, methods: { + // 加载列设置 + loadColumns() { + this.outputColumns = JSON.parse(localStorage.getItem('preference-tableColumns-coil-report-output') || '[]') || [] + }, + // 统一查询入口 + handleQuery() { + this.getList() + }, getList() { this.loading = true Promise.all([ @@ -242,6 +232,10 @@ export default { }, `materialCoil_${new Date().getTime()}.xlsx`) }, }, + mounted() { + this.getList() + this.loadColumns() + } } diff --git a/klp-ui/src/views/wms/report/template/team.vue b/klp-ui/src/views/wms/report/template/team.vue index 14142aab..70e7dd29 100644 --- a/klp-ui/src/views/wms/report/template/team.vue +++ b/klp-ui/src/views/wms/report/template/team.vue @@ -49,6 +49,7 @@ 查询 导出产出钢卷 导出消耗钢卷 + 列设置 @@ -85,71 +86,20 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ scope.row.status === 0 ? '在库' : '已出库' }} - - - - - + + + + + 投入明细配置 + 产出明细配置 + + + @@ -163,6 +113,8 @@ import MemoInput from "@/components/MemoInput"; import MutiSelect from "@/components/MutiSelect"; import WarehouseSelect from "@/components/KLPService/WarehouseSelect"; import { calcSummary, calcAbSummary, calcTeamSummary } from "@/views/wms/report/js/calc"; +import ColumnsSetting from "@/views/wms/report/components/setting/columns.vue"; +import CoilTable from "@/views/wms/report/components/coilTable/index.vue"; export default { name: 'TeamTemplate', @@ -172,7 +124,9 @@ export default { CoilNo, MemoInput, MutiSelect, - WarehouseSelect + WarehouseSelect, + ColumnsSetting, + CoilTable, }, props: { actionTypes: { @@ -209,6 +163,8 @@ export default { return { activeTab: 'loss', + activeColumnConfig: 'coil-report-loss', + settingVisible: false, list: [], lossList: [], queryParams: { @@ -238,7 +194,10 @@ export default { '2019583429955104769', '2019583137616310273' ], - getDayTimeRange + getDayTimeRange, + + lossColumns: [], + outputColumns: [], }; }, watch: { @@ -277,6 +236,11 @@ export default { } }, methods: { + // 加载列设置 + loadColumns() { + this.lossColumns = JSON.parse(localStorage.getItem('preference-tableColumns-coil-report-loss') || '[]') || [] + this.outputColumns = JSON.parse(localStorage.getItem('preference-tableColumns-coil-report-output') || '[]') || [] + }, handleQuery() { this.getList(); this.getLossList(); @@ -386,6 +350,7 @@ export default { mounted() { this.getList(); this.getLossList(); + this.loadColumns(); } }; diff --git a/klp-ui/src/views/wms/report/template/year.vue b/klp-ui/src/views/wms/report/template/year.vue index de632f85..ae74bbb9 100644 --- a/klp-ui/src/views/wms/report/template/year.vue +++ b/klp-ui/src/views/wms/report/template/year.vue @@ -39,6 +39,7 @@ 查询 导出产出钢卷 导出消耗钢卷 + 列设置 @@ -73,73 +74,20 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ scope.row.status === 0 ? '在库' : '已出库' }} - - - - - + + + + 投入明细配置 + 产出明细配置 + + + @@ -155,6 +103,8 @@ import MemoInput from "@/components/MemoInput"; import MutiSelect from "@/components/MutiSelect"; import WarehouseSelect from "@/components/KLPService/WarehouseSelect"; import { calcSummary, calcAbSummary } from "@/views/wms/report/js/calc"; +import ColumnsSetting from "@/views/wms/report/components/setting/columns.vue"; +import CoilTable from "@/views/wms/report/components/coilTable/index.vue"; export default { name: 'YearTemplate', @@ -165,6 +115,8 @@ export default { MemoInput, MutiSelect, WarehouseSelect, + ColumnsSetting, + CoilTable, }, props: { actionTypes: { @@ -214,6 +166,8 @@ export default { return { activeTab: 'loss', + activeColumnConfig: 'coil-report-loss', + settingVisible: false, list: [], lossList: [], queryParams: { @@ -242,7 +196,10 @@ export default { '2019583429955104769', '2019583137616310273', ], - getDayTimeRange // 挂载时间范围生成函数 + getDayTimeRange, // 挂载时间范围生成函数 + + lossColumns: [], + outputColumns: [], } }, watch: { @@ -264,6 +221,11 @@ export default { } }, methods: { + // 加载列设置 + loadColumns() { + this.lossColumns = JSON.parse(localStorage.getItem('preference-tableColumns-coil-report-loss') || '[]') || [] + this.outputColumns = JSON.parse(localStorage.getItem('preference-tableColumns-coil-report-output') || '[]') || [] + }, // 日期变更处理:更新开始/结束时间 handleDateChange(date) { if (!date) return @@ -381,6 +343,7 @@ export default { mounted() { this.getList() this.getLossList() + this.loadColumns() } } diff --git a/klp-ui/src/views/wms/seal/seal.vue b/klp-ui/src/views/wms/seal/seal.vue index a64856ff..53c2c0dc 100644 --- a/klp-ui/src/views/wms/seal/seal.vue +++ b/klp-ui/src/views/wms/seal/seal.vue @@ -5,7 +5,7 @@ 用印申请 - + @@ -223,7 +223,12 @@ export default { }) }, goDetail(row) { - this.$router.push({ path: '/job/sealDetail', query: { bizId: row.bizId } }) + // if (row.applyType === 'seal') { + this.$router.push({ + path: `/wms/seal/sealDetail/${row.bizId}` + }) + return + // } }, canPreviewReceipt(row) { return row.status === 'approved' && row.receiptFileIds diff --git a/klp-ui/src/views/wms/seal/sealDetail.vue b/klp-ui/src/views/wms/seal/sealDetail.vue index 3ea12caf..e1ce5aa3 100644 --- a/klp-ui/src/views/wms/seal/sealDetail.vue +++ b/klp-ui/src/views/wms/seal/sealDetail.vue @@ -150,6 +150,7 @@