|
@@ -0,0 +1,177 @@
|
|
|
|
|
+<!-- 盘点工单(库存台账非物品维度详情页签) -->
|
|
|
|
|
+<template>
|
|
|
|
|
+ <div id="stocktakingWorkOrderTab">
|
|
|
|
|
+ <WorkSearch @search="reload"></WorkSearch>
|
|
|
|
|
+ <ele-pro-table
|
|
|
|
|
+ class="table_list"
|
|
|
|
|
+ ref="table"
|
|
|
|
|
+ height="calc(100vh - 300px)"
|
|
|
|
|
+ :columns="columns"
|
|
|
|
|
+ :datasource="datasource"
|
|
|
|
|
+ :pageSize="20"
|
|
|
|
|
+ row-key="id"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template v-slot:code="{ row }">
|
|
|
|
|
+ <el-link type="primary" @click="goDetail(row)">{{ row.code }}</el-link>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </ele-pro-table>
|
|
|
|
|
+ </div>
|
|
|
|
|
+</template>
|
|
|
|
|
+
|
|
|
|
|
+<script>
|
|
|
|
|
+ import WorkSearch from '@/views/warehouseManagement/stocktaking/work/components/work-search.vue';
|
|
|
|
|
+ import { getPlanOrderList } from '@/api/inventory';
|
|
|
|
|
+ export default {
|
|
|
|
|
+ components: { WorkSearch },
|
|
|
|
|
+ props: {
|
|
|
|
|
+ // 当前库存台账行的物料 id
|
|
|
|
|
+ categoryId: {
|
|
|
|
|
+ type: String,
|
|
|
|
|
+ default: ''
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ // 0-待处理,1-执行中,2-已完成
|
|
|
|
|
+ statusObj: {
|
|
|
|
|
+ 0: '待处理',
|
|
|
|
|
+ 1: '执行中',
|
|
|
|
|
+ 2: '已完成'
|
|
|
|
|
+ },
|
|
|
|
|
+ // 与「盘点工单」菜单列表同款列(去掉操作列:本页签只读,报工仍在盘点工单菜单)
|
|
|
|
|
+ columns: [
|
|
|
|
|
+ {
|
|
|
|
|
+ columnKey: 'index',
|
|
|
|
|
+ label: '序号',
|
|
|
|
|
+ type: 'index',
|
|
|
|
|
+ width: 55,
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ fixed: 'left'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ slot: 'code',
|
|
|
|
|
+ prop: 'code',
|
|
|
|
|
+ label: '盘点单号',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 200
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'status',
|
|
|
|
|
+ label: '状态',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 110,
|
|
|
|
|
+ formatter: (row) => this.statusObj[Number(row.status)] || ''
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'planCode',
|
|
|
|
|
+ label: '计划单号',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 200
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'planName',
|
|
|
|
|
+ label: '计划名称',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 110
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'warehouseName',
|
|
|
|
|
+ label: '盘点仓库',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 110
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'executeGroupName',
|
|
|
|
|
+ label: '盘点部门',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 110
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'executorName',
|
|
|
|
|
+ label: '盘点人员',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 110
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'startTime',
|
|
|
|
|
+ label: '计划开始时间',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 150
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'endTime',
|
|
|
|
|
+ label: '计划结束时间',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 150
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ watch: {
|
|
|
|
|
+ categoryId() {
|
|
|
|
|
+ this.reload();
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ /* 表格数据源:盘点工单菜单同一接口,额外按当前物料收窄 */
|
|
|
|
|
+ async datasource({ page, limit, where }) {
|
|
|
|
|
+ if (!this.categoryId) {
|
|
|
|
|
+ return [];
|
|
|
|
|
+ }
|
|
|
|
|
+ try {
|
|
|
|
|
+ return await getPlanOrderList({
|
|
|
|
|
+ pageNum: page,
|
|
|
|
|
+ size: limit,
|
|
|
|
|
+ categoryId: this.categoryId,
|
|
|
|
|
+ ...where
|
|
|
|
|
+ });
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ return [];
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ reload(where) {
|
|
|
|
|
+ this.$refs.table && this.$refs.table.reload({ page: 1, where });
|
|
|
|
|
+ },
|
|
|
|
|
+ // 与「盘点工单」菜单同一详情入口。只带工单 id:planId 是裸 Long(雪花 ID 到前端已丢精度),
|
|
|
|
|
+ // 后端 getOrderInfoByPlanId 支持按工单反查计划
|
|
|
|
|
+ goDetail(row) {
|
|
|
|
|
+ this.$router.push({
|
|
|
|
|
+ path: '/warehouseManagement/stocktaking/work/details',
|
|
|
|
|
+ query: { id: row.id }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+</script>
|
|
|
|
|
+
|
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
|
+ #stocktakingWorkOrderTab {
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ padding-top: 10px;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ :deep(.ele-pro-table) {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ .el-table {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .el-form-item {
|
|
|
|
|
+ margin-bottom: 5px !important;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+</style>
|