|
|
@@ -1,214 +1,76 @@
|
|
|
<template>
|
|
|
- <div class="ele-body">
|
|
|
+ <div id="inboundRequests">
|
|
|
<el-card shadow="never" v-loading="loading">
|
|
|
<search @search="reload" ref="searchRef"> </search>
|
|
|
-
|
|
|
- <!-- 数据表格 -->
|
|
|
- <ele-pro-table
|
|
|
- ref="table"
|
|
|
- :columns="columns"
|
|
|
- :datasource="datasource"
|
|
|
- cache-key="workOrderTable"
|
|
|
- >
|
|
|
- <template v-slot:totalCount="{ row }">
|
|
|
- {{ row.totalCount }} {{ row.measuringUnit }}
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-slot:totalPackage="{ row }">
|
|
|
- {{ row.totalPackage }}
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-slot:totalWeight="{ row }">
|
|
|
- {{ row.totalWeight }} {{ row.weightUnit }}
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-slot:approvalStatus="{ row }">
|
|
|
- <span :class="{ 'ele-text-danger': row.approvalStatus == 2 }">
|
|
|
- {{ statusFormatter(row.approvalStatus) }}
|
|
|
- </span>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-slot:action="{ row }">
|
|
|
- <!-- <el-link
|
|
|
- type="primary"
|
|
|
- v-if="row.approvalStatus == 0 || row.approvalStatus == 3"
|
|
|
- :underline="false"
|
|
|
- @click="storage(row)"
|
|
|
- >
|
|
|
- 入库
|
|
|
- </el-link> -->
|
|
|
- <el-link type="primary" :underline="false" @click="details(row)">
|
|
|
- 详情
|
|
|
- </el-link>
|
|
|
- </template>
|
|
|
- </ele-pro-table>
|
|
|
+ <el-tabs type="border-card" v-model="activeName" @tab-click="handleClick">
|
|
|
+ <el-tab-pane label="入库" name="入库">
|
|
|
+ <tgTable
|
|
|
+ v-if="activeName == '入库'"
|
|
|
+ ref="tableRef"
|
|
|
+ type="1"
|
|
|
+ ></tgTable>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="出库" name="出库">
|
|
|
+ <tgTable
|
|
|
+ v-if="activeName == '出库'"
|
|
|
+ ref="tableRef"
|
|
|
+ type="2"
|
|
|
+ ></tgTable>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
</el-card>
|
|
|
-
|
|
|
- <tgDetails ref="tgDetailsRefs"></tgDetails>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import storageApi from '@/api/warehouseManagement';
|
|
|
-
|
|
|
import search from './components/search.vue';
|
|
|
import tgDetails from './components/tgDetails.vue';
|
|
|
+ import tgTable from './components/tgTable.vue';
|
|
|
export default {
|
|
|
components: {
|
|
|
search,
|
|
|
- tgDetails
|
|
|
+ tgDetails,
|
|
|
+ tgTable
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- loading: false,
|
|
|
-
|
|
|
- statusOpt: [
|
|
|
- { label: '未提交', value: 0 },
|
|
|
- { label: '审核中', value: 1 },
|
|
|
- { label: '审核通过', value: 2 },
|
|
|
- { label: '审核不通过', value: 3 }
|
|
|
- ]
|
|
|
+ activeName: '入库',
|
|
|
+ loading: false
|
|
|
};
|
|
|
},
|
|
|
- computed: {
|
|
|
- // 表格列配置
|
|
|
- columns() {
|
|
|
- return [
|
|
|
- {
|
|
|
- columnKey: 'index',
|
|
|
- label: '序号',
|
|
|
- type: 'index',
|
|
|
- width: 55,
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- fixed: 'left'
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'code',
|
|
|
- label: '编码',
|
|
|
- align: 'center',
|
|
|
- minWidth: 110
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'workOrderCode',
|
|
|
- label: '工单编码',
|
|
|
- align: 'center',
|
|
|
- minWidth: 110
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'warehouseName',
|
|
|
- label: '仓库名称 ',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
- prop: 'categoryLevelName',
|
|
|
- label: '物品分类',
|
|
|
- minWidth: 200,
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'categoryName',
|
|
|
- label: '名称',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- { label: '型号', prop: 'modelType', width: '150' },
|
|
|
- { label: '规格', prop: 'specification', width: '150' },
|
|
|
- { label: '牌号', prop: 'brandNum', width: '50' },
|
|
|
- {
|
|
|
- slot: 'totalCount',
|
|
|
- label: '总数量',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
- slot: 'totalPackage',
|
|
|
- label: '总包装',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
- slot: 'totalWeight',
|
|
|
- label: '总重量',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'type',
|
|
|
- label: '入库类型',
|
|
|
- align: 'center',
|
|
|
- formatter: (row, column, cellValue) => {
|
|
|
- return cellValue == 1 ? '生产入库' : '';
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'approvalUserName',
|
|
|
- label: '审核人',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
- prop: 'createTime',
|
|
|
- label: '创建时间',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
- },
|
|
|
- {
|
|
|
- slot: 'approvalStatus',
|
|
|
- label: '状态',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
- columnKey: 'action',
|
|
|
- label: '操作',
|
|
|
- width: 120,
|
|
|
- align: 'center',
|
|
|
- resizable: false,
|
|
|
- fixed: 'right',
|
|
|
- slot: 'action',
|
|
|
- showOverflowTooltip: true
|
|
|
- }
|
|
|
- ];
|
|
|
- }
|
|
|
- },
|
|
|
created() {},
|
|
|
methods: {
|
|
|
- statusFormatter(status) {
|
|
|
- const obj = this.statusOpt.find((i) => i.value == status);
|
|
|
- return obj && obj.label;
|
|
|
- },
|
|
|
- /* 表格数据源 */
|
|
|
- datasource({ page, limit, where }) {
|
|
|
- return storageApi.getinboundRequestsList({
|
|
|
- pageNum: page,
|
|
|
- size: limit,
|
|
|
- ...where
|
|
|
- });
|
|
|
+ handleClick(tab) {
|
|
|
+ this.activeName = tab.name;
|
|
|
+ this.$refs.tableRef && this.$refs.tableRef.reload(tab.name);
|
|
|
},
|
|
|
-
|
|
|
- details(row) {
|
|
|
- console.log(row);
|
|
|
- this.$refs.tgDetailsRefs.open(row);
|
|
|
- },
|
|
|
-
|
|
|
- storage(row) {
|
|
|
- this.$router.push({
|
|
|
- path: '/warehouseManagement/stockManagement/add',
|
|
|
- query: {
|
|
|
- id: row.id
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
/* 刷新表格 */
|
|
|
reload(where) {
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.table.reload({ page: 1, where });
|
|
|
- });
|
|
|
+ this.$refs.tableRef.reload(where);
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss" scoped></style>
|
|
|
+<style lang="scss" scoped>
|
|
|
+ #inboundRequests {
|
|
|
+ height: 100%;
|
|
|
+ width: 100%;
|
|
|
+ // :deep(.el-card) {
|
|
|
+ // height: 100%;
|
|
|
+ // .el-card__body {
|
|
|
+ // height: 100%;
|
|
|
+ // display: flex;
|
|
|
+ // flex-direction: column;
|
|
|
+ // .el-tabs--border-card {
|
|
|
+ // flex: 1;
|
|
|
+ // display: flex;
|
|
|
+ // flex-direction: column;
|
|
|
+ // .el-tabs__content {
|
|
|
+ // flex: 1;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ }
|
|
|
+</style>
|