viewModel.on("customInit", function (data) {
        // 关闭或取消关原因详情--页面初始化
        viewModel.on("afterLoadData", function (event) {
          if (
            viewModel.originalParams["SetData"] &&
            viewModel.originalParams["SetData"] == "取消关闭"
          ) {
            viewModel.get("canCloseRea").setVisible("true"); //取消关闭显示
            viewModel.get("reasonClose").setVisible("false"); //关闭隐藏
          } else if (
            viewModel.originalParams["SetData"] &&
            viewModel.originalParams["SetData"] == "关闭"
          ) {
            viewModel.get("canCloseRea").setVisible("false"); //取消关闭隐藏
            viewModel.get("reasonClose").setVisible("true"); //关闭显示
          }
        });
      });
 //【关闭】功能
      viewModel.get("button135ja").on("click", function (args) {
        let state = viewModel.get("state").getValue();
        let reasonClose = viewModel.get("reasonClose").getValue();
        if (state !== "1") {
          cb.utils.alert("状态为待认证才可关闭", "error");
          return false;
        }
        if (
          reasonClose == null ||
          reasonClose == undefined ||
          reasonClose == ""
        ) {
          let params = {
            mode: "add",
            setData: "关闭",
          };
          let data = {
            billtype: "Voucher",
            billno: "f8724c3c",
            params: params,
          };
          cb.loader.runCommandLine("bill", data, viewModel);
        }
      }); //【取消关闭】功能
      viewModel.get("button175re").on("click", function (args) {
        let closeState = viewModel.get("closeState").getValue();
        let canCloseRea = viewModel.get("canCloseRea").getValue();
        if (closeState !== "1") {
          cb.utils.alert("关闭状态为已关闭才可取消关闭", "error");
          return false;
        }
        if (
          canCloseRea == null ||
          canCloseRea == undefined ||
          canCloseRea == ""
        ) {
          let params = {
            mode: "add",
            setData: "取消关闭",
          };
          let data = {
            billtype: "Voucher",
            billno: "f8724c3c",
            params: params,
          };
          cb.loader.runCommandLine("bill", data, viewModel);
        }
      });
有bug的写法

viewModel.communication({//弹出模态框
        type: 'modal',
        payload: {
            mode: 'inner',
            groupCode: 'modal16tc',
            viewModel: viewModel,
            readOnly: false
        }
    })

有bug的样式

最新文章

  1. 共享文件夹:The user has not been granted the requested logon type at this computer
  2. MSSQL 多行合并为一行
  3. 异步数据库查询 Z
  4. Scala 深入浅出实战经典 第67讲:Scala并发编程匿名Actor、消息传递、偏函数解析
  5. 理解tornado
  6. perl dbi 测试 mysql wait_timeout
  7. poj3708:函数式化简+高精度进制转换+同余方程组
  8. Ubuntu12.04环境搭建遇到的问题和建议(一个)
  9. HDU 1724 Ellipse [辛普森积分]
  10. [BZOJ4825][HNOI2017]单旋spaly
  11. Java 开发, volatile 你必须了解一下
  12. VS Code插件配置
  13. 15 python 初学(闭包,函数装饰器)
  14. 黄聪:visual studio 2017编译运行出现脚本发生错误等问题如何解决?
  15. Ubuntu 16.04: How to install OpenCV
  16. Java多线程面试大全
  17. poj 2406 Power Strings KMP匹配
  18. MyBitis(iBitis)系列随笔之三:简单实现CRUD
  19. Delphi XE TStringBuilder
  20. ss-libev 源码解析local篇(1): ss_local的启动,客户端连入

热门文章

  1. Linux:atime、mtime、ctime
  2. IIS SSL认证流程& url重写
  3. shell 命令小记
  4. Android 缩小动画
  5. 原生javascript解锁恶心的CSDN强制关注才能阅读让文章自动展开(转部分内容)
  6. swagger界面不显示
  7. 七、25.创建user子分支并把代码推送到码云仓库中
  8. 肖sir ___性能测试____多线程
  9. springboot中实现逆向工程
  10. Linux安装Jemalloc