liulijun
2026-02-25 f10cf643e5be44f8dd525d91bb4953b46778a377
´úÂë¹ÜÀí/WMS/WMSClient/src/views/stock/proStockInfo.vue
@@ -1,168 +1,177 @@
<template>
    <view-grid
      ref="grid"
      :columns="columns"
      :detail="detail"
      :editFormFields="editFormFields"
      :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields"
      :searchFormOptions="searchFormOptions"
      :table="table"
      :extend="extend"
    >
    </view-grid>
  </template>
  <view-grid
    ref="grid"
    :columns="columns"
    :detail="detail"
    :editFormFields="editFormFields"
    :editFormOptions="editFormOptions"
    :searchFormFields="searchFormFields"
    :searchFormOptions="searchFormOptions"
    :table="table"
    :extend="extend"
  >
  </view-grid>
</template>
    <script>
  import extend from "@/extension/stock/proStockInfo.js";
  import { ref, defineComponent } from "vue";
  export default defineComponent({
    setup() {
      const table = ref({
        key: "id",
        footer: "Foots",
        cnName: "成品库存信息",
        name: "proStockInfo",
        url: "/proStockInfo/",
        sortName: "id",
      });
      const editFormFields = ref({
        deviceCode: "",
        deviceName: "",
        deviceType: "",
        deviceStatus: "",
        deviceIp: "",
        devicePort: "",
        devicePlcType: "",
        deviceRemark: "",
      });
      const editFormOptions = ref([
       [
        {field:'palletCode',title:'胶框号',type:'string'},
        {field:'locationCode',title:'货位编号',type:'string'},
       ]
      ]);
      const searchFormFields = ref({
        palletCode: "",
        locationCode: "",
      });
      const searchFormOptions = ref([
        [
          { title: "胶框号", field: "palletCode" },
          { title: "货位编号", field: "locationCode" },
        ],
      ]);
      const columns = ref([
        {
          field: "id",
          title: "Id",
          type: "int",
          width: 90,
          hidden: true,
          readonly: true,
          require: true,
          align: "left",
        },
        {
          field: "palletCode",
          title: "胶框号",
          type: "string",
          width: 90,
          align: "left",
        },
        {
          field: "shipmentOrder",
          title: "出货单号",
          type: "string",
          width: 90,
          align: "left",
        },
         {
          field: "palletType",
          title: "胶框类型",
          type: "string",
          width: 90,
          align: "left",
        },
        {
          field: "locationCode",
          title: "货位编号",
          type: "string",
          width: 150,
          align: "left",
        },
        // {
        //   field: "isFull",
        //   title: "是否满盘",
        //   type: "string",
        //   width: 150,
        //   align: "left",
        //   bind: { key: "yesno", data: [] },
        // },
         {
          field: "warehouseId",
          title: "仓库",
          type: "select",
          width: 100,
          align: "left",
          bind: { key: "warehouses", data: [] },
        },
        {
          field: "creater",
          title: "创建人",
          type: "string",
          width: 90,
          align: "left",
        },
        {
          field: "createDate",
          title: "创建时间",
          type: "datetime",
          width: 160,
          align: "left",
        },
        {
          field: "modifier",
          title: "修改人",
          type: "string",
          width: 100,
          align: "left",
          hidden:true
        },
        {
          field: "modifyDate",
          title: "修改时间",
          type: "datetime",
          width: 160,
          align: "left",
          hidden:true
        },
        {
          field: "remark",
          title: "备注",
          type: "string",
          width: 100,
          align: "left",
          hidden:true
        },
      ]);
      const detail = ref({
        cnName: "#detailCnName",
        table: "",
        columns: [],
        sortName: "",
      });
      return {
        table,
        extend,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
      };
    },
  });
  </script>
import extend from "@/extension/stock/proStockInfo.js";
import { ref, defineComponent } from "vue";
export default defineComponent({
  setup() {
    const table = ref({
      key: "id",
      footer: "Foots",
      cnName: "成品库存信息",
      name: "proStockInfo",
      url: "/ProStockInfo/",
      sortName: "id",
    });
    const editFormFields = ref({
    });
    const editFormOptions = ref([
      [
      ],
    ]);
    const searchFormFields = ref({
      locationCode: "",
      containerCode: "",
      containerType: "",
      warehouseId: "",
    });
    const searchFormOptions = ref([
      [
        { title: "料框编号", field: "containerCode", type: "like" },
        { title: "货位编号", field: "locationCode", type: "like" },
        { title: "料框类型", field: "containerType" ,type: "select",dataKey: "containerTypeEnum",data: [],},
        { title: "仓库", field: "warehouseId" ,type: "select",dataKey: "warehouseEnum",data: [],},
      ],
    ]);
    const columns = ref([
      {
        field: "id",
        title: "Id",
        type: "int",
        width: 100,
        hidden: true,
        readonly: true,
        require: true,
        align: "left",
      },
      {
        field: "containerCode",
        title: "料框编号",
        type: "string",
        width: 200,
        align: "left",
      },
      {
        field: "locationCode",
        title: "货位编号",
        type: "string",
        width: 280,
        align: "left",
      },
      {
        field: "containerType",
        title: "料框类型",
        type: "int",
        width: 100,
        align: "left",
      },
      {
        field: "warehouseId",
        title: "仓库",
        type: "int",
        width: 90,
        align: "left",
        bind: { key: "warehouseEnum", data: [] },
      },
      {
        field: "stockStatus",
        title: "库存状态",
        type: "int",
        width: 120,
        align: "left",
        bind: { key: "stockStatusEnum", data: [] },
      },
      {
        field: "isEmpty",
        title: "是否空框",
        type: "bool",
        width: 90,
        align: "left",
        bind: { key: "", data: [{ key: "true", value: "是" }, { key: "false", value: "否" }] },
      },
      {
        field: "isFill",
        title: "是否满框",
        type: "bool",
        width: 90,
        align: "left",
        bind: { key: "", data: [{ key: "true", value: "是" }, { key: "false", value: "否" }] },
      },
      {
        field: "isPick",
        title: "是否分拣",
        type: "bool",
        width: 90,
        align: "left",
        bind: { key: "", data: [{ key: "true", value: "是" }, { key: "false", value: "否" }] },
      },
      {
        field: "remark",
        title: "备注",
        type: "string",
        width: 120,
        align: "left",
      },
      {
        field: "creater",
        title: "创建人",
        type: "string",
        width: 90,
        align: "left",
      },
      {
        field: "createDate",
        title: "创建时间",
        type: "datetime",
        width: 160,
        align: "left",
      },
      {
        field: "modifier",
        title: "修改人",
        type: "string",
        width: 100,
        align: "left",
      },
      {
        field: "modifyDate",
        title: "修改时间",
        type: "datetime",
        width: 160,
        align: "left",
      },
    ]);
    const detail = ref({
      cnName: "#detailCnName",
      table: "",
      columns: [],
      sortName: "",
    });
    return {
      table,
      extend,
      editFormFields,
      editFormOptions,
      searchFormFields,
      searchFormOptions,
      columns,
      detail,
    };
  },
});
</script>