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.

68 lines
2.6 KiB

define(function (require, exports, module) {
let BaseBiz = require('apps/rht/base/rhtBiz');
function Biz(vm) {
//继承第一步,构造继承
BaseBiz.call(this, vm);
vm.remark =''
}
//继承第二步,方法继承
inherits(Biz, BaseBiz);
Biz.prototype.beforeAdd = function () {
this.dsMaster.getColumn('ClsCode').set('isEditable',true);
return this.super('beforeAdd');
};
Biz.prototype.beforeEdit = function () {
if (Store.logOn.orgType != '1001'){
let masterRow = this.dsMaster.currentRow;
let sOrgCode = TypeUtil.toString(masterRow['OrgCode']);
if (sOrgCode != Store.logOn.orgCode) {
Store.messager.warn('只能修改本门店设置数据,其它不能修改!');
return false;
}
}
this.dsMaster.getColumn('ClsCode').set('isEditable',false);
return this.super('beforeEdit');
};
/*
//功能初始化完毕调用该方法
Biz.prototype.initCompleted = function() {
let orgType = rhtComm.GetOrgType(Store.logOn.orgCode);
if (orgType != '1001'){
this.dsMaster.getColumn('OrgCode').set('isEditable',false);
}
else{
this.dsMaster.getColumn('OrgCode').set('isEditable',true);
}
return this.super('initCompleted');
};
// 添加前
Biz.prototype.beforeAdd = function () {
this.dsMaster.getColumn('ClsCode').set('isEditable',true);
return this.super('beforeAdd');
};
Biz.prototype.beforeEdit = function () {
let masterRow = this.dsMaster.currentRow;
let sOrgCode = TypeUtil.toString(masterRow['OrgCode']);
if (sOrgCode != Store.logOn.orgCode) {
Store.messager.warn('只能修改本门店设置数据,其它不能修改!');
return false;
}
this.dsMaster.getColumn('ClsCode').set('isEditable',false);
return this.super('beforeEdit');
}; */
Biz.prototype.beforeDelete = function () {
if (Store.logOn.orgType != '1001'){
let masterRow = this.dsMaster.currentRow;
let sOrgCode = TypeUtil.toString(masterRow['OrgCode']);
if (sOrgCode != Store.logOn.orgCode) {
Store.messager.warn('门店只能删除本门店的品类信息,其它不能删除!');
return false;
}
}
return this.super('beforeDelete');
};
return Biz;
});