Code/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.jsx
@@ -3,58 +3,74 @@
let extension = {
  components: {
    //查询界面扩展组件
    gridHeader: '',
    gridBody: '',
    gridFooter: '',
    gridHeader: "",
    gridBody: "",
    gridFooter: "",
    //新建、编辑弹出框扩展组件
    modelHeader: '',
    modelBody: '',
    modelFooter: ''
    modelHeader: "",
    modelBody: "",
    modelFooter: "",
  },
  tableAction: '',
  tableAction: "",
  buttons: { view: [], box: [], detail: [] },
  methods: {
    onInit() {
      // 添加MES操作列
      this.columns.push({
        title: '操作',
        field: '操作',
        align: 'center',
        title: "操作",
        field: "操作",
        align: "center",
        width: 200,
        fixed: 'right',
        fixed: "right",
        render: (h, { row, column, index }) => {
          return (
            <div>
              <el-button
                type="primary"
                size="small"
                onClick={($e) => { this.handleInbound(row); }}
              >进站</el-button>
                onClick={($e) => {
                  this.handleInbound(row);
                }}
              >
                进站
              </el-button>
              <el-button
                type="success"
                size="small"
                style="margin-left: 8px"
                onClick={($e) => { this.handleOutbound(row); }}
              >出站</el-button>
                onClick={($e) => {
                  this.handleOutbound(row);
                }}
              >
                出站
              </el-button>
            </div>
          );
        }
        },
      });
    },
    // 托盘进站操作
    async handleInbound(row) {
      try {
        await this.$confirm(`确认执行托盘进站操作?\n托盘编号:${row.palletCode}`, "进站确认", {
          confirmButtonText: "确认",
          cancelButtonText: "取消",
          type: "warning"
        });
        await this.$confirm(
          `确认执行托盘进站操作?\n托盘编号:${row.palletCode}`,
          "进站确认",
          {
            confirmButtonText: "确认",
            cancelButtonText: "取消",
            type: "warning",
          },
        );
        const result = await this.http.post("/api/StockInfo/inboundInContainer", {
          palletCode: row.palletCode,
          stockId: row.id
        }, "正在调用MES接口...");
        const result = await this.http.post(
          "/api/StockInfo/inboundInContainer",
          {
            palletCode: row.palletCode,
            stockId: row.id,
          },
          "正在调用MES接口...",
        );
        if (result.status) {
          this.$Message.success(result.message || "托盘进站成功");
@@ -72,16 +88,24 @@
    // 托盘出站操作
    async handleOutbound(row) {
      try {
        await this.$confirm(`确认执行托盘出站操作?\n托盘编号:${row.palletCode}`, "出站确认", {
          confirmButtonText: "确认",
          cancelButtonText: "取消",
          type: "warning"
        });
        await this.$confirm(
          `确认执行托盘出站操作?\n托盘编号:${row.palletCode}`,
          "出站确认",
          {
            confirmButtonText: "确认",
            cancelButtonText: "取消",
            type: "warning",
          },
        );
        const result = await this.http.post("/api/StockInfo/outboundInContainer", {
          palletCode: row.palletCode,
          stockId: row.id
        }, "正在调用MES接口...");
        const result = await this.http.post(
          "/api/StockInfo/outboundInContainer",
          {
            palletCode: row.palletCode,
            stockId: row.id,
          },
          "正在调用MES接口...",
        );
        if (result.status) {
          this.$Message.success(result.message || "托盘出站成功");
@@ -100,6 +124,16 @@
      // 框架初始化配置后
    },
    searchBefore(param) {
      const stockStatusFilter = {
        name: "stockStatus",
        value: "1",
        displayType: "notequal",
      };
      if (!param.wheres) {
        param.wheres = [];
      }
      // 将过滤条件添加到查询参数中
      param.wheres.push(stockStatusFilter);
      return true;
    },
    searchAfter(result) {
@@ -116,8 +150,8 @@
    },
    modelOpenAfter(row) {
      // 点击编辑、新建按钮弹出框后
    }
  }
    },
  },
};
export default extension;