1
yangpeixing
2025-12-04 63e1ee997a5318e628b992f969bdac2fec6dbf14
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/Dt_BillGroupStock_Hty.jsx
@@ -8,12 +8,11 @@
//此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码
// import gridHeader from "./demo_Product/Dt_BillGroupStockDetail.vue";
import gridBody from "./extend/SupplementationData.vue"
let extension = {
  components: {
    //查询界面扩展组件
    gridHeader: '',
    gridBody: gridBody,
    gridBody: '',
    gridFooter: '',
    //新建、编辑弹出框扩展组件
    modelHeader: '',
@@ -26,52 +25,6 @@
    //下面这些方法可以保留也可以删除
    onInit() {
      //框架初始化配置前,
      let OutBoundBtn = this.buttons.find((x) => x.value == 'OutBound')
      if (OutBoundBtn) {
        OutBoundBtn.onClick = function () {
          // this.$Message.success('点击了按钮')
          let row = this.$refs.table.getSelected() //获取选中的行
          if (row <= 0) {
            //如果没有选中行
            this.$Message.error('请选择一行数据')
            return
          }
          let locationCode = row[0].locationCode
          let palletCode = row[0].palletCode
          this.http
            .get(
              `/api/Task/CreateAndSendOutboundTask?locationCode=${locationCode}&palletCode=${palletCode}`,
              {},
              '正在创建任务'
            )
            .then((res) => {
              //示例:调用后台接口
              if (res.status) {
                this.$Message.success('创建任务成功')
                console.log(res)
                this.refresh() //刷新表格
              } else {
                this.$Message.error(res.message) //错误提示
              }
            })
        }
      }
      var btnSupplementationData = this.buttons.find(x => x.value == "SupplementationData");
            if (btnSupplementationData != null) {
                btnSupplementationData.onClick = () => {
                    let rows = this.$refs.table.getSelected();
                        if (rows.length == 0) {
                            return this.$error("请选择数据!");
                        } else if (rows.length > 1) {
                            return this.$error("只能选择单条数据");
                        }
                        this.$refs.gridBody.open(rows[0].palletCode);
                        this.refresh();
                    }
                }
      //示例:在按钮的最前面添加一个按钮
      // this.buttons.unshift({
      //   //也可以用push或者splice方法来修改buttons数组
@@ -101,29 +54,6 @@
      //示例:设置修改新建、编辑弹出框字段标签的长度
      this.boxOptions.labelWidth = 150
      // this.columns.push({
      //   title: "操作",
      //   field: "操作",
      //   width: 150,
      //   align: "left", // 'center',
      //   render: (h, { row, column, index }) => {
      //     return (
      //       <div>
      //         <el-button
      //           onClick={($e) => {
      //             this.$refs.gridHeader.openModel1(row);
      //           }}
      //           type="primary"
      //           plain
      //           style="height:26px; padding: 10px !important;"
      //         >
      //           æŸ¥çœ‹åº“存明细
      //         </el-button>
      //       </div>
      //     );
      //   },
      // });
      this.columns.forEach((column) => {
@@ -195,7 +125,6 @@
      // this.$refs.table.$refs.table.toggleRowSelection(row) //单击行时选中当前行;
    },
    modelOpenAfter(row) {
      //点击编辑、新建按钮弹出框后,可以在此处写逻辑,如,从后台获取数据
      //(1)判断是编辑还是新建操作: this.currentAction=='Add';
      //(2)给弹出框设置默认值