|
@@ -38,6 +38,30 @@ |
|
@@ -38,6 +38,30 @@ |
38
|
<div id="tradeBillsList" region="center">
|
38
|
<div id="tradeBillsList" region="center">
|
39
|
<table id="tradeBillsListTable"></table>
|
39
|
<table id="tradeBillsListTable"></table>
|
40
|
</div>
|
40
|
</div>
|
|
|
41
|
+
|
|
|
42
|
+<div id="refundConfirmDialog" class="easyui-dialog" style="width:400px;height:300px;"
|
|
|
43
|
+ data-options="title:'人工打款确认',buttons:'#refundConfirmDialog_tb',modal:true,closed:true">
|
|
|
44
|
+ <div style="padding:20px;">
|
|
|
45
|
+ <input id="refund_tradeBillsId" type="hidden" readonly disabled/>
|
|
|
46
|
+ <input id="refund_uid" type="hidden" readonly disabled/>
|
|
|
47
|
+ <label>订 单 编 号:</label>
|
|
|
48
|
+ <input id="refund_orderCode" type="text" class="easyui-textbox" style="width:250px" readonly disabled/>
|
|
|
49
|
+
|
|
|
50
|
+ <br/><br/>
|
|
|
51
|
+ <label>支付宝账号:</label>
|
|
|
52
|
+ <input id="refund_alipayAccount" type="text" class="easyui-textbox" style="width:250px" readonly disabled/>
|
|
|
53
|
+
|
|
|
54
|
+ <br/><br/>
|
|
|
55
|
+ <label>打 款 金 额:</label>
|
|
|
56
|
+ <input id="refund_amount" type="text" class="easyui-textbox" style="width:250px" readonly disabled/>
|
|
|
57
|
+
|
|
|
58
|
+ </div>
|
|
|
59
|
+</div>
|
|
|
60
|
+<div id="refundConfirmDialog_tb">
|
|
|
61
|
+ <a href="#" id="refundConfirmDialog_btn_save" onclick="refundGo();" class="easyui-linkbutton btn-danger" >确定</a>
|
|
|
62
|
+ <a href="#" id="refundConfirmDialog_btn_close" onclick="$('#refundConfirmDialog').dialog('close');" class="easyui-linkbutton btn-info" >关闭</a>
|
|
|
63
|
+</div>
|
|
|
64
|
+
|
41
|
<script>
|
65
|
<script>
|
42
|
$(function() {
|
66
|
$(function() {
|
43
|
$("#status").combobox({
|
67
|
$("#status").combobox({
|
|
@@ -56,30 +80,21 @@ $(function() { |
|
@@ -56,30 +80,21 @@ $(function() { |
56
|
return;
|
80
|
return;
|
57
|
}*/
|
81
|
}*/
|
58
|
|
82
|
|
|
|
83
|
+ loadTradeBillsData();
|
|
|
84
|
+ }
|
|
|
85
|
+ });
|
|
|
86
|
+
|
|
|
87
|
+ getTradeBillsList();
|
|
|
88
|
+});
|
|
|
89
|
+
|
|
|
90
|
+function loadTradeBillsData() {
|
59
|
$("#tradeBillsListTable").datagrid("load", {
|
91
|
$("#tradeBillsListTable").datagrid("load", {
|
60
|
status : $("#status").myCombobox("getValue"),
|
92
|
status : $("#status").myCombobox("getValue"),
|
61
|
orderCode : $("#orderCode").val(),
|
93
|
orderCode : $("#orderCode").val(),
|
62
|
uid : $("#uid").val(),
|
94
|
uid : $("#uid").val(),
|
63
|
mobile : $("#mobile").val()
|
95
|
mobile : $("#mobile").val()
|
64
|
});
|
96
|
});
|
65
|
- }
|
|
|
66
|
- });
|
|
|
67
|
-
|
|
|
68
|
- //全部按钮
|
|
|
69
|
- /* $("#allBtn").linkbutton({
|
|
|
70
|
- iconCls: "icon-import",
|
|
|
71
|
- onClick: function () {
|
|
|
72
|
- $("#orderCode").textbox('setValue','');
|
|
|
73
|
- $("#status").combobox('setValue','');
|
|
|
74
|
- //$("#uid").textbox('setValue','');
|
|
|
75
|
- $("#mobile").textbox('setValue','');
|
|
|
76
|
- $("#orderListTable").datagrid("load", {
|
|
|
77
|
- });
|
|
|
78
|
- }
|
|
|
79
|
- });*/
|
|
|
80
|
-
|
|
|
81
|
- getTradeBillsList();
|
|
|
82
|
-});
|
97
|
+}
|
83
|
|
98
|
|
84
|
function getTradeBillsList(){
|
99
|
function getTradeBillsList(){
|
85
|
$("#tradeBillsListTable").myDatagrid({
|
100
|
$("#tradeBillsListTable").myDatagrid({
|
|
@@ -150,7 +165,13 @@ function getTradeBillsList(){ |
|
@@ -150,7 +165,13 @@ function getTradeBillsList(){ |
150
|
align: "center",
|
165
|
align: "center",
|
151
|
formatter: function (value, rowData, rowIndex) {
|
166
|
formatter: function (value, rowData, rowIndex) {
|
152
|
if (rowData.tradeStatus != 100) {
|
167
|
if (rowData.tradeStatus != 100) {
|
153
|
- return "<a role='refundsConfirm' dataId='"+ rowData.id +"' style='margin-left:10px;background-color: #5cb85c !important;'>打款</a>";
|
168
|
+ var btn= "<a role='refundsConfirm' onclick='openConfirmDialog(\"%s\",\"%s\",\"%s\",\"%s\",\"%s\")' style='margin-left:10px;background-color: #5cb85c !important;'>打款</a>";
|
|
|
169
|
+ btn = btn.replace("%s",rowData.id);
|
|
|
170
|
+ btn = btn.replace("%s",rowData.uid);
|
|
|
171
|
+ btn = btn.replace("%s",rowData.orderCode);
|
|
|
172
|
+ btn = btn.replace("%s",rowData.alipayAccount);
|
|
|
173
|
+ btn = btn.replace("%s",rowData.amount);
|
|
|
174
|
+ return btn;
|
154
|
}
|
175
|
}
|
155
|
}
|
176
|
}
|
156
|
}]],
|
177
|
}]],
|
|
@@ -160,14 +181,55 @@ function getTradeBillsList(){ |
|
@@ -160,14 +181,55 @@ function getTradeBillsList(){ |
160
|
idField: "id",
|
181
|
idField: "id",
|
161
|
singleSelect: true,
|
182
|
singleSelect: true,
|
162
|
onLoadSuccess: function (data) {
|
183
|
onLoadSuccess: function (data) {
|
163
|
- $(this).datagrid("getPanel").find("a[role='refundsConfirm']").linkbutton({
|
|
|
164
|
- onClick: function () {
|
|
|
165
|
- var id = $(this).attr("dataId");
|
|
|
166
|
- alert("开发中。。");
|
184
|
+ $(this).datagrid("getPanel").find("a[role='refundsConfirm']").linkbutton({});
|
167
|
}
|
185
|
}
|
168
|
});
|
186
|
});
|
|
|
187
|
+}
|
|
|
188
|
+
|
|
|
189
|
+function openConfirmDialog(id,uid,orderCode,alipayAccount,amount) {
|
|
|
190
|
+ //重新赋值
|
|
|
191
|
+ $("#refund_tradeBillsId").val(id);
|
|
|
192
|
+ $("#refund_uid").val(uid);
|
|
|
193
|
+ $("#refund_orderCode").textbox('setValue',orderCode);
|
|
|
194
|
+ $("#refund_alipayAccount").textbox('setValue',alipayAccount);
|
|
|
195
|
+ $("#refund_amount").textbox('setValue',amount);
|
|
|
196
|
+
|
|
|
197
|
+ $("#refundConfirmDialog").dialog('open');
|
|
|
198
|
+}
|
|
|
199
|
+
|
|
|
200
|
+//确认打款
|
|
|
201
|
+function refundGo() {
|
|
|
202
|
+ var param={};
|
|
|
203
|
+ param.tradeBillsId = $("#refund_tradeBillsId").val();
|
|
|
204
|
+ param.uid=$("#refund_uid").val();
|
|
|
205
|
+ param.orderCode=$("#refund_orderCode").val();
|
|
|
206
|
+ param.alipayAccount=$("#refund_alipayAccount").val();
|
|
|
207
|
+ param.amount=$("#refund_amount").val();
|
|
|
208
|
+
|
|
|
209
|
+ //发送请求
|
|
|
210
|
+ $.ajax({
|
|
|
211
|
+ type: "POST",
|
|
|
212
|
+ url: contextPath + '/tradeBills/manualRefund',
|
|
|
213
|
+ data: param,
|
|
|
214
|
+ async: false,
|
|
|
215
|
+ cache: false,
|
|
|
216
|
+ dataType: 'json',
|
|
|
217
|
+ success: function (result) {
|
|
|
218
|
+ if(result.code == 200) {
|
|
|
219
|
+ $("#refundConfirmDialog").dialog('close');
|
|
|
220
|
+ loadTradeBillsData();
|
|
|
221
|
+ }
|
|
|
222
|
+ else {
|
|
|
223
|
+ $.messager.alert("失败", result.message, "error");
|
|
|
224
|
+ $("#refundConfirmDialog").dialog('close');
|
|
|
225
|
+ loadTradeBillsData();
|
|
|
226
|
+ }
|
169
|
}
|
227
|
}
|
170
|
});
|
228
|
});
|
|
|
229
|
+
|
|
|
230
|
+ //按钮置灰
|
|
|
231
|
+ $("#refundConfirmDialog_btn_save").linkbutton("disabled");
|
|
|
232
|
+ $("#refundConfirmDialog_btn_close").linkbutton("disabled");
|
171
|
}
|
233
|
}
|
172
|
|
234
|
|
173
|
</script>
|
235
|
</script>
|