<!--
 * @Author: zwq
 * @Date: 2023-08-24 14:47:58
 * @LastEditors: zwq
 * @LastEditTime: 2024-10-30 13:52:15
 * @Description:
-->
<template>
	<div>
	<!-- <div class="app-container"> -->
		<base-table
			v-loading="dataListLoading"
			:table-props="propType==='1'?
      [...tableProps,...tableProps1]:tableProps"
      max-height="200"
			:table-data="tableData" />
      </div>
</template>

<script>
import basicPage from './mixins/basic-page';
import { parseTime } from './mixins/code-filter';
import codeFilter from './mixins/code-filter';

import {
	getWarehouseStorehouseGoodsSpecificationPage,
} from '@/api/asrs/warehouseStorehouseGoodsSpecification';
import {
	getWarehouseStorehouseStorageGoodsSpecificationPage,
} from '@/api/asrs/warehouseStorehouseStorageGoodsSpecification';

import { number } from 'echarts';

const tableProps = [
	{
		prop: 'goodSpecificationName',
		label: '产品名',
	},
	{
		prop: 'rollCode',
		label: '膜卷编码',
	},
	{
		prop: 'specification',
		label: '产品规格',
		filter: codeFilter('specification'),
	},
	{
		prop: 'number',
		label: '数量',
	},
	{
		prop: 'grade',
		label: '品质',
	},
];

const tableProps1 = [
	{
		prop: 'cpGrade',
		label: '质检初判等级',
	},
	{
		prop: 'fpGrade',
		label: '质检复判等级',
	},
	{
		prop: 'cureTime',
		label: '需要熟化时间(小时)',
	},
	{
		prop: 'alreadyCureTime',
		label: '已熟化时间(小时)',
	},
	{
		prop: 'createTime',
		label: '入库时间',
		filter: parseTime,
	},
]
export default {
	mixins: [basicPage],
	props: {
		propType: {
			type: String,
			default: '1',
		},
    warehouseId: {
			type: String,
			default: '',
		},
	},
	data() {
		return {
			urlOptions: {
				getDataListURL: this.propType!=='3'?getWarehouseStorehouseGoodsSpecificationPage:getWarehouseStorehouseStorageGoodsSpecificationPage,
			},
			tableProps,
      tableProps1,
			tableData: [],
      listQuery: {
        pageSize: 100,
        pageNo: 1,
        total: 1,
        warehouseStorehouseId:this.warehouseId,
        warehouseStorehouseStorageId:this.warehouseId,
      },
		};
	},
	components: {
	},
	created() {
  },
	methods: {
	},
};
</script>
