下次检测时间周期改为月份展示

This commit is contained in:
jjLv 2024-09-29 11:17:16 +08:00
parent c1c0fd8a34
commit 8fcc4280e0
4 changed files with 12 additions and 10 deletions

View File

@ -373,7 +373,7 @@
<!--查询试验模板数据、基础数据--> <!--查询试验模板数据、基础数据-->
<select id="getTestBasicInfo" resultType="com.bonus.aqgqj.basis.entity.vo.TestVo"> <select id="getTestBasicInfo" resultType="com.bonus.aqgqj.basis.entity.vo.TestVo">
SELECT DATE_FORMAT(ts.sample_date, '%Y-%m-%d') AS sampleDate, SELECT DATE_FORMAT(ts.sample_date, '%Y-%m-%d') AS sampleDate,
DATE_FORMAT(DATE_ADD(now(),INTERVAL a.times YEAR), '%Y-%m-%d') AS nextExperTime, DATE_FORMAT(DATE_ADD(now(),INTERVAL a.times Month), '%Y-%m-%d') AS nextExperTime,
a.times AS times, a.times AS times,
custom_id AS customId, custom_id AS customId,
custom_name AS customName, custom_name AS customName,
@ -424,7 +424,7 @@
te.dev_module AS devModule, te.dev_module AS devModule,
te.sample_date AS sampleDate, te.sample_date AS sampleDate,
DATE_FORMAT(te.exper_time, '%Y-%m-%d') AS experTime, DATE_FORMAT(te.exper_time, '%Y-%m-%d') AS experTime,
DATE_FORMAT(DATE_ADD(te.exper_time,INTERVAL tec.times YEAR), '%Y-%m-%d') AS nextExperTime, DATE_FORMAT(DATE_ADD(te.exper_time,INTERVAL tec.times Month), '%Y-%m-%d') AS nextExperTime,
tec.times AS times, tec.times AS times,
te.submit_unit AS customId, te.submit_unit AS customId,
tc.custom_name AS customName, tc.custom_name AS customName,

View File

@ -86,15 +86,17 @@ function setParams(params) {
laydate.render({ laydate.render({
elem: '#experTime', elem: '#experTime',
showBottom:false,
value: today, value: today,
done: function(value,data){ done: function(value,data){
// console.log(data); // console.log(data);
var dateInput = document.getElementById('experTime').value; var dateInput = document.getElementById('experTime').value;
if(dateInput){ if(dateInput){
var date = new Date(dateInput); var date = new Date(dateInput);
var yearsToAdd = timeTemp; var yearsToAdd = timeTemp
date.setFullYear(date.getFullYear() + yearsToAdd); var month = date.getMonth() +1
// date.setFullYear(date.getFullYear() + yearsToAdd);
date.setMonth(date.getMonth() + yearsToAdd)
var year = date.getFullYear(); var year = date.getFullYear();
var mouth = ('0' + (date.getMonth() +1)).slice(-2); var mouth = ('0' + (date.getMonth() +1)).slice(-2);
var day = ('0' + date.getDate()).slice(-2); var day = ('0' + date.getDate()).slice(-2);
@ -869,4 +871,4 @@ function closePage(type) {
if (type === 1) { if (type === 1) {
parent.reloadData() parent.reloadData()
} }
} }

View File

@ -142,7 +142,7 @@
lay-verify="required" oninput="updateAmountTwo(this)" /> lay-verify="required" oninput="updateAmountTwo(this)" />
</div> </div>
<div class="layui-input-inlineTwo" > <div class="layui-input-inlineTwo" >
<span style="display: flex;margin: 10px 10px;"></span> <span style="display: flex;margin: 10px 10px;"></span>
</div> </div>
</div> </div>
<div class="layui-inline"> <div class="layui-inline">
@ -207,4 +207,4 @@
</body> </body>
<script src="../../../../js/basis/tools/child/addTestStandards.js" charset="UTF-8" type="text/javascript"></script> <script src="../../../../js/basis/tools/child/addTestStandards.js" charset="UTF-8" type="text/javascript"></script>
<script src="../../../../js/basis/tools/child/select.js" charset="UTF-8" type="text/javascript"></script> <script src="../../../../js/basis/tools/child/select.js" charset="UTF-8" type="text/javascript"></script>
</html> </html>

View File

@ -140,7 +140,7 @@
lay-verify="required" oninput="updateAmountTwo(this)"/> lay-verify="required" oninput="updateAmountTwo(this)"/>
</div> </div>
<div class="layui-input-inlineTwo" > <div class="layui-input-inlineTwo" >
<span style="display: flex;margin: 10px 10px;"></span> <span style="display: flex;margin: 10px 10px;"></span>
</div> </div>
</div> </div>
<!-- <div class="btn-box">--> <!-- <div class="btn-box">-->
@ -203,4 +203,4 @@
</body> </body>
<script src="../../../../js/basis/tools/child/checkTestStandards.js" charset="UTF-8" type="text/javascript"></script> <script src="../../../../js/basis/tools/child/checkTestStandards.js" charset="UTF-8" type="text/javascript"></script>
<script src="../../../../js/basis/tools/child/select.js" charset="UTF-8" type="text/javascript"></script> <script src="../../../../js/basis/tools/child/select.js" charset="UTF-8" type="text/javascript"></script>
</html> </html>