Files
OMS/app/console/view/admin/stockdump/cancel_confirm.html
2026-01-04 19:08:31 +08:00

92 lines
3.6 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 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="from-cancel" name="from-cancel" method="post" action="index.php?app=console&ctl=<{$ctl}>&act=do_save_operation">
<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}>" />
<{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>
</form>
</div>
<script>
$('btn-submit').addEvent('click', function(){
var stock_id = '<{$stock_id}>';
var operator_name = '<{$title}>';
new Request({url:'index.php?app=console&ctl=<{$ctl}>&act=do_cancel&p[0]='+stock_id,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'){
if (json.msg_code=='w402')
{
if (window.confirm('仓储物流系统无法进行撤销转储单操作,是否继续取消转储单?\n注确定继续拒绝将强制撤销本系统未处理的转储单否则请线下联系仓储服务商取消相应的转储单'))
{
$('from-cancel').fireEvent('submit',{stop:function(){}});
}else{
$('btn-submit').set('disabled', '');
$('btn-submit').getElements('span')[1].set('text','确定');
}
}else{
alert('取消失败:'+json.err_msg);
$('btn-submit').set('disabled', '');
$('btn-submit').getElements('span')[1].set('text','确定');
return;
}
}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>