12 changed files with 2243 additions and 256 deletions
-
8src/api/mr/mr.js
-
16src/api/outsourcing/outsourcing-return.js
-
7src/router/index.js
-
8src/views/modules/mr-issue/mrPicking.vue
-
4src/views/modules/mr-issue/mrPickingDetail.vue
-
5src/views/modules/mr-issue/mrPickingReturn.vue
-
9src/views/modules/mr-issue/mrReturnIssueList.vue
-
431src/views/modules/mr-issue/mrReturnPickingDetail.vue
-
6src/views/modules/outsourcing-issue/index.vue
-
399src/views/modules/outsourcing-return/index.vue
-
1444src/views/modules/outsourcing-return/outsourcingReturnPDAIssueList.vue
-
162src/views/modules/outsourcing-return/outsourcingReturnPDAList.vue
@ -0,0 +1,16 @@ |
|||
import { createAPI } from "@/utils/httpRequest.js"; |
|||
|
|||
// 搜索委外订单(用于退料)
|
|||
export const searchOutsourcingOrdersForReturn = data => createAPI(`/pda/outsourcing/return/searchOutsourcingOrdersForReturn`,'post',data) |
|||
|
|||
// 获取委外订单发料记录
|
|||
export const getUnissueMatericalForOutsourcingOrder = data => createAPI(`/pda/outsourcing/return/getUnissueMatericalForOutsourcingOrder`,'post',data) |
|||
|
|||
// 获取委外订单物料详情
|
|||
export const getInventoryPartForOutsourcing = data => createAPI(`/pda/outsourcing/return/getInventoryPartForOutsourcing`,'post',data) |
|||
|
|||
// 扫描委外退料标签
|
|||
export const scanMaterialLabelForOutsourcing = data => createAPI(`/pda/outsourcing/return/scanMaterialLabelForOutsourcing`,'post',data) |
|||
|
|||
// 确认委外退料
|
|||
export const outsourcingReturnUnissueConfirm = data => createAPI(`/pda/outsourcing/return/outsourcingReturnUnissueConfirm`,'post',data) |
|||
@ -0,0 +1,399 @@ |
|||
<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"> |
|||
<el-input |
|||
clearable |
|||
class="compact-input" |
|||
v-model="searchValue" |
|||
placeholder="请扫描委外订单号或物料编码" |
|||
prefix-icon="el-icon-search" |
|||
@keyup.enter.native="handleSearch" |
|||
ref="searchInput" |
|||
/> |
|||
</div> |
|||
|
|||
<!-- 搜索结果列表 --> |
|||
<div class="content-area"> |
|||
<div class="work-order-list" v-if="searchResults.length > 0"> |
|||
<div |
|||
v-for="(item, index) in searchResults" |
|||
:key="index" |
|||
class="material-card" |
|||
@click="goToDetail(item)" |
|||
> |
|||
<div class="card-title"> |
|||
<span class="title-label">委外订单号:{{ item.outsourcingOrderNo }}</span> |
|||
</div> |
|||
<div class="part-desc-row"> |
|||
<span class="desc-text">物料编码:{{ item.partNo }}</span> |
|||
</div> |
|||
<div class="part-desc-row"> |
|||
<span class="desc-text">{{ item.description }}</span> |
|||
</div> |
|||
<div class="card-details"> |
|||
<div class="detail-item"> |
|||
<div class="detail-label">发料数量</div> |
|||
<div class="detail-value">{{ item.issuedQty }}</div> |
|||
</div> |
|||
<div class="detail-item"> |
|||
<div class="detail-label">已退数量</div> |
|||
<div class="detail-value">{{ item.returnedQty || 0 }}</div> |
|||
</div> |
|||
<div class="detail-item"> |
|||
<div class="detail-label">可退数量</div> |
|||
<div class="detail-value">{{ item.returnableQty }}</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div v-if="!loading && searchResults.length === 0 && hasSearched" 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 v-if="!hasSearched" class="welcome-state"> |
|||
<i class="el-icon-search"></i> |
|||
<p>请输入委外订单号或物料编码进行搜索</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { searchOutsourcingOrdersForReturn } from '@/api/outsourcing/outsourcing-return'; |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
searchValue: '', |
|||
searchResults: [], |
|||
loading: false, |
|||
hasSearched: false, |
|||
}; |
|||
}, |
|||
methods: { |
|||
handleSearch() { |
|||
if (!this.searchValue.trim()) { |
|||
this.$message.warning('请输入搜索内容'); |
|||
return; |
|||
} |
|||
|
|||
this.loading = true; |
|||
this.hasSearched = true; |
|||
|
|||
const params = { |
|||
searchValue: this.searchValue.trim(), |
|||
site: this.$store.state.user.site, |
|||
}; |
|||
|
|||
searchOutsourcingOrdersForReturn(params) |
|||
.then(({ data }) => { |
|||
this.loading = false; |
|||
if (data && data.code === 0) { |
|||
this.searchResults = data.orders || []; |
|||
if (this.searchResults.length === 0) { |
|||
this.$message.info('未找到相关委外订单'); |
|||
} |
|||
} else { |
|||
this.$message.error(data.msg || '搜索失败'); |
|||
this.searchResults = []; |
|||
} |
|||
}) |
|||
.catch(() => { |
|||
this.loading = false; |
|||
this.$message.error('搜索失败'); |
|||
this.searchResults = []; |
|||
}); |
|||
}, |
|||
|
|||
goToDetail(item) { |
|||
if (item.returnableQty <= 0) { |
|||
this.$message.warning('该物料已无可退数量'); |
|||
return; |
|||
} |
|||
|
|||
this.$router.push({ |
|||
name: 'outsourcingReturnPDAList', |
|||
params: { |
|||
outsourcingOrderNo: item.outsourcingOrderNo, |
|||
partNo: item.partNo, |
|||
unissureQty: item.returnableQty, |
|||
itemNo: item.itemNo, |
|||
}, |
|||
}); |
|||
}, |
|||
}, |
|||
|
|||
mounted() { |
|||
// 聚焦搜索框 |
|||
this.$nextTick(() => { |
|||
if (this.$refs.searchInput) { |
|||
this.$refs.searchInput.focus(); |
|||
} |
|||
}); |
|||
}, |
|||
}; |
|||
</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; |
|||
} |
|||
|
|||
/* 搜索容器 */ |
|||
.search-container { |
|||
padding: 12px 16px; |
|||
background: white; |
|||
} |
|||
|
|||
.search-container .el-input { |
|||
width: 100%; |
|||
} |
|||
|
|||
/* 紧凑型输入框样式 */ |
|||
.compact-input ::v-deep .el-input__inner { |
|||
height: 40px; |
|||
padding: 0 12px 0 35px; |
|||
font-size: 14px; |
|||
} |
|||
|
|||
.compact-input ::v-deep .el-input__prefix { |
|||
left: 10px; |
|||
} |
|||
|
|||
.compact-input ::v-deep .el-input__suffix { |
|||
right: 30px; |
|||
} |
|||
|
|||
/* 内容区域 */ |
|||
.content-area { |
|||
flex: 1; |
|||
overflow-y: auto; |
|||
} |
|||
|
|||
/* 工单列表 */ |
|||
.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; |
|||
} |
|||
|
|||
.empty-state p { |
|||
margin: 0; |
|||
font-size: 14px; |
|||
} |
|||
|
|||
/* 加载状态 */ |
|||
.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; |
|||
} |
|||
|
|||
.loading-state p { |
|||
margin: 0; |
|||
font-size: 14px; |
|||
} |
|||
|
|||
/* 欢迎状态 */ |
|||
.welcome-state { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; |
|||
justify-content: center; |
|||
padding: 60px 20px; |
|||
color: #999; |
|||
} |
|||
|
|||
.welcome-state i { |
|||
font-size: 48px; |
|||
margin-bottom: 16px; |
|||
color: #17b3a3; |
|||
} |
|||
|
|||
.welcome-state p { |
|||
margin: 0; |
|||
font-size: 14px; |
|||
} |
|||
|
|||
@keyframes spin { |
|||
from { |
|||
transform: rotate(0deg); |
|||
} |
|||
to { |
|||
transform: rotate(360deg); |
|||
} |
|||
} |
|||
|
|||
/* 响应式设计 */ |
|||
@media (max-width: 360px) { |
|||
.header-bar { |
|||
padding: 8px 12px; |
|||
} |
|||
|
|||
.search-container { |
|||
padding: 8px 12px; |
|||
} |
|||
|
|||
.work-order-list { |
|||
padding: 8px 12px; |
|||
} |
|||
|
|||
.card-details { |
|||
flex-wrap: wrap; |
|||
gap: 6px; |
|||
} |
|||
|
|||
.detail-item { |
|||
flex: 0 0 48%; |
|||
margin-bottom: 6px; |
|||
min-width: 50px; |
|||
} |
|||
} |
|||
</style> |
|||
1444
src/views/modules/outsourcing-return/outsourcingReturnPDAIssueList.vue
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,162 @@ |
|||
<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">委外订单号:{{ outsourcingOrderNo }}</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 { getUnissueMatericalForOutsourcingOrder } from '@/api/outsourcing/outsourcing-return'; |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
outsourcingOrderNo: '', |
|||
partNo: '', |
|||
loading: false, |
|||
issueList: [], |
|||
unissureQty: 0, |
|||
itemNo: '', |
|||
}; |
|||
}, |
|||
methods: { |
|||
loadIssueList() { |
|||
if (!this.outsourcingOrderNo || !this.partNo) { |
|||
return; |
|||
} |
|||
this.loading = true; |
|||
const params = { |
|||
outsourcingOrderNo: this.outsourcingOrderNo, |
|||
site: this.$store.state.user.site, |
|||
partNo: this.partNo, |
|||
}; |
|||
getUnissueMatericalForOutsourcingOrder(params) |
|||
.then(({ data }) => { |
|||
this.loading = false; |
|||
if (data && data.code === 0) { |
|||
this.issueList = data.issueForOutsourcingOrder || []; |
|||
} else { |
|||
this.$message.error(data.msg || '获取发料记录失败'); |
|||
this.issueList = []; |
|||
} |
|||
}) |
|||
.catch(() => { |
|||
this.loading = false; |
|||
this.$message.error('获取发料记录失败'); |
|||
}); |
|||
}, |
|||
goDetail(item) { |
|||
this.$router.push({ |
|||
name: 'outsourcingReturnPDAIssueList', |
|||
params: { |
|||
outsourcingOrderNo: this.outsourcingOrderNo, |
|||
material:{ |
|||
itemNo: this.itemNo, |
|||
partNo: this.partNo, |
|||
orderType: 'outsourcingOrder', |
|||
ifsTransactionID: item.TRANSACTION_ID, |
|||
quantity: item.QUANTITY, |
|||
batchNo: item.LOT_BATCH_NO, |
|||
unissureQty: this.unissureQty, |
|||
ifsAccountingID:item.ACCOUNTING_ID, |
|||
qtyReversed:item.QTY_REVERSED || 0, |
|||
} |
|||
}, |
|||
}); |
|||
}, |
|||
}, |
|||
mounted() { |
|||
this.outsourcingOrderNo = this.$route.params.outsourcingOrderNo; |
|||
this.partNo = this.$route.params.partNo; |
|||
this.unissureQty = this.$route.params.unissureQty; |
|||
this.itemNo = this.$route.params.itemNo; |
|||
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; } |
|||
.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