sgj
2025-12-29 c7fcb7f2763ea83db7611575af90824bd24c7338
fzzy-igdss-view/src/main/java/com/fzzy/igds/Depot.view.xml
@@ -16,37 +16,33 @@
    </DataType>
  </Model>
  <View layout="padding:10">
    <ClientEvent name="onReady">// start 通过库区id来加载仓储数据&#xD;
/**&#xD;
 * 通用工具函数:获取URL中的指定参数值&#xD;
 * @param {String} name 要获取的参数名&#xD;
 * @returns {String/null} 参数值(无则返回null)&#xD;
 */&#xD;
function getUrlParam(name) {&#xD;
    // 解析URL的查询字符串(?后面的部分)&#xD;
    var search = window.location.search.substring(1);&#xD;
    // 分割成键值对数组&#xD;
    var params = search.split(&quot;&amp;&quot;);&#xD;
    for (var i = 0; i &lt; params.length; i++) {&#xD;
        var pair = params[i].split(&quot;=&quot;);&#xD;
        // 解码参数值(处理中文/特殊字符)&#xD;
        if (decodeURIComponent(pair[0]) === name) {&#xD;
            return decodeURIComponent(pair[1] || &quot;&quot;);&#xD;
        }&#xD;
    }&#xD;
    return null;&#xD;
};  &#xD;
&#xD;
&#xD;
    <ClientEvent name="onReady">&#xD;
&#xD;
/**&#xD;
 * 查询&#xD;
 */&#xD;
query = function(){&#xD;
   //通过库区id来加载仓储数据&#xD;
   var parentId = getUrlParam(&quot;parentId&quot;);&#xD;
   var parentId = &quot;${request.getParameter('parentId')}&quot;;&#xD;
   view.get(&quot;#dataSetdepot&quot;).set(&quot;parameter&quot;,{parentId: parentId}).flushAsync();&#xD;
};&#xD;query();&#xD;
&#xD;
&#xD;
showDlg=function(){&#xD;
   var select = view.get(&quot;#dataGridDepot&quot;).get(&quot;selection&quot;);&#xD;
   if(select){&#xD;
       view.get(&quot;#depotdialog&quot;).show();;&#xD;
   }else{&#xD;
        $notify(&quot;请先选择数据……&quot;);&#xD;
   }&#xD;
};&#xD;
&#xD;
renderId = function(arg){&#xD;
    var txt = arg.data.getText(&quot;id&quot;);&#xD;
    if(!txt) return true;&#xD;
    var htm = &quot;&lt;a href='javascript:;' onClick='showDlg()' >&quot;+txt+&quot;&lt;/a>&quot;;&#xD;
    arg.dom.innerHTML = htm;&#xD;
}&#xD;
&#xD;
</ClientEvent>
    <Property name="packages">font-awesome,css-common</Property>
@@ -107,12 +103,13 @@
          <Property name="action">ajaxRefreshCache</Property>
        </ToolBarButton>
        <ToolBarButton>
          <ClientEvent name="onClick">var url = &quot;com.fzzy.igds.sys.DepotStore.d&quot;;&#xD;
          <ClientEvent name="onClick">var url = &quot;com.fzzy.igds.DepotStore.d&quot;;&#xD;
var panelId = window.frameElement.getAttribute('data-id');
window.parent.$.modal.openTab(&quot;库存管理&quot;, url, false, panelId);</ClientEvent>
          <Property name="caption">库存管理</Property>
          <Property name="iconClass">fa fa-book</Property>
          <Property name="exClassName">btn1</Property>
          <Property name="visible">false</Property>
          <Property name="width">100</Property>
        </ToolBarButton>
      </ToolBar>
@@ -124,6 +121,7 @@
        <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>