Files
OMS/app/omevirtualwms/view/callback.html
2025-12-28 23:13:25 +08:00

69 lines
2.7 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">
<div class="division">
<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center" >
<tbody>
<tr>
<td align="center">msg_id:<{$msg_id}>
<input type="radio" name="rsp" value="succ" checked="checked" />成功 <input type="radio" name="rsp" value="fail" />失败
</td>
</tr>
<tr>
<td align="center">仓储物流系统单据号:<input type="text" name="wms_order_code" value="" /></td>
</tr>
<tr>
<td align="center">消息:<input type="text" name="err_msg" value="" /></td>
</tr>
<tr>
<td align="center">返回结果:<span id="result"></span></td>
</tr>
<tr>
<td align="center">
<{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>
</div>
<script>
$('btn-submit').addEvent('click', function(){
var msg_id = '<{$msg_id}>';
var rsp = $$('input[name=rsp]:checked').get('value');
var err_msg = $$('input[name=err_msg]').get('value');
var wms_order_code = $$('input[name=wms_order_code]').get('value');
new Request({url:'index.php?app=omevirtualwms&ctl=admin_wms&act=callback_call&p[0]='+msg_id+'&p[1]='+rsp,data:{'err_msg':err_msg,'wms_order_code':wms_order_code},method:'POST',
onRequest:function(){
$('btn-submit').set('disabled', 'true');
$('btn-submit').getElements('span')[1].set('text','正在回传');
},
onComplete:function(json){
var json = JSON.decode(json);
if (json.rsp == 'succ')
{
alert('回传成功');
parent.finderGroup['<{$finder_id}>'].refresh.delay(400,parent.finderGroup['<{$finder_id}>']);
$('btn-submit').getParent('.dialog').retrieve('instance').close();
return;
}else{
$('btn-submit').set('disabled', '');
$('btn-submit').getElements('span')[1].set('text','回传');
}
$('result').set('html',json.html);
parent.finderGroup['<{$finder_id}>'].refresh.delay(400,parent.finderGroup['<{$finder_id}>']);
},
}).send();
});
$('btn-close').addEvent('click', function(){
this.getParent('.dialog').retrieve('instance').close();
});
</script>