<template>
  <ContainerTit>
    <Container></Container>
    <div slot="headr">
      <el-button type="primary">确定修改</el-button>
    </div>
    <vxe-table ref="xTable1" :data="tableData.goodsDate">
      <vxe-table-column
        field="goodsName"
        title="商品名称"
        width="150"
      ></vxe-table-column>
      <vxe-table-column title="商品图片" width="100">
        <template #default="{ row }">
          <el-image fit="cover" :src="row.goodsImages"></el-image>
        </template>
      </vxe-table-column>
      <vxe-table-column field="no" title="货号" width="150"></vxe-table-column>
      <vxe-table-column
        field="unitName"
        title="规格"
        width="150"
      ></vxe-table-column>
      <vxe-table-column
        field="orderNum"
        title="订单数量"
        width="150"
      ></vxe-table-column>
      <vxe-table-column
        field="pickingNum"
        title="本次应拣数量"
        width="150"
      ></vxe-table-column>
      <vxe-table-column
        field="unitName"
        title="单位名称"
        width="150"
      ></vxe-table-column>
      <vxe-table-column
        field="pickingedNum"
        title="本次拣货数量"
        width="150"
      ></vxe-table-column>
      <vxe-table-column
        field="conversion"
        title="换算结果"
        width="150"
      ></vxe-table-column>
      <vxe-table-column
        field="totalMoney"
        title="金额"
        width="150"
      ></vxe-table-column>
      <vxe-table-column field="pickingStatus" title="拣货状态" width="150">
        <template #default="{ row }">
          <span v-if="row.pickingStatus === 1">未拣货</span>
          <span v-if="row.pickingStatus === 2">待拣货</span>
          <span v-if="row.pickingStatus === 3">拣货完成</span>
        </template>
      </vxe-table-column>
      <vxe-table-column
        field="InspectionNum"
        title="应验数量"
        width="150"
      ></vxe-table-column>
      <vxe-table-column
        field="InspectionedNum"
        title="验货数量"
        width="150"
      ></vxe-table-column>
      <vxe-table-column field="InspectionStatus" title="验货状态" width="150">
        <template #default="{ row }">
          <span v-if="row.InspectionStatus === 5">全部验货</span>
          <span v-if="row.InspectionStatus === 4">未验货</span>
        </template>
      </vxe-table-column>
      <vxe-table-column
        field="remark"
        title="备注"
        width="150"
      ></vxe-table-column>
    </vxe-table>
  </ContainerTit>
</template>
<script>
  import { getPickingInfo } from "@/api/Stock";
  export default {
    data() {
      return {
        id: "",
        tableData: {},
      };
    },
    created() {
      this.id = this.$route.params.id;
      this.getPickingInfo();
    },
    methods: {
      async getPickingInfo() {
        const { data } = await getPickingInfo(this.id);
        this.tableData = data;
        console.log(data);
      },
    },
  };
</script>
<style></style>
