| | |
| | | </DataType> |
| | | </Model> |
| | | <View layout="padding:10"> |
| | | <ClientEvent name="onReady">
 |
| | | <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;
 |
| | | }; 
 |
| | | 
 |
| | | 
 |
| | | 
 |
| | | /**
 |
| | | * 查询
 |
| | | */
 |
| | | query = function(){
 |
| | | view.get("#dataSetdepot").flushAsync();
 |
| | | }
</ClientEvent> |
| | | //通过库区id来加载仓储数据
 |
| | | var parentId = getUrlParam("parentId");
 |
| | | view.get("#dataSetdepot").set("parameter",{parentId: parentId}).flushAsync();
 |
| | | };
query();
 |
| | | 
 |
| | | </ClientEvent> |
| | | <Property name="packages">font-awesome,css-common</Property> |
| | | <DataSet id="dataSetdepot"> |
| | | <Property name="dataProvider">depotPR#getData</Property> |
| | | <Property name="dataType">[dtDepot]</Property> |
| | | <Property name="loadMode">manual</Property> |
| | | </DataSet> |
| | | <DataSet id="dataSetUser"> |
| | | <Property name="dataType">[dataTypeUser]</Property> |
| | |
| | | <Property name="iconClass">fa fa-tasks</Property> |
| | | <Property name="caption">仓库信息</Property> |
| | | <Property name="width">80%</Property> |
| | | <Property name="height">82%</Property> |
| | | <Property name="height">90%</Property> |
| | | <Property name="closeable">false</Property> |
| | | <Buttons> |
| | | <Button id="btnOK"> |
| | |
| | | <Property name="property">deptId</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement layoutConstraint="colSpan:2"> |
| | | <Property name="name">storageMax</Property> |
| | | <Property name="property">storageMax</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement layoutConstraint="colSpan:2"> |
| | | <Property name="name">storageMax</Property> |
| | | <Property name="property">storageMax</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement layoutConstraint="colSpan:2"> |
| | | <Property name="name">storeType</Property> |
| | | <Property name="property">storeType</Property> |