cashier-web/src/views/product/indexconfig/Table.vue

38 lines
1.5 KiB
Vue

<template>
<div style="margin-top: 10px;">
<el-table :data="props.list" border style="width: 100%">
<el-table-column prop="productName" align="center" label="商品名称/规格名称" />
<el-table-column prop="afterNumber" align="center" label="变动后库存" />
<el-table-column prop="beforeNumber" align="center" label="原库存" />
<el-table-column prop="inOutNumber" align="center" label="变动数量" />
<el-table-column prop="" align="center" label="类型">
<template #default="scope">
{{ fliterinOutItem(scope.row.inOutItem) }}
</template>
</el-table-column>
<el-table-column prop="createUserName" align="center" label="操作人" />
<el-table-column prop="remark" align="center" label="备注" />
<el-table-column prop="createTime" align="center" label="操作时间" />
</el-table>
</div>
</template>
<script setup>
const props = defineProps({
list: {
type: Array,
default: () => []
}
})
function fliterinOutItem(d) {
// manual-in:手动入库 manual-out:手动出库 win-in:盘盈入库 loss-out:盘亏出库 order-in:订单退款入库 order-out:订单消费出库 damage-out:损耗出库
if (d == 'manual-in') return '手动入库'
else if (d == 'manual-out') return '手动出库'
else if (d == 'win-in') return '盘盈入库'
else if (d == 'loss-out') return '盘亏出库'
else if (d == 'order-in') return '订单退款入库'
else if (d == 'order-out') return '订单消费出库'
else if (d == 'damage-out') return '损耗出库'
}
</script>