diff --git a/src/api/po/po.js b/src/api/po/po.js index b538e17..ba09637 100644 --- a/src/api/po/po.js +++ b/src/api/po/po.js @@ -47,4 +47,13 @@ export const getPoReceiveRecords = data => createAPI(`po/getPoReceiveRecords`,'p export const getHandlingUnitsByReceiptNo = data => createAPI(`po/getHandlingUnitsByReceiptNo`,'post',data) // 确认库存移库 -export const confirmInventoryMove = data => createAPI(`other/confirmInventoryMove`,'post',data) \ No newline at end of file +export const confirmInventoryMove = data => createAPI(`other/confirmInventoryMove`,'post',data) + +// 获取采购订单接收记录列表(检验合格入库用) +export const getPurchaseOrderReceiptList = data => createAPI(`qualified-storage/getPurchaseOrderReceiptList`,'post',data) + +// 校验并获取HandlingUnit信息(检验合格入库用) +export const validateHandlingUnitForQualifiedStorage = data => createAPI(`qualified-storage/validateHandlingUnit`,'post',data) + +// 确认检验合格入库 +export const confirmQualifiedStorage = data => createAPI(`qualified-storage/confirmQualifiedStorage`,'post',data) \ No newline at end of file diff --git a/src/assets/scss/global.scss b/src/assets/scss/global.scss index 687aaca..b6cd4f8 100644 --- a/src/assets/scss/global.scss +++ b/src/assets/scss/global.scss @@ -1,3 +1,56 @@ +/* Element UI Message 组件样式调整 - 适配PDA屏幕 start */ +.el-message { + max-width: 98vw !important; + min-width: 300px !important; + width: auto !important; + word-wrap: break-word !important; + word-break: break-all !important; + white-space: pre-wrap !important; + line-height: 1.4 !important; + padding: 12px 16px !important; + font-size: 14px !important; + left: 30% !important; + transform: translateX(-70%) !important; + margin-left: -30px; +} + +.el-message__content { + max-width: 100% !important; + word-wrap: break-word !important; + word-break: break-all !important; + white-space: pre-wrap !important; + line-height: 1.4 !important; +} + +/* 针对不同类型的message */ +.el-message--error { + max-width: 98vw !important; +} + +.el-message--success { + max-width: 98vw !important; +} + +.el-message--warning { + max-width: 98vw !important; +} + +.el-message--info { + max-width: 98vw !important; +} + +/* 小屏幕下进一步调整message宽度 */ +@media (max-width: 360px) { + .el-message { + max-width: 99vw !important; + min-width: 250px !important; + font-size: 13px !important; + padding: 10px 12px !important; + transform: translateX(-65%) !important; + } +} +/* Element UI Message 组件样式调整 - 适配PDA屏幕 end */ + /* 侧边导航栏 start*/ .el-menu-item, .el-submenu__title { height: 35px; diff --git a/src/views/common/login.vue b/src/views/common/login.vue index 44fc536..5bfc67a 100644 --- a/src/views/common/login.vue +++ b/src/views/common/login.vue @@ -196,7 +196,7 @@ export default { this.$router.replace({ name: 'home' }); } else { - this.$alert("用户名或密码错误", '错误', { + this.$alert(data.msg, '错误', { confirmButtonText: '确定' }); } diff --git a/src/views/modules/other-transaction/inventory-move.vue b/src/views/modules/other-transaction/inventory-move.vue index cd5c247..9e4b38b 100644 --- a/src/views/modules/other-transaction/inventory-move.vue +++ b/src/views/modules/other-transaction/inventory-move.vue @@ -93,6 +93,11 @@ {{ label.qty }} {{ label.unit || '个' }} + + + {{ formatDate(label.expiredDate) }} + + @@ -237,6 +242,28 @@ export default { return; }*/ + // 校验过期日期一致性 + if (this.scannedItems.length > 0) { + const firstItemExpiryDate = this.scannedItems[0].expiredDate; + const currentExpiryDate = huInfo.expiredDate; + + // 如果两个日期都存在且不相等,则不允许添加 + if (firstItemExpiryDate && currentExpiryDate) { + const firstDate = new Date(firstItemExpiryDate).toDateString(); + const currentDate = new Date(currentExpiryDate).toDateString(); + + if (firstDate !== currentDate) { + this.$message.error(`HandlingUnit的过期日期不一致,无法一起移库。已扫描的过期日期:${firstDate},当前扫描的过期日期:${currentDate}`); + return; + } + } + // 如果一个有过期日期,另一个没有,也不允许 + else if (firstItemExpiryDate || currentExpiryDate) { + this.$message.error('HandlingUnit的过期日期不一致,部分有过期日期,部分没有,无法一起移库'); + return; + } + } + // 添加到列表 this.scannedItems.push({ id: Date.now(), @@ -247,7 +274,8 @@ export default { unit: huInfo.unit, batchNo: huInfo.batchNo, locationId: huInfo.locationId, - wdr: huInfo.wdr + wdr: huInfo.wdr, + expiredDate: huInfo.expiredDate }); this.$message.success('扫描成功'); @@ -379,6 +407,21 @@ export default { // 初始化表单数据 initFormData() { // 可以在这里设置其他默认值 + }, + + // 格式化日期显示 + formatDate(dateString) { + if (!dateString) return ''; + try { + const date = new Date(dateString); + return date.toLocaleDateString('zh-CN', { + year: 'numeric', + month: '2-digit', + day: '2-digit' + }); + } catch (error) { + return dateString; + } } }, diff --git a/src/views/modules/recv/qualifiedStorage.vue b/src/views/modules/recv/qualifiedStorage.vue index 52114f2..c2dfbc6 100644 --- a/src/views/modules/recv/qualifiedStorage.vue +++ b/src/views/modules/recv/qualifiedStorage.vue @@ -6,144 +6,192 @@
检验合格入库
🏠首页
-
- + + +
+
+ +
+ {{ scanLoading ? '验证中...' : loadingText }} +
+
+
+ +
+
- +
- -
+
- + - {{ qualifiedDetail.partNo }} + {{ receiptDetail.sourcePartNo }} - {{ qualifiedDetail.transNo }} + {{ receiptDetail.receiptNo }} - 入库 - {{ qualifiedDetail.partDesc }} + {{ receiptDetail.description }} - {{ qualifiedDetail.qualifiedQty }} + {{ receiptDetail.qtyArrived }} - {{ qualifiedDetail.batchNo }} + {{ receiptDetail.senderName }} - {{ qualifiedDetail.orderRef1 }} + {{ receiptDetail.sourceRef1 }} - {{ formatDate(qualifiedDetail.inspectionDate) }} + {{ formatDate(receiptDetail.arrivalDate) }}
- +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

入库信息确认

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - 回退 - - - - - - 确认入库 - - - - - - 退出 - - -
-
+ +
+
+
+
+ + +
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+ +
+ + + {{ '移除' }} + {{ '添加' }} +
+
+ + +
+
+
+
+ + + +
+
+
+
+ + +
+
+ + 扫描信息确认 +
+
+ + +
+
+ + + + + {{ label.unitId }} + + + + + {{ label.partNo }} + + + + + {{ label.partDesc }} + + + + + {{ label.batchNo }} + + + + + {{ label.locationId }} + + + + + {{ label.qty }} {{ label.unit || '个' }} + + + + +
+
+ + +
+
+

暂无扫描HandlingUnit

+
+
+ + +
+ + +
@@ -197,24 +245,23 @@ diff --git a/src/views/modules/recv/recv.vue b/src/views/modules/recv/recv.vue index 6023ca6..d1ac95c 100644 --- a/src/views/modules/recv/recv.vue +++ b/src/views/modules/recv/recv.vue @@ -199,9 +199,9 @@ export default { }); }, async recvLine(row) { - /* if (row.receiveCaseDB!='INVDIR' && row.receiveCaseDB!='QAINV') { + if (row.receiveCaseDB!='INVDIR' && row.receiveCaseDB!='QAINV') { return this.$message.warning("该采购订单行的收货方式为"+row.receiveCase+",无法接收"); - }*/ + } if (row.poStatus === 'Stopped' || row.poStatus === 'Closed' || row.poStatus === 'Cancelled' || row.poStatus === 'Planned') { return this.$message.warning("该采购订单状态为"+row.poStatus+",无法接收"); }