Files
OMS/app/purchase/view/admin/stock/transfer_branch.html
2026-01-04 19:08:31 +08:00

59 lines
2.3 KiB
HTML

<!--
Copyright 2012-2026 ShopeX (https://www.shopex.cn)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div class="tableform">
<h3>仓库理货</h3>
<div class="division">
<h5>请选择理货仓库</h5>
<form action="index.php?app=purchase&ctl=admin_stock&act=transferTidy" method="post">
<div class="gray_form">
<ul class="branch_list">
<{foreach from=$branchs item=branch}>
<li><label for="branch_id_<{$branch.branch_id}>">
<input type="radio" name="branch_id" id="branch_id_<{$branch.branch_id}>" value="<{$branch.branch_id}>"><{$branch.name}>
</label></li>
<{/foreach}>
</ul>
<div align="right"><a href="javascript:void(0);" id="btn_more">点击展开更多&gt;&gt;</a></div>
</div>
<div class="division" align="center"><{button type="submit" class="btn-primary" label="确 定"}></div>
</form>
</div>
</div>
<script>
(function(){
function getList(k,v){
return '<label for="branch_id_'+k+'"><input type="radio" name="branch_id" id="branch_id_'+k+'" value="'+k+'"> '+v+'</label>';
}
$('btn_more').addEvent("click",function(){
new Request({url:'index.php?app=purchase&ctl=admin_inventory&act=branch_more',method:'get',
onRequest:function(){
this.addClass('loading');
}.bind(this),
onSuccess:function(json){//[{id:1,name:"上海仓库"}]
this.getParent().destroy();
var fdoc=document.createDocumentFragment();
json.each(function(item,i){
fdoc.appendChild(new Element('li',{html:getList(item.id,item.name))});
});
$E('.branch_list').appendChild(fdoc);
}.bind(this)
}).send();
});
})()
</script>