| | |
| | | </DataType> |
| | | </Model> |
| | | <View layout="padding:10"> |
| | | <ClientEvent name="onReady">/**
 |
| | | * 查看详情
 |
| | | * @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.Dept.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">companyPR#getData</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">120</Property> |
| | |
| | | <Property name="caption">收储公司信息</Property> |
| | | <Property name="closeable">false</Property> |
| | | <Property name="iconClass">fa fa-tasks</Property> |
| | | <Property name="height">80%</Property> |
| | | <Property name="height">90%</Property> |
| | | <Buttons> |
| | | <Button id="btnOk"> |
| | | <ClientEvent name="onClick">view.get("#uaSave").execute(function(result){
 |
| | |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">createBy</Property> |
| | | <Property name="property">createBy</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">createTime</Property> |
| | | <Property name="property">createTime</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">wd</Property> |
| | | <Property name="property">wd</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">updateBy</Property> |
| | | <Property name="property">updateBy</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |