Browse Source
feat(inspection): 优化验货申请列表界面并新增我的验货清单查询功能
feat(inspection): 优化验货申请列表界面并新增我的验货清单查询功能
- 将审核链接从el-link替换为自定义class的a标签以统一样式 - 更新已审核状态显示逻辑,直接展示当前状态值 - 新增getMyInspectionList API接口用于查询我的验货清单 - 在检验申请单表格配置中添加计划验货日期列设置 - 移除登录页面的公司logo图片展示 - 优化表格列配置的数据结构和排序逻辑master
5 changed files with 186 additions and 25 deletions
-
3src/api/inspection/inspectionRequestHeader.js
-
3src/views/common/login.vue
-
7src/views/modules/inspection/inspectionRequestAudit.vue
-
37src/views/modules/inspection/inspectionRequestList.vue
-
161src/views/modules/inspection/myInspectionList.vue
@ -0,0 +1,161 @@ |
|||
<template> |
|||
<div class="customer-css"> |
|||
<!-- 列表 --> |
|||
<el-table |
|||
:data="dataList" |
|||
:height="height" |
|||
border |
|||
highlight-current-row |
|||
v-loading="loading" |
|||
style="width: 100%"> |
|||
<el-table-column prop="requestNo" label="申请单号" header-align="center" align="left" min-width="150" show-overflow-tooltip/> |
|||
<el-table-column prop="orderRef1" label="PO号" header-align="center" align="left" min-width="150" show-overflow-tooltip/> |
|||
<el-table-column prop="supplierNo" label="供应商编码" header-align="center" align="left" min-width="120" show-overflow-tooltip/> |
|||
<el-table-column prop="supplierName" label="供应商名称" header-align="center" align="left" min-width="200" show-overflow-tooltip/> |
|||
<el-table-column prop="partNo" label="产品编码" header-align="center" align="left" min-width="150" show-overflow-tooltip/> |
|||
<el-table-column prop="partDesc" label="产品名称" header-align="center" align="left" min-width="150" show-overflow-tooltip/> |
|||
<el-table-column prop="qty" label="验货数量" header-align="center" align="right" width="120"/> |
|||
<el-table-column prop="status" label="状态" header-align="center" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
{{ getStatusText(scope.row.statusDb) }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="needInspectDate" label="建议验货日期" header-align="center" align="center" width="120"/> |
|||
<el-table-column prop="planStartDate" label="计划开始日期" header-align="center" align="center" width="120"/> |
|||
<el-table-column prop="planEndDate" label="计划结束日期" header-align="center" align="center" width="120"/> |
|||
<el-table-column prop="qcOperator" label="QC人员" header-align="center" align="center" width="100"/> |
|||
<el-table-column prop="inspectAddress" label="验货地址" header-align="center" align="left" min-width="150" show-overflow-tooltip/> |
|||
<el-table-column prop="inspectContract" label="联系人" header-align="center" align="center" width="100"/> |
|||
<el-table-column fixed="right" header-align="center" align="center" width="120" label="操作"> |
|||
<template slot-scope="scope"> |
|||
<a class="customer-a" @click="startInspection(scope.row)">开始验货</a> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<!-- 分页插件 --> |
|||
<el-pagination |
|||
style="margin-top: 10px" |
|||
@size-change="sizeChangeHandle" |
|||
@current-change="currentChangeHandle" |
|||
:current-page="pageIndex" |
|||
:page-sizes="[20, 50, 100, 200, 500]" |
|||
:page-size="pageSize" |
|||
:total="totalPage" |
|||
layout="total, sizes, prev, pager, next, jumper"> |
|||
</el-pagination> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { getMyInspectionList } from '@/api/inspection/inspectionRequestHeader.js' |
|||
|
|||
|
|||
export default { |
|||
components: { |
|||
}, |
|||
name: 'MyInspectionList', |
|||
data () { |
|||
return { |
|||
height: 400, |
|||
loading: false, |
|||
dataList: [], |
|||
pageIndex: 1, |
|||
pageSize: 50, |
|||
totalPage: 0, |
|||
searchData: { |
|||
page: 1, |
|||
limit: 50 |
|||
} |
|||
} |
|||
}, |
|||
mounted () { |
|||
this.calcHeight() |
|||
window.addEventListener('resize', this.calcHeight) |
|||
this.getList() |
|||
}, |
|||
beforeDestroy () { |
|||
window.removeEventListener('resize', this.calcHeight) |
|||
}, |
|||
methods: { |
|||
// 计算表格高度 |
|||
calcHeight () { |
|||
this.$nextTick(() => { |
|||
this.height = window.innerHeight - 120 |
|||
}) |
|||
}, |
|||
|
|||
// 获取列表数据 |
|||
getList () { |
|||
this.loading = true |
|||
this.searchData.page = this.pageIndex |
|||
this.searchData.limit = this.pageSize |
|||
getMyInspectionList(this.searchData).then(({ data }) => { |
|||
if (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.$message.error((data && data.msg) || '获取列表失败') |
|||
} |
|||
this.loading = false |
|||
}).catch(() => { |
|||
this.loading = false |
|||
}) |
|||
}, |
|||
|
|||
|
|||
// 每页条数变化 |
|||
sizeChangeHandle (val) { |
|||
this.pageSize = val |
|||
this.pageIndex = 1 |
|||
this.getList() |
|||
}, |
|||
|
|||
// 当前页变化 |
|||
currentChangeHandle (val) { |
|||
this.pageIndex = val |
|||
this.getList() |
|||
}, |
|||
|
|||
// 状态转换 |
|||
getStatusText (statusDb) { |
|||
const statusMap = { |
|||
'Draft': '草稿', |
|||
'Confirmed': '已确认', |
|||
'Scheduled': '已排程', |
|||
'Audited': '已审核', |
|||
'Inspected': '已验货', |
|||
'Completed': '已完成', |
|||
'Cancelled': '已取消' |
|||
} |
|||
return statusMap[statusDb] || statusDb || '-' |
|||
}, |
|||
|
|||
// 开始验货 |
|||
startInspection (row) { |
|||
// TODO: 实现开始验货逻辑 |
|||
console.log('开始验货:', row) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
.customer-css { |
|||
padding: 5px; |
|||
height: calc(100vh - 60px); |
|||
display: flex; |
|||
flex-direction: column; |
|||
} |
|||
|
|||
::v-deep .el-table { |
|||
flex: 1; |
|||
} |
|||
|
|||
::v-deep .el-pagination { |
|||
margin-top: 5px; |
|||
flex-shrink: 0; |
|||
} |
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue