1
Huangxiaoqiang-03
2024-11-05 f82511343cf2c8ecf3981954e7eb92172d72a905
´úÂë¹ÜÀí/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"
                        <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",
                },
                {
@@ -138,6 +146,7 @@
                    hidden: true,
                },
            ],
            dictionaryList: null,
        };
    },
    methods: {
@@ -145,7 +154,7 @@
            this.row = row;
            this.showDetialBox = true;
            this.getDetailData();
            getDictionaryData();
            this.getDictionaryData();
        },
        getDetailData() {
            this.http
@@ -157,7 +166,6 @@
                .then((x) => {
                    if (!x.status) return this.$message.error(x.message);
                    this.tableData = x.data;
                    console.log(this.tableData);
                });
        },
        getDictionaryData() {
@@ -182,24 +190,18 @@
      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]);
          var dicItem = item.data.find((x) => x.key == row[column.field]);
          console.log(dicItem);
          if (dicItem) {
            return dicItem.value;
          } else {
            return row[column.prop];
          }
          else {
            return row[column.field];
          }
        } else {
          return row[column.prop];
          return row[column.field];
        }
      }
    },
        tableRowClassName({ row, rowIndex }) {
            if (row.isNormal) {
            } else if (row.isManual) {
                return "success-row";
            }
        },
    },