<template>
|
<el-header class="m-header" style="height: auto">
|
<!-- <el-row :gutter="10">
|
<el-col :span="5">
|
<el-input v-model="wuliaoxinxi"
|
placeholder="物料编码\物料名称"
|
clearable
|
/>
|
</el-col>
|
|
<el-col :span="3">
|
<el-input v-model="wuliaokuan"
|
placeholder="宽度"
|
clearable
|
oninput="value=value.replace(/\D/g,'')"
|
maxLength='6'
|
/>
|
</el-col>
|
<el-col :span="3">
|
<el-input v-model="wuliaogao"
|
placeholder="高度"
|
clearable
|
oninput="value=value.replace(/\D/g,'')"
|
maxLength='6'
|
/>
|
</el-col>
|
|
<el-col :span="3">
|
<el-cascader
|
placeholder="选择或输入类型"
|
:options="options"
|
filterable
|
clearable>
|
</el-cascader>
|
</el-col>
|
|
<el-col :span="10">
|
<el-button
|
id="select"
|
type="primary"
|
:icon="Search"
|
@click="autoAddRow">查询
|
</el-button>
|
<el-button
|
id="select"
|
type="primary"
|
:icon="Search">线边仓查询
|
</el-button>
|
<el-button
|
id="select"
|
type="primary"
|
:icon="Search">原片月结
|
</el-button>
|
<el-button
|
id="select"
|
type="primary"
|
:icon="Search">辅料月结
|
</el-button>
|
</el-col>
|
|
</el-row>-->
|
</el-header>
|
<el-main style="padding-top: 5px">
|
<el-table :data="tableData" style="width: 100%" max-height="620px" border show-summary sum-text=" "
|
empty-text="暂无数据">
|
<el-table-column fixed="left" prop="rIndex" label="" width="50" align="center"></el-table-column>
|
|
<el-table-column fixed="left" label="操作" width="120">
|
<template #default="scope">
|
<el-button
|
link
|
type="primary"
|
size="small"
|
@click.prevent="deleteRow(scope.$index)"
|
>
|
删除
|
</el-button>
|
<el-button
|
link
|
type="primary"
|
size="small"
|
@click.prevent="deleteRow(scope.$index)"
|
>
|
标记
|
</el-button>
|
</template>
|
</el-table-column>
|
|
|
<el-table-column prop="name" label="库存组织" width="150"/>
|
<el-table-column prop="wlNumber" label="物料编码" width="150"/>
|
<el-table-column prop="state" label="物料名称" width="120"/>
|
<el-table-column prop="city" label="产地" width="120"/>
|
<el-table-column prop="kcNumber" label="库存编号" width="150"/>
|
<el-table-column prop="width" sortable label="宽度" width="120"/>
|
<el-table-column prop="height" sortable label="高度" width="120"/>
|
<el-table-column prop="thick" sortable label="厚度" width="120"/>
|
<el-table-column prop="zip" label="主单位" width="120"/>
|
<el-table-column prop="number" label="安全库存" width="120"/>
|
<el-table-column prop="number" sortable label="库存数" width="120"/>
|
<el-table-column prop="number" label="可用库存" width="120" show-summary="ture"/>
|
<el-table-column prop="number" label="未领数量" width="120"/>
|
<el-table-column prop="zip" sortable label="总面积" width="120"/>
|
<el-table-column prop="zip" label="单片面积" width="120"/>
|
<el-table-column prop="date" label="生产日期" width="120"/>
|
<el-table-column prop="date" label="保质期" width="120"/>
|
<el-table-column prop="zip" label="库存编号" width="120"/>
|
<el-table-column prop="zip" label="库区" width="120"/>
|
<el-table-column prop="zip" label="库位" width="120"/>
|
<el-table-column prop="zip" label="积压库存" width="120"/>
|
<el-table-column prop="zip" label="备注" width="120"/>
|
|
|
</el-table>
|
</el-main>
|
</template>
|
|
|
<script setup>
|
|
import {ref} from 'vue'
|
const wuliaoxinxi = ref('')
|
const wuliaokuan = ref('')
|
const wuliaogao = ref('')
|
const options = [
|
{
|
value: '0',
|
label: '全部'
|
},
|
{
|
value: '1',
|
label: '原片'
|
},
|
{
|
value: '2',
|
label: '化学品'
|
},
|
{
|
value: '3',
|
label: '工具'
|
},
|
{
|
value: '4',
|
label: '木箱'
|
},
|
{
|
value: '5',
|
label: '白玻'
|
},
|
]
|
|
import dayjs from 'dayjs'
|
|
const now = new Date()
|
|
const tableData = ref([
|
{
|
date: '2016-05-01',
|
name: 'Tom',
|
state: 'California',
|
city: 'Los Angeles',
|
address: 'No. 189, Grove St, Los Angeles',
|
zip: 'CA 90036',
|
number: '999',
|
width: '3660',
|
height: '2440',
|
rIndex: 1,
|
}
|
])
|
|
const autoAddRow = () => {
|
for (let i = 0; i < 10; i++) {
|
const randomKCInt = Math.floor(Math.random() * 9999) + 10000;
|
const randomInt = Math.floor(Math.random() * 999) + 1000;
|
const randomZZInt = Math.floor(Math.random() * 99) + 100;
|
const randomSumInt = Math.floor(Math.random() * 99) + 10;
|
const kcThick = i % 3 === 0 ? 5 : i % 4 === 0 ? 6 : i % 5 === 0 ? 8 : 10;
|
now.setDate(now.getDate() + 1)
|
tableData.value.push({
|
date: dayjs(now).format('YYYY-MM-DD'),
|
name: '物料组织' + randomZZInt,
|
state: '物料' + randomSumInt,
|
city: '产地' + (randomSumInt * 6),
|
address: 'No. 189, Grove St, Los Angeles',
|
zip: 'CA 90036',
|
number: 666 + 66 * i,
|
width: '3660',
|
height: '2440',
|
rIndex: tableData.value.length + 1,
|
wlNumber: 'NGWL1000' + randomInt,
|
kcNumber: 'NGKC100' + randomKCInt,
|
thick: kcThick
|
})
|
}
|
}
|
|
</script>
|
|
|
<style scoped>
|
.el-row {
|
margin-bottom: 20px;
|
}
|
|
.el-row:last-child {
|
margin-bottom: 0;
|
}
|
|
.el-col {
|
border-radius: 4px;
|
}
|
|
.m-header {
|
height: 64px;
|
}
|
</style>
|