6 changed files with 2429 additions and 1045 deletions
-
6src/api/production/production-return.js
-
2src/router/index.js
-
1362src/views/modules/production-return/productionReturnPDA.vue
-
1908src/views/modules/production-return/productionReturnPDAIssueList.vue
-
156src/views/modules/production-return/productionReturnPDAList.vue
-
40src/views/modules/production-return/productionReturnPicking.vue
1362
src/views/modules/production-return/productionReturnPDA.vue
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
1908
src/views/modules/production-return/productionReturnPDAIssueList.vue
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,156 @@ |
|||||
|
<template> |
||||
|
<div class="pda-container"> |
||||
|
<!-- 头部栏 --> |
||||
|
<div class="header-bar"> |
||||
|
<div class="header-left" @click="$router.back()"> |
||||
|
<i class="el-icon-arrow-left"></i> |
||||
|
<span>退仓 - 领料记录</span> |
||||
|
</div> |
||||
|
<div class="header-right" @click="$router.push({ path: '/' })">首页</div> |
||||
|
</div> |
||||
|
<div class="search-container"> |
||||
|
<div class="card-title"> |
||||
|
<label class="title-label">工单号:{{ workOrderNo }}</label> |
||||
|
</div> |
||||
|
<div class="card-title"> |
||||
|
<label class="title-label">物料编码:{{ partNo }}</label> |
||||
|
</div> |
||||
|
<div class="card-title"> |
||||
|
<label class="title-label">退料数量:{{ unissureQty }}</label> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="content-area"> |
||||
|
<div class="work-order-list" v-if="issueList.length > 0"> |
||||
|
<div |
||||
|
v-for="(item, index) in issueList" |
||||
|
:key="index" |
||||
|
class="material-card" |
||||
|
@click="goDetail(item)" |
||||
|
> |
||||
|
<div class="card-title"> |
||||
|
<span class="title-label"> |
||||
|
物料编码:{{ partNo }} 领料号:{{ item.TRANSACTION_ID }} |
||||
|
</span> |
||||
|
</div> |
||||
|
<div class="part-desc-row"> |
||||
|
<span class="desc-text">批次号:{{ item.LOT_BATCH_NO || '-' }}</span> |
||||
|
</div> |
||||
|
<div class="card-details"> |
||||
|
<div class="detail-item"> |
||||
|
<div class="detail-label">领料数量</div> |
||||
|
<div class="detail-value">{{ item.QUANTITY }}</div> |
||||
|
</div> |
||||
|
<div class="detail-item"> |
||||
|
<div class="detail-label">撤销数量</div> |
||||
|
<div class="detail-value">{{ item.QTY_REVERSED || 0 }}</div> |
||||
|
</div> |
||||
|
<div class="detail-item"> |
||||
|
<div class="detail-label">单位</div> |
||||
|
<div class="detail-value">{{ item.uom || '个' }}</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div v-if="!loading && issueList.length === 0" class="empty-state"> |
||||
|
<i class="el-icon-box"></i> |
||||
|
<p>暂无领料记录</p> |
||||
|
</div> |
||||
|
|
||||
|
<div v-if="loading" class="loading-state"> |
||||
|
<i class="el-icon-loading"></i> |
||||
|
<p>加载中...</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { getUnissueMatericalForShopOrder } from '@/api/production/production-return'; |
||||
|
|
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
workOrderNo: '', |
||||
|
partNo: '', |
||||
|
loading: false, |
||||
|
issueList: [], |
||||
|
unissureQty: 0, |
||||
|
}; |
||||
|
}, |
||||
|
methods: { |
||||
|
loadIssueList() { |
||||
|
if (!this.workOrderNo || !this.partNo) { |
||||
|
return; |
||||
|
} |
||||
|
this.loading = true; |
||||
|
const params = { |
||||
|
workOrderNo: this.workOrderNo, |
||||
|
site: this.$store.state.user.site, |
||||
|
partNo: this.partNo, |
||||
|
}; |
||||
|
getUnissueMatericalForShopOrder(params) |
||||
|
.then(({ data }) => { |
||||
|
this.loading = false; |
||||
|
if (data && data.code === 0) { |
||||
|
this.issueList = data.issueForShopOrder || []; |
||||
|
} else { |
||||
|
this.$message.error(data.msg || '获取领料记录失败'); |
||||
|
this.issueList = []; |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
this.loading = false; |
||||
|
this.$message.error('获取领料记录失败'); |
||||
|
}); |
||||
|
}, |
||||
|
goDetail(item) { |
||||
|
this.$router.push({ |
||||
|
name: 'productionReturnPDAIssueList', |
||||
|
params: { |
||||
|
orderNo: this.workOrderNo, |
||||
|
orderType: 'workOrder', |
||||
|
partNo: this.partNo, |
||||
|
transactionId: item.TRANSACTION_ID, |
||||
|
quantity: item.QUANTITY, |
||||
|
batchNo: item.LOT_BATCH_NO, |
||||
|
}, |
||||
|
}); |
||||
|
}, |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.workOrderNo = this.$route.params.workOrderNo; |
||||
|
this.partNo = this.$route.params.partNo; |
||||
|
this.unissureQty = this.$route.params.unissureQty; |
||||
|
this.loadIssueList(); |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
.pda-container { width: 100vw; height: 100vh; display: flex; flex-direction: column; background: #f5f5f5; } |
||||
|
.header-bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px; background: #17B3A3; color: white; height: 40px; min-height: 40px; } |
||||
|
.header-left { display: flex; align-items: center; cursor: pointer; font-size: 16px; font-weight: 500; } |
||||
|
.header-left i { margin-right: 8px; font-size: 18px; } |
||||
|
.header-right { cursor: pointer; font-size: 16px; font-weight: 500; } |
||||
|
.content-area { flex: 1; overflow-y: auto; padding: 12px 16px; } |
||||
|
.work-order-list { overflow-y: auto; padding: 12px 16px; } |
||||
|
.material-card { background: white; border-radius: 8px; margin-bottom: 12px; padding: 16px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); cursor: pointer; transition: all 0.2s ease; border: 2px solid transparent; } |
||||
|
.material-card:hover { box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); transform: translateY(-1px); } |
||||
|
.material-card:active { transform: translateY(0); } |
||||
|
.card-title { margin-bottom: 12px; } |
||||
|
.title-label { font-size: 12px; color: #666; display: block; margin-bottom: 4px; } |
||||
|
.part-desc-row { margin-bottom: 12px; padding: 0 4px; } |
||||
|
.desc-text { font-size: 12px; color: #666; line-height: 1.3; word-break: break-all; } |
||||
|
.card-details { display: flex; justify-content: space-between; align-items: flex-start; gap: 4px; } |
||||
|
.detail-item { flex: 1; text-align: center; min-width: 50px; max-width: 70px; } |
||||
|
.detail-label { font-size: 11px; color: #666; margin-bottom: 4px; line-height: 1.2; margin-left: -12px; } |
||||
|
.detail-value { font-size: 13px; color: #333; line-height: 1.2; margin-left: -12px; } |
||||
|
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: #999; } |
||||
|
.empty-state i { font-size: 48px; margin-bottom: 16px; } |
||||
|
.loading-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: #17B3A3; } |
||||
|
.loading-state i { font-size: 24px; margin-bottom: 12px; animation: spin 1s linear infinite; } |
||||
|
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } |
||||
|
</style> |
||||
|
|
||||
|
|
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue