考核功能样式及bug修改。
This commit is contained in:
parent
3d49cb9382
commit
8cb74de635
@ -326,14 +326,14 @@ public class PartyScoreController extends AbstractController {
|
||||
if(resultScore > scoreProperties.getMeetingGrossscore()) {
|
||||
resultScore = scoreProperties.getMeetingGrossscore();
|
||||
}
|
||||
partyMeetingScoreDTO.setScore(resultScore);
|
||||
partyMeetingScoreDTO.setScore(Double.valueOf(String.format("%.2f", resultScore)));
|
||||
}else {
|
||||
partyMeetingScoreDTO.setQuarter("全年");
|
||||
double resultScore = trueCount / baseCount * scoreProperties.getMeetingGrossscore();
|
||||
if(resultScore > scoreProperties.getMeetingGrossscore()) {
|
||||
resultScore = scoreProperties.getMeetingGrossscore();
|
||||
}
|
||||
partyMeetingScoreDTO.setScore(resultScore);
|
||||
partyMeetingScoreDTO.setScore(Double.valueOf(String.format("%.2f", resultScore)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,6 +26,8 @@ public class ConfigForScoreDTO {
|
||||
private String unit;
|
||||
@ApiModelProperty(name = "type", value = "配置类型")
|
||||
private String type;
|
||||
@ApiModelProperty(name = "typeName", value = "配置类型名称")
|
||||
private String typeName;
|
||||
|
||||
public String getConfigForScoreId() {
|
||||
return configForScoreId == null ? "" : configForScoreId.trim();
|
||||
@ -74,4 +76,12 @@ public class ConfigForScoreDTO {
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getTypeName() {
|
||||
return typeName == null ? "" : typeName;
|
||||
}
|
||||
|
||||
public void setTypeName(String typeName) {
|
||||
this.typeName = typeName;
|
||||
}
|
||||
}
|
||||
|
@ -25,8 +25,10 @@ public class ConfigForScoreVO {
|
||||
private String areaName;
|
||||
@ApiModelProperty(name = "unit", value = "单位")
|
||||
private String unit;
|
||||
@ApiModelProperty(name = "type", value = "配置类型")
|
||||
@ApiModelProperty(name = "type", value = "配置类型ID")
|
||||
private String type;
|
||||
@ApiModelProperty(name = "typeName", value = "配置类型名称")
|
||||
private String typeName;
|
||||
|
||||
public String getCount() {
|
||||
return count == null ? "" : count.trim();
|
||||
@ -67,4 +69,12 @@ public class ConfigForScoreVO {
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getTypeName() {
|
||||
return typeName == null ? "" : typeName;
|
||||
}
|
||||
|
||||
public void setTypeName(String typeName) {
|
||||
this.typeName = typeName;
|
||||
}
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ public class ConfigForScoreServiceImpl extends AbstractService implements IConfi
|
||||
Integer count = countNumberConfigForScore(params);
|
||||
if(!count.equals(0)) {
|
||||
if(StringUtils.isEmpty(params.get("area"))) {
|
||||
throw new SearchException(params.get("type") + "数据已存在,请进行修改");
|
||||
throw new SearchException(params.get("typeName") + "数据已存在,请进行修改");
|
||||
}else {
|
||||
throw new SearchException(params.get("areaName") + "数据已存在,请进行修改");
|
||||
}
|
||||
|
@ -9,6 +9,7 @@
|
||||
<result column="area_name" property="areaName"/>
|
||||
<result column="unit" property="unit"/>
|
||||
<result column="type" property="type"/>
|
||||
<result column="type_name" property="typeName"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 新增考核系统配置表 -->
|
||||
@ -20,6 +21,7 @@
|
||||
area_name,
|
||||
unit,
|
||||
type,
|
||||
type_name,
|
||||
creator,
|
||||
gmt_create,
|
||||
modifier,
|
||||
@ -32,6 +34,7 @@
|
||||
#{areaName},
|
||||
#{unit},
|
||||
#{type},
|
||||
#{typeName},
|
||||
#{creator},
|
||||
#{gmtCreate},
|
||||
#{modifier},
|
||||
@ -85,6 +88,9 @@
|
||||
</if>
|
||||
<if test="type != null and type != ''">
|
||||
type = #{type},
|
||||
</if>
|
||||
<if test="typeName != null and typeName != ''">
|
||||
type_name = #{typeName},
|
||||
</if>
|
||||
modifier = #{modifier},
|
||||
gmt_modified = #{gmtModified}
|
||||
@ -100,6 +106,7 @@
|
||||
t1.area_name,
|
||||
t1.unit,
|
||||
t1.type,
|
||||
t1.type_name,
|
||||
t1.config_for_score_id
|
||||
FROM
|
||||
gen_config_for_score t1
|
||||
@ -127,6 +134,7 @@
|
||||
t1.area_name,
|
||||
t1.unit,
|
||||
t1.type,
|
||||
t1.type_name,
|
||||
t1.config_for_score_id
|
||||
FROM
|
||||
gen_config_for_score t1
|
||||
|
@ -77,7 +77,6 @@
|
||||
height: $win.height() - 90,
|
||||
limit: 20,
|
||||
limits: [20, 40, 60, 80, 100, 200],
|
||||
toolbar: '#headerToolBar',
|
||||
request: {
|
||||
pageName: 'page',
|
||||
limitName: 'rows'
|
||||
|
@ -18,17 +18,12 @@
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body" id="dataTableBox">
|
||||
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
|
||||
<div class="layui-inline" style="margin-left: -62px;">
|
||||
<label class="layui-form-label">年度</label>
|
||||
<div class="layui-inline">
|
||||
<input type="text" class="layui-input" id="year" placeholder="请选择年份">
|
||||
<input type="text" id="year" class="layui-input search-item" placeholder="请选择年份" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline" style="margin-left: -3%;">
|
||||
<label class="layui-form-label">季度</label>
|
||||
<div class="layui-input-block layui-form">
|
||||
<div class="layui-inline" style="width: 100px;">
|
||||
<div class="layui-inline layui-form search-item">
|
||||
<select id="quarter" name="quarter" lay-filter="quarter">
|
||||
<option value="">请选择季度</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -72,25 +67,21 @@
|
||||
}
|
||||
var month = date.getMonth() + 1;
|
||||
if(month >= 1 && month <=3) {
|
||||
$("#quarter").append("<option value=''>请选择季度</option>");
|
||||
$("#quarter").append("<option value='1'>第一季度</option>");
|
||||
form.render();
|
||||
}
|
||||
if(month >= 4 && month <=6) {
|
||||
$("#quarter").append("<option value=''>请选择季度</option>");
|
||||
$("#quarter").append("<option value='1'>第一季度</option>");
|
||||
$("#quarter").append("<option value='2'>第二季度</option>");
|
||||
form.render();
|
||||
}
|
||||
if(month >= 7 && month <=9) {
|
||||
$("#quarter").append("<option value=''>请选择季度</option>");
|
||||
$("#quarter").append("<option value='1'>第一季度</option>");
|
||||
$("#quarter").append("<option value='2'>第二季度</option>");
|
||||
$("#quarter").append("<option value='3'>第三季度</option>");
|
||||
form.render();
|
||||
}
|
||||
if(month >= 10 && month <=12) {
|
||||
$("#quarter").append("<option value=''>请选择季度</option>");
|
||||
$("#quarter").append("<option value='1'>第一季度</option>");
|
||||
$("#quarter").append("<option value='2'>第二季度</option>");
|
||||
$("#quarter").append("<option value='3'>第三季度</option>");
|
||||
@ -156,7 +147,7 @@
|
||||
return '-';
|
||||
}
|
||||
}
|
||||
rowData = rowData.toFixed(2);
|
||||
rowData = Math.floor(rowData * 100) / 100
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
@ -200,6 +191,7 @@
|
||||
laydate.render({
|
||||
elem: '#year'
|
||||
,type: 'year'
|
||||
,value:new Date()
|
||||
,done:function(value,date){
|
||||
quarterFun(value);
|
||||
}
|
||||
|
@ -17,17 +17,12 @@
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
|
||||
<div class="layui-inline" style="margin-left: -62px;">
|
||||
<label class="layui-form-label">年度</label>
|
||||
<div class="layui-inline">
|
||||
<input type="text" class="layui-input" id="year" placeholder="请选择年份">
|
||||
<input type="text" id="year" class="layui-input search-item" placeholder="请选择年份" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline" style="margin-left: -3%;">
|
||||
<label class="layui-form-label">季度</label>
|
||||
<div class="layui-input-block layui-form">
|
||||
<div class="layui-inline" style="width: 100px;">
|
||||
<div class="layui-inline layui-form search-item">
|
||||
<select id="quarter" name="quarter" lay-filter="quarter">
|
||||
<option value="">请选择季度</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -71,25 +66,21 @@
|
||||
}
|
||||
var month = date.getMonth() + 1;
|
||||
if(month >= 1 && month <=3) {
|
||||
$("#quarter").append("<option value=''>请选择季度</option>");
|
||||
$("#quarter").append("<option value='1'>第一季度</option>");
|
||||
form.render();
|
||||
}
|
||||
if(month >= 4 && month <=6) {
|
||||
$("#quarter").append("<option value=''>请选择季度</option>");
|
||||
$("#quarter").append("<option value='1'>第一季度</option>");
|
||||
$("#quarter").append("<option value='2'>第二季度</option>");
|
||||
form.render();
|
||||
}
|
||||
if(month >= 7 && month <=9) {
|
||||
$("#quarter").append("<option value=''>请选择季度</option>");
|
||||
$("#quarter").append("<option value='1'>第一季度</option>");
|
||||
$("#quarter").append("<option value='2'>第二季度</option>");
|
||||
$("#quarter").append("<option value='3'>第三季度</option>");
|
||||
form.render();
|
||||
}
|
||||
if(month >= 10 && month <=12) {
|
||||
$("#quarter").append("<option value=''>请选择季度</option>");
|
||||
$("#quarter").append("<option value='1'>第一季度</option>");
|
||||
$("#quarter").append("<option value='2'>第二季度</option>");
|
||||
$("#quarter").append("<option value='3'>第三季度</option>");
|
||||
@ -110,7 +101,6 @@
|
||||
height: $win.height() - 90,
|
||||
limit: 20,
|
||||
limits: [20, 40, 60, 80, 100, 200],
|
||||
toolbar: '#headerToolBar',
|
||||
request: {
|
||||
pageName: 'page',
|
||||
limitName: 'rows'
|
||||
@ -120,6 +110,7 @@
|
||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{field: 'areaName', width: 150, title: '街镇村', align:'center',
|
||||
templet: function(row) {
|
||||
console.log(row)
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
@ -172,6 +163,16 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'score', width: 150, title: '总得分', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '0';
|
||||
}
|
||||
rowData = Math.floor(rowData * 100) / 100
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'year', width: 150, title: '督察年', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
@ -190,7 +191,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'superviseTime', width: 150, title: '督察时间', align:'center',
|
||||
{field: 'superviseTime', width: 180, title: '督察时间', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -233,6 +234,7 @@
|
||||
laydate.render({
|
||||
elem: '#year'
|
||||
,type: 'year'
|
||||
,value:new Date()
|
||||
,done:function(value,date){
|
||||
quarterFun(value);
|
||||
}
|
||||
|
@ -85,7 +85,7 @@
|
||||
cols: [[
|
||||
{type:'checkbox', fixed: 'left'},
|
||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{field: 'count', width: 150, title: '数量', align:'center',
|
||||
{field: 'typeName', width: 150, title: '类型', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -103,6 +103,15 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'count', width: 150, title: '数量', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'unit', width: 150, title: '单位', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
|
@ -39,7 +39,7 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-item" id="areaDiv">
|
||||
<label class="layui-form-label">街镇村</label>
|
||||
<div class="layui-input-block layui-form" id="areaSelectTemplateBox" lay-filter="areaSelectTemplateBox"></div>
|
||||
<script id="areaSelectTemplate" type="text/html">
|
||||
@ -99,9 +99,11 @@
|
||||
form.on('select(type)', function(data){
|
||||
$("#unit").empty();
|
||||
if(data.value == '人员预估'){
|
||||
$('#areaDiv').show()
|
||||
$("#unit").append("<option value='万'>万</option>");
|
||||
form.render('select');
|
||||
}else{
|
||||
$('#areaDiv').hide()
|
||||
$("#unit").append("<option value='年'>年</option>");
|
||||
$("#unit").append("<option value='月'>月</option>");
|
||||
$("#unit").append("<option value='日'>日</option>");
|
||||
@ -151,6 +153,7 @@
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
formData.field.typeName = $('#type').find('option:selected').text();
|
||||
top.restAjax.post(top.restAjax.path('api/configforscore/saveconfigforscore', []), formData.field, null, function(code, data) {
|
||||
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
||||
time: 0,
|
||||
|
@ -27,19 +27,19 @@
|
||||
<div class="layui-input-block layui-form">
|
||||
<select id="type" name="type" lay-filter="type">
|
||||
<option value="人员预估">人员预估</option>
|
||||
<option value="支委会">支委会</option>
|
||||
<option value="党小组">党小组</option>
|
||||
<option value="党员大会">党员大会</option>
|
||||
<option value="1">支委会</option>
|
||||
<option value="2">党员大会</option>
|
||||
<option value="3">党小组</option>
|
||||
<option value="4">民主评议党员</option>
|
||||
<option value="5">民主(组织)生活会</option>
|
||||
<option value="6">谈心谈话</option>
|
||||
<option value="主题党日">主题党日</option>
|
||||
<option value="民主(组织)生活会">民主(组织)生活会</option>
|
||||
<option value="民主评议党员">民主评议党员</option>
|
||||
<option value="党课">党课</option>
|
||||
<option value="谈心谈话">谈心谈话</option>
|
||||
<option value="8">党课</option>
|
||||
<option value="党费">党费</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-item" id="areaDiv">
|
||||
<label class="layui-form-label">街镇村</label>
|
||||
<div class="layui-input-block layui-form" id="areaSelectTemplateBox" lay-filter="areaSelectTemplateBox"></div>
|
||||
<script id="areaSelectTemplate" type="text/html">
|
||||
@ -101,9 +101,11 @@
|
||||
console.log(data)
|
||||
$("#unit").empty();
|
||||
if(data.value == '人员预估'){
|
||||
$('#areaDiv').show()
|
||||
$("#unit").append("<option value='万'>万</option>");
|
||||
form.render('select');
|
||||
}else{
|
||||
$('#areaDiv').hide()
|
||||
$("#unit").append("<option value='年'>年</option>");
|
||||
$("#unit").append("<option value='月'>月</option>");
|
||||
$("#unit").append("<option value='日'>日</option>");
|
||||
@ -179,6 +181,7 @@
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
formData.field.typeName = $('#type').find('option:selected').text();
|
||||
top.restAjax.put(top.restAjax.path('api/configforscore/updateconfigforscore/{configForScoreId}', [configForScoreId]), formData.field, null, function(code, data) {
|
||||
var layerIndex = top.dialog.msg(top.dataMessage.updateSuccess, {
|
||||
time: 0,
|
||||
|
@ -26,16 +26,11 @@
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">年度</label>
|
||||
<div class="layui-inline">
|
||||
<input type="text" class="layui-input" id="year" placeholder="yyyy">
|
||||
<input type="text" id="year" class="layui-input search-item" placeholder="请选择年份" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline" style="margin-left: -3%;">
|
||||
<label class="layui-form-label">季度</label>
|
||||
<div class="layui-input-block layui-form">
|
||||
<div class="layui-inline" style="width: 100px;">
|
||||
<div class="layui-inline layui-form search-item">
|
||||
<select id="quarter" name="quarter" lay-filter="quarter">
|
||||
<option value="">请选择季度</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -174,7 +169,19 @@
|
||||
methods: {
|
||||
getData: function() {
|
||||
var self = this;
|
||||
top.restAjax.get(top.restAjax.path('api/partyscore/partymeetingscore?year={year}&quarter={quarter}', [$('#year').val(), $('#quarter').val()]), {}, null, function(code, data) {
|
||||
var yearVal;
|
||||
if($('#year').val()) {
|
||||
yearVal = $('#year').val()
|
||||
}else {
|
||||
yearVal = new Date().getFullYear();
|
||||
}
|
||||
var quarterVal;
|
||||
if($('#quarter').val()) {
|
||||
quarterVal = $('#quarter').val()
|
||||
}else {
|
||||
quarterVal = 1
|
||||
}
|
||||
top.restAjax.get(top.restAjax.path('api/partyscore/partymeetingscore?year={year}&quarter={quarter}', [yearVal, quarterVal]), {}, null, function(code, data) {
|
||||
// 将街镇村名字放到集合中
|
||||
self.dataList = data;
|
||||
if(data[0]['partyMeetingScoreDTO1']) {
|
||||
@ -215,25 +222,21 @@
|
||||
}
|
||||
var month = date.getMonth() + 1;
|
||||
if(month >= 1 && month <=3) {
|
||||
$("#quarter").append("<option value=''>请选择季度</option>");
|
||||
$("#quarter").append("<option value='1'>第一季度</option>");
|
||||
form.render();
|
||||
}
|
||||
if(month >= 4 && month <=6) {
|
||||
$("#quarter").append("<option value=''>请选择季度</option>");
|
||||
$("#quarter").append("<option value='1'>第一季度</option>");
|
||||
$("#quarter").append("<option value='2'>第二季度</option>");
|
||||
form.render();
|
||||
}
|
||||
if(month >= 7 && month <=9) {
|
||||
$("#quarter").append("<option value=''>请选择季度</option>");
|
||||
$("#quarter").append("<option value='1'>第一季度</option>");
|
||||
$("#quarter").append("<option value='2'>第二季度</option>");
|
||||
$("#quarter").append("<option value='3'>第三季度</option>");
|
||||
form.render();
|
||||
}
|
||||
if(month >= 10 && month <=12) {
|
||||
$("#quarter").append("<option value=''>请选择季度</option>");
|
||||
$("#quarter").append("<option value='1'>第一季度</option>");
|
||||
$("#quarter").append("<option value='2'>第二季度</option>");
|
||||
$("#quarter").append("<option value='3'>第三季度</option>");
|
||||
@ -249,6 +252,7 @@
|
||||
laydate.render({
|
||||
elem: '#year'
|
||||
,type: 'year'
|
||||
,value:new Date()
|
||||
,done:function(value,date){
|
||||
quarterFun(value);
|
||||
}
|
||||
|
@ -17,17 +17,12 @@
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body" id="dataTableBox">
|
||||
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
|
||||
<div class="layui-inline" style="margin-left: -62px;">
|
||||
<label class="layui-form-label">年度</label>
|
||||
<div class="layui-inline">
|
||||
<input type="text" class="layui-input" id="year" placeholder="请选择年份">
|
||||
<input type="text" id="year" class="layui-input search-item" placeholder="请选择年份" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline" style="margin-left: -3%;">
|
||||
<label class="layui-form-label">季度</label>
|
||||
<div class="layui-input-block layui-form">
|
||||
<div class="layui-inline" style="width: 100px;">
|
||||
<div class="layui-inline layui-form search-item">
|
||||
<select id="quarter" name="quarter" lay-filter="quarter">
|
||||
<option value="">请选择季度</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -71,25 +66,21 @@
|
||||
}
|
||||
var month = date.getMonth() + 1;
|
||||
if(month >= 1 && month <=3) {
|
||||
$("#quarter").append("<option value=''>请选择季度</option>");
|
||||
$("#quarter").append("<option value='1'>第一季度</option>");
|
||||
form.render();
|
||||
}
|
||||
if(month >= 4 && month <=6) {
|
||||
$("#quarter").append("<option value=''>请选择季度</option>");
|
||||
$("#quarter").append("<option value='1'>第一季度</option>");
|
||||
$("#quarter").append("<option value='2'>第二季度</option>");
|
||||
form.render();
|
||||
}
|
||||
if(month >= 7 && month <=9) {
|
||||
$("#quarter").append("<option value=''>请选择季度</option>");
|
||||
$("#quarter").append("<option value='1'>第一季度</option>");
|
||||
$("#quarter").append("<option value='2'>第二季度</option>");
|
||||
$("#quarter").append("<option value='3'>第三季度</option>");
|
||||
form.render();
|
||||
}
|
||||
if(month >= 10 && month <=12) {
|
||||
$("#quarter").append("<option value=''>请选择季度</option>");
|
||||
$("#quarter").append("<option value='1'>第一季度</option>");
|
||||
$("#quarter").append("<option value='2'>第二季度</option>");
|
||||
$("#quarter").append("<option value='3'>第三季度</option>");
|
||||
@ -152,6 +143,7 @@
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '0';
|
||||
}
|
||||
rowData = Math.floor(rowData * 100) / 100
|
||||
return rowData;
|
||||
}
|
||||
}
|
||||
@ -196,6 +188,7 @@
|
||||
laydate.render({
|
||||
elem: '#year'
|
||||
,type: 'year'
|
||||
,value:new Date()
|
||||
,done:function(value,date){
|
||||
quarterFun(value);
|
||||
}
|
||||
|
@ -17,17 +17,12 @@
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
|
||||
<div class="layui-inline" style="margin-left: -62px;">
|
||||
<label class="layui-form-label">年度</label>
|
||||
<div class="layui-inline">
|
||||
<input type="text" class="layui-input" id="year" placeholder="请选择年份">
|
||||
<input type="text" id="year" class="layui-input search-item" placeholder="请选择年份" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline" style="margin-left: -3%;">
|
||||
<label class="layui-form-label">季度</label>
|
||||
<div class="layui-input-block layui-form">
|
||||
<div class="layui-inline" style="width: 100px;">
|
||||
<div class="layui-inline layui-form search-item">
|
||||
<select id="quarter" name="quarter" lay-filter="quarter">
|
||||
<option value="">请选择季度</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -73,25 +68,21 @@
|
||||
}
|
||||
var month = date.getMonth() + 1;
|
||||
if(month >= 1 && month <=3) {
|
||||
$("#quarter").append("<option value=''>请选择季度</option>");
|
||||
$("#quarter").append("<option value='1'>第一季度</option>");
|
||||
form.render();
|
||||
}
|
||||
if(month >= 4 && month <=6) {
|
||||
$("#quarter").append("<option value=''>请选择季度</option>");
|
||||
$("#quarter").append("<option value='1'>第一季度</option>");
|
||||
$("#quarter").append("<option value='2'>第二季度</option>");
|
||||
form.render();
|
||||
}
|
||||
if(month >= 7 && month <=9) {
|
||||
$("#quarter").append("<option value=''>请选择季度</option>");
|
||||
$("#quarter").append("<option value='1'>第一季度</option>");
|
||||
$("#quarter").append("<option value='2'>第二季度</option>");
|
||||
$("#quarter").append("<option value='3'>第三季度</option>");
|
||||
form.render();
|
||||
}
|
||||
if(month >= 10 && month <=12) {
|
||||
$("#quarter").append("<option value=''>请选择季度</option>");
|
||||
$("#quarter").append("<option value='1'>第一季度</option>");
|
||||
$("#quarter").append("<option value='2'>第二季度</option>");
|
||||
$("#quarter").append("<option value='3'>第三季度</option>");
|
||||
@ -152,6 +143,7 @@
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '0';
|
||||
}
|
||||
rowData = Math.floor(rowData * 100) / 100
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
@ -201,6 +193,7 @@
|
||||
laydate.render({
|
||||
elem: '#year'
|
||||
,type: 'year'
|
||||
,value:new Date()
|
||||
,done:function(value,date){
|
||||
quarterFun(value);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user