define(function (require, exports, module) { let BaseBiz = require('apps/rht/base/rhtBiz'); let rhtComm = require('apps/rht/comm/rhtComm'); let IsdsMasterChg = false; let IsdsDetailChg = false; /** * 控制按钮的可用 * @param opCode 按钮编码 * @return [description] */ function Biz(vm) { //继承第一步,构造继承 BaseBiz.call(this, vm); } //继承第二步,方法继承 inherits(Biz, BaseBiz); Biz.prototype.initCompleted = function () { this.super('initCompleted'); this.dsMaster.serverBiz = 'pluExPatternBiz' }; let MaxSerialNo = 1; //保存前记录日志 Biz.prototype.afterEdit = function () { return this.super('afterEdit'); }; //保存后记录日志 Biz.prototype.beforeSave = function () { return this.super('beforeSave'); }; //新增行后处理,默认值已经处理 Biz.prototype.afterNewRow = function (dataSrc, newRow) { //let sdate=new Date(Store.bizDao.getSysDate()).format('yyyy-MM-dd'); if (dataSrc.uiObjCode === this.dsDetail.uiObjCode) { this.getMaxSerialNo(); newRow.setColumnValue('SerialNo',MaxSerialNo+1); } }; //主表 CanRun 字段变化执行事件 Biz.prototype.getMaxSerialNo = function () { let curRow = this.dsMaster.currentRow; if(curRow){ MaxSerialNo = 0; for(let i=0;i