Commit 5acecd5c by guanzhenshan

导入流水增加月份导入,并且强制月份为必填

parent e7b08086
...@@ -219,6 +219,8 @@ ...@@ -219,6 +219,8 @@
var BASE_URL = '@(Url.Content("~/js/webuploader-0.1.5/"))'; var BASE_URL = '@(Url.Content("~/js/webuploader-0.1.5/"))';
var month = '';
$(document).ready(function () { $(document).ready(function () {
//其他平台,默认选择第一个平台 //其他平台,默认选择第一个平台
...@@ -237,7 +239,17 @@ ...@@ -237,7 +239,17 @@
laydate.render({ elem: '#start' }); laydate.render({ elem: '#start' });
laydate.render({ elem: '#end' }); laydate.render({ elem: '#end' });
laydate.render({ elem: '#month', type: 'month' }); laydate.render({
elem: '#month', type: 'month', done: function (value, date, endDate) {
//console.log(value); //得到日期生成的值,如:2017-08-18
//console.log(date); //得到日期时间对象:{year: 2017, month: 8, date: 18, hours: 0, minutes: 0, seconds: 0}
//console.log(endDate); //得结束的日期时间对象,开启范围选择(range: true)才会返回。对象成员同上。
month = value;
initUpload();
}
});
initUpload(); initUpload();
...@@ -276,7 +288,6 @@ ...@@ -276,7 +288,6 @@
var start = $('#start').val(); var start = $('#start').val();
var end = $('#end').val(); var end = $('#end').val();
var orderno = $('#orderno').val(); var orderno = $('#orderno').val();
var month = $('#month').val();
if (platform == '') { if (platform == '') {
alert('请选择平台'); alert('请选择平台');
...@@ -347,8 +358,6 @@ ...@@ -347,8 +358,6 @@
return false; return false;
} }
var month = $('#month').val();
//if (month == '') { //if (month == '') {
// alert('请选择月份'); // alert('请选择月份');
// return false; // return false;
...@@ -439,8 +448,6 @@ ...@@ -439,8 +448,6 @@
alert('请选择平台'); alert('请选择平台');
return false; return false;
} }
var month = $('#month').val();
window.open('@Url.Content("~/DataWareHouse/PlatformOrder/ExportOrderBillings")' + '?platform=' + platform + '&website=' + website + '&start=' + start + '&end=' + end + '&orderno=' + orderno + '&month=' + month); window.open('@Url.Content("~/DataWareHouse/PlatformOrder/ExportOrderBillings")' + '?platform=' + platform + '&website=' + website + '&start=' + start + '&end=' + end + '&orderno=' + orderno + '&month=' + month);
} }
...@@ -448,13 +455,13 @@ ...@@ -448,13 +455,13 @@
function Export_Voucher() { function Export_Voucher() {
var time = new Date(); var time = new Date();
var mon = time.getMonth(); var mon = time.getMonth();
var month = null; var month1 = null;
if (mon < 10) { if (mon < 10) {
month = time.getFullYear() + '-0' + time.getMonth(); month1 = time.getFullYear() + '-0' + time.getMonth();
} else { } else {
month = time.getFullYear() + '-' + time.getMonth(); month1 = time.getFullYear() + '-' + time.getMonth();
} }
var centents = '<input type="month" class="layui-layer-input" value="' + month + '" placeholder="月份">'; var centents = '<input type="month" class="layui-layer-input" value="' + month1 + '" placeholder="月份">';
layer.prompt({ layer.prompt({
title: '请选择月份(必选项)', title: '请选择月份(必选项)',
content: centents, content: centents,
...@@ -480,7 +487,6 @@ ...@@ -480,7 +487,6 @@
var start = $('#start').val(); var start = $('#start').val();
var end = $('#end').val(); var end = $('#end').val();
var orderno = $('#orderno').val(); var orderno = $('#orderno').val();
var month = $('#month').val();
if (month == '') { if (month == '') {
alert('请选择月份'); alert('请选择月份');
......
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