<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="orderNo" align="center" label="订单编号">
        <template #default="scope">
          <span style="color: #4080ff;cursor: pointer;" @click="orderNoGoUrl(scope.row.orderNo)">{{ scope.row.orderNo
          }}</span>
        </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 router = useRouter();
const props = defineProps({
  list: {
    type: Array,
    default: () => []
  }
})
function orderNoGoUrl(value) {
  router.push({ name: 'orderIndex', query: { orderNo: value } });
}
</script>
