...
|
...
|
@@ -38,6 +38,30 @@ |
|
|
<div id="tradeBillsList" region="center">
|
|
|
<table id="tradeBillsListTable"></table>
|
|
|
</div>
|
|
|
|
|
|
<div id="refundConfirmDialog" class="easyui-dialog" style="width:400px;height:300px;"
|
|
|
data-options="title:'人工打款确认',buttons:'#refundConfirmDialog_tb',modal:true,closed:true">
|
|
|
<div style="padding:20px;">
|
|
|
<input id="refund_tradeBillsId" type="hidden" readonly disabled/>
|
|
|
<input id="refund_uid" type="hidden" readonly disabled/>
|
|
|
<label>订 单 编 号:</label>
|
|
|
<input id="refund_orderCode" type="text" class="easyui-textbox" style="width:250px" readonly disabled/>
|
|
|
|
|
|
<br/><br/>
|
|
|
<label>支付宝账号:</label>
|
|
|
<input id="refund_alipayAccount" type="text" class="easyui-textbox" style="width:250px" readonly disabled/>
|
|
|
|
|
|
<br/><br/>
|
|
|
<label>打 款 金 额:</label>
|
|
|
<input id="refund_amount" type="text" class="easyui-textbox" style="width:250px" readonly disabled/>
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
|
<div id="refundConfirmDialog_tb">
|
|
|
<a href="#" id="refundConfirmDialog_btn_save" onclick="refundGo();" class="easyui-linkbutton btn-danger" >确定</a>
|
|
|
<a href="#" id="refundConfirmDialog_btn_close" onclick="$('#refundConfirmDialog').dialog('close');" class="easyui-linkbutton btn-info" >关闭</a>
|
|
|
</div>
|
|
|
|
|
|
<script>
|
|
|
$(function() {
|
|
|
$("#status").combobox({
|
...
|
...
|
@@ -56,31 +80,22 @@ $(function() { |
|
|
return;
|
|
|
}*/
|
|
|
|
|
|
$("#tradeBillsListTable").datagrid("load", {
|
|
|
status : $("#status").myCombobox("getValue"),
|
|
|
orderCode : $("#orderCode").val(),
|
|
|
uid : $("#uid").val(),
|
|
|
mobile : $("#mobile").val()
|
|
|
});
|
|
|
loadTradeBillsData();
|
|
|
}
|
|
|
});
|
|
|
|
|
|
//全部按钮
|
|
|
/* $("#allBtn").linkbutton({
|
|
|
iconCls: "icon-import",
|
|
|
onClick: function () {
|
|
|
$("#orderCode").textbox('setValue','');
|
|
|
$("#status").combobox('setValue','');
|
|
|
//$("#uid").textbox('setValue','');
|
|
|
$("#mobile").textbox('setValue','');
|
|
|
$("#orderListTable").datagrid("load", {
|
|
|
});
|
|
|
}
|
|
|
});*/
|
|
|
|
|
|
getTradeBillsList();
|
|
|
});
|
|
|
|
|
|
function loadTradeBillsData() {
|
|
|
$("#tradeBillsListTable").datagrid("load", {
|
|
|
status : $("#status").myCombobox("getValue"),
|
|
|
orderCode : $("#orderCode").val(),
|
|
|
uid : $("#uid").val(),
|
|
|
mobile : $("#mobile").val()
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function getTradeBillsList(){
|
|
|
$("#tradeBillsListTable").myDatagrid({
|
|
|
fit: true,
|
...
|
...
|
@@ -150,7 +165,13 @@ function getTradeBillsList(){ |
|
|
align: "center",
|
|
|
formatter: function (value, rowData, rowIndex) {
|
|
|
if (rowData.tradeStatus != 100) {
|
|
|
return "<a role='refundsConfirm' dataId='"+ rowData.id +"' style='margin-left:10px;background-color: #5cb85c !important;'>打款</a>";
|
|
|
var btn= "<a role='refundsConfirm' onclick='openConfirmDialog(\"%s\",\"%s\",\"%s\",\"%s\",\"%s\")' style='margin-left:10px;background-color: #5cb85c !important;'>打款</a>";
|
|
|
btn = btn.replace("%s",rowData.id);
|
|
|
btn = btn.replace("%s",rowData.uid);
|
|
|
btn = btn.replace("%s",rowData.orderCode);
|
|
|
btn = btn.replace("%s",rowData.alipayAccount);
|
|
|
btn = btn.replace("%s",rowData.amount);
|
|
|
return btn;
|
|
|
}
|
|
|
}
|
|
|
}]],
|
...
|
...
|
@@ -160,16 +181,57 @@ function getTradeBillsList(){ |
|
|
idField: "id",
|
|
|
singleSelect: true,
|
|
|
onLoadSuccess: function (data) {
|
|
|
$(this).datagrid("getPanel").find("a[role='refundsConfirm']").linkbutton({
|
|
|
onClick: function () {
|
|
|
var id = $(this).attr("dataId");
|
|
|
alert("开发中。。");
|
|
|
}
|
|
|
});
|
|
|
$(this).datagrid("getPanel").find("a[role='refundsConfirm']").linkbutton({});
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function openConfirmDialog(id,uid,orderCode,alipayAccount,amount) {
|
|
|
//重新赋值
|
|
|
$("#refund_tradeBillsId").val(id);
|
|
|
$("#refund_uid").val(uid);
|
|
|
$("#refund_orderCode").textbox('setValue',orderCode);
|
|
|
$("#refund_alipayAccount").textbox('setValue',alipayAccount);
|
|
|
$("#refund_amount").textbox('setValue',amount);
|
|
|
|
|
|
$("#refundConfirmDialog").dialog('open');
|
|
|
}
|
|
|
|
|
|
//确认打款
|
|
|
function refundGo() {
|
|
|
var param={};
|
|
|
param.tradeBillsId = $("#refund_tradeBillsId").val();
|
|
|
param.uid=$("#refund_uid").val();
|
|
|
param.orderCode=$("#refund_orderCode").val();
|
|
|
param.alipayAccount=$("#refund_alipayAccount").val();
|
|
|
param.amount=$("#refund_amount").val();
|
|
|
|
|
|
//发送请求
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
url: contextPath + '/tradeBills/manualRefund',
|
|
|
data: param,
|
|
|
async: false,
|
|
|
cache: false,
|
|
|
dataType: 'json',
|
|
|
success: function (result) {
|
|
|
if(result.code == 200) {
|
|
|
$("#refundConfirmDialog").dialog('close');
|
|
|
loadTradeBillsData();
|
|
|
}
|
|
|
else {
|
|
|
$.messager.alert("失败", result.message, "error");
|
|
|
$("#refundConfirmDialog").dialog('close');
|
|
|
loadTradeBillsData();
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
//按钮置灰
|
|
|
$("#refundConfirmDialog_btn_save").linkbutton("disabled");
|
|
|
$("#refundConfirmDialog_btn_close").linkbutton("disabled");
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
</body>
|
|
|
</html> |
|
|
\ No newline at end of file |
...
|
...
|
|