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.
54 lines
1.9 KiB
54 lines
1.9 KiB
4 years ago
|
define(function (require, exports, module) {
|
||
|
let BaseBiz = require('apps/rht/base/rhtBiz');
|
||
|
let rhtComm = require('../../comm/rhtComm');
|
||
|
/**
|
||
|
* 控制按钮的可用
|
||
|
* @param opCode 按钮编码
|
||
|
* @return [description]
|
||
|
*/
|
||
|
|
||
|
function Biz(vm) {
|
||
|
//继承第一步,构造继承
|
||
|
BaseBiz.call(this, vm);
|
||
|
vm.remark =''
|
||
|
}
|
||
|
|
||
|
//继承第二步,方法继承
|
||
|
inherits(Biz, BaseBiz);
|
||
|
Biz.prototype.getBillNoFieldName = function () {
|
||
|
};
|
||
|
//根据登录组织等拼装查询条件
|
||
|
Biz.prototype.beforeDataSrcSearch = function (dataSrc, params) {
|
||
|
let self = this;
|
||
|
self.setServerBiz('cn.qdhezheng.rht.app.cou.cou190102.SavePlugin');
|
||
|
};
|
||
|
//新增行后处理,默认值已经处理
|
||
|
Biz.prototype.afterNewRow = function (dataSrc, newRow) {
|
||
|
if (dataSrc.uiObjCode === this.dsMaster.uiObjCode) {
|
||
|
let InOrgCode = rhtComm.GetInOrgCode(Store.logOn.orgCode).message;
|
||
|
let sOrgType = rhtComm.GetOrgType(Store.logOn.orgCode);
|
||
|
if ((sOrgType == "1001") || (sOrgType == "1002")){
|
||
|
newRow.setColumnValue('OrgCode', "*");
|
||
|
newRow.setColumnValue('InOrgCode', "*");
|
||
|
}
|
||
|
else{
|
||
|
newRow.setColumnText('OrgCode', InOrgCode);
|
||
|
newRow.setColumnValue('InOrgCode', InOrgCode);
|
||
|
}
|
||
|
this.dsMaster.getColumn('PluCode').set('isEditable',true);
|
||
|
}
|
||
|
this.super('afterNewRow', dataSrc, newRow);
|
||
|
};
|
||
|
//编辑后
|
||
|
Biz.prototype.afterEdit = function() {
|
||
|
if (this._state == "edit") {
|
||
|
this.dsMaster.getColumn('PluCode').set('isEditable',false);
|
||
|
}
|
||
|
else{
|
||
|
this.dsMaster.getColumn('PluCode').set('isEditable',true);
|
||
|
}
|
||
|
|
||
|
return this.super('afterEdit');
|
||
|
};
|
||
|
return Biz;
|
||
|
});
|