From 1378fc4cd7abc24ed3a982e09437c2c8a74e9f2f Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期二, 27 一月 2026 19:06:32 +0800
Subject: [PATCH] 代码优化

---
 项目代码/WIDESEA_WMSClient/src/views/stock/stockInfo.vue |  296 +++++++++++++++++++++++++++++------------------------------
 1 files changed, 145 insertions(+), 151 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockInfo.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockInfo.vue"
index 22f2eea..ba23a85 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockInfo.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockInfo.vue"
@@ -1,154 +1,148 @@
 
 <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/stockInfo.js";
-  import { ref, defineComponent } from "vue";
-  export default defineComponent({
-    setup() {
-      const table = ref({
-        key: "id",
-        footer: "Foots",
-        cnName: "搴撳瓨淇℃伅",
-        name: "stockInfo",
-        url: "/StockInfo/",
-        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: "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>
+  <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/stockInfo.js";
+import { ref, defineComponent } from "vue";
+export default defineComponent({
+  setup() {
+    const table = ref({
+      key: "id",
+      footer: "Foots",
+      cnName: "搴撳瓨淇℃伅",
+      name: "stockInfo",
+      url: "/StockInfo/",
+      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", type: 'like' },
+        { title: "璐т綅缂栧彿", field: "locationCode", type: 'like' },
+        { title: "鎵樼洏绫诲瀷", field: "palletType", type: "select", dataKey: "palletType", data: [] },
+      ],
+    ]);
+    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: "palletType",
+        title: "鎵樼洏绫诲瀷",
+        type: "string",
+        width: 150,
+        align: "left",
+        bind: { key: "palletType", data: [] },
+      },
+      {
+        field: "locationCode",
+        title: "璐т綅缂栧彿",
+        type: "string",
+        width: 150,
+        align: "left",
+      },
+      {
+        field: "warehouseId",
+        title: "浠撳簱",
+        type: "select",
+        width: 100,
+        align: "left",
+        bind: { key: "warehouses", data: [] },
+        hidden: true
+      },
+      {
+        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>
     
\ No newline at end of file

--
Gitblit v1.9.3