647556386
2026-01-15 cf6a69eed3ac59698f16ee08aedd73d34cf6790d
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue
@@ -64,17 +64,27 @@
            :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>
              <div v-else>
                {{ scoped.row[item.prop] }}
              </div>
            </template>
          </el-table-column>
        </el-table>
@@ -153,6 +163,7 @@
      showDetialBox: false,
      showStationDialog: false, // ç«™å°é€‰æ‹©å¼¹çª—显示控制
      tableData: [],
      dictionaryList: null, // æ–°å¢žï¼šå­—典数据
      tableColumns: [
        {
          prop: "materielCode",
@@ -200,6 +211,13 @@
          type: "string",
        },
        {
          prop: "stockStatus",
          title: "库存明细状态",
          type: "tag",
          width: 90,
          bindKey: "stockStatusEmun",
        },
        {
          prop: "stockId",
          title: "库存主键",
          type: "string",
@@ -232,6 +250,9 @@
      this.showDetialBox = true;
      this.originalQuantity = this.row.lockQuantity;
      this.selectionSum = this.row.lockQuantity;
      // åŠ è½½å­—å…¸æ•°æ®
      this.getDictionaryData();
      this.getData();
      if (this.selectionSum == this.row.orderQuantity) {
@@ -241,6 +262,44 @@
      } else {
        this.selectionClass = "more-style";
      }
    },
    // èŽ·å–å­—å…¸æ•°æ®
    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.prop]);
          if (dicItem) {
            return dicItem.value;
          } else {
            return row[column.prop];
          }
        } else {
          return row[column.prop];
        }
      }
      return row[column.prop];
    },
    // æ‰“开站台选择弹窗
@@ -394,9 +453,7 @@
  justify-content: flex-end;
  gap: 10px;
}
</style>
<style>
.text-button:hover {
  background-color: #f0f9eb !important;
}