wanshenmean
11 小时以前 2db17e312a9bf0cff60917104447260b86178ca2
Code/WMS/WIDESEA_WMSClient/src/extension/stock/groupPalle.jsx
@@ -1,10 +1,11 @@
//此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码
import RobotSelect from './extend/RobotSelect.vue';
let extension = {
  components: {
    //查询界面扩展组件
    gridHeader: '',
    gridBody: '',
    gridBody: RobotSelect,
    gridFooter: '',
    //新建、编辑弹出框扩展组件
    modelHeader: '',
@@ -28,72 +29,28 @@
              <el-button
                type="primary"
                size="small"
                onClick={($e) => { this.handleInbound(row); }}
              >进站</el-button>
                onClick={($e) => { this.handleBind(row); }}
              >绑定</el-button>
              <el-button
                type="success"
                size="small"
                style="margin-left: 8px"
                onClick={($e) => { this.handleOutbound(row); }}
              >出站</el-button>
                onClick={($e) => { this.handleUnbind(row); }}
              >解绑</el-button>
            </div>
          );
        }
      });
    },
    // 托盘进站操作
    async handleInbound(row) {
      try {
        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接口...");
        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 || "网络错误,请稍后重试");
        }
      }
    // 托盘组盘操作
    handleBind(row) {
      this.$refs.gridBody.open('bind', row);
    },
    // 托盘出站操作
    async handleOutbound(row) {
      try {
        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接口...");
        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 || "网络错误,请稍后重试");
        }
      }
    // 托盘拆盘操作
    handleUnbind(row) {
      this.$refs.gridBody.open('unbind', row);
    },
    onInited() {