Browse Source
feat(order): 新增验货明细列表和物流PO列表组件
feat(order): 新增验货明细列表和物流PO列表组件
- 添加了 inspectionDetailList.vue 组件用于显示验货明细 - 添加了 logisticsPoList.vue 组件用于显示物流PO信息 - 在 poOrder_search.vue 中集成物流和验货明细页签功能 - 实现了表格行点击切换详情页签的数据联动机制 - 更新了多个附件表格组件的表头对齐样式 - 修改了物流管理页面的字段映射和高度设置方法master
6 changed files with 470 additions and 9 deletions
-
20src/views/modules/inspection/com_inspectionRequestAttachmentTab.vue
-
6src/views/modules/npcIqc/com_logisticsAttachmentTab.vue
-
10src/views/modules/npcIqc/logisticsManagement.vue
-
183src/views/modules/order/com_inspectionDetailList.vue
-
176src/views/modules/order/com_logisticsPoList.vue
-
84src/views/modules/order/poOrder_search.vue
@ -0,0 +1,183 @@ |
|||||
|
<template> |
||||
|
<div class="customer-css"> |
||||
|
<!-- 数据表格 --> |
||||
|
<el-table |
||||
|
ref="table" |
||||
|
:height="searchData.height" |
||||
|
:data="dataList" |
||||
|
border |
||||
|
v-loading="dataListLoading" |
||||
|
style="width: 100%;"> |
||||
|
<el-table-column |
||||
|
v-for="(item,index) in columnList" :key="index" |
||||
|
:sortable="item.columnSortable" |
||||
|
:prop="item.columnProp" |
||||
|
:header-align="item.headerAlign" |
||||
|
:show-overflow-tooltip="item.showOverflowTooltip" |
||||
|
:align="item.align" |
||||
|
:fixed="item.fixed==''?false:item.fixed" |
||||
|
:min-width="item.columnWidth" |
||||
|
:label="item.columnLabel"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
<!-- 分页 --> |
||||
|
<el-pagination style="margin-top: 0px" |
||||
|
@size-change="sizeChangeHandle" |
||||
|
@current-change="currentChangeHandle" |
||||
|
:current-page="pageIndex" |
||||
|
:page-sizes="[20, 50, 100, 200]" |
||||
|
:page-size="pageSize" |
||||
|
:total="totalPage" |
||||
|
layout="total, sizes, prev, pager, next, jumper"> |
||||
|
</el-pagination> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { getInspectionRequestDetailList } from '@/api/inspection/inspectionRequestHeader.js' |
||||
|
|
||||
|
export default { |
||||
|
name: 'InspectionDetailList', |
||||
|
|
||||
|
data() { |
||||
|
return { |
||||
|
dataList: [], |
||||
|
searchData: { |
||||
|
site: this.$store.state.user.site, |
||||
|
orderRef1: '', |
||||
|
height: '300', |
||||
|
page: 1, |
||||
|
limit: 20 |
||||
|
}, |
||||
|
pageIndex: 1, |
||||
|
pageSize: 20, |
||||
|
totalPage: 0, |
||||
|
dataListLoading: false, |
||||
|
columnList: [ |
||||
|
{ |
||||
|
columnProp: 'requestNo', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '申请单号', |
||||
|
columnWidth: '140', |
||||
|
columnHidden: false, |
||||
|
columnSortable: false, |
||||
|
showOverflowTooltip: true, |
||||
|
fixed: false |
||||
|
}, |
||||
|
{ |
||||
|
columnProp: 'partNo', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '产品编码', |
||||
|
columnWidth: '120', |
||||
|
columnHidden: false, |
||||
|
columnSortable: false, |
||||
|
showOverflowTooltip: true, |
||||
|
fixed: false |
||||
|
}, |
||||
|
{ |
||||
|
columnProp: 'partDesc', |
||||
|
headerAlign: 'center', |
||||
|
align: 'left', |
||||
|
columnLabel: '产品名称', |
||||
|
columnWidth: '200', |
||||
|
columnHidden: false, |
||||
|
columnSortable: false, |
||||
|
showOverflowTooltip: true, |
||||
|
fixed: false |
||||
|
}, |
||||
|
{ |
||||
|
columnProp: 'qty', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '验货数量', |
||||
|
columnWidth: '100', |
||||
|
columnHidden: false, |
||||
|
columnSortable: false, |
||||
|
fixed: false |
||||
|
}, |
||||
|
{ |
||||
|
columnProp: 'status', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '验货状态', |
||||
|
columnWidth: '100', |
||||
|
columnHidden: false, |
||||
|
columnSortable: false, |
||||
|
fixed: false |
||||
|
}, |
||||
|
{ |
||||
|
columnProp: 'inspectResult', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '验货结果', |
||||
|
columnWidth: '100', |
||||
|
columnHidden: false, |
||||
|
columnSortable: false, |
||||
|
fixed: false |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
methods: { |
||||
|
// 初始化组件的参数(模仿 com_logisticsPoList.vue 的 init 模式) |
||||
|
init(inData) { |
||||
|
this.searchData = JSON.parse(JSON.stringify(inData)) |
||||
|
this.pageIndex = 1 |
||||
|
this.searchTable() |
||||
|
}, |
||||
|
|
||||
|
// 查询数据 |
||||
|
searchTable() { |
||||
|
this.dataListLoading = true |
||||
|
const params = { |
||||
|
...this.searchData, |
||||
|
page: this.pageIndex, |
||||
|
limit: this.pageSize |
||||
|
} |
||||
|
getInspectionRequestDetailList(params).then(({ data }) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.dataList = data.page.list || [] |
||||
|
this.pageIndex = data.page.currPage |
||||
|
this.pageSize = data.page.pageSize |
||||
|
this.totalPage = data.page.totalCount |
||||
|
} else { |
||||
|
this.dataList = [] |
||||
|
this.totalPage = 0 |
||||
|
} |
||||
|
this.dataListLoading = false |
||||
|
}).catch(() => { |
||||
|
this.dataListLoading = false |
||||
|
this.dataList = [] |
||||
|
this.totalPage = 0 |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 每页数 |
||||
|
sizeChangeHandle(val) { |
||||
|
this.pageSize = val |
||||
|
this.pageIndex = 1 |
||||
|
this.searchTable() |
||||
|
}, |
||||
|
|
||||
|
// 当前页 |
||||
|
currentChangeHandle(val) { |
||||
|
this.pageIndex = val |
||||
|
this.searchTable() |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped lang="scss"> |
||||
|
.rq .auto /deep/ .el-form-item__content { |
||||
|
height: auto; |
||||
|
line-height: 1.5; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,176 @@ |
|||||
|
<template> |
||||
|
<div class="customer-css"> |
||||
|
<!-- 数据表格 --> |
||||
|
<el-table |
||||
|
ref="table" |
||||
|
:height="searchData.height" |
||||
|
:data="dataList" |
||||
|
border |
||||
|
v-loading="dataListLoading" |
||||
|
style="width: 100%;"> |
||||
|
<el-table-column |
||||
|
v-for="(item,index) in columnList" :key="index" |
||||
|
:sortable="item.columnSortable" |
||||
|
:prop="item.columnProp" |
||||
|
:header-align="item.headerAlign" |
||||
|
:show-overflow-tooltip="item.showOverflowTooltip" |
||||
|
:align="item.align" |
||||
|
:fixed="item.fixed==''?false:item.fixed" |
||||
|
:min-width="item.columnWidth" |
||||
|
:label="item.columnLabel"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
<!-- 分页 --> |
||||
|
<el-pagination style="margin-top: 0px" |
||||
|
@size-change="sizeChangeHandle" |
||||
|
@current-change="currentChangeHandle" |
||||
|
:current-page="pageIndex" |
||||
|
:page-sizes="[20, 50, 100, 200]" |
||||
|
:page-size="pageSize" |
||||
|
:total="totalPage" |
||||
|
layout="total, sizes, prev, pager, next, jumper"> |
||||
|
</el-pagination> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { getPoList } from '@/api/npcIqc/npcIqc.js' |
||||
|
|
||||
|
export default { |
||||
|
name: 'LogisticsPoList', |
||||
|
|
||||
|
data() { |
||||
|
return { |
||||
|
dataList: [], |
||||
|
searchData: { |
||||
|
flexId: '', |
||||
|
supplierNo: '', |
||||
|
site: this.$store.state.user.site, |
||||
|
height: '300', |
||||
|
page: 1, |
||||
|
limit: 20 |
||||
|
}, |
||||
|
pageIndex: 1, |
||||
|
pageSize: 20, |
||||
|
totalPage: 0, |
||||
|
dataListLoading: false, |
||||
|
columnList: [ |
||||
|
{ |
||||
|
columnProp: 'flexId', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '进仓编号', |
||||
|
columnWidth: '120', |
||||
|
columnHidden: false, |
||||
|
columnSortable: false, |
||||
|
fixed: false |
||||
|
}, |
||||
|
{ |
||||
|
columnProp: 'orderDate', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: 'PO日期', |
||||
|
columnWidth: '120', |
||||
|
columnHidden: false, |
||||
|
columnSortable: false, |
||||
|
fixed: false |
||||
|
}, |
||||
|
{ |
||||
|
columnProp: 'sku', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: 'SKU', |
||||
|
columnWidth: '120', |
||||
|
columnHidden: false, |
||||
|
columnSortable: false, |
||||
|
fixed: false |
||||
|
}, |
||||
|
{ |
||||
|
columnProp: 'qty', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: 'Qty', |
||||
|
columnWidth: '100', |
||||
|
columnHidden: false, |
||||
|
columnSortable: false, |
||||
|
fixed: false |
||||
|
}, |
||||
|
{ |
||||
|
columnProp: 'shippedQty', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: 'Qty Shipped', |
||||
|
columnWidth: '120', |
||||
|
columnHidden: false, |
||||
|
columnSortable: false, |
||||
|
fixed: false |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
methods: { |
||||
|
// 初始化组件的参数(模仿 com_supplierShare_supplierList.vue 的 init 模式) |
||||
|
init(inData) { |
||||
|
this.searchData = JSON.parse(JSON.stringify(inData)) |
||||
|
this.pageIndex = 1 |
||||
|
this.searchTable() |
||||
|
}, |
||||
|
|
||||
|
// 查询数据 |
||||
|
searchTable() { |
||||
|
if (!this.searchData.flexId && !this.searchData.supplierNo) { |
||||
|
this.dataList = [] |
||||
|
this.totalPage = 0 |
||||
|
return |
||||
|
} |
||||
|
this.dataListLoading = true |
||||
|
const params = { |
||||
|
...this.searchData, |
||||
|
page: this.pageIndex, |
||||
|
limit: this.pageSize |
||||
|
} |
||||
|
getPoList(params).then(({ data }) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.dataList = data.page.list || [] |
||||
|
this.pageIndex = data.page.currPage |
||||
|
this.pageSize = data.page.pageSize |
||||
|
this.totalPage = data.page.totalCount |
||||
|
} else { |
||||
|
this.dataList = [] |
||||
|
this.totalPage = 0 |
||||
|
} |
||||
|
this.dataListLoading = false |
||||
|
}).catch(() => { |
||||
|
this.dataListLoading = false |
||||
|
this.dataList = [] |
||||
|
this.totalPage = 0 |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 每页数 |
||||
|
sizeChangeHandle(val) { |
||||
|
this.pageSize = val |
||||
|
this.pageIndex = 1 |
||||
|
this.searchTable() |
||||
|
}, |
||||
|
|
||||
|
// 当前页 |
||||
|
currentChangeHandle(val) { |
||||
|
this.pageIndex = val |
||||
|
this.searchTable() |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped lang="scss"> |
||||
|
.rq .auto /deep/ .el-form-item__content { |
||||
|
height: auto; |
||||
|
line-height: 1.5; |
||||
|
} |
||||
|
</style> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue