| | |
| | | <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 |
| | |
| | | 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 || "网络错误,请稍后重试"); |
| | | } |
| | | } |
| | | }, |
| | | |
| | | // 托盘进站操作 |
| | |
| | | } |
| | | }, |
| | | |
| | | // 托盘拆盘操作 |
| | | 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() { |
| | | // 框架初始化配置后 |
| | | }, |
| | |
| | | return true; |
| | | }, |
| | | searchAfter(result) { |
| | | return true; |
| | | return result; |
| | | }, |
| | | addBefore(formData) { |
| | | return true; |