| | |
| | | <Property name="label">库区编码</Property> |
| | | <Property name="readOnly">true</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="parentId"> |
| | | <Property></Property> |
| | | <Property name="label">收储公司</Property> |
| | | <Property name="mapping"> |
| | | <Property name="mapValues">${dorado.getDataProvider("companyPR#getData").getResult()}</Property> |
| | | <Property name="keyProperty">id</Property> |
| | | <Property name="valueProperty">dwmc</Property> |
| | | </Property> |
| | | <Property name="readOnly">true</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="companyId"> |
| | | <Property></Property> |
| | | <Property name="label">组织编码</Property> |
| | |
| | | </PropertyDef> |
| | | <PropertyDef name="xzqhmc"> |
| | | <Property></Property> |
| | | <Property name="label">区划名称</Property> |
| | | <Property name="label">所在区县</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="kqcq"> |
| | | <Property></Property> |
| | |
| | | view.get("#dialogImg").show();
 |
| | | 
 |
| | | };</ClientEvent> |
| | | <ClientEvent name="onReady">
 |
| | | // 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;
 |
| | | }
 |
| | | </ClientEvent> |
| | | <Property name="packages">font-awesome,css-common</Property> |
| | | <DataSet id="dsMain"> |
| | | <Property name="dataProvider">deptPR#getData</Property> |
| | | <Property name="dataType">[dtMain]</Property> |
| | | <Property name="loadMode">manual</Property> |
| | | </DataSet> |
| | | <Container> |
| | | <Property name="className">c-param</Property> |
| | |
| | | <RowSelectorColumn/> |
| | | <RowNumColumn/> |
| | | <DataColumn name="id"> |
| | | <ClientEvent name="onRenderCell">renderId(arg);</ClientEvent> |
| | | <Property name="property">id</Property> |
| | | <Property name="align">center</Property> |
| | | <Property name="width">160</Property> |
| | |
| | | <Property name="property">kqmc</Property> |
| | | <Property name="align">left</Property> |
| | | </DataColumn> |
| | | <DataColumn name="parentId"> |
| | | <Property name="property">parentId</Property> |
| | | <Property name="align">left</Property> |
| | | </DataColumn> |
| | | <DataColumn name="xzqhmc"> |
| | | <Property name="property">xzqhmc</Property> |
| | | <Property name="align">center</Property> |
| | | </DataColumn> |
| | | <DataColumn name="kqcq"> |
| | | <Property name="property">kqcq</Property> |
| | | <Property name="align">center</Property> |
| | | <Property name="width">120</Property> |
| | | </DataColumn> |
| | | <DataColumn name="yxcr"> |
| | | <Property name="property">yxcr</Property> |
| | | <Property name="align">center</Property> |
| | | <Property name="width">180</Property> |
| | | </DataColumn> |
| | | <DataColumn name="zdmj"> |
| | | <Property name="property">zdmj</Property> |
| | | <Property name="align">center</Property> |
| | | <Property name="width">180</Property> |
| | | </DataColumn> |
| | |
| | | <Dialog id="dialogMain"> |
| | | <Property name="iconClass">fa fa-tasks</Property> |
| | | <Property name="caption">库区信息</Property> |
| | | <Property name="width">1200</Property> |
| | | <Property name="width">65%</Property> |
| | | <Property name="closeable">false</Property> |
| | | <Buttons> |
| | | <Button id="btnOk"> |
| | |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement layoutConstraint="colSpan:2"> |
| | | <Property name="name">kqdz</Property> |
| | | <Property name="property">kqdz</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">kqcq</Property> |
| | | <Property name="property">kqcq</Property> |
| | | <Property name="name">parentId</Property> |
| | | <Property name="property">parentId</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | |
| | | <Property name="property">yxcr</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">zdmj</Property> |
| | | <Property name="property">zdmj</Property> |
| | | <AutoFormElement layoutConstraint="colSpan:2"> |
| | | <Property name="name">kqdz</Property> |
| | | <Property name="property">kqdz</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | |
| | | <Property name="property">xzqhdm</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <Label> |
| | | <Property name="text"></Property> |
| | | </Label> |
| | | <AutoFormElement> |
| | | <Property name="name">createBy</Property> |
| | | <Property name="property">createBy</Property> |
| | | <Property name="name">zdmj</Property> |
| | | <Property name="property">zdmj</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">createTime</Property> |
| | | <Property name="property">createTime</Property> |
| | | <AutoFormElement layoutConstraint="colSpan:2"> |
| | | <Property name="name">remark</Property> |
| | | <Property name="property">remark</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | |
| | | </Property> |
| | | <Property name="text">帮助:点击坐标位置拾取</Property> |
| | | </Link> |
| | | <AutoFormElement layoutConstraint="colSpan:3"> |
| | | <Property name="name">remark</Property> |
| | | <Property name="property">remark</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | </AutoForm> |
| | | </Children> |
| | | <Tools/> |
| | | </Dialog> |
| | | <Dialog id="dialogImg"> |
| | | <Property name="width">1000</Property> |
| | | <Property name="height">640</Property> |
| | | <Property name="width">55%</Property> |
| | | <Property name="height">65%</Property> |
| | | <Property name="iconClass">fa fa-tasks</Property> |
| | | <Property name="caption">鸟瞰图预览</Property> |
| | | <Buttons/> |