From be3f5f8497e7cfcfd6c54defcf6e8d7b8b276f18 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Tue, 13 Jan 2026 15:27:26 +0800 Subject: [PATCH] =?UTF-8?q?2026-01-13=20=E8=BF=87=E7=AB=99=E9=87=87?= =?UTF-8?q?=E9=9B=86=E9=A1=B5=E9=9D=A2=E5=88=9B=E5=BB=BA=E5=88=86=E5=8D=B7?= =?UTF-8?q?=E7=9A=84=E5=9B=BA=E5=AE=9A=E8=BD=BD=E5=85=B7=E6=B8=85=E5=8D=95?= =?UTF-8?q?=E5=8A=A0=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/yieldReport/com_separate_roll.vue | 145 ++++++++++++++++++ 1 file changed, 145 insertions(+) diff --git a/src/views/modules/yieldReport/com_separate_roll.vue b/src/views/modules/yieldReport/com_separate_roll.vue index d002519..2b790ae 100644 --- a/src/views/modules/yieldReport/com_separate_roll.vue +++ b/src/views/modules/yieldReport/com_separate_roll.vue @@ -144,6 +144,7 @@ 查询 批量编辑 批量保存 + 新增 + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 保存 + 关闭 + + @@ -233,6 +306,7 @@ validateShiftChangeDataCount,/*校验数据条数*/ saveAbnormalRollData,/*保存异常截卷数据*/ } from '@/api/yieldReport/com_separate_roll.js'; + import { fixedCarrierSave } from '@/api/fixedCarrier/fixedCarrier.js'; /*打印标签专用的js*/ import { @@ -336,6 +410,31 @@ export default { }, editBatchVisible: false, // 批量编辑状态 saveLoading: false, // 保存loading状态 + // 新增固定载具相关 + addCarrierFlag: false, + addCarrierLoading: false, + addCarrierData: { + bu: '', + site: '', + buNo: '', + carrierTypeCode: '', + carrierTypeName: '', + assetNo: '', + specification: '', + purchaseDate: null, + currentLocation: '', + dimensions: '', + availableQty: null, + maxWeight: null, + expectedLifeCycles: null, + expectedLifeDays: null, + status: 1, + remark: '' + }, + addCarrierRules: { + carrierTypeCode: [{ required: true, message: '请输入载具类型编码', trigger: 'blur' }], + carrierTypeName: [{ required: true, message: '请输入载具类型名称', trigger: 'blur' }] + }, hasCachedData: false, // 是否有缓存数据 cachedDataCount: 0, // 缓存数据条数 cachedRowDataList: [], // 缓存的原始行数据(用于校验) @@ -1055,6 +1154,52 @@ export default { }) }, + // 打开新增固定载具对话框 + addCarrierModal() { + console.log(this.scheduleData) + this.addCarrierData = { + bu: this.scheduleData.site + '_' + this.scheduleData.buNo || '', + site: this.scheduleData.site || '', + buNo: this.scheduleData.buNo || '', + carrierTypeCode: '', + carrierTypeName: '', + assetNo: '', + specification: '', + purchaseDate: null, + currentLocation: '', + dimensions: '', + availableQty: null, + maxWeight: null, + expectedLifeCycles: null, + expectedLifeDays: null, + status: 1, + remark: '' + }; + this.addCarrierFlag = true; + }, + + // 保存新增固定载具 + saveAddCarrier() { + this.$refs.addCarrierForm.validate((valid) => { + if (valid) { + this.addCarrierLoading = true; + fixedCarrierSave(this.addCarrierData).then(({data}) => { + if (data && data.code === 0) { + this.$message.success('新增成功'); + this.addCarrierFlag = false; + this.queryFixedCarrierList(); + } else { + this.$message.error(data.msg || '新增失败'); + } + }).catch(error => { + this.$message.error('新增失败: ' + error.message); + }).finally(() => { + this.addCarrierLoading = false; + }); + } + }); + }, + // 打印固定载具 printCarrier(row) { const LODOP = getLodop()