createAccountOrderChecking.html
6.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<script>
$( "#datepickfrom" ).datepicker({
monthNamesShort: ["01月", "02月", "03月", "04月", "05月", "06月", "07月", "08月", "09月", "10月", "11月", "12月"], // 区域化月名为中文
changeYear: true, // 年下拉菜单
changeMonth: true, // 月下拉菜单
//showButtonPanel: true, // 显示按钮面板
showMonthAfterYear: true, // 月份显示在年后面
currentText: "本月", // 当前日期按钮提示文字
closeText: "关闭", // 关闭按钮提示文字
dateFormat: "yy-mm", // 日期格式
onClose: function(dateText, inst) {// 关闭事件
var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
//上月年份
var lastYear = year;
//转换成当月数据
month = parseInt(month) +1;
//上月月份
var lastMonth = month;
if(parseInt(month) <10){
month = "0"+month;
}
var period = $("#period1").val();
//获取当月天数
var day = getLastDay(year,month);
if(parseInt(day) < parseInt(period)){
alert("周期配置为:"+period+"号,你选择结束日期为:"+year+"-"+month+",该月份只有"+day+"天");
return false;
}
//上月月份
if(parseInt(lastMonth) == 1){
lastMonth = 12;
lastYear = parseInt(lastYear) - 1;
}else{
lastMonth = parseInt(lastMonth) - 1;
}
//上月天数
var lastDay = getLastDay(lastYear,lastMonth);
if(parseInt(period)+1 <31){
var lastPeriod = parseInt(period) + 1;
}else{
var lastPeriod = parseInt(period);
}
if(parseInt(lastDay) < parseInt(lastPeriod)){
alert("周期配置为:"+period+"号,你选择开始日期为:"+lastYear+"-"+lastMonth+",该月份只有"+lastDay+"天");
return false;
}
if(parseInt(lastPeriod) < 10){
lastPeriod = "0"+lastPeriod;
}
if(parseInt(lastMonth) < 10){
lastMonth = "0"+lastMonth;
}
if(parseInt(period) < 10){
period = "0"+period;
}
$("#settleStartDate").val(getYearMonthDay(lastYear,lastMonth,lastPeriod));
$("#settleEndDate").val(getYearMonthDay(year,month,period));
$("#datepickfrom").val(year+"-"+month);
}
});
//根据年月获取该月有多少天
function getLastDay(year, month) {
var date = new Date(year, month, 1),
lastDay = new Date(date.getTime() - 864e5).getDate();
return lastDay;
}
//格式化日期
function getYearMonthDay(year, month,day){
return year + "-" + month + "-" + day;
}
</script>
<style>
.ui-datepicker-calendar {
display: none;// 不显示日期面板
}
.ui-datepicker-next {
display: none;
}
.ui-datepicker-prev{
display: none;
}
.model-select-box { width: 197px; height: 27px; line-height: 27px; border: 1px solid #aaa; float: left; margin-right: 20px; text-indent: 5px; position: relative; }
.model-select-text { height: 27px; padding-right: 27px; background: url(http://t43-2.yunpan.360.cn/p/800-600.e692334dad266bef653533e12fa291286932eb10.3619c0.jpg?t=64368e238226776012c7ea2a6ad4dcce&d=20140221) no-repeat right 0; cursor: pointer; -moz-user-select: none; -webkit-user-select: none; user-select: none; }
.model-select-option { display: none; position: absolute; background: #fff; width: 100%; left: -1px; border: 1px solid #aaa; }
.model-select-option li { line-height: 14px; color: #555; cursor: pointer; }
.model-select-option li.seleced { background: #06C; color: #fff; }
</style>
<div class="pageheader notab">
<h1 class="pagetitle">对账管理-创建对账订单管理</h1>
</div>
<!--pageheader-->
<div id="contentwrapper" class="contentwrapper">
<div id="basicform" class="subcontent">
<div class="contenttitle2">
<h3>创建对账订单管理</h3>
</div>
<div class="input">
<a class="btn btn2 btn_blue" href="javascript:void(0)" ng-click="periodConfiguration()"><span>周期配置</span></a>
</div>
<br/>
<br/>
<div style="width: 100%">
<!-- 左边添加表单 -->
<div style="width: 60%; float: left;">
<div style="background-color: #EEEEEE; color: #666666; border-left: 1px solid #ddd; border-top: 1px solid #ddd; border-right: 1px solid #ddd; width: 100%; height: 30px;">
<span style="height: 30px; line-height: 30px; background-color: #EEEEEE;height: 16px; margin-left: 13px;">生成订单</span>
</div>
<div class="overviewhead" method="post" style="width: 100%; margin-bottom: 10px;">
<div class="line">
<label for="datepickfrom" class="label">选择月份: </label>
<div class="input">
<input type="text" id="datepickfrom" class="hasDatepicker1" />
</div>
<label for="period" class="label">周期:</label>
<div class="input">
<input type="text" id="period" ng-model="period" disabled="disabled"/>
<input type="text" id="period1" ng-model="period1" hidden disabled="disabled"/>
</div>
<div style="display:inline-block">
<label class="label">商家名称:</label>
<div class="input">
<select type="text" ng-model="orderChecking.supplierId" >
<option value=''>--请选择--</option>
<option ng-repeat="x in suppliers " value="{{x.id}}">{{x.name}}</option>
</select>
</div>
</div>
<br/>
<br/>
<br/>
<div class="line">
<label >开始日期: </label>
<div class="input">
<input type="text" id="settleStartDate" date-format placeholder="开始日期" class="laydate-icon"
onClick="laydate({istime: true, format: 'YYYY-MM-DD'})" style="width: 150px;" ng-model="orderChecking.settleStartDate"/>
</div>
<label>结束日期: </label>
<div class="input">
<input type="text" ng-model="orderChecking.settleEndDate" name="settleEndDate" id="settleEndDate" disabled="disabled" />
</div>
</div>
</div>
<br/>
<br/>
<br/>
<p style="margin: 0 auto; text-align: center">
<a class="btn btn2 btn_cloud" href="javascript:void(0)" ng-click="exportOrderChecking()"><span>生成</span></a>
</p>
</div>
</div>
</div>
</div>
</div>