Files
OMS/app/console/view/admin/iostock/instock_cancel.html
2025-12-28 23:13:25 +08:00

83 lines
3.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!--
Copyright © ShopeX http://www.shopex.cn. All rights reserved.
See LICENSE file for license details.
-->
<div class="tableform">
<form id="from-cancel" name="from-cancel" method="post" action="index.php?app=console&ctl=admin_iostockorder&act=updateStatus">
<div class="division">
<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center" >
<tbody>
<tr>
<td align="center"><h4>取消<{$title}><{$stock_bn}></h4></td>
</tr>
<tr>
<td align="center">
<input type="hidden" name="stock_bn" value="<{$stock_bn}>" />
<input type="hidden" name="iso_id" value="<{$stock_id}>" />
<{button label="确定" type="button" id="btn-submit" class="btn-primary"}>
<{button label="关闭" type="button" id="btn-close" class="btn-primary"}>
</td>
</tr>
</tbody>
</table>
</div>
<input type="hidden" name="type" value="<{$type}>">
</form>
</div>
<script>
$('btn-submit').addEvent('click', function(){
var stock_id = '<{$stock_id}>';
var operator_name = '<{$title}>';
var type = '<{$type}>';
var act = '<{$act}>';
new Request({url:'index.php?app=console&ctl=admin_iostockorder&act=do_cancel&p[0]='+stock_id+'&p[1]='+act+'&p[2]='+type,method:'POST',
onRequest:function(){
$('btn-submit').set('disabled', 'true');
$('btn-submit').getElements('span')[1].set('text','正在取消...');
},
onComplete:function(json){
if (json != ''){
json = JSON.decode(json);
if(json.rsp == 'fail'){
alert('取消失败:'+json.err_msg);
$('btn-submit').set('disabled', '');
$('btn-submit').getElements('span')[1].set('text','确定');
return;
}else if(json.rsp == 'warning'){
if (window.confirm('仓储物流系统无法进行撤销'+operator_name+'操作,是否继续取消'+operator_name+'?\n注确定继续拒绝将强制撤销本系统未处理的'+operator_name+',否则请线下联系仓储服务商取消相应的'+operator_name))
{
$('from-cancel').fireEvent('submit',{stop:function(){}});
}else{
$('btn-submit').set('disabled', '');
$('btn-submit').getElements('span')[1].set('text','确定');
}
}else{
$('from-cancel').fireEvent('submit',{stop:function(){}});
}
}
},
}).send();
});
$('btn-close').addEvent('click', function(){
this.getParent('.dialog').retrieve('instance').close();
});
$('from-cancel').store('target',{
onComplete:function(){
try{
var _dialogIns = $('btn-submit').getParent('.dialog').retrieve('instance');
}catch(e){}
if(_dialogIns){
_dialogIns.close();
}
}
});
</script>