|
|
@@ -0,0 +1,161 @@
|
|
|
+<template>
|
|
|
+ <ele-modal
|
|
|
+ title="锁库详情"
|
|
|
+ :visible.sync="visible"
|
|
|
+ :before-close="handleClose"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :close-on-press-escape="false"
|
|
|
+ append-to-body
|
|
|
+ width="75%"
|
|
|
+ :maxable="true"
|
|
|
+ >
|
|
|
+ <el-card shadow="never">
|
|
|
+ <el-descriptions :column="3">
|
|
|
+ <el-descriptions-item label="物品编码">{{
|
|
|
+ formData.categoryCode || '-'
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="物品名称">{{
|
|
|
+ formData.categoryName || '-'
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="批次号">{{
|
|
|
+ formData.batchNo || '-'
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ <div style="margin-top: 12px">
|
|
|
+ <ele-pro-table
|
|
|
+ ref="eleTable"
|
|
|
+ :columns="columns"
|
|
|
+ :datasource="detailList"
|
|
|
+ height="calc(100vh - 460px)"
|
|
|
+ full-height="calc(100vh - 116px)"
|
|
|
+ tool-class="ele-toolbar-form"
|
|
|
+ :needPage="false"
|
|
|
+ :initLoad="false"
|
|
|
+ >
|
|
|
+ <template v-slot:sourceType="{ row }">
|
|
|
+ <span>{{ LockOrderSourceTypeEnum[row.sourceType] || '-' }}</span>
|
|
|
+ </template>
|
|
|
+ <template v-slot:status="{ row }">
|
|
|
+ <span>{{ lockStatusEnum[row.status] || '-' }}</span>
|
|
|
+ </template>
|
|
|
+ </ele-pro-table>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ </ele-modal>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+ import storageApi from '@/api/warehouseManagement';
|
|
|
+ export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ visible: false,
|
|
|
+ formData: {},
|
|
|
+ detailList: [],
|
|
|
+ loading: false,
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ columnKey: 'index',
|
|
|
+ type: 'index',
|
|
|
+ width: 50,
|
|
|
+ align: 'center',
|
|
|
+ label: '序号',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'orderNo',
|
|
|
+ label: '锁库单号',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 140
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'sourceOrderNo',
|
|
|
+ label: '订单号',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 140
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'sourceType',
|
|
|
+ label: '单据类型',
|
|
|
+ slot: 'sourceType',
|
|
|
+ align: 'center',
|
|
|
+ width: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'customerName',
|
|
|
+ label: '客户名称',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 160
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'quantity',
|
|
|
+ label: '锁定数量',
|
|
|
+ align: 'center',
|
|
|
+ width: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'status',
|
|
|
+ label: '锁定状态',
|
|
|
+ slot: 'status',
|
|
|
+ align: 'center',
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'orderDate',
|
|
|
+ label: '锁库时间',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ width: 160
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ LockOrderSourceTypeEnum: {
|
|
|
+ 0: '无定义',
|
|
|
+ 1: '销售发货单',
|
|
|
+ 2: '领料出库单',
|
|
|
+ 3: '调拨出库单',
|
|
|
+ 4: '销售订单'
|
|
|
+ },
|
|
|
+ lockStatusEnum: {
|
|
|
+ 1: '锁定中',
|
|
|
+ 2: '已扣减',
|
|
|
+ 3: '已释放'
|
|
|
+ }
|
|
|
+ };
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ async open(row) {
|
|
|
+ this.visible = true;
|
|
|
+ this.formData = row || {};
|
|
|
+ this.detailList = [];
|
|
|
+ await this.loadData();
|
|
|
+ },
|
|
|
+ async loadData() {
|
|
|
+ const row = this.formData || {};
|
|
|
+ const params = {
|
|
|
+ pageNum: 1,
|
|
|
+ size: 999,
|
|
|
+ productId: row.categoryId,
|
|
|
+ productCode: row.categoryCode,
|
|
|
+ batchNo: row.batchNo,
|
|
|
+ systemBatchNo: row.systemBatchNo,
|
|
|
+ warehouseId: row.warehouseId
|
|
|
+ };
|
|
|
+ try {
|
|
|
+ this.loading = true;
|
|
|
+ const res = await storageApi.getLockDetail(params);
|
|
|
+ this.detailList = res || [];
|
|
|
+ } catch (e) {
|
|
|
+ this.detailList = [];
|
|
|
+ } finally {
|
|
|
+ this.loading = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleClose() {
|
|
|
+ this.visible = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+</script>
|