Commit c4eac918 by guanzhenshan

应收款明细增加平台搜索

parent ed872e7d
...@@ -74,6 +74,8 @@ ...@@ -74,6 +74,8 @@
$("#roletable").attr("data-height", (height - 170)); $("#roletable").attr("data-height", (height - 170));
list(); list();
listPlatform();
}) })
function list() { function list() {
...@@ -118,15 +120,24 @@ ...@@ -118,15 +120,24 @@
{ field: 'amount_end', title: '期末应收账款', width: '130', iscount: true } { field: 'amount_end', title: '期末应收账款', width: '130', iscount: true }
]; ];
} }
var url = '@Url.Content("~/Reports/Finance/PlatformReceivableJson")' + '?' + $("#toolbar").serialize(); var url = '@Url.Content("~/Reports/Finance/PlatformReceivableJson")' + '?' + $("#toolbar").serialize();
var platform = $('#platform').val();
if (type == 1) { if (type == 1) {
$('#tb_noebay').hide(); $('#tb_noebay').hide();
$('#tb_ebay').show(); $('#tb_ebay').show();
if (platform != '' && platform != 'Ebay') {
layer.msg('在选择了查看Ebay类型的预收款时,只能选择Ebay平台。');
return false;
}
if (tb == undefined) { if (tb == undefined) {
tb = OnlyTable("roletable", columns, url, "", { tb = OnlyTable("roletable", columns, url, "", {
showfooter: true, showCount: true, loadsuccess: function (d) { showfooter: true, showCount: true, loadsuccess: function (d) {
...@@ -142,6 +153,12 @@ ...@@ -142,6 +153,12 @@
} }
else { else {
if (platform != '' && platform == 'Ebay') {
layer.msg('在选择了查看非Ebay类型的应收款时,不能选择Ebay平台。');
return false;
}
$('#tb_ebay').hide(); $('#tb_ebay').hide();
$('#tb_noebay').show(); $('#tb_noebay').show();
...@@ -171,6 +188,25 @@ ...@@ -171,6 +188,25 @@
} }
} }
function listPlatform() {
var lindex = layer.load();
$.submit({
url: '@Url.Content("~/Reports/Orders/ListPlatform")',
type:'POST',
paramData: '',
func: function (result) {
layer.close(lindex);
if (result != null && result != undefined) {
$('#platform').html('<option value="">选择平台</option>');
for (var i = 0; i < result.length; i++) {
$('#platform').append('<option value="' + result[i] + '">' + result[i]+'</option>');
}
}
}
})
}
</script> </script>
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment