Browse Source

2025-09-28

pda 其它入库 其它出库
master
fengyuan_yang 4 months ago
parent
commit
d59f0ca831
  1. 5
      src/api/po/po.js
  2. 14
      src/views/modules/other-transaction/other-inbound.vue
  3. 192
      src/views/modules/other-transaction/other-outbound.vue

5
src/api/po/po.js

@ -31,9 +31,6 @@ export const confirmUnqualifiedProcess = data => createAPI(`inspection/confirmUn
// 确认其它入库 // 确认其它入库
export const confirmOtherInbound = data => createAPI(`other/confirmOtherInbound`,'post',data) export const confirmOtherInbound = data => createAPI(`other/confirmOtherInbound`,'post',data)
// 获取其它入库历史
export const getOtherInboundHistory = data => createAPI(`other/getOtherInboundHistory`,'post',data)
// 确认其它出库 // 确认其它出库
export const confirmOtherOutbound = data => createAPI(`other/confirmOtherOutbound`,'post',data) export const confirmOtherOutbound = data => createAPI(`other/confirmOtherOutbound`,'post',data)
@ -47,4 +44,4 @@ export const printLabel = data => createAPI('/label/setting/printLabel','post',d
export const getPoReceiveRecords = data => createAPI(`po/getPoReceiveRecords`,'post',data) export const getPoReceiveRecords = data => createAPI(`po/getPoReceiveRecords`,'post',data)
// 根据接收单号获取HandlingUnit列表 // 根据接收单号获取HandlingUnit列表
export const getHandlingUnitsByReceiptNo = data => createAPI(`po/getHandlingUnitsByReceiptNo`,'post',data)
export const getHandlingUnitsByReceiptNo = data => createAPI(`po/getHandlingUnitsByReceiptNo`,'post',data)

14
src/views/modules/other-transaction/other-inbound.vue

@ -121,6 +121,11 @@
<span>{{ label.locationId }}</span> <span>{{ label.locationId }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24">
<div class="action-buttons" style="text-align: right; margin-top: 8px;">
<el-button size="mini" type="danger" @click="removeLabel(label)">删除</el-button>
</div>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
@ -257,6 +262,15 @@ export default {
} }
}, },
//
removeLabel(label) {
const index = this.scannedItems.indexOf(label);
if (index > -1) {
this.scannedItems.splice(index, 1);
this.$message.success('删除成功');
}
},
// //
confirmInbound() { confirmInbound() {

192
src/views/modules/other-transaction/other-outbound.vue

@ -74,45 +74,47 @@
</div> </div>
</div> </div>
<!-- 扫描的HandlingUnit列表 -->
<!-- 扫描的HandlingUnit明细列表 -->
<div class="scanned-items" v-if="scannedItems.length > 0" style="margin: 2px;"> <div class="scanned-items" v-if="scannedItems.length > 0" style="margin: 2px;">
<div class="label-list"> <div class="label-list">
<el-form label-position="top" style="margin: 3px;"> <el-form label-position="top" style="margin: 3px;">
<el-row :gutter="5" v-for="(label, index) in scannedItems" :key="label.id"
<el-row :gutter="5"
v-for="(label, index) in scannedItems"
:key="label.id"
:class="index < scannedItems.length - 1 ? 'bottom-line-row' : ''" :class="index < scannedItems.length - 1 ? 'bottom-line-row' : ''"
style="border: 1px solid #e0e0e0; border-radius: 4px; margin-bottom: 8px; padding: 8px;"> style="border: 1px solid #e0e0e0; border-radius: 4px; margin-bottom: 8px; padding: 8px;">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="HandlingUnit" style="margin-bottom: 3px;">
<el-input :value="label.unitId" readonly size="mini" style="font-size: 11px; color: #666;"></el-input>
<el-form-item label="HandlingUnit">
<span>{{ label.unitId }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="当前库位" style="margin-bottom: 3px;">
<el-input :value="label.locationId" readonly size="mini" style="font-size: 11px; color: #666;"></el-input>
<el-col :span="8">
<el-form-item label="物料编码">
<span>{{ label.partNo }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="物料号" style="margin-bottom: 3px;">
<el-input :value="label.partNo" readonly size="mini" style="font-size: 11px; color: #666;"></el-input>
<el-col :span="4">
<el-form-item label="数量">
<span>{{ label.qty }} {{ label.unit || '个' }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="批次号" style="margin-bottom: 3px;">
<el-input :value="label.batchNo" readonly size="mini" style="font-size: 11px; color: #666;"></el-input>
<el-col :span="24" v-if="label.partDesc">
<el-form-item label="物料描述">
<span>{{ label.partDesc }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24">
<el-form-item label="物料描述" style="margin-bottom: 3px;">
<el-input :value="label.partDesc" readonly size="mini" style="font-size: 11px; color: #666;"></el-input>
<el-col :span="12" v-if="label.batchNo">
<el-form-item label="批次号">
<span>{{ label.batchNo }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="数量" style="margin-bottom: 0;">
<el-input :value="label.qty + ' ' + label.unit" readonly size="mini" style="font-size: 11px; color: #666;"></el-input>
<el-col :span="12" v-if="label.locationId">
<el-form-item label="库位">
<span>{{ label.locationId }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<div class="action-buttons" style="text-align: right; margin-top: 18px;">
<el-col :span="24">
<div class="action-buttons" style="text-align: right; margin-top: 8px;">
<el-button size="mini" type="danger" @click="removeLabel(label)">删除</el-button> <el-button size="mini" type="danger" @click="removeLabel(label)">删除</el-button>
</div> </div>
</el-col> </el-col>
@ -130,8 +132,12 @@
<!-- 底部操作按钮 --> <!-- 底部操作按钮 -->
<div class="bottom-actions" v-if="scannedItems.length > 0"> <div class="bottom-actions" v-if="scannedItems.length > 0">
<button class="action-btn primary" @click="confirmOutbound">确认出库</button>
<button class="action-btn" @click="cancelProcess">取消</button>
<button class="action-btn primary" @click="confirmOutbound">
确认其它出库
</button>
<button class="action-btn secondary" style="margin-left: 10px;" @click="cancelProcess">
取消
</button>
</div> </div>
</div> </div>
</div> </div>
@ -325,8 +331,11 @@ export default {
const hours = now.getHours().toString().padStart(2, '0'); const hours = now.getHours().toString().padStart(2, '0');
const minutes = now.getMinutes().toString().padStart(2, '0'); const minutes = now.getMinutes().toString().padStart(2, '0');
const seconds = now.getSeconds().toString().padStart(2, '0'); const seconds = now.getSeconds().toString().padStart(2, '0');
this.outboundForm.operateTime = year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds; this.outboundForm.operateTime = year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds;
//
this.outboundForm.operatorName = localStorage.getItem('userName') || '系统用户';
} }
}, },
mounted() { mounted() {
@ -341,6 +350,32 @@ export default {
</script> </script>
<style scoped> <style scoped>
/* 复用其它入库的样式 */
.pda-container {
width: 100%;
height: 100vh;
display: flex;
flex-direction: column;
overflow: hidden;
}
.status-bar {
background: #17B3A3;
color: white;
padding: 8px 16px;
display: flex;
justify-content: space-between;
align-items: center;
height: 40px;
min-height: 40px;
}
.goBack {
cursor: pointer;
font-size: 16px;
font-weight: 500;
}
/* 搜索容器样式 */ /* 搜索容器样式 */
.search-container { .search-container {
padding: 12px 16px; padding: 12px 16px;
@ -355,24 +390,32 @@ export default {
margin-right: 12px; margin-right: 12px;
} }
.compact-input .el-input__inner {
/* 紧凑型输入框样式 */
.compact-input ::v-deep .el-input__inner {
height: 36px; height: 36px;
line-height: 36px;
padding: 0 12px 0 35px;
font-size: 14px; font-size: 14px;
border-radius: 4px;
} }
/* 模式切换按钮样式 */
.compact-input ::v-deep .el-input__prefix {
left: 10px;
}
.compact-input ::v-deep .el-input__suffix {
right: 30px;
}
/* 模式切换开关 */
.mode-switch { .mode-switch {
display: flex;
align-items: center;
position: relative; position: relative;
display: inline-block;
} }
.custom-switch { .custom-switch {
transform: scale(1.3); transform: scale(1.3);
} }
/* 中间文字 */
.switch-text { .switch-text {
position: absolute; position: absolute;
left: 25%; left: 25%;
@ -536,88 +579,81 @@ export default {
} }
.empty-labels { .empty-labels {
padding: 20px;
text-align: center;
color: #999;
background: white; background: white;
margin: 0 16px 12px;
border-radius: 0 0 8px 8px;
overflow: hidden;
margin: 0 16px;
border-radius: 8px;
} }
/* 底部操作按钮 */ /* 底部操作按钮 */
.bottom-actions { .bottom-actions {
display: flex; display: flex;
gap: 12px;
justify-content: center;
padding: 16px; padding: 16px;
gap: 20px;
background: white; background: white;
margin: 0 16px 12px;
border-radius: 8px;
margin-top: auto;
} }
.action-btn { .action-btn {
flex: 1; flex: 1;
max-width: 120px;
height: 40px;
border: none;
border-radius: 6px;
padding: 12px;
border: 1px solid #17B3A3;
background: #17B3A3;
color: white;
border-radius: 20px;
font-size: 14px; font-size: 14px;
font-weight: 500;
cursor: pointer; cursor: pointer;
transition: all 0.3s;
transition: all 0.2s ease;
} }
.action-btn.primary {
background: #17B3A3;
color: white;
.action-btn.secondary {
background: white;
color: #17B3A3;
} }
.action-btn.primary:hover {
background: #13a094;
.action-btn:hover {
background: #0d8f7f;
border-color: #0d8f7f;
} }
.action-btn:not(.primary) {
background: #f5f5f5;
color: #666;
border: 1px solid #ddd;
.action-btn.secondary:hover {
background: #17B3A3;
color: white;
} }
.action-btn:not(.primary):hover {
background: #e9e9e9;
.action-btn:active {
transform: scale(0.98);
} }
/* 响应式设计 */ /* 响应式设计 */
@media (max-width: 360px) { @media (max-width: 360px) {
.search-container {
.status-bar {
padding: 8px 12px; padding: 8px 12px;
} }
.search-container .el-input {
width: 200px;
}
.form-row {
flex-direction: column;
gap: 8px;
.search-container {
padding: 8px 12px;
} }
.material-info-card { .material-info-card {
margin: 4px 12px; margin: 4px 12px;
padding: 6px 16px;
} }
.section-title {
margin: 0 12px;
margin-top: 4px;
}
.label-list {
margin: 0 12px 12px;
.item-list {
margin: 0 12px 8px;
} }
.empty-labels {
margin: 0 12px 12px;
.form-row {
gap: 8px;
margin-bottom: 8px;
} }
.bottom-actions {
margin: 0 12px 12px;
.form-label {
font-size: 10px;
margin-bottom: 2px;
} }
} }
</style> </style>
Loading…
Cancel
Save