Files
OMS/app/ome/view/admin/branch/flow.html
2026-01-04 19:08:31 +08:00

84 lines
2.7 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">
<form id="branch-flow-form" method="POST" action="index.php?app=ome&ctl=admin_branch_flow&act=save">
<input type="hidden" name="id" value="<{$flow.id}>">
<div class="division">
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<th>单据类型:</th>
<td>
<select name="flow_type" <{if $flow}>disabled<{/if}> >
<{foreach from=$flowTypes item=item key=key}>
<option value="<{$key}>" <{if $key==$flow.flow_type}>selected<{/if}> ><{$item}></option>
<{/foreach}>
</select>
</td>
</tr>
</tbody>
</table>
</div>
<div class="division" id="content">
</div>
</form>
</div>
<{area inject='.mainFoot'}>
<div class="table-action">
<{button label="保存" class="btn-primary"}>
<{button label="关闭" class="btn-secondary" isCloseDialogBtn="true" }>
</div>
<{/area}>
<script>
(function(){
$E('.btn-primary').addEvent('click', function(){
$('branch-flow-form').fireEvent('submit', {stop:$empty})
})
$('branch-flow-form').store('target', {
onComplete:function(resp){
resp = JSON.decode(resp)
if (resp.error) {return}
$('branch-flow-form').getParent('.dialog').retrieve('instance').close();
finderGroup["<{$env.get.finder_id}>"].refresh();
}
})
$E("select[name=flow_type]").addEvent('change',function(){
new Request.HTML({
url:'index.php?app=ome&ctl=admin_branch_flow&act=loadFlow&p[]='+$E('input[name=id]').get('value')+'&p[]='+this.value,
update:'content'
}).send()
// W.page('index.php?app=ome&ctl=admin_branch_flow&act=loadFlow&p[]='+$E('input[name=id]').get('value')+'&p[]='+this.value,{
// update:'content',
// clearUpdateMap:false
// })
});
window.addEvent('domready',function(){
$E("select[name=flow_type]").fireEvent('change',{stop:$empty});
})
})();
</script>