qinchulong
2025-05-27 c020f31a67fc5aa5644511bddff075f7ecc85234
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/views/basic/warehouse.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,179 @@
<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/basic/warehouse.js";
import { ref, defineComponent } from "vue";
export default defineComponent({
  setup() {
    const table = ref({
      key: "id",
      footer: "Foots",
      cnName: "仓库信息",
      name: "warehouse",
      url: "/Warehouse/",
      sortName: "id",
    });
    const editFormFields = ref({
      warehouseCode: "",
      warehouseName: "",
      warehouseType: "",
      warehouseStatus: "",
      warehouseDes: "",
    });
    const editFormOptions = ref([
      [
        {
          title: "仓库编号",
          required: true,
          field: "warehouseCode",
          type: "string",
        },
        {
          title: "仓库名称",
          required: true,
          field: "warehouseName",
          type: "string",
        },
        {
          title: "仓库描述",
          field: "warehouseDes",
          type: "textarea",
        },
      ],
    ]);
    const searchFormFields = ref({
      warehouseCode: "",
      warehouseName: "",
      warehouseType: "",
      warehouseStatus: "",
    });
    const searchFormOptions = ref([
      [
        { title: "仓库编号", field: "warehouseCode", type: "like" },
        { title: "仓库名称", field: "warehouseName", type: "like" },
        { title: "仓库类型", field: "warehouseType", type: "like" },
        {
          title: "仓库状态",
          field: "warehouseStatus",
          type: "select",
          dataKey: "enableEnum",
          data: [],
        },
      ],
    ]);
    const columns = ref([
      {
        field: "id",
        title: "Id",
        type: "int",
        width: 90,
        hidden: true,
        readonly: true,
        require: true,
        align: "left",
      },
      {
        field: "warehouseCode",
        title: "仓库编号",
        type: "string",
        width: 90,
        align: "left",
      },
      {
        field: "warehouseName",
        title: "仓库名称",
        type: "string",
        width: 150,
        align: "left",
      },
      {
        field: "warehouseType",
        title: "仓库类型",
        type: "string",
        width: 150,
        align: "left",
      },
      {
        field: "warehouseStatus",
        title: "仓库状态",
        type: "decimal",
        width: 90,
        align: "left",
        bind: { key: "enableEnum", data: [] },
      },
      {
        field: "warehouseDes",
        title: "仓库描述",
        type: "string",
        width: 90,
        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",
      },
      {
        field: "remark",
        title: "备注",
        type: "string",
        width: 100,
        align: "left",
      },
    ]);
    const detail = ref({
      cnName: "#detailCnName",
      table: "",
      columns: [],
      sortName: "",
    });
    return {
      table,
      extend,
      editFormFields,
      editFormOptions,
      searchFormFields,
      searchFormOptions,
      columns,
      detail,
    };
  },
});
</script>