diff --git a/src/views/firstOrder/components/approvalProcessDialog.vue b/src/views/firstOrder/components/approvalProcessDialog.vue index ccddb62..002be0f 100644 --- a/src/views/firstOrder/components/approvalProcessDialog.vue +++ b/src/views/firstOrder/components/approvalProcessDialog.vue @@ -92,7 +92,7 @@ export default { margin: 0 auto 0 } -:deep(.el-dialog__body) { - height: 300px; -} +// :deep(.el-dialog__body) { +// height: 300px; +// } diff --git a/src/views/firstOrder/components/inDialog.vue b/src/views/firstOrder/components/inDialog.vue index f4b79c0..b4fe825 100644 --- a/src/views/firstOrder/components/inDialog.vue +++ b/src/views/firstOrder/components/inDialog.vue @@ -91,16 +91,24 @@ + - + + + @@ -189,6 +207,10 @@ + s @@ -220,11 +242,10 @@ - - @@ -233,7 +254,8 @@ @@ -245,7 +267,8 @@ @@ -435,6 +458,7 @@ export default { // const randomNum = Math.floor(Math.random() * 100000000) + 1; // this.sizeForm.orderNo = String(randomNum).padStart(8, '0');//入库单号 this.sizeForm.inDate = new Date()//入库时间 + this.sizeForm.inTableData.theInboundQuantity = 0 }, //取消操作 handleCloseDetail() { @@ -450,7 +474,7 @@ export default { status: '',// materialId: '', materialName: '', - theInboundQuantity: 1, + theInboundQuantity: 0, unitPrice: 0, }) } else { @@ -465,7 +489,7 @@ export default { status: '',// materialId: '', materialName: '', - theInboundQuantity: 1, + theInboundQuantity: 0, unitPrice: 0, }; this.sizeForm.singleData.push(newRow); @@ -564,8 +588,8 @@ export default { this.$message.error("物资名称不能为空"); return; } - if (!row.theInboundQuantity || row.theInboundQuantity <= 0) { - this.$message.error("本次入库数量必须大于0"); + if (!row.theInboundQuantity || row.theInboundQuantity < 0) { + this.$message.error("本次入库数量不能为空"); return; } if (row.unitPrice === undefined || row.unitPrice < 0) { @@ -594,8 +618,8 @@ export default { this.$message.error("物资名称不能为空"); return; } - if (!row.theInboundQuantity || row.theInboundQuantity <= 0) { - this.$message.error("本次入库数量必须大于0"); + if (!row.theInboundQuantity || row.theInboundQuantity < 0) { + this.$message.error("本次入库数量不能为空"); return; } if (row.unitPrice === undefined || row.unitPrice <= 0) { @@ -636,7 +660,7 @@ export default { } else { this.$message.error(res.data.message || "提交失败"); } - } catch (error) { + } catch (error) { this.$message.error(error.message || "服务器错误"); } @@ -653,7 +677,7 @@ export default { // type类别选择变更 handleTypeChange(row) { if (row.type === 'YH') { - // 检查单价是否大于600 + // row.unitPrice = null; if (Number(row.unitPrice) > 600) { this.$confirm('单价大于600元,确定要选择为易耗品吗?', '提示', { confirmButtonText: '确定', @@ -681,4 +705,9 @@ export default { font-weight: 600; padding: 18px 0; } + +::v-deep .el-table td, +::v-deep .el-table th { + text-align: center !important; +} diff --git a/src/views/firstOrder/components/outDialog.vue b/src/views/firstOrder/components/outDialog.vue index 20a873f..4e014b8 100644 --- a/src/views/firstOrder/components/outDialog.vue +++ b/src/views/firstOrder/components/outDialog.vue @@ -39,6 +39,15 @@ + + + + 易耗品 + 耐用品 + 全部 + + + @@ -69,6 +78,11 @@ {{ scope.row.type === "NY" ? "耐用品" : (scope.row.type === "YH" ? "易耗品" : "") }} + + + @@ -91,17 +105,11 @@ -
出库账目表格:
@@ -117,6 +125,11 @@ {{ scope.row.type === "NY" ? "耐用品" : (scope.row.type === "YH" ? "易耗品" : "") }} + + + - @@ -170,6 +179,15 @@ + + + + 易耗品 + 耐用品 + 全部 + + + @@ -206,12 +224,12 @@ {{ scope.row.outboundQuantity || 0 }} - +
@@ -259,8 +277,9 @@ export default { inTableData: [], ldOneOutStorageDetailVOList: [], demandEndInfo: '',//需求单名称 - outDate: '',//出库日期 + outDate: '',//出库时间 options: 2,//出库类型 + radio: 1, // 1易耗品 2耐用品 materialType: '1',//物资类型 status: '',//1暂存 2提交 // materialld: '',//物资Id @@ -269,7 +288,6 @@ export default { name: "用户名称" }, }, - uniqueListDialogVisible: false, // 新增:控制弹窗显示 uniqueList: [], goodsList: [], goodsSelectList: [], @@ -289,8 +307,11 @@ export default { const now = new Date() const year = now.getFullYear(); const month = String(now.getMonth() + 1).padStart(2, '0'); - const day = String(now.getDate()).padStart(2, '0'); - return `${year}年${month}月${day}日`; + const day = String(now.getDate()).padStart(2, '0') + const hour = String(now.getHours()).padStart(2, '0') + const minute = String(now.getMinutes()).padStart(2, '0') + const second = String(now.getSeconds()).padStart(2, '0') + return `${year}-${month}-${day} ${hour}:${minute}:${second}` } }, mounted() { @@ -304,6 +325,9 @@ export default { this.getMaterialList() }, methods: { + addInit() { + this.sizeForm.outDate = new Date()//出库时间 + }, //本次出库数量 syncInboundQuantity(row) { row.theOutboundQuantity = Number(row.theOutboundQuantity); @@ -377,12 +401,12 @@ export default { }) if (res.data && res.data.result) { - this.sizeForm.inTableData = res.data.result.duplicateList + this.sizeForm.inTableData = res.data.result.uniqueList const selectedDept = this.departmentList.find( dept => dept.departmentId === this.inBatchForm.department ); const deptName = selectedDept ? selectedDept.department : ''; - this.sizeForm.inTableData = res.data.result.duplicateList.map(item => ({ + this.sizeForm.inTableData = res.data.result.uniqueList.map(item => ({ ...item, IdDemandEndld: this.inBatchForm.batchType, // department: this.inBatchForm.department, @@ -395,10 +419,14 @@ export default { if (selectedQuarter) { this.sizeForm.demandEndInfo = selectedQuarter.quarterName; } - if (res.data.result.uniqueList != null && res.data.result.uniqueList.length > 0) { - this.goodsVisible = true - this.goodsList = res.data.result.uniqueList + //当radio是全部的时候 弹弹窗 + if (this.sizeForm.radio === 3) { + if (res.data.result.duplicateList != null && res.data.result.duplicateList.length > 0) { + this.goodsVisible = true + this.goodsList = res.data.result.duplicateList + } } + } else { this.$message.warning('未获取到详细数据'); } @@ -516,7 +544,6 @@ export default { try { const res = await editList(this.id); const { ldOneOutStorage, ldOneOutStorageDetails = [] } = res.data.result || {}; - if (!ldOneOutStorage) { this.$message.error("回显数据异常"); return; @@ -534,20 +561,18 @@ export default { this.sizeForm.inTableData = handledDetailList; } catch (error) { - console.error("回显失败:", error); this.$message.error("获取详情数据失败"); } } }, - addInit() { - this.sizeForm.outDate = new Date()//出库时间 - }, + // 添加出库数据 inTableAdd() { this.sizeForm.inTableData.push({}) }, // 选项选择 async radioChange() { + // this.resetAllForms() this.sizeForm.inTableData = [] if (this.sizeForm.options === 1) { await this.getQuarterList() @@ -556,6 +581,7 @@ export default { } }, + }, watch: { // 监听需求单选择变化 diff --git a/src/views/firstOrder/inbound.vue b/src/views/firstOrder/inbound.vue index 33db46f..4bab6b5 100644 --- a/src/views/firstOrder/inbound.vue +++ b/src/views/firstOrder/inbound.vue @@ -73,6 +73,7 @@ v-if="approvalProcessShow" @closeDialog="closeDialog" :approveList="approveList" + :id="id" > diff --git a/src/views/firstOrder/list.vue b/src/views/firstOrder/list.vue index abb4129..944dd5d 100644 --- a/src/views/firstOrder/list.vue +++ b/src/views/firstOrder/list.vue @@ -11,8 +11,9 @@ + + :append-to-body="true" > @@ -21,11 +22,11 @@ - + - + @@ -34,11 +35,7 @@