Browse Source

移库

master
han\hanst 3 months ago
parent
commit
05ce638829
  1. 12
      src/views/main.vue
  2. 67
      src/views/modules/other-transaction/inventory-move.vue
  3. 23
      src/views/modules/recv/inspectionResults.vue
  4. 3
      src/views/modules/recv/recv.vue
  5. 3
      src/views/modules/recv/reprint-label.vue
  6. 7
      src/views/modules/recv/unqualifiedProcess.vue

12
src/views/main.vue

@ -73,6 +73,12 @@
<span class="section-title">拣货出库</span>
</div>
<div class="button-grid">
<div class="menu-item" @click="navigateWithWarehouseCheck('inventory-move')">
<div class="menu-icon inventory-move">
<van-icon name="exchange" size="24" />
</div>
<div class="menu-text">移库</div>
</div>
<div class="menu-item" @click="navigateWithWarehouseCheck('otherinout')">
<div class="menu-icon other">
<van-icon name="exchange" size="24" />
@ -97,8 +103,6 @@
</div>
<div class="menu-text">委外发料</div>
</div>
</div>
<div class="button-grid" style="margin-top: 8px;">
<div class="menu-item disabled" @click="handleDisabledFeature('saleshipping')">
<div class="menu-icon sales-delivery">
<van-icon name="logistics" size="24" />
@ -688,6 +692,10 @@ export default {
background: linear-gradient(135deg, #17B3A3 0%, #1dc5ef 100%);
}
.menu-icon.inventory-move {
background: linear-gradient(135deg, #17B3A3 0%, #1dc5ef 100%);
}
.menu-text {
font-size: 11px;
color: #333;

67
src/views/modules/other-transaction/inventory-move.vue

@ -107,10 +107,11 @@
<!-- 底部操作按钮 -->
<div class="bottom-actions" v-if="scannedItems.length > 0">
<button class="action-btn primary" @click="confirmMove">
确认移库
<button class="action-btn primary" @click="confirmMove" :disabled="loading">
<i v-if="loading" class="el-icon-loading"></i>
{{ loading ? '移库中...' : '确认移库' }}
</button>
<button class="action-btn secondary" style="margin-left: 10px;" @click="cancelProcess">
<button class="action-btn secondary" style="margin-left: 10px;" @click="cancelProcess" :disabled="loading">
取消
</button>
</div>
@ -132,7 +133,8 @@ export default {
targetLocationId: ''
},
scannedItems: [],
site: localStorage.getItem('site') || 'SITE01'
site: localStorage.getItem('site') || 'SITE01',
loading: false
};
},
methods: {
@ -307,8 +309,12 @@ export default {
scannedItems: this.scannedItems
};
// loading
this.loading = true;
// API
confirmInventoryMove(params).then(({ data }) => {
this.loading = false;
if (data && data.code === 0) {
this.$message({
message: '移库成功!处理单元: ' + handlingUnitIds.length + '个',
@ -316,19 +322,43 @@ export default {
duration: 3000
});
//
setTimeout(() => {
this.$router.push({ path: '/otherinout' });
}, 1000);
//
this.clearPageContent();
} else {
this.$message.error(data.msg || '移库失败');
}
}).catch(error => {
this.loading = false;
console.error('移库失败:', error);
this.$message.error('移库失败,请重试');
});
},
//
clearPageContent() {
//
this.moveForm = {
moveReason: '',
targetLocationId: ''
};
//
this.scannedItems = [];
//
this.scanCode = '';
//
this.isRemoveMode = false;
//
this.$nextTick(() => {
if (this.$refs.scanInput) {
this.$refs.scanInput.focus();
}
});
},
//
cancelProcess() {
if (this.scannedItems.length > 0) {
@ -656,6 +686,27 @@ export default {
transform: scale(0.98);
}
.action-btn:disabled {
background: #c0c4cc !important;
border-color: #c0c4cc !important;
color: white !important;
cursor: not-allowed !important;
transform: none !important;
box-shadow: none !important;
}
.action-btn:disabled:hover {
background: #c0c4cc !important;
transform: none !important;
box-shadow: none !important;
}
.action-btn.secondary:disabled {
background: #f5f7fa !important;
color: #c0c4cc !important;
border-color: #e4e7ed !important;
}
/* 响应式设计 */
@media (max-width: 360px) {
.status-bar {

23
src/views/modules/recv/inspectionResults.vue

@ -127,15 +127,7 @@ export default {
if (!this.scanCode.trim()) {
return;
}
// HandlingUnit
if (this.scanCode.startsWith('PO') || this.scanCode.startsWith('REC')) {
//
this.searchUnqualifiedList();
} else {
// HandlingUnit
this.scanHandlingUnit();
}
},
//
@ -264,7 +256,10 @@ export default {
const typeMap = {
'RETURN': '退货',
'SCRAP': '报废',
'EXCHANGE': '换货'
'EXCHANGE': '换货',
'RETWORK': '退货',
'INVSCRAP': '报废',
'REWORK': '换货'
};
return typeMap[processType] || '未知';
},
@ -274,7 +269,10 @@ export default {
const labelMap = {
'RETURN': '退货数量',
'SCRAP': '报废数量',
'EXCHANGE': '换货数量'
'EXCHANGE': '换货数量',
'RETWORK': '退货数量',
'INVSCRAP': '报废数量',
'REWORK': '换货数量'
};
return labelMap[processType] || '数量';
},
@ -284,7 +282,10 @@ export default {
const styleMap = {
'RETURN': 'color: #E6A23C; font-weight: 500;', //
'SCRAP': 'color: #F56C6C; font-weight: 500;', //
'EXCHANGE': 'color: #409EFF; font-weight: 500;' //
'EXCHANGE': 'color: #409EFF; font-weight: 500;', //
'RETWORK': 'color: #E6A23C; font-weight: 500;', //
'INVSCRAP': 'color: #F56C6C; font-weight: 500;', //
'REWORK': 'color: #409EFF; font-weight: 500;' //
};
return styleMap[processType] || 'color: #666; font-weight: 500;';
},

3
src/views/modules/recv/recv.vue

@ -370,7 +370,8 @@ export default {
username: localStorage.getItem('userName'),
site: localStorage.getItem('site'),
receiptNo: receiptNo,
needCheck:needCheck
needCheck:needCheck,
printLabel:"BIL标签"
}
const { data } = await printLabel(printRequest)
if (data.code === 200) {

3
src/views/modules/recv/reprint-label.vue

@ -245,7 +245,8 @@ export default {
userId: localStorage.getItem('userName'),
username: localStorage.getItem('userName'),
site: localStorage.getItem('site'),
unitId: unitId
unitId: unitId,
printLabel:"BIL标签"
}
const { data } = await printLabel(printRequest)
if (data.code === 200) {

7
src/views/modules/recv/unqualifiedProcess.vue

@ -217,7 +217,7 @@ export default {
validateAndAddLabel(unitId) {
const params = {
unitId: unitId,
site: this.$store.state.user.site,
site: localStorage.getItem('site'),
};
scanHandlingUnitLabel(params).then(({ data }) => {
@ -237,11 +237,6 @@ export default {
return;
}
if (huInfo.orderRef2 !== this.processInfo.transNo) {
this.$message.error('该HandlingUnit不属于当前接收单,请检查');
return;
}
//
if (this.processInfo.partNo && huInfo.partNo !== this.processInfo.partNo) {
this.$message.error('物料编码不匹配,请检查');

Loading…
Cancel
Save