From e483ac11616ffc9260d8f491fcc0d66f480b5443 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期四, 16 四月 2026 10:12:52 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/LongTu/FangGangAGV

---
 Code Management/WMS/WIDESEA_WMSClient/src/extension/basic/extend/GetLocationStatus.vue |  395 +++++++++++++++++---------------------------------------
 1 files changed, 122 insertions(+), 273 deletions(-)

diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/extension/basic/extend/GetLocationStatus.vue b/Code Management/WMS/WIDESEA_WMSClient/src/extension/basic/extend/GetLocationStatus.vue
index a861f7d..d66fa80 100644
--- a/Code Management/WMS/WIDESEA_WMSClient/src/extension/basic/extend/GetLocationStatus.vue
+++ b/Code Management/WMS/WIDESEA_WMSClient/src/extension/basic/extend/GetLocationStatus.vue
@@ -1,292 +1,141 @@
 <template>
-  <div>
-    <vol-box
-      v-model="showDetialBox"
-      :lazy="true"
-      width="1500px"
-      :padding="15"
-      title="璐т綅鐘舵�佸彉鍔ㄨ褰�"
-    >
-      <div class="box-table" style="margin-top: 1%">
-        <el-table
-          ref="singleTable"
-          :data="tableData"
-          style="width: 100%; height: 100%"
-          highlight-current-row
-          @row-click="handleRowClick"
-          height="500px"
-          @selection-change="handleSelectionChange"
-        >
-          >
-          <!-- <el-table-column type="selection" width="55"> </el-table-column> -->
-          <el-table-column
-            label="搴忓彿"
-            type="index"
-            fixed="left"
-            width="55"
-            align="center"
-          ></el-table-column>
-          <el-table-column
-            v-for="(item, index) in tableColumns.filter((x) => !x.hidden)"
-            :key="index"
-            :prop="item.field"
-            :label="item.title"
-            :width="item.width"
-            align="center"
-          >
-            <template #default="scoped">
-              <div v-if="item.type == 'icon'">
-                <el-tooltip
-                  class="item"
-                  effect="dark"
-                  :content="item.title"
-                  placement="bottom"
-                  ><el-button
-                    type="text"
-                    @click="tableButtonClick(scoped.row, item)"
-                    ><i
-                      :class="item.icon"
-                      style="font-size: 22px"
-                    ></i></el-button
-                ></el-tooltip>
-              </div>
-              <div v-else-if="item.type == 'tag'">
-                <el-tag size="small">
-                  {{ getDictionary(scoped.row, item) }}
-                </el-tag>
-              </div>
-            </template>
-          </el-table-column>
-        </el-table>
+  <vol-box :lazy="true" v-model="model" title="璐т綅鐘舵�佸彉鍔ㄨ褰�" :width="1820" :padding="5">
+    <div class="table-item">
+      <div class="table-item-header">
+        <div class="table-item-border"></div> <span class="table-item-text">璐т綅鐘舵�佸彉鍔ㄨ褰�</span>
+        <div class="table-item-buttons">
+          <div>
+            <el-button type="primary" @click="reload" color="#95d475" plain>鍒锋柊</el-button>
+          </div>
+        </div>
       </div>
-    </vol-box>
-  </div>
+      <!-- <el-alert type="success" title="" style="line-height: 12px;">
+              鍔熻兘锛氳〃灏惧悎璁°�佹枃浠朵笂浼犮�佺紪杈戙�乤pi鍔犺浇鏁版嵁銆佽嚜鍔ㄥ垎椤点�佽嚜瀹氫箟鎸夐挳銆佽鐐瑰嚮浜嬩欢銆佸姞杞絣oadBefore鑷畾涔夌瓑銆傘�傘��
+          </el-alert> -->
+      <vol-table @loadBefore="loadBefore" @loadAfter="loadAfter" ref="table" :url="url" index :tableData="tableData"
+        :columns="columns" :height="700" :pagination-hide="false" :load-key="true" :column-index="true"></vol-table>
+    </div>
+    <template #footer>
+      <div>
+        <el-button type="primary" size="small" @click="model = false">纭</el-button>
+        <el-button type="default" size="small" @click="model = false">鍏抽棴</el-button>
+      </div>
+    </template>
+  </vol-box>
 </template>
-
-<script>
+<script lang="jsx">
+//濡傛灉鏄嚜瀹氫箟vue椤甸潰浣跨敤鐨勯厤缃紝鍦╲ue椤甸潰鐨剆cript鍚庝竴瀹氳鍔犱笂lang="jsx"
+import VolTable from "@/components/basic/VolTable.vue";
 import VolBox from "@/components/basic/VolBox.vue";
 export default {
-  components: { VolBox },
+  components: {
+    'vol-table': VolTable,
+    'vol-box': VolBox
+  },
   data() {
     return {
-      showDetialBox: false,
-      row: null,
-      tableData: [],
-      tableColumns: [
-        {
-          field: "locationId",
-          title: "璐т綅涓婚敭",
-          type: "string",
-          width: 90,
-          align: "left",
-        },
-        {
-          field: "locationCode",
-          title: "璐т綅缂栧彿",
-          type: "string",
-          align: "left",
-        },
-        {
-          field: "beforeStatus",
-          title: "鍙樺姩鍓嶈揣浣嶇姸鎬�",
-          type: "tag",
-          width: 150,
-          align: "left",
-          bindKey: "locationStatusEnum",
-        },
-        {
-          field: "afterStatus",
-          title: "鍙樺姩鍚庤揣浣嶇姸鎬�",
-          type: "tag",
-          width: 150,
-          align: "left",
-          bindKey: "locationStatusEnum",
-        },
-        {
-          field: "changeType",
-          title: "鍙樺姩绫诲瀷",
-          type: "tag",
-          width: 100,
-          align: "left",
-          bindKey: "locationChangeType",
-        },
-        {
-          field: "orderId",
-          title: "鍗曟嵁涓婚敭",
-          type: "string",
-          width: 90,
-          align: "left",
-          hidden: true,
-        },
-        {
-          field: "orderNo",
-          title: "鍗曟嵁缂栧彿",
-          type: "int",
-          width: 160,
-          align: "left",
-        },
-        {
-          field: "orderDetailId",
-          title: "鍗曟嵁鏄庣粏涓婚敭",
-          type: "string",
-          width: 200,
-          align: "left",
-          hidden: true,
-        },
-        {
-          field: "taskNum",
-          title: "浠诲姟鍙�",
-          type: "string",
-          width: 180,
-          align: "left",
-        },
-        {
-          field: "creater",
-          title: "鍒涘缓浜�",
-          type: "string",
-          width: 90,
-          align: "left",
-        },
-        {
-          field: "createDate",
-          title: "鍒涘缓鏃堕棿",
-          type: "datetime",
-          width: 160,
-          align: "left",
-          sort: true,
-        },
-        {
-          field: "modifier",
-          title: "淇敼浜�",
-          type: "string",
-          width: 100,
-          align: "left",
-          hidden: true,
-        },
-        {
-          field: "modifyDate",
-          title: "淇敼鏃堕棿",
-          type: "datetime",
-          width: 160,
-          align: "left",
-          hidden: true,
-          sort: true,
-        },
-        {
-          field: "remark",
-          title: "澶囨敞",
-          type: "string",
-          width: 100,
-          align: "left",
-          hidden: true,
-        },
-      ],
-      paginations: {
-        sort: "CreateDate",
-        order: "desc",
-        Foots: "",
-        total: 0,
-        // 2020.08.29澧炲姞鑷畾涔夊垎椤垫潯澶у皬
-        sizes: [30, 60, 100, 120],
-        size: 30, // 榛樿鍒嗛〉澶у皬
-        Wheres: [],
-        page: 1,
-        rows: 30,
-      },
-      dictionaryList: null,
-    };
+      model: false,
+      locationCode: '',
+      //鎺ュ彛杩斿洖鏁版嵁锛屽彲浠ユ鏋剁敓鎴愮殑鎺ュ彛getPageData
+      //濡傛灉鏄嚜瀹氫箟鐨勬帴鍙o紝闇�瑕佽繑鍥炵殑鏁版嵁鏍煎紡锛歿total:100,rows:[]}
+      url: "api/LocationStatusChangeRecord/getPageData",
+      columns: [{ field: 'Id', title: '涓婚敭', type: 'int', width: 110, hidden: true, readonly: true, require: true, align: 'left' },
+      { field: 'locationId', title: '璐т綅ID', type: 'int', width: 110, hidden: true, readonly: true, require: true, align: 'left' },
+      { field: 'locationCode', title: '璐т綅缂栧彿', type: 'string', width: 110, require: true, align: 'left' },
+      { field: 'beforeStatus', title: '鍙樺姩鍓嶈揣浣嶇姸鎬�', type: 'int', width: 120, align: 'left', bind: { key: "LocationState", data: [] } },
+      { field: 'afterStatus', title: '鍙樺姩鍚庤揣浣嶇姸鎬�', type: 'int', width: 110, require: true, align: 'left', sort: true, bind: { key: "LocationState", data: [] } },
+      { field: 'changeType', title: '鍙樺姩绫诲瀷锛堝嚭搴撱�佸叆搴撱�佹墜鍔ㄨ皟鏁达級', type: 'string', width: 70, align: 'left', bind: { key: "StatusChangeType", data: [] } },
+      { field: 'orderId', title: '鍗曟嵁涓婚敭', type: 'string', width: 70, align: 'left', hidden: true },
+      { field: 'orderNo', title: '鍗曟嵁缂栧彿', type: 'string', width: 110, align: 'left', hidden: true },
+      { field: 'orderDetailId', title: '鍗曟嵁鏄庣粏涓婚敭', type: 'string', width: 110, align: 'left', hidden: true },
+      { field: 'taskNum', title: '浠诲姟鍙�', type: 'string', width: 110, align: 'left' },
+      { field: 'remark', title: '澶囨敞', type: 'int', width: 110, align: 'left', hidden: true },
+      { field: 'creater', title: '鍒涘缓浜�', type: 'string', sort: true, width: 110, align: 'left', hidden: true },
+      { field: 'createDate', title: '鍒涘缓鏃堕棿', type: 'datetime', sort: true, width: 150, align: 'left', sort: true },
+      { field: 'modifier', title: '淇敼浜�', type: 'string', sort: true, width: 100, align: 'left', hidden: true },
+      { field: 'modifyDate', title: '淇敼鏃堕棿', type: 'datetime', sort: true, width: 150, hidden: true, align: 'left', sort: true }
+      ]
+    }
   },
   methods: {
-    open(row) {
-      this.row = row;
-      this.showDetialBox = true;
-      this.getDetailData();
-      this.getDictionaryData();
+    //鑷畾涔夋寜閽�
+    customOpen(row) {
+      this.locationCode = row.locationCode;
+      this.locationId = row.id;
+      this.model = true;
+      this.$nextTick(() => {
+        this.$refs.table.load(null, true);
+      })
     },
-    getDetailData() {
-      this.http
-        .post(
-          "/api/LocationStatusChangeRecord/GetLocationState?id=" + this.row.id,
-          {},
-          true
-        )
-        .then((x) => {
-          if (!x.status) return this.$message.error(x.message);
-          this.tableData = x.data;
-        });
-    },
-    getDictionaryData() {
-      if (this.dictionaryList) {
-        return;
-      }
-      var param = [];
-      this.tableColumns.forEach((x) => {
-        if (x.type == "tag" && x.bindKey != "") {
-          param.push(x.bindKey);
-        }
-      });
-      this.http
-        .post("api/Sys_Dictionary/GetVueDictionary", param, "鏌ヨ涓�")
-        .then((x) => {
-          if (x.length > 0) {
-            this.dictionaryList = x;
-          }
-        });
-    },
-    getDictionary(row, column) {
-      if (this.dictionaryList) {
-        var item = this.dictionaryList.find((x) => x.dicNo == column.bindKey);
-        if (item) {
-          var dicItem = item.data.find((x) => x.key == row[column.field]);
-          console.log(dicItem);
-          if (dicItem) {
-            return dicItem.value;
-          } else {
-            return row[column.field];
-          }
-        } else {
-          return row[column.field];
-        }
-      }
-    },
-  },
 
-  created() {},
-};
+    loadBefore(params, callBack) {//璋冪敤鍚庡彴鎺ュ彛鍓嶅鐞�
+      //璁剧疆鏌ヨ鏉′欢鍙傛暟
+      params.wheres.push({
+        name: "locationId",
+        value: this.locationId,
+        displayType: "text"//妯$硦鏌ヨ
+      }, {
+        name: "locationCode",
+        value: this.locationCode,
+        displayType: "text"//妯$硦鏌ヨ
+      })
+
+      //涔熷彲浠ョ粰value璁剧疆鍊硷紝鍚庡彴鑷繁瑙f瀽
+      // params.value=this.OrderNo
+
+      //鏌ヨ鍓嶆柟娉曚篃鍙互鍔ㄦ�佽缃畊rl鍙傛暟
+      //params.url='api/xxx/xx?鍙傛暟1='+this.xx鍙傛暟
+
+      callBack(true)//false涓嶄細璋冪敤鍚庡彴鎺ュ彛
+    },
+    //鏌ヨ鍚庢柟娉�
+    loadAfter(rows, callBack, result) {
+      //濡傛灉鏈夊悎璁★細鍚庡彴杩斿洖鍚堣鏍煎紡
+      // var data = new {
+      //     rows: [],//杩斿洖鐨勮鏁版嵁
+      //     total: 200,//杩斿洖鐨勬�昏鏁�
+      //     //鍚堣
+      //     summary: { TotalPrice: 100, TotalQty: 200 }
+      // }
+      // callBack(true)
+    },
+    reload() {
+      this.$refs.table.load(null, true);
+      this.$message.success('鏌ヨ鎴愬姛')
+    }
+  }
+}
 </script>
-
-<style scoped>
-.el-col {
-  border-radius: 4px;
-}
-
-.grid-content {
-  border-radius: 4px;
-  min-height: 36px;
-}
-
-.content-text {
+<style lang="less" scoped>
+.table-item-header {
   display: flex;
   align-items: center;
-  justify-content: center;
-}
+  padding: 6px;
 
-.right-text {
-  display: flex;
-  align-items: center;
-  justify-content: flex-end;
-}
-</style>
-<style>
-.el-table .warning-row {
-  background: #e6a23c;
-}
+  .table-item-border {
+    height: 15px;
+    background: rgb(33, 150, 243);
+    width: 5px;
+    border-radius: 10px;
+    position: relative;
+    margin-right: 5px;
+  }
 
-.el-table .success-row {
-  background: #f0f9eb;
-}
+  .table-item-text {
+    font-weight: bolder;
+  }
 
-.el-table .error-row {
-  background: #f56c6c;
+  .table-item-buttons {
+    flex: 1;
+    text-align: right;
+  }
+
+  .small-text {
+    font-size: 12px;
+    color: #2196F3;
+    margin-left: 10px;
+    position: relative;
+    top: 2px;
+  }
 }
 </style>
\ No newline at end of file

--
Gitblit v1.9.3