wanshenmean
8 小时以前 75ef0dfecf2331c0828a1a182b1d3243d3041c51
Code/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.jsx
@@ -28,6 +28,11 @@
              <el-button
                type="primary"
                size="small"
                onClick={($e) => { this.handleBind(row); }}
              >绑定</el-button>
              <el-button
                type="primary"
                size="small"
                onClick={($e) => { this.handleInbound(row); }}
              >进站</el-button>
              <el-button
@@ -36,10 +41,42 @@
                style="margin-left: 8px"
                onClick={($e) => { this.handleOutbound(row); }}
              >出站</el-button>
              <el-button
                type="success"
                size="small"
                style="margin-left: 8px"
                onClick={($e) => { this.handleUnbind(row); }}
              >解绑</el-button>
            </div>
          );
        }
      });
    },
    // 托盘组盘操作
    async handleBind(row) {
      try {
        await this.$confirm(`确认执行托盘组盘操作?\n托盘编号:${row.palletCode}`, "组盘确认", {
          confirmButtonText: "确认",
          cancelButtonText: "取消",
          type: "warning"
        });
        const result = await this.http.post("/api/StockInfoDetail/BindContainer", {
          palletCode: row.palletCode
        }, "正在调用MES接口...");
        if (result.status) {
          this.$Message.success(result.message || "托盘组盘成功");
          this.$refs.table.load();
        } else {
          this.$error(result.message || "托盘组盘失败");
        }
      } catch (error) {
        if (error !== "cancel") {
          this.$error(error.message || "网络错误,请稍后重试");
        }
      }
    },
    // 托盘进站操作
@@ -96,6 +133,32 @@
      }
    },
    // 托盘拆盘操作
    async handleUnbind(row) {
      try {
        await this.$confirm(`确认执行托盘拆盘操作?\n托盘编号:${row.palletCode}`, "拆盘确认", {
          confirmButtonText: "确认",
          cancelButtonText: "取消",
          type: "warning"
        });
        const result = await this.http.post("/api/StockInfoDetail/UnbindContainer", {
          palletCode: row.palletCode,
        }, "正在调用MES接口...");
        if (result.status) {
          this.$Message.success(result.message || "托盘拆盘成功");
          this.$refs.table.load();
        } else {
          this.$error(result.message || "托盘拆盘失败");
        }
      } catch (error) {
        if (error !== "cancel") {
          this.$error(error.message || "网络错误,请稍后重试");
        }
      }
    },
    onInited() {
      // 框架初始化配置后
    },