You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
2.0 KiB
65 lines
2.0 KiB
|
|
define(function (require, exports, module) {
|
|
//引入业务类基类
|
|
let BaseBiz = require('apps/rht/base/rhtBiz');
|
|
|
|
//引入业务服务
|
|
let Service = require('./pri10020207service');
|
|
|
|
/**
|
|
* 定义业务类对象
|
|
* @param vm 界面相关ViewModule
|
|
*/
|
|
function Biz(vm) {
|
|
//继承第一步,构造继承
|
|
BaseBiz.call(this, vm);
|
|
}
|
|
|
|
//继承第二步,方法继承
|
|
inherits(Biz, BaseBiz);
|
|
|
|
//按钮事件控制
|
|
Biz.prototype.doOp = function (opCode) {
|
|
let self = this;
|
|
if (opCode == 'btnzf') {
|
|
let ds = self.dsMaster;
|
|
this.onbtnzf(self, ds);
|
|
}
|
|
};
|
|
//按钮事件处理
|
|
Biz.prototype.onbtnzf = function (biz, ds) {
|
|
Store.messager.confirm("确认要作废对应关系数据吗?",function(isOK){
|
|
if(!isOK){
|
|
return false;
|
|
}
|
|
else{
|
|
let curRow = ds.currentRow;
|
|
let JgZcCode = TypeUtil.toString(curRow['JgZcCode']);
|
|
let OrgCode = TypeUtil.toString(curRow['OrgCode']);
|
|
if (curRow){
|
|
let ret= Service.getSlideMenuData("actExecute","onbtnzf",JgZcCode,OrgCode,Store.logOn.userId,Store.logOn.userCode,Store.logOn.userName);
|
|
if (ret.result !== 1) {
|
|
curRow.setColumnError('JgZcCode', ret.message);
|
|
return false;
|
|
}
|
|
curRow.delete();
|
|
self.opRouter("refresh");
|
|
}
|
|
}
|
|
})
|
|
return true;
|
|
};
|
|
//控制主界面按钮状态
|
|
Biz.prototype.getOpEnabled = function (opCode) {
|
|
let isOk = this.super('getOpEnabled', opCode);
|
|
if (!isOk) return false;
|
|
let curRow = this.dsMaster.currentRow;
|
|
|
|
if (opCode == 'btnzf') {
|
|
if (!curRow)
|
|
return false;
|
|
}
|
|
return true;
|
|
};
|
|
return Biz;
|
|
}); |