Browse Source
feat(check): 添加RFID盘点功能模块
feat(check): 添加RFID盘点功能模块
- 新增RFID盘点API接口文件,包含主表、明细表和快照查询功能 - 创建RFID盘点推送详情页面,实现主表和明细表联动展示 - 添加RFID日常盘点结果查询页面,支持按标签、物料、托盘等条件筛选 - 实现盘点数据的分页加载和条件查询功能 - 集成表格组件展示盘点结果和明细信息 - 添加日期范围选择和状态筛选功能master
3 changed files with 701 additions and 0 deletions
-
14src/api/check/rfidCount.js
-
394src/views/modules/check/rfidCountPushDetail.vue
-
293src/views/modules/check/rfidDailyCountResult.vue
@ -0,0 +1,14 @@ |
|||
import { createAPI } from "@/utils/httpRequest.js"; |
|||
|
|||
// ==================== RFID日常入库盘点主表 ==================== - rqrq
|
|||
|
|||
// 查询RFID盘点推送主表列表 - rqrq
|
|||
export const searchRfidCountHeaderList = data => createAPI(`/check/rfidCount/searchRfidCountHeaderList`, 'post', data) |
|||
|
|||
// 查询RFID盘点推送明细列表 - rqrq
|
|||
export const searchRfidCountDetailList = data => createAPI(`/check/rfidCount/searchRfidCountDetailList`, 'post', data) |
|||
|
|||
// ==================== RFID日常入库盘点快照 ==================== - rqrq
|
|||
|
|||
// 查询RFID日常入库盘点结果列表 - rqrq
|
|||
export const searchRfidCountSnapshotList = data => createAPI(`/check/rfidCount/searchRfidCountSnapshotList`, 'post', data) |
|||
@ -0,0 +1,394 @@ |
|||
<template> |
|||
<div class="mod-config yzz"> |
|||
<!-- 查询表单 - rqrq --> |
|||
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;"> |
|||
<el-form :inline="true" label-position="top" style="margin-top: 0px"> |
|||
<el-form-item :label="'托盘编码'"> |
|||
<el-input v-model="searchData.palletId" style="width: 120px" clearable></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="盘点结果"> |
|||
<el-select v-model="searchData.countResult" placeholder="请选择" style="width: 120px" clearable> |
|||
<el-option label="全部" value=""></el-option> |
|||
<el-option label="盘点成功" value="盘点成功"></el-option> |
|||
<el-option label="盘点失败" value="盘点失败"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="是否处理"> |
|||
<el-select v-model="searchData.isUsed" placeholder="请选择" style="width: 120px" clearable> |
|||
<el-option label="全部" value=""></el-option> |
|||
<el-option label="已处理" value="Y"></el-option> |
|||
<el-option label="未处理" value="N"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item :label="'盘点日期'"> |
|||
<el-date-picker |
|||
style="width: 120px" |
|||
v-model="searchData.startDate" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择日期"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item style="margin-top: 23px;"> |
|||
<label style="margin-left: 0px;font-size: 19px">➞</label> |
|||
</el-form-item> |
|||
<el-form-item :label="' '"> |
|||
<el-date-picker |
|||
style="width: 120px" |
|||
v-model="searchData.endDate" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择日期"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item :label="' '"> |
|||
<el-button type="primary" @click="searchTable()">查询</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-form> |
|||
|
|||
<!-- 主表格:rfid_count_header - rqrq --> |
|||
<el-table |
|||
:data="dataList" |
|||
@row-click="changeData" |
|||
:height="height" |
|||
border |
|||
highlight-current-row |
|||
ref="mainTable" |
|||
v-loading="dataListLoading" |
|||
style="width: 100%;"> |
|||
<el-table-column |
|||
prop="site" |
|||
header-align="center" |
|||
align="center" |
|||
width="80" |
|||
label="站点"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="palletId" |
|||
header-align="center" |
|||
align="center" |
|||
min-width="120" |
|||
show-overflow-tooltip |
|||
label="托盘编码"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="countResult" |
|||
header-align="center" |
|||
align="center" |
|||
width="100" |
|||
label="盘点结果"> |
|||
<template slot-scope="scope"> |
|||
<span :style="{color: scope.row.countResult === '盘点成功' ? '#67C23A' : '#F56C6C'}"> |
|||
{{ scope.row.countResult }} |
|||
</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="countTime" |
|||
header-align="center" |
|||
align="center" |
|||
width="160" |
|||
label="盘点时间"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="isUsed" |
|||
header-align="center" |
|||
align="center" |
|||
width="100" |
|||
label="是否处理"> |
|||
<template slot-scope="scope"> |
|||
<span :style="{color: scope.row.isUsed === 'Y' ? '#67C23A' : '#F56C6C'}"> |
|||
{{ scope.row.isUsed === 'Y' ? '已处理' : '未处理' }} |
|||
</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="labelCount" |
|||
header-align="center" |
|||
align="center" |
|||
width="100" |
|||
label="标签数量"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="remark" |
|||
header-align="center" |
|||
align="center" |
|||
min-width="150" |
|||
show-overflow-tooltip |
|||
label="备注"> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<!-- 分页 - rqrq --> |
|||
<el-pagination |
|||
@size-change="sizeChangeHandle" |
|||
@current-change="currentChangeHandle" |
|||
:current-page="pageIndex" |
|||
:page-sizes="[20, 50, 100, 1000]" |
|||
:page-size="pageSize" |
|||
:total="totalPage" |
|||
layout="total, sizes, prev, pager, next, jumper"> |
|||
</el-pagination> |
|||
|
|||
<!-- 下方明细表格 - rqrq --> |
|||
<div style="margin-top: 10px; font-weight: bold; font-size: 14px; padding: 5px;"> |
|||
盘点明细 |
|||
</div> |
|||
<el-table |
|||
:data="dataList2" |
|||
:height="height" |
|||
border |
|||
v-loading="dataList2Loading" |
|||
style="width: 100%;"> |
|||
<el-table-column |
|||
prop="site" |
|||
header-align="center" |
|||
align="center" |
|||
width="80" |
|||
label="站点"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="palletId" |
|||
header-align="center" |
|||
align="center" |
|||
min-width="120" |
|||
show-overflow-tooltip |
|||
label="托盘编码"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="countTime" |
|||
header-align="center" |
|||
align="center" |
|||
width="160" |
|||
label="盘点时间"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="unitId" |
|||
header-align="center" |
|||
align="center" |
|||
min-width="150" |
|||
show-overflow-tooltip |
|||
label="标签编码"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="partNo" |
|||
header-align="center" |
|||
align="center" |
|||
min-width="120" |
|||
show-overflow-tooltip |
|||
label="物料编码"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="qty" |
|||
header-align="center" |
|||
align="center" |
|||
width="100" |
|||
label="数量"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="batchNo" |
|||
header-align="center" |
|||
align="center" |
|||
min-width="120" |
|||
show-overflow-tooltip |
|||
label="批次号"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="locationId" |
|||
header-align="center" |
|||
align="center" |
|||
min-width="120" |
|||
show-overflow-tooltip |
|||
label="库位"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="warehouseId" |
|||
header-align="center" |
|||
align="center" |
|||
width="100" |
|||
label="仓库"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="wdr" |
|||
header-align="center" |
|||
align="center" |
|||
width="100" |
|||
label="WDR"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="remark" |
|||
header-align="center" |
|||
align="center" |
|||
min-width="150" |
|||
show-overflow-tooltip |
|||
label="备注"> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
searchRfidCountHeaderList, |
|||
searchRfidCountDetailList |
|||
} from "@/api/check/rfidCount.js" |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
// 页面状态 - rqrq |
|||
height: 200, |
|||
|
|||
// 加载状态 - rqrq |
|||
dataListLoading: false, |
|||
dataList2Loading: false, |
|||
|
|||
// 数据列表 - rqrq |
|||
dataList: [], // 主表数据 |
|||
dataList2: [], // 明细表数据 |
|||
|
|||
// 查询条件 - rqrq |
|||
searchData: { |
|||
site: this.$store.state.user.site, |
|||
palletId: '', |
|||
countResult: '', |
|||
isUsed: '', |
|||
startDate: '', |
|||
endDate: '', |
|||
page: 1, |
|||
limit: 20 |
|||
}, |
|||
|
|||
// 当前选中行 - rqrq |
|||
currentRow: null, |
|||
|
|||
// 分页信息 - rqrq |
|||
pageIndex: 1, |
|||
pageSize: 20, |
|||
totalPage: 0 |
|||
} |
|||
}, |
|||
|
|||
mounted() { |
|||
// 计算表格高度 - rqrq |
|||
this.$nextTick(() => { |
|||
this.height = (window.innerHeight - 315) / 2 |
|||
}) |
|||
// 加载主表数据 - rqrq |
|||
this.getDataList() |
|||
}, |
|||
|
|||
methods: { |
|||
/** |
|||
* @Description 查询主表数据 - rqrq |
|||
* @Title getDataList |
|||
* @author rqrq |
|||
*/ |
|||
getDataList() { |
|||
this.dataListLoading = true |
|||
this.searchData.page = this.pageIndex |
|||
this.searchData.limit = this.pageSize |
|||
|
|||
searchRfidCountHeaderList(this.searchData).then(({data}) => { |
|||
this.dataListLoading = false |
|||
if (data && data.code === 0) { |
|||
this.dataList = data.page.list || [] |
|||
this.pageIndex = data.page.currPage |
|||
this.totalPage = data.page.totalCount |
|||
} else { |
|||
this.dataList = [] |
|||
this.$message.error(data.msg || '查询失败') |
|||
} |
|||
}).catch(() => { |
|||
this.dataListLoading = false |
|||
this.$message.error('查询失败') |
|||
}) |
|||
}, |
|||
|
|||
/** |
|||
* @Description 查询按钮点击事件 - rqrq |
|||
* @Title searchTable |
|||
* @author rqrq |
|||
*/ |
|||
searchTable() { |
|||
this.pageIndex = 1 |
|||
this.getDataList() |
|||
}, |
|||
|
|||
/** |
|||
* @Description 每页数变化 - rqrq |
|||
* @Title sizeChangeHandle |
|||
* @param {Number} val 每页数量 |
|||
* @author rqrq |
|||
*/ |
|||
sizeChangeHandle(val) { |
|||
this.pageSize = val |
|||
this.pageIndex = 1 |
|||
this.getDataList() |
|||
}, |
|||
|
|||
/** |
|||
* @Description 当前页变化 - rqrq |
|||
* @Title currentChangeHandle |
|||
* @param {Number} val 当前页码 |
|||
* @author rqrq |
|||
*/ |
|||
currentChangeHandle(val) { |
|||
this.pageIndex = val |
|||
this.getDataList() |
|||
}, |
|||
|
|||
/** |
|||
* @Description 主表行点击事件 - 刷新明细表 - rqrq |
|||
* @Title changeData |
|||
* @param {Object} row 当前行数据 |
|||
* @author rqrq |
|||
*/ |
|||
changeData(row) { |
|||
// 保存当前选中行 - rqrq |
|||
this.currentRow = JSON.parse(JSON.stringify(row)) |
|||
|
|||
// 刷新明细表 - rqrq |
|||
this.getDetailList() |
|||
}, |
|||
|
|||
/** |
|||
* @Description 查询明细表数据 - rqrq |
|||
* @Title getDetailList |
|||
* @author rqrq |
|||
*/ |
|||
getDetailList() { |
|||
if (!this.currentRow) { |
|||
this.dataList2 = [] |
|||
return |
|||
} |
|||
|
|||
this.dataList2Loading = true |
|||
|
|||
// 使用 headerId 查询明细,避免时间精度问题 - rqrq |
|||
let params = { |
|||
headerId: this.currentRow.id |
|||
} |
|||
|
|||
searchRfidCountDetailList(params).then(({data}) => { |
|||
this.dataList2Loading = false |
|||
if (data && data.code === 0) { |
|||
this.dataList2 = data.rows || [] |
|||
} else { |
|||
this.dataList2 = [] |
|||
this.$message.error(data.msg || '查询明细失败') |
|||
} |
|||
}).catch(() => { |
|||
this.dataList2Loading = false |
|||
this.$message.error('查询明细失败') |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
/* 样式使用全局样式,无需额外定义 - rqrq */ |
|||
</style> |
|||
@ -0,0 +1,293 @@ |
|||
<template> |
|||
<div class="mod-config yzz"> |
|||
<!-- 查询表单 - rqrq --> |
|||
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;"> |
|||
<el-form :inline="true" label-position="top" style="margin-top: 0px"> |
|||
<el-form-item :label="'标签编码'"> |
|||
<el-input v-model="searchData.unitId" style="width: 120px" clearable></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'物料编码'"> |
|||
<el-input v-model="searchData.partNo" style="width: 120px" clearable></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'托盘编码'"> |
|||
<el-input v-model="searchData.palletId" style="width: 120px" clearable></el-input> |
|||
</el-form-item> |
|||
<!-- <el-form-item label="盘点结果">--> |
|||
<!-- <el-select v-model="searchData.countResult" placeholder="请选择" style="width: 120px" clearable>--> |
|||
<!-- <el-option label="全部" value=""></el-option>--> |
|||
<!-- <el-option label="盘点成功" value="盘点成功"></el-option>--> |
|||
<!-- <el-option label="盘点失败" value="盘点失败"></el-option>--> |
|||
<!-- </el-select>--> |
|||
<!-- </el-form-item>--> |
|||
<el-form-item :label="'盘点日期'"> |
|||
<el-date-picker |
|||
style="width: 120px" |
|||
v-model="searchData.startDate" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择日期"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item style="margin-top: 23px;"> |
|||
<label style="margin-left: 0px;font-size: 19px">➞</label> |
|||
</el-form-item> |
|||
<el-form-item :label="' '"> |
|||
<el-date-picker |
|||
style="width: 120px" |
|||
v-model="searchData.endDate" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择日期"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item :label="' '"> |
|||
<el-button type="primary" @click="searchTable()">查询</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-form> |
|||
|
|||
<!-- 主表格:rfid_count_snapshot - rqrq --> |
|||
<el-table |
|||
:data="dataList" |
|||
:height="height" |
|||
border |
|||
highlight-current-row |
|||
v-loading="dataListLoading" |
|||
style="width: 100%;"> |
|||
<el-table-column |
|||
prop="site" |
|||
header-align="center" |
|||
align="center" |
|||
width="80" |
|||
label="站点"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="unitId" |
|||
header-align="center" |
|||
align="center" |
|||
min-width="150" |
|||
show-overflow-tooltip |
|||
label="标签编码"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="partNo" |
|||
header-align="center" |
|||
align="center" |
|||
min-width="120" |
|||
show-overflow-tooltip |
|||
label="物料编码"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="qty" |
|||
header-align="center" |
|||
align="center" |
|||
width="100" |
|||
label="数量"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="batchNo" |
|||
header-align="center" |
|||
align="center" |
|||
min-width="120" |
|||
show-overflow-tooltip |
|||
label="批次号"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="locationId" |
|||
header-align="center" |
|||
align="center" |
|||
min-width="120" |
|||
show-overflow-tooltip |
|||
label="库位"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="warehouseId" |
|||
header-align="center" |
|||
align="center" |
|||
width="100" |
|||
label="仓库"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="wdr" |
|||
header-align="center" |
|||
align="center" |
|||
width="100" |
|||
label="WDR"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="lastCountDate" |
|||
header-align="center" |
|||
align="center" |
|||
width="160" |
|||
label="最后盘点日期"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="palletId" |
|||
header-align="center" |
|||
align="center" |
|||
min-width="120" |
|||
show-overflow-tooltip |
|||
label="托盘编码"> |
|||
</el-table-column> |
|||
<!-- <el-table-column--> |
|||
<!-- prop="countResult"--> |
|||
<!-- header-align="center"--> |
|||
<!-- align="center"--> |
|||
<!-- width="100"--> |
|||
<!-- label="盘点结果">--> |
|||
<!-- <template slot-scope="scope">--> |
|||
<!-- <span :style="{color: scope.row.countResult === '盘点成功' ? '#67C23A' : '#F56C6C'}">--> |
|||
<!-- {{ scope.row.countResult }}--> |
|||
<!-- </span>--> |
|||
<!-- </template>--> |
|||
<!-- </el-table-column>--> |
|||
<el-table-column |
|||
prop="countTimes" |
|||
header-align="center" |
|||
align="center" |
|||
width="100" |
|||
label="盘点次数"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="remark" |
|||
header-align="center" |
|||
align="center" |
|||
min-width="150" |
|||
show-overflow-tooltip |
|||
label="备注"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="updatedDate" |
|||
header-align="center" |
|||
align="center" |
|||
width="160" |
|||
label="更新时间"> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<!-- 分页 - rqrq --> |
|||
<el-pagination |
|||
@size-change="sizeChangeHandle" |
|||
@current-change="currentChangeHandle" |
|||
:current-page="pageIndex" |
|||
:page-sizes="[20, 50, 100, 1000]" |
|||
:page-size="pageSize" |
|||
:total="totalPage" |
|||
layout="total, sizes, prev, pager, next, jumper"> |
|||
</el-pagination> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
searchRfidCountSnapshotList |
|||
} from "@/api/check/rfidCount.js" |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
// 页面状态 - rqrq |
|||
height: 200, |
|||
|
|||
// 加载状态 - rqrq |
|||
dataListLoading: false, |
|||
|
|||
// 数据列表 - rqrq |
|||
dataList: [], |
|||
|
|||
// 查询条件 - rqrq |
|||
searchData: { |
|||
site: this.$store.state.user.site, |
|||
unitId: '', |
|||
partNo: '', |
|||
palletId: '', |
|||
countResult: '', |
|||
startDate: '', |
|||
endDate: '', |
|||
page: 1, |
|||
limit: 20 |
|||
}, |
|||
|
|||
// 分页信息 - rqrq |
|||
pageIndex: 1, |
|||
pageSize: 20, |
|||
totalPage: 0 |
|||
} |
|||
}, |
|||
|
|||
mounted() { |
|||
// 计算表格高度 - rqrq |
|||
this.$nextTick(() => { |
|||
this.height = window.innerHeight - 250 |
|||
}) |
|||
// 加载数据 - rqrq |
|||
this.getDataList() |
|||
}, |
|||
|
|||
methods: { |
|||
/** |
|||
* @Description 查询数据 - rqrq |
|||
* @Title getDataList |
|||
* @author rqrq |
|||
*/ |
|||
getDataList() { |
|||
this.dataListLoading = true |
|||
this.searchData.page = this.pageIndex |
|||
this.searchData.limit = this.pageSize |
|||
|
|||
searchRfidCountSnapshotList(this.searchData).then(({data}) => { |
|||
this.dataListLoading = false |
|||
if (data && data.code === 0) { |
|||
this.dataList = data.page.list || [] |
|||
this.pageIndex = data.page.currPage |
|||
this.totalPage = data.page.totalCount |
|||
} else { |
|||
this.dataList = [] |
|||
this.$message.error(data.msg || '查询失败') |
|||
} |
|||
}).catch(() => { |
|||
this.dataListLoading = false |
|||
this.$message.error('查询失败') |
|||
}) |
|||
}, |
|||
|
|||
/** |
|||
* @Description 查询按钮点击事件 - rqrq |
|||
* @Title searchTable |
|||
* @author rqrq |
|||
*/ |
|||
searchTable() { |
|||
this.pageIndex = 1 |
|||
this.getDataList() |
|||
}, |
|||
|
|||
/** |
|||
* @Description 每页数变化 - rqrq |
|||
* @Title sizeChangeHandle |
|||
* @param {Number} val 每页数量 |
|||
* @author rqrq |
|||
*/ |
|||
sizeChangeHandle(val) { |
|||
this.pageSize = val |
|||
this.pageIndex = 1 |
|||
this.getDataList() |
|||
}, |
|||
|
|||
/** |
|||
* @Description 当前页变化 - rqrq |
|||
* @Title currentChangeHandle |
|||
* @param {Number} val 当前页码 |
|||
* @author rqrq |
|||
*/ |
|||
currentChangeHandle(val) { |
|||
this.pageIndex = val |
|||
this.getDataList() |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
/* 样式使用全局样式,无需额外定义 - rqrq */ |
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue