mirror of
https://gitee.com/ShopeX/OMS
synced 2026-04-07 07:15:33 +08:00
76 lines
2.6 KiB
HTML
76 lines
2.6 KiB
HTML
<!--
|
|
Copyright 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='division'>
|
|
<h3><{$title}></h3>
|
|
<form method='post' id='regulation-form'>
|
|
<input type="hidden" name="task_id" value="<{$task_id}>">
|
|
<input type='hidden' name='ids' value='<{$ids}>'>
|
|
<div class='tableform'>
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
|
|
<tr>
|
|
<th><span class="red">*</span> 应用规则:</th>
|
|
<td><select name="regulation_id" id="regulation_id">
|
|
<{foreach from=$regulation_list item=regulation}>
|
|
<option value="<{$regulation.id}>"><{$regulation.heading}></option>
|
|
|
|
<{/foreach}>
|
|
</select></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
</form>
|
|
</div>
|
|
|
|
<div class='table-action'>
|
|
<{button type='button' label='确认' id='regulation-submit'}>
|
|
<{button type='button' label='取消' id='closeBut'}>
|
|
</div>
|
|
<script>
|
|
|
|
|
|
$('regulation-submit').addEvent('click',function(){
|
|
var regulation_id = $('regulation_id').value;
|
|
if(regulation_id == ''){
|
|
return MessageBox.error('请选择规则!');
|
|
|
|
}
|
|
new Request({url:'index.php?app=inventorydepth&ctl=regulation_skus&act=saveRegulation',method:'post',data:$('regulation-form').toQueryString(),
|
|
onSuccess:function(json){
|
|
if(!json) return;
|
|
rs=JSON.decode(json);
|
|
if(rs.rsp=='fail') MessageBox.error(rs.msg);
|
|
else MessageBox.success(rs.msg);
|
|
$('regulation-submit').getParent('.dialog').retrieve('instance').close();
|
|
window.finderGroup['<{$env.get.finder_id}>'].refresh(true);
|
|
|
|
}
|
|
}).send();
|
|
|
|
});
|
|
|
|
$('closeBut').addEvent('click', function(event){
|
|
$('closeBut').getParent('.dialog').retrieve('instance').close();
|
|
window.finderGroup['<{$env.get.finder_id}>'].refresh(true);
|
|
});
|
|
|
|
</script> |