wanshenmean
15 小时以前 d14030746fcd0310d3c9b028fe2c0a5b78984eb6
Code/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.jsx
@@ -8,21 +8,21 @@
    gridBody: RobotSelect,
    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>
@@ -50,7 +50,7 @@
              >解绑</el-button>
            </div>
          );
        }
        },
      });
    },
@@ -62,16 +62,24 @@
    // 托盘进站操作
    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 || "托盘进站成功");
@@ -89,16 +97,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 || "托盘出站成功");
@@ -122,6 +138,16 @@
      // 框架初始化配置后
    },
    searchBefore(param) {
      const stockStatusFilter = {
        name: "stockStatus",
        value: "1",
        displayType: "notequal",
      };
      if (!param.wheres) {
        param.wheres = [];
      }
      // 将过滤条件添加到查询参数中
      param.wheres.push(stockStatusFilter);
      return true;
    },
    searchAfter(result) {
@@ -138,8 +164,8 @@
    },
    modelOpenAfter(row) {
      // 点击编辑、新建按钮弹出框后
    }
  }
    },
  },
};
export default extension;