com.fzzy.igds.domain.Dept
库区编码
true
收储公司
${dorado.getDataProvider("companyPR#getData").getResult()}
id
dwmc
true
组织编码
库区名称
true
库区地址
区划代码
true
所在区县
库区产权
key
value
1
1-自有
2
2-租赁
3
3-共有
4
4-混合
9
9-其他
Double
有效仓容
#0.000 吨
Double
占地面积
#0.000 平方米
Integer
仓库数
#0 栋
Double
经度
Double
纬度
备注说明
DateTime
创建时间
true
创建人
true
DateTime
更新时间
true
更新人
true
图路径
鸟瞰图
/**
* 预览图片
*/
showImg = function(){
var cur = view.get("#dsMain.data:#");
var imgName = cur.get("imgName");
if(!imgName){
$alert("没有上传鸟瞰图信息,无法预览。");
return;
}
var imgPath = cur.get("imgPath");
view.get("#iFrameImg").set("path", "/file/dept-img?imgPath=" + imgPath);
view.get("#dialogImg").show();
};
// start 通过收储公司id来加载库区数据
/**
* 通用工具函数:获取URL中的指定参数值
* @param {String} name 要获取的参数名
* @returns {String/null} 参数值(无则返回null)
*/
function getUrlParam(name) {
// 解析URL的查询字符串(?后面的部分)
var search = window.location.search.substring(1);
// 分割成键值对数组
var params = search.split("&");
for (var i = 0; i < params.length; i++) {
var pair = params[i].split("=");
// 解码参数值(处理中文/特殊字符)
if (decodeURIComponent(pair[0]) === name) {
return decodeURIComponent(pair[1] || "");
}
}
return null;
};
var parentId = getUrlParam("parentId");
console.log("parentId",parentId);
view.get("#dsMain").set("parameter",{parentId: parentId}).flushAsync();
//end
/**
* 查看详情
* @param {String/Number} manualId 手动传入的id值(可选)
*/
detail = function(manualId){
// 优先使用手动传入的id,没有则走原有选中行逻辑
var id = manualId;
if(!id){
var cur = view.get("#dgMain").get("selection");
if(cur){
id = cur.get("id");
}
}
// 有id则打开详情页,否则提示
if(id){
var url = "/com.fzzy.igds.Depot.d?parentId="+ id;
window.$openTab("仓库管理", url);
}else{
$notify("请先选择库区……");
}
};
renderId = function(arg){
var txt = arg.data.getText("id");
if(!txt) return true;
// 关键修改:点击时把txt作为参数传给detail方法(注意转义双引号)
var htm = "<a href='javascript:;' onClick='detail(\""+txt+"\")' >"+txt+"</a>";
arg.dom.innerHTML = htm;
}
font-awesome,css-common
deptPR#getData
[dtMain]
manual
c-param
var select = view.get("#dgMain").get("selection");
if(select){
view.get("#dialogMain").show();;
}else{
$notify("请选择需要编辑的数据……");
}
修改
btn2
100
fa fa-pencil-square-o
view.get("#dsMain").flushAsync();
刷新
btn4
100
fa fa-refresh
view.get("#dgMain").set("selection",arg.data);
dsMain
true
singleRow
renderId(arg);
id
center
160
kqmc
left
parentId
left
xzqhmc
center
yxcr
center
180
cfs
center
100
updateBy
center
100
updateTime
center
160
deptPR#updateData
数据保存完成!
dsMain
[#current]
false
500
xzqhmc=name,xzqhdm=code
500
dicAreaPR#pageList
[dtArea]
10
-- 名称 --
200
var data = view.get("#dsFoodOrigin.data:#");
if(data){
view.get("#ddFoodOrigin").close(data.toJSON());
}
dsFoodOrigin
true
code
true
center
arg.dom.style.fontWeight = "bold";
arg.processDefault = true;
name
true
center
simple
true
center
dsFoodOrigin
var imgPath = arg.returnValue;
var data = view.get("#dsMain.data:#");
data.set("imgPath",imgPath);
data.set("imgName",arg.file.name);
fileUploadManage#imgFile
50MB