代码参考
代码设置字段必录,非必录
isInvestChange:function(event,ui){
debugger;
var value= ui.current;
if(value=="1"){
$("#investmentType").wafValidator("option","rules","required:true");//增加必填控制
}else{
$("#investmentType").wafValidator("option","rules","required:false"); //去掉必填控制
$("#labelinvestmentType_label").find('span.inner-label').removeClass("require"); //去掉必填星号
}
}
var entryCount = waf("#entry").wafGrid('getRowCount');
//从所有数据中筛选用户选择的数据
for (var i = 1; i <= entryCount; i++) {
var rowId = $("#entry").wafGrid('getRowId', i);
var rowdata = waf('#entry').wafGrid('getRowRealData', rowId);
//分录得到行
var rowText = $("#entry").wafGrid('getRowIndex', rowId);
rowdata.dynprop16 = money; //p金额
waf("#entry").wafGrid("setRowData" , rowId,rowdata);//分录赋值
waf.msgBox.showInfo("合计结束,请核对数据!"); */
//清空分录
varret = waf("#entry").wafGrid("clearGridData",true);
这里配置是通过配置文件读取的,可以修改serverdeployeasweb.eareas_web.warWEB-INFpropertieswaf2.properties这个文件的isShowXy=false
扩展业务单元表
T_EP_CUSTOMIZEDUNIT
分录整行赋值
$("#editgrid").wafGrid("setRowData", rowid, data.row);
清空分录
//现代表变化 清空分录
varret = waf("#entrys").wafGrid("clearGridData",true);
单据头F7 过滤
//审计通知书 被审计单位监听 过滤显示该组织下的通知人员 wafPromptSpecial_Person wafPromptStandard
auditeeChange:function(event,value){
// waf("#noticePerson").wafPromptSpecial_Person("option" ,"filteritem" ,"ADMINORGUNIT.ID='333333'");
var filter = waf.parseSql.getFilter("CU.id", "=", value.current.cU.id)
// waf("#noticePerson").wafPromptSpecial_Person("option", "filteritem", filter); //左树右表 F7 标准 树列表无法自动过滤
waf("#noticePerson").wafPromptStandard("option", "filteritem", filter); // 序时簿
}
编辑界面分录F7过滤
,// 分录项目F7 的过滤实现 (项目审核状态 且是 股权投资类型) 正式环境 股权投资类型 id要 改
beforeEditRow:function(rowid,cellname,value,iRow,iCol,rowdata){
var a = waf.parseSql.getFilter("investmentType.id", "=", "N5cAAAAAMs2g6U9T")
var b = waf.parseSql.getFilter("ProjectBasis.billStatus", "=", 3);
var filter= waf.parseSql.mergeFilter([a,b],"and")
waf('#entrys').wafGrid('setCellEditorAllConfig', "projectName","filteritem",filter,"promptGrid",null);
}
编辑界面 id 过滤显示
//审计机构变换 过滤审计人员
auditInsitutionChange:function(event,value){
waf.doPost({
action:"AuditProjectLaunch",
data: {
_method: "personFilter",
auditInsitution:waf.toJSONString(value.current)
},
success: function (data) {
var ids= data.idsStr.split(",");
var filter=waf.parseSql.getFilter("sourceEntryId", "in", ids);
waf("#auditPerson").wafPromptStandard("option", "filteritem", filter);
} ,error:function (data) {
_self.showWarning(data);
}
});
}
StringBuffer ids = new StringBuffer();
for (int i = 0; i < parseArray.size(); i++) {
JSONObject jsonObject = parseArray.getJSONObject(i);
JSONArray entrys = jsonObject.getJSONArray("entrys");
for (int j = 0; j < entrys.size(); j++) {
String id = entrys.getJSONObject(j).getString("id").toString();
// ids.append("'");
ids.append(id).append(",");
// ids.append(id).append("'").append(",");
}
}
HashMap map= new HashMap();
String idsStr= ids.substring(0, ids.length()-1) ;
map.put("idsStr", idsStr);
JSONUtils.SUCCESS(map); // 返回所选择的中介机构 分录中的id , 审计人员单据 中 有审计机构分录的id
得到分录合计行数据等代码—循环的选中分录值
//分录批量更新按钮
entryUpdate:function(e){
//得到选择的rowid
var selectedIds = waf("#entrys").wafGrid("getSelectedRows");
//从所有数据中筛选用户选择的数据
for(var i = 0; i < selectedIds.length; i++){
var rowdata = waf('#entrys').wafGrid('getRowRealData', selectedIds[i]);
}
}
});//@endPrivate
//得到选择的rowid
var selectedIds = waf("#entrys").wafGrid("getSelectedRows");
//从所有数据中筛选用户选择的数据
for(var i = 0; i < selectedIds.length; i++){
var rowdata = waf('#entrys').wafGrid('getRowRealData', selectedIds[i]);
//分录得到行
var rowText = $("#entrys").wafGrid('getRowIndex', selectedIds[i]);
//行id
var rowid=selectedIds[i];
}
waf("#entrys").wafGrid("setCell", rowid, "dynProp05", resultStr);
afterSaveCell1:function(rowid,cellname,value,iRow,Col,oldValue){
//if(cellname=="moneyyuan"){
waf("#editGrid0").wafGrid('calcFooterData');//刷新后面的合计
//第一个分录 得到
var footData0 = waf("#editGrid0").wafGrid('getFooterData');
var json0 = waf.toJSONString(footData0) ;
var json02 = eval("("+json0+")");
var sjbg=json02.sjbg;//包干金额
var sjMoney=json02.sjMoney;//实际金额
var pjMoney=json02.pjMoney;//票据金额
//计算税额
//得到票据类型中的税率
//var rate=waf("#biiType").wafPromptBox("getValue");
var rate = $("#editGrid0").wafGrid("getCell",rowid,'biiType').rate;
//计算税额
$("#editGrid0").wafGrid("setCell",rowid,'rateMoney',pjMoney*rate);
//alert(waf.toJSON(rate));
var dpFy=json02.dpFy;//订票费用
//第二个分录 得到
waf("#editGrid1").wafGrid('calcFooterData');//刷新后面的合计
var footData1 = waf("#editGrid1").wafGrid('getFooterData');
var json1 = waf.toJSONString(footData1) ;
var json12 = eval("("+json1+")");
var cbCost=json12.cbCost;//实际费用
//两个分录的合计数据相加
var sumMoney=sjbg+sjMoney+pjMoney+dpFy+cbCost;
var ccwcm=waf("#ccwcm").wafNumberField("getValue"); //餐补
var shjtMoney=waf("#shjtMoney").wafNumberField("getValue"); //交通补
sumMoney=sumMoney+shjtMoney+ccwcm;
waf("#sumMoney").wafNumberField("setValue",sumMoney);
// }
}
设置分录字段根据状态隐藏
var BillStatus= waf("#billstatus").wafSelect("getValue");
if(BillStatus!="APPROVED"){
waf("#entrys").wafGrid("hideColumn","pzz",true);
编辑界面刷新
_self.setOnlyModelLoad(true);
_pageInitByModelLoad
location.reload() ;
序时簿刷新
rejected:function(e){
var selectId=waf("#queryGrid").wafGrid("getCell",waf("#queryGrid").wafGrid("getSelectedRows"),"id");
if(selectId==undefined || selectId.length<=0){
_self.showWarning("请选择一条记录");//"请选中一行后再进行操作!"
return ;
}
waf.doPost({
action:"unAuditService",
data:{
_method: "medicalActivities_rejected",
billId:selectId
},
success:function(data){
waf("#queryGrid").dataGrid("reloadGrid");
}
});
},
分录操作————循环所有分录数据
//得到选择的rowid
var selectedIds = waf("#entrys").wafGrid("getSelectedRows");
//从所有数据中筛选用户选择的数据
for(var i = 0; i < selectedIds.length; i++){
var rowdata = waf('#entrys').wafGrid('getRowRealData', selectedIds[i]); //isAppend
if(rowdata.isAppend!=""&&null!=rowdata.isAppend){
_self.showWarning("选中的数据含有"+rowdata.isAppend+"数据,不允许删除!");
return false;
}
}
分录中的change事件才能用
var entryCount = waf("#entrys").wafGrid('getRowCount');
var rowdata = waf('#entrys').wafGrid('getRowRealData', rowid);
//修改的这行 如果在本表内重复
//修改的这行 如果在本表内重复
for (var i = 1; i <= entryCount; i++) {
var rowId = $("#entrys").wafGrid('getRowId', i);
var entryIdValue = waf("#entrys").wafGrid('getCell', rowId, 'txt1') != "" ? waf("#entrys").wafGrid('getCell', rowId, 'txt1').trim() : "";
if (i != rowText) {
if (idValue == entryIdValue) {
flag = true;
rowGet = i;
break;
}
}
}
表头得到 分录数据循环分录
.id; 这里得不到id 会报错
var entryCount = waf("#entrys").wafGrid('getRowCount');
//从所有数据中筛选用户选择的数据
for (var i = 0; i < entryCount; i++) {
//得到选择的rowid
var rowid = _self.getCurrentModel().entrys[i].id;
var rowdata = waf('#entrys').wafGrid('getRowRealData', rowid);
//分录得到行
var rowText = $("#entrys").wafGrid('getRowIndex', rowid);
// 客户
CustomerId = rowdata.dynProp03.id;
// 产品
MaterialId = rowdata.dynProp07.id;
// 提成比例
var proStr = rowdata.dynProp24;
// 单位P
var pStr = rowdata.dynProp23;
// 【P单位】和【提成比例】两个字段要么都要填,要么都不填,不可只填写一个字段。
if((""==proStr&&pStr!="")||""!=proStr&&pStr==""){
_self.showWarning("第" + rowText+ "行, 【单位P】和【提成比例】两个字段要么都要填,要么都不填,不可只填写一个字段 !");
return;
}
//location.reload();
_self.fireEvent("fieldOnStoreEvent");
var model=_self.getCurrentModel();
waf.doPost({
action: "targetterminal",
data: {
_method: "newDbChange",
basedataDept: basedataDept,
basedata: value.current.id,
model:waf.toJSONString(model)
},
success: function (data) {
console.log("新代表变化返回数据---分录关联医院过滤------------");
console.log(data);
//分录关联医院过滤
waf('#entrys').wafGrid('setCellEditorAllConfig', "relateHospital", "filteritem", " " + data.Fbasedata8 + "", "promptGrid", null);
var special = data.resultMap.special;
if (special != undefined && special.length > 0) {
//返回拼接信息
waf.msgBox.showConfirm({
title: "信息提示?",
summaryMsg: "有归集客户备案的,药店/医院目标终端是否携带?",
buttonType: "yes-no",
buttonCallBack: [function () {
//点击是
if (special != undefined && special.length > 0) {
for (var i = 0; i < special.length; i++) {
waf("#entrys").wafGrid('addRow', { data: special[i] });
}
}
}, function () {
}]
});
}
/* var special = data.resultMap.special;
if (special != undefined && special.length > 0) {
for (var i = 0; i < special.length; i++) {
waf("#entrys").wafGrid('addRow', { data: special[i] });
}
} */
}
});
前端传参model 后端强转为单据info
Context ctx = WafContext.getInstance().getContext();
ModelMap modelMap = event.getReqeustContext().get(ModelMap.class);
RentFileInfo rentFileInfo = (RentFileInfo) modelMap.get("model");
序时簿刷新数据方法:var page = _self; page.getGrid().reloadGrid();
实现点击分录中点击单据编码跳转到具体页面
/**点击问题清单编码 */
viewIssueInfo:function(e){
var page = _self;
var rowdata = waf('#grid').wafGrid('getRowRealData', e);
var option = {}
// option.url = _self.getDynamicContextPath()+'?method=doEvent&billId='+waf.encodeURIComponent(rowdata.id);
// option.url +='&uipk=com.kingdee.eas.custom.auditmodule.auditrectificatmanage.CAuditIssueListList';
// option.url += '&action=view';
// option.url += '&viewuipk=com.kingdee.eas.custom.auditmodule.auditrectificatmanage.CAuditIssueListEdit'
// option.close=function(event,ui){
// //_self._pageInitByModelLoad(waf.encodeURIComponent(rowdata.id),"VIEW");
// }
option.url = "/myweb/dynamicPage.do?method=doEvent&action=view&uipk=com.kingdee.eas.custom.auditmodule.auditrectificatmanage.CAuditIssueListList&billId="+waf.encodeURIComponent(rowdata.id)+"&viewuipk=com.kingdee.eas.custom.auditmodule.auditrectificatmanage.CAuditIssueListEdit&edituipk=com.kingdee.eas.custom.auditmodule.auditrectificatmanage.CAuditIssueListEdit&queryPK=com.kingdee.eas.custom.auditmodule.auditrectificatmanage.app.AuditIssueListQuery&queryUuid=1974c017-4b49-49f6-ac8b-599a6a76a0ec&sequenceNo=1&billTotal=3"
option.close = option && option.close ? option.close : function () {
page.getGrid().dataGrid("reloadGridWithState");
};
page.addNewWindow(option);
}
,
/**点击新增问题清单按钮 */
addissue:function(event,value){
var option = {}
option.url = "/myweb/dynamicPage.do?method=doEvent&action=addNew&uipk=com.kingdee.eas.custom.auditmodule.auditrectificatmanage.CAuditIssueListList&edituipk=com.kingdee.eas.custom.auditmodule.auditrectificatmanage.CAuditIssueListEdit";
_self.addNewWindow(option);
// var url="http://localhost:56898/myweb/dynamicList.do?event=initialize&method=doEvent&uipk=com.kingdee.eas.custom.auditmodule.auditrectificatmanage.CAuditIssueListEdit&inwafpage=true&debug=true";
// window.open(url);
}
校验必填项
var submitBoolean = waf("#form").wafFormValidator("validateForm");
if (submitBoolean == false) {
return;
}
使用web的年度控件
webYearChange:function(oldValue,newValue){
var year=newValue.current;
var strTime=newValue.current+"-01"+"-01";
var date= new Date(Date.parse(strTime.replace(/-/g, "/"))); //转换成Data();
waf("#year").wafDatePicker("setValue",date);
}
pageOpenAfter:function(e){
var date=waf("#year").wafDatePicker("getValue");
var d = new Date(date);
var yearStr=d.getFullYear()
waf("#webYear").wafYear("setValue",yearStr);
}
botp下推时进入的代码方法
js的原生ajax请求
// 输入具体项目地址经纬度 得到具体地址 ,街道经纬度,街道地址
locationChange:function(event,ui){
var jsonData={ "location":ui.current}
$.ajax({
type:"POST",
url: "http://42351e50i8.oicp.vip/citylife/baseInfo/GetjwdFromlocation",
dataType:"JSON",
data: JSON.stringify(jsonData), // waf.toJSONString(jsonData),
contentType: "application/json; charset=utf-8",
success: function (data) {
console.log(data);
waf("#address").wafText("setValue",data.formatted_address);
waf("#streetName").wafText("setValue",data.township);
waf("#street").wafText("setValue",data.township_jwd);
}, error: function (data) {
_self.showWarning(data);
}
});
}
/**
* 根据具体地址经纬度,得到 具体地址 和 街道名称 街道经纬度
*
* @return
*/
@RequestMapping("/GetjwdFromlocation")
public String regeo( @RequestBody String json ) {
// Map<String,String[]> map= request.getParameterMap();
// String location ="";
// for (Map.Entry<String, String[]> entry : map.entrySet()) {
// String k = entry.getKey();
// if (k.contains("location")) {
// location = k.trim();
// continue;
// }
// }
String key = " XXXXXXXXXXX";
JSONObject locationobject = JSONObject.parseObject(json);
String location=locationobject.getString("location");
String url="https://restapi.amap.com/v3/geocode/regeo?key="+key+"&location="+location+"" ;
if(StringUtils.isEmpty(location)){
return null;
}
String sendGet = executeGet(url);
JSONObject parseObject = JSON.parseObject(sendGet);
if(parseObject.containsKey("regeocode")) {
JSONObject addressComponent = parseObject.getJSONObject("regeocode").getJSONObject("addressComponent");
String township = addressComponent.getString("township"); //街道地址
//获取街道经纬度
String city = addressComponent.getString("city");//城市
String district = addressComponent.getString("district");//区域
String townshipinfo=city+district+township;
String township_jwd = getLongitudeAndLatitude ( townshipinfo);
String formatted_address =parseObject.getJSONObject("regeocode").getString("formatted_address"); //具体地址
JSONObject jsonObject = new JSONObject();
jsonObject.put("township", township);
jsonObject.put("township_jwd", township_jwd);
jsonObject.put("formatted_address", formatted_address);
return jsonObject.toJSONString() ;
}
return null;
}
通过单据内嵌 自动开发的网页url
1、单据使用iframe 组件
2、页面打开事件
pageOpenAfter:function(e){
$("#iframe").css("height",$("body").height());
setInterval( function(){$("#iframe").css("height",$("body").height());},500); //定时器 半秒执行一次
}
3、单据路径菜单 去掉部门参数
&inwafpage=true
收款单选择缴费单分录 , 分录seq排序、 分录id过滤、 F7多选填充、金额扣减
afterSaveRow: function (rowid, cellname, value, iRow, Col, oldValue) {
if (cellname == "rentContract") {
// 循环获取单据分录已有的缴费分录id
var entryIds="";
var entryCount = waf("#editgrid").wafGrid('getRowCount');
for (var i = 1; i <= entryCount; i++) {
var rowId = $("#editgrid").wafGrid('getRowId', i);
var rowdata = waf('#editgrid').wafGrid('getRowRealData', rowId)
entryIds=entryIds+(rowdata.entryId)+(",");
}
entryIds= entryIds.substring(0, entryIds.length-1) ;
var entryIdsz=entryIds.split(",");
//选择合同对缴款单分录过滤
var a = waf.parseSql.getFilter("rentContract.id", "=", value.id);
var b = waf.parseSql.getFilter("debt", ">", 0); //欠收金额>0
var c = waf.parseSql.getFilter("parent.statu", "=", 2); //应收单状态为审核
var d = waf.parseSql.getFilter("id", "not in", entryIdsz); //过滤掉本单已选择的应收账单分录的id
var filter = waf.parseSql.mergeFilter([a, b, c, d], "and")
waf("#editgrid").wafGrid('setCellEditorAllConfig', "receiveBillEntrys", "filteritem", filter, "promptGrid", null);
//选择合同后带出项目
waf("#editgrid").wafGrid("setCell", rowid, "project", value.project);//项目
//选择合同后,清空费用类型,缴款单分录,起始日期,结束日期,应交金额,意向交款金额,应交日期,欠收金额,合同缴费账单分录id
waf("#editgrid").wafGrid("setCell", rowid, "receiveBillEntrys", null);//费用类型
waf("#editgrid").wafGrid("setCell", rowid, "paymentType", null);//费用类型
waf("#editgrid").wafGrid("setCell", rowid, "beginDate", null);//起始日期
waf("#editgrid").wafGrid("setCell", rowid, "endDate", null);//结束日期
waf("#editgrid").wafGrid("setCell", rowid, "amt", null);//应交金额
waf("#editgrid").wafGrid("setCell", rowid, "purposeAmt", null);//意向交款金额默认等于应交金额
waf("#editgrid").wafGrid("setCell", rowid, "paymentDate", null);//应交日期
waf("#editgrid").wafGrid("setCell", rowid, "debt", null);//欠收金额
waf("#editgrid").wafGrid("setCell", rowid, "entryId", null);// 合同缴费账单分录id
}
if (cellname == "receiveBillEntrys") {
var rentContract = $("#editgrid").wafGrid("getCell", rowid, "rentContract");
var bizDate = _private.fermitTime(waf("#bizDate").wafDatePicker("getValue"));
var project = $("#editgrid").wafGrid("getCell", rowid, "project");
//带出 费用类型、起始日期,结束日期,应交金额,应交日期,欠收金额
// 排序
function compare(property) {
return function (a, b) {
var value1 = a[property];
var value2 = b[property];
return value1 - value2;
}
}
value.sort(compare("seq"))
waf("#editgrid").wafGrid("setCell", rowid, "receiveBillEntrys", null);
waf("#editgrid").wafGrid("setCell", rowid, "realDate", bizDate);
waf("#editgrid").wafGrid("setCell", rowid, "receiveBillEntrys", value[0]);
waf("#editgrid").wafGrid("setCell", rowid, "paymentType", value[0].paymentType);//费用类型
waf("#editgrid").wafGrid("setCell", rowid, "beginDate", value[0].beginDate);//起始日期
waf("#editgrid").wafGrid("setCell", rowid, "endDate", value[0].endDate);//结束日期
waf("#editgrid").wafGrid("setCell", rowid, "amt", value[0].debt);//应交金额 -------实际上 是要交的欠收金额
waf("#editgrid").wafGrid("setCell", rowid, "purposeAmt", value[0].debt);//意向交款金额默认等于欠收金额
waf("#editgrid").wafGrid("setCell", rowid, "paymentDate", value[0].paymentDate);//应交日期
waf("#editgrid").wafGrid("setCell", rowid, "debt", value[0].debt);//欠收金额
waf("#editgrid").wafGrid("setCell", rowid, "entryId", value[0].id);// 合同缴费账单分录id
// waf("#editgrid").wafGrid("setCell", rowid, "source", value.id);//默认pc端
for (var i = 1; i < value.length; i++) {
var datarow = { rentContract: rentContract, project: project, receiveBillEntrys: value[i], paymentType: value[i].paymentType, beginDate: value[i].beginDate, endDate: value[i].endDate, amt: value[i].debt, purposeAmt: value[i].debt, paymentDate: value[i].paymentDate, debt: value[i].debt, entryId: value[i].id, realDate: bizDate };
var su = $("#editgrid").wafGrid('addRow', { data: datarow });
//waf("#editgrid").wafGrid("lockCell",_self.getCurrentModel().entrys[i].id,"amt");
}
}
if (cellname == "actAmt") { //实收金额
var entryCount = waf("#editgrid").wafGrid('getRowCount');
var sumActAmt = 0; //实收总金额
var sumDebt = 0; //欠收总金额
var sumAmt = 0; //应收总金额
for (var i = 1; i <= entryCount; i++) {
//得到选择的rowid
var rowId = waf("#editgrid").wafGrid("getRowId", i);
var rowdata = waf('#entry').wafGrid('getRowRealData', rowId);
// var rowdata = waf("#editgrid").wafGrid('getRowRealData', _self.getCurrentModel().entrys[i].id);
var rowText = $("#entry").wafGrid('getRowIndex', rowId);
sumActAmt = sumActAmt + rowdata.actAmt;
sumDebt = sumDebt + rowdata.debt;
sumAmt = sumAmt + rowdata.amt;
}
var rowdata = waf('#editgrid').wafGrid('getRowRealData', rowid);
var thisRowdebt = $("#editgrid").wafGrid("getCell", rowid, "debt");
var thisRowactAmt = $("#editgrid").wafGrid("getCell", rowid, "actAmt");
var thisRowamt = $("#editgrid").wafGrid("getCell", rowid, "amt"); // 应交金额
if (sumActAmt > sumAmt) {
// var summary ="实收总金额大于已选应收单总应收金额,请核对数据!";
// _self.showError( summary , summary , "警告" )
}
if (thisRowactAmt >= thisRowamt) { //本行实收金额>本行应收金额
debugger;
var thisrowdata = waf('#editgrid').wafGrid('getRowRealData', rowid);
var thisrowText = $("#editgrid").wafGrid('getRowIndex', rowid);
if (rowdata.actAmt >= rowdata.amt) {
waf("#editgrid").wafGrid("setCell", rowid, "debt", 0);
waf("#editgrid").wafGrid("setCell", rowid, "actAmt", rowdata.amt);
waf("#editgrid").wafGrid("setCell", rowid, "purposeAmt", rowdata.amt);
var subAmt = thisRowactAmt - thisRowamt;
for (var j = thisrowText + 1; j <= entryCount; j++) {
var rowdata = waf('#editgrid').wafGrid('getRowRealData', waf("#editgrid").wafGrid("getRowId", j));
if (subAmt >= rowdata.amt) {
waf("#editgrid").wafGrid("setCell", waf("#editgrid").wafGrid("getRowId", j), "debt", 0);
waf("#editgrid").wafGrid("setCell", waf("#editgrid").wafGrid("getRowId", j), "actAmt", rowdata.amt);
waf("#editgrid").wafGrid("setCell", waf("#editgrid").wafGrid("getRowId", j), "purposeAmt", rowdata.amt);
subAmt = subAmt - rowdata.amt;
} else {
var subDebt = rowdata.amt - subAmt;
waf("#editgrid").wafGrid("setCell", waf("#editgrid").wafGrid("getRowId", j), "actAmt", subAmt);
waf("#editgrid").wafGrid("setCell", waf("#editgrid").wafGrid("getRowId", j), "purposeAmt", subAmt);
waf("#editgrid").wafGrid("setCell", waf("#editgrid").wafGrid("getRowId", j), "debt", subDebt);
break;
}
}
}
} else {
var actAmt = waf("#editgrid").wafGrid("getCell", rowid, "actAmt");
var amt = waf("#editgrid").wafGrid("getCell", rowid, "amt");
var subDebt = amt - actAmt;
waf("#editgrid").wafGrid("setCell", rowid, "debt", subDebt);
waf("#editgrid").wafGrid("setCell", rowid, "purposeAmt", actAmt);
}
//配置中勾选自动合计就ok
// var footData = waf("#editGrid").wafGrid('getFooterData');
// var json = waf.toJSONString(footData) ;
// var json2 = eval("("+json+")");
// waf("#sumAmt").wafNumberField("setValue",amt);
// waf("#sumActAmt").wafNumberField("setValue",actAmt);
// waf("#sumdDebt").wafNumberField("setValue",debt);
/*
for (var h = 0; h < entryCount; h++) {
//得到选择的rowid
var rowdata = waf('#editgrid').wafGrid('getRowRealData', _self.getCurrentModel().entrys[h].id);
var debt= rowdata.debt;
if(debt==0){
waf("#editgrid").wafGrid("setCell", _self.getCurrentModel().entrys[h].id, "settlementState",2); // 0 未结清, 2 已结清
}else{
waf("#editgrid").wafGrid("setCell", _self.getCurrentModel().entrys[h].id, "settlementState",0);
}
}
*/
}
}
文章版权声明
1 原创文章作者:5657,如若转载,请注明出处: https://www.52hwl.com/38641.html
2 温馨提示:软件侵权请联系469472785#qq.com(三天内删除相关链接)资源失效请留言反馈
3 下载提示:如遇蓝奏云无法访问,请修改lanzous(把s修改成x)
4 免责声明:本站为个人博客,所有软件信息均来自网络 修改版软件,加群广告提示为修改者自留,非本站信息,注意鉴别