Files
OMS/app/inventorydepth/view/product.html
2026-01-04 19:08:31 +08:00

80 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.
-->
<form method="post" id='shopForm' action="index.php?app=inventorydepth&ctl=product&act=do_ration">
<input type="hidden" name="post" value='<{$product}>'/>
<div class="tableform">
<div class="division">
<table border="0" cellpadding="0" cellspacing="0" class="gridlist sepc_value_table <{$spec.spec_type|default:'text'}>-spec-value-table">
<thead>
<tr>
<th><input type="checkbox" id="chkAll"></th>
<th>店铺名称</th>
<th>店铺类型</th>
</tr>
</thead>
<tbody>
<{foreach from=$shop item=items key=key}>
<tr>
<td><input type="checkbox" name="shopIds[]" value="<{$items.shop_id}>"></td>
<td><{$items.name}></td>
<td><{$items.shop_type}></td>
</tr>
<{/foreach}>
</tbody>
</table>
</div>
</div>
<div class="table-action">
<{button label=$___idm="确定"|t:'idm' type="submit" id="btn_submit"}>
</div>
</form>
<script>
$('chkAll').addEvent('click',function(e){
$$('[name^=shopIds[]').set('checked',this.checked);
});
$('shopForm').store('target',{
onRequest:function(){
$('btn_submit').set('disabled','disabled');
},
onComplete:function(rs){
var result = Json.evaluate(rs);
if (typeof(result.error) != 'undefined'){
$('btn_submit').set('disabled','');
return;
}else {
new Dialog(new Element("div.dispatch_form",{html:'正在加载...'}),{
title:'分配商品',
width:350,
height:200,
modal:true,
resizeable:false,
onClose:function(){
$$('[name^=shopIds[]').set('checked','');
$('btn_submit').set('disabled','');
}
});
$$('.dispatch_form').load('index.php?app=inventorydepth&ctl=product&act=dispatch_confirm');
}
}
});
</script>