dengjunjie
2025-06-17 4f39dcc195f28fa275fc2d065fbf1bf6a46c21b7
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/extension/basic/extend/GetLocationStatus.vue
@@ -9,10 +9,18 @@
                    <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" 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>
                        <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>
@@ -28,7 +36,7 @@
    data() {
        return {
            showDetialBox: false,
            row: {},
            row: null,
            tableData: [],
            tableColumns: [
                {
@@ -48,7 +56,7 @@
                {
                    field: "beforeStatus",
                    title: "变动前货位状态",
                    type: "string",
                    type: "tag",
                    width: 150,
                    align: "left",
                    bindKey: "locationStatusEnum"
@@ -56,7 +64,7 @@
                {
                    field: "afterStatus",
                    title: "变动后货位状态",
                    type: "decimal",
                    type: "tag",
                    width: 150,
                    align: "left",
                    bindKey: "locationStatusEnum"
@@ -64,8 +72,8 @@
                {
                    field: "changeType",
                    title: "变动类型",
                    type: "string",
                    width: 90,
                    type: "tag",
                    width: 100,
                    align: "left",
                    bindKey: "stockChangeType",
                },
@@ -81,7 +89,7 @@
                    field: "orderNo",
                    title: "单据编号",
                    type: "int",
                    width: 120,
                    width: 160,
                    align: "left",
                },
                {
@@ -112,6 +120,7 @@
                    type: "datetime",
                    width: 160,
                    align: "left",
                    sort: true,
                },
                {
                    field: "modifier",
@@ -128,6 +137,7 @@
                    width: 160,
                    align: "left",
                    hidden: true,
                    sort: true,
                },
                {
                    field: "remark",
@@ -138,6 +148,19 @@
                    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,
        };
    },
    methods: {
@@ -145,7 +168,7 @@
            this.row = row;
            this.showDetialBox = true;
            this.getDetailData();
            getDictionaryData();
            this.getDictionaryData();
        },
        getDetailData() {
            this.http
@@ -157,7 +180,6 @@
                .then((x) => {
                    if (!x.status) return this.$message.error(x.message);
                    this.tableData = x.data;
                    console.log(this.tableData);
                });
        },
        getDictionaryData() {
@@ -179,27 +201,21 @@
                });
        },
        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.prop]);
          if (dicItem) {
            return dicItem.value;
          } else {
            return row[column.prop];
          }
        } else {
          return row[column.prop];
        }
      }
    },
        tableRowClassName({ row, rowIndex }) {
            if (row.isNormal) {
            } else if (row.isManual) {
                return "success-row";
            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];
                }
            }
        },
    },