1
wankeda
2026-01-09 58a1b8b7db72225e0c2acca4f76399899f1bda4f
WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.js
@@ -181,6 +181,43 @@
          }
        }
      });
      this.columns.push({
        field: '操作',
        title: '操作',
        width: 90,
        fixed: 'right',
        align: 'center',
        formatter: (row) => {
            return (
                '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">直接出库</i>'
            );
        },
        click: (row) => {
            this.$confirm("是否确认出库","出库操作确认",{
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning",
            center: true,
            }).then(() => {
              let rows = this.$refs.table.getSelected();
              if (rows.length == 0) return this.$error("请选择数据!");
              if (rows.length > 1) return this.$error("请选择一条数据!");
              const keys = rows.map(row => row.id);
              // 发送POST请求,将ID数组作为请求体发送
              this.http
              .post("api/Task/WMSGenerateSTOutboundTask", keys, "数据处理中...")
              .then((x) => {
                  if (x.status) {
                  this.$Message.success('操作成功');
                  this.refresh();
                } else {
                  return this.$error(x.message);
                }
              });
            });
        }
    });
    },
    onInited() {
      //框架初始化配置后