Files
OMS/app/ome/view/admin/order/dispatching.html
2026-01-04 17:22:44 +08:00

85 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.
-->
<form action="index.php?app=ome&ctl=<{$env.get.ctl}>&act=do_dispatch" method="post" id="disForm">
<input name="single" value="<{$single}>" type="hidden">
<table class="tableform">
<tbody>
<tr>
<th>订单确认小组:</th>
<td>
<{input type="select" name='new_group_id' rows=$groups valueColumn="group_id" labelColumn="name" onchange="getOp(this.value,'')"}>
<{if $isSelectedAll}>
<input name="isSelectedAll" value="<{$isSelectedAll}>" type="hidden">
<{/if}>
</td>
</tr>
<tr>
<th>订单操作员:</th>
<td><select id='new_op_id' name='new_op_id'></select></td>
</tr>
<tr>
<th></th>
<td><{foreach from=$orderIds key=key item=item}>
<input type="hidden" name='order_id[]' value=<{$key}> />
<{/foreach}><span style="color:#FF0000;">注:可合并处理订单将会同时被分派</span></td>
</tr>
</tbody>
</table>
</form>
<{area inject=".mainFoot"}>
<div class="table-action">
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td><button class="btn btn-primary" id="btnSubmit" ><span><span><{t}>确定<{/t}></span></span></button></td>
</tr>
</tbody>
</table>
</div>
<{/area}>
<script>
$('disForm').store('target',{
onComplete:function(){
},
onSuccess: function(response){
$$('.dialog').getLast().retrieve('instance').close();
finderGroup['<{$env.get.finder_id}>'].refresh();
}
});
var flag = true;
$('btnSubmit').addEvent('click',function(e){
if(flag){
flag = false;
if('<{$env.get.single}>'){
//finderGroup['<{$env.get.finder_id}>'].refresh.delay(400,finderGroup['<{$env.get.finder_id}>']);
}
$('disForm').fireEvent('submit',{stop:$empty});
}
});
function getOp(group_id,selected_op_id){
if(group_id){
W.page('index.php?app=ome&ctl=admin_group&act=get_op&p[0]='+group_id+'&p[1]='+selected_op_id+'&p[2]=true',{update:$('new_op_id')});
}else{
$('new_op_id').empty();
}
}
</script>