From 6dd1670ff69d885c5aadc91f0ad1a4ed2e7592f8 Mon Sep 17 00:00:00 2001
From: 克 刘 <4345453@qq.com>
Date: Mon, 01 Mar 2021 12:00:26 +0800
Subject: [PATCH] 1、FileCenter微服务扩展支持本地文件存储 2、FileCenter微服务扩展支持文件访问
---
kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/recharge.html | 353 ++++++++++++++++++++++++++++++++--------------------------
1 files changed, 195 insertions(+), 158 deletions(-)
diff --git a/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/recharge.html b/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/recharge.html
index 129af3e..2c810d5 100644
--- a/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/recharge.html
+++ b/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/recharge.html
@@ -80,12 +80,12 @@
<div class="layui-row">
<div class="layui-col-sm6">
<label class="layui-form-label">当前软件服务周期:</label>
- <div class="layui-input-block" >
+ <div class="layui-input-block">
<input autocomplete="off" name="contractBeginTime_not" disabled
id="contractBeginTime_not" type="text" placeholder="请输开始时间" class="layui-input"
maxlength="50" readonly
style="border: none; display: inline-block;width: 30%;" />
- <span id="contractBeginTime_not_heng"> 至 </span>
+ <span id="contractBeginTime_not_heng"> 至 </span>
<input autocomplete="off" name="contractEndTime_not" disabled
id="contractEndTime_not" type="text" placeholder="请输入结束时间" class="layui-input"
maxlength="50" readonly
@@ -137,6 +137,17 @@
</div>
</div>
</div>
+ <div class="layui-form-item" style="margin: 10px 0px 0px 0px;">
+ <div class="layui-row">
+ <div class="layui-col-sm6">
+ <label class="layui-form-label">签订日期</label>
+ <div class="layui-input-block">
+ <input autocomplete="off" name="contractTime" id="contractTime" type="text"
+ class="layui-input" maxlength="50" lay-verify="required" style="display: inline-block;width: 40%;" required />
+ </div>
+ </div>
+ </div>
+ </div>
</div>
</div>
</div>
@@ -169,13 +180,14 @@
<label class="layui-form-label">读片充值量:</label>
<div class="layui-input-inline">
<input autocomplete="off" id="custom_ailightCount"
- onkeyup="this.value=this.value.replace(/[^\d]/g,'') " type="text"
+ onkeyup="this.value=this.value.replace(/[^\d]/g,'') " type="text"
class="layui-input" maxlength="50" />
</div>
</div>
<div class="layui-col-sm6">
<div class="layui-input-inline">
- <input type="checkbox" id="custom_isShare" name="gongxiang" value="1" lay-skin="primary" title="是否共享" />
+ <input type="checkbox" id="custom_isShare" name="gongxiang" value="1"
+ lay-skin="primary" title="是否共享" />
</div>
</div>
</div>
@@ -184,8 +196,8 @@
<div class="layui-row">
<div class="layui-col-sm12">
<div class="layui-input-inline" style="width: 160px;text-align: right;">
- <input type="checkbox" id="termType" lay-skin="primary" name="termType" value="true" checked
- title="期限限制" />
+ <input type="checkbox" id="termType" lay-skin="primary" name="termType" value="true"
+ checked title="期限限制" />
</div>
<div class="layui-col-sm4" style="margin-right: 30px;">
<input autocomplete="off" id="custom_beginTime" type="text" placeholder="请输开始时间"
@@ -262,7 +274,7 @@
//充值进行中
var isRun = false;
//执行一个laydate实例
- var contractBeginTime= laydate.render({
+ var contractBeginTime = laydate.render({
elem: '#contractBeginTime', //指定元素
done: function (value, date, endDate) {
var startDate = new Date(value).getTime();
@@ -270,11 +282,11 @@
if (endTime <= startDate) {
layer.msg('结束时间不能小于或等于开始时间');
var end = new Date($('#contractEndTime').val())
- end.setDate(end.getDate()-1)
+ end.setDate(end.getDate() - 1)
$('#contractBeginTime').val(util.toDateString(end, "yyyy-MM-dd"));
} else {
- var flag=termTypeTime();
- if(!false){
+ var flag = termTypeTime();
+ if (!flag) {
return false;
}
$('#custom_beginTime').val($("#contractBeginTime").val())
@@ -298,15 +310,33 @@
if (endTime <= startDate) {
layer.msg('结束时间不能小于或等于开始时间');
var begin = new Date($('#contractBeginTime').val())
- begin.setDate(begin.getDate()+1)
+ begin.setDate(begin.getDate() + 1)
$('#contractEndTime').val(util.toDateString(begin, "yyyy-MM-dd"));
// $('#contractEndTime').val($('#contractBeginTime').val());
} else {
- var flag=termTypeTime();
- if(!false){
+ var flag = termTypeTime();
+ if (!flag) {
return false;
}
$('#custom_endTime').val($("#contractEndTime").val())
+ //将自定义的开始时间都限制
+ custom_beginTimes.config.min = {
+ year: layui.util.toDateString(begin, "yyyy"),
+ month: layui.util.toDateString(begin, "MM") - 1,//关键
+ date: layui.util.toDateString(begin, "dd"),
+ hours: layui.util.toDateString(begin, "HH"),
+ minutes: layui.util.toDateString(begin, "mm"),
+ seconds: layui.util.toDateString(begin, "ss")
+ }
+ custom_beginTimes.config.max = {
+ year: date.year,
+ month: date.month - 1,//关键
+ date: date.date,
+ hours: date.hours,
+ minutes: date.minutes,
+ seconds: date.seconds
+ }
+ //将自定义的结束时间都限制
custom_endTimes.config.max = {
year: date.year,
month: date.month - 1,//关键
@@ -328,43 +358,48 @@
}
}
});
- function termTypeTime(){
+ function termTypeTime() {
var listData = admin.getTempData("t_tempProduct");
- var max= "";
- var min= '';
- if(listData!=null&&listData.length>0){
-
- listData.forEach((element,index) => {
- if(index==0){
- max=element.endTime;
- min=element.beginTime;
- }else{
+ var max = "";
+ var min = '';
+ if (listData != null && listData.length > 0) {
+
+ listData.forEach((element, index) => {
+ if (index == 0) {
+ max = element.endTime;
+ min = element.beginTime;
+ } else {
if (dateUtil.compareDate(min, element.beginTime)) {
- min=element.beginTime;
+ min = element.beginTime;
}
- if (dateUtil.compareDate( element.endTime,max)) {
- max=element.endTime;
+ if (dateUtil.compareDate(element.endTime, max)) {
+ max = element.endTime;
}
}
-
+
});
+ } else {
+ return true;
}
- if(dateUtil.compareDate( $('#contractBeginTime').val(),min)){
+ if (dateUtil.compareDate($('#contractBeginTime').val(), min)) {
layer.msg("合同的时间必须小于待充值的开始时间")
$('#contractBeginTime').val(contractBeginTime_cheng);
return false;
- }else{
- contractBeginTime_cheng=$('#contractBeginTime').val()
+ } else {
+ contractBeginTime_cheng = $('#contractBeginTime').val()
}
- if(dateUtil.compareDate(max, $('#contractEndTime').val())){
+ if (dateUtil.compareDate(max, $('#contractEndTime').val())) {
layer.msg("合同的时间必须小于待充值的开始时间")
$('#contractEndTime').val(contractEndTime_cheng);
return false;
- }else{
- contractEndTime_cheng=$('#contractEndTime').val()
+ } else {
+ contractEndTime_cheng = $('#contractEndTime').val()
}
}
+ laydate.render({
+ elem: '#contractTime' //指定元素
+ });
laydate.render({
elem: '#contractBeginTime_not' //指定元素
});
@@ -500,13 +535,13 @@
admin.req('api-opration/productorderdetail/getContractBeginEndTimeAndNum', { departmentId: departmentId },
function (data) {
if (data.code == 0) {
- if(data.data.beginTime==undefined){
+ if (data.data.beginTime == undefined) {
$("#contractBeginTime_not").hide();
$("#contractEndTime_not").hide();
$("#contractBeginTime_not_heng").hide();
$("#contractNum_not").hide();
form.render();
- }else{
+ } else {
$("#contractBeginTime_not").val(layui.util.toDateString(data.data.beginTime, "yyyy-MM-dd"));
$("#contractEndTime_not").val(layui.util.toDateString(data.data.endTime, "yyyy-MM-dd"));
$("#contractBeginTime").val(layui.util.toDateString(data.data.beginTime, "yyyy-MM-dd"));
@@ -563,7 +598,7 @@
minutes: layui.util.toDateString(data.data.endTime, "mm"),
seconds: layui.util.toDateString(data.data.endTime, "ss")
}
- $("#contractNum_not").val(data.data.count);
+ $("#contractNum_not").val(data.data.count);
}
}
@@ -715,7 +750,7 @@
var listNum = 0;
if (!strUtil.isEmpty(listData)) {
listData.forEach(item => {
- if(item.proType==1){
+ if (item.proType == 1) {
listNum += item.ailightCount;
}
})
@@ -727,7 +762,7 @@
} else {
contractNum = $("#contractNum").val();
//将自定义的读片量赋值
- $("#custom_ailightCount").val($("#contractNum").val()-listNum);
+ $("#custom_ailightCount").val($("#contractNum").val() - listNum);
}
})
//自定义的确定
@@ -840,14 +875,14 @@
//将所选的时间不得大于 合同的时间
var contractBeginTime = $("#contractBeginTime").val();
var contractEndTime = $("#contractEndTime").val();
- if (!strUtil.isEmpty(data.beginTime)){
- if (dateUtil.compareDate( contractBeginTime,data.beginTime)) {
+ if (!strUtil.isEmpty(data.beginTime)) {
+ if (dateUtil.compareDate(contractBeginTime, data.beginTime)) {
layer.msg("开始时间必须大于合同的开始时间!");
return false;
}
}
- if (!strUtil.isEmpty(data.endTime)){
- if (dateUtil.compareDate(data.endTime,contractEndTime)) {
+ if (!strUtil.isEmpty(data.endTime)) {
+ if (dateUtil.compareDate(data.endTime, contractEndTime)) {
layer.msg("结束时间必须小于合同的结束时间!");
return false;
}
@@ -871,17 +906,17 @@
}
});
//将自定义的数量重新赋值
- function zidingyiNum(){
+ function zidingyiNum() {
var listData = admin.getTempData("t_tempProduct");
var listNum = 0;
if (!strUtil.isEmpty(listData)) {
listData.forEach(item => {
- if(item.proType==1){
+ if (item.proType == 1) {
listNum += item.ailightCount;
}
})
}
- $("#custom_ailightCount").val($("#contractNum").val()-listNum);
+ $("#custom_ailightCount").val($("#contractNum").val() - listNum);
}
function isthenNum(num) {
if (num <= 0) {
@@ -891,7 +926,7 @@
var listNum = 0;
if (!strUtil.isEmpty(listData)) {
listData.forEach(item => {
- if(item.proType==1){
+ if (item.proType == 1) {
listNum += item.ailightCount;
}
})
@@ -984,120 +1019,122 @@
layer.load(2);
var listData = admin.getTempData("t_tempProduct");
// if (listData != null) {
- var count= 0;
- if(listData!=null){
- listData.forEach(element => {
- if(element.proType==1){
- count+=element.ailightCount;
- }
- });
- }
- if(count!=data.field.contractNum){
- layer.closeAll('loading');
- layer.msg("合同读片充值量与套餐充值量不一致")
- return false;
- }
- if (data.field != null) {
- var len=listData!=null&&listData.length>0 ? listData.length : 0
- layer.confirm("确定要将待充值列表中的" + len + "个产品充值给当前医院的科室吗?", {
- btn: ["确定", "返回"]
- }, function () {
- isRun = true;
- data.field.contractBeginTime = data.field.contractBeginTime +
- " 00:00:00";
- data.field.contractEndTime = data.field.contractEndTime +
- " 23:59:59";
- // data.field.contractTime = data.field.contractTime + " 00:00:00";
- delete data.field.contractNum_not
- delete data.field.contractBeginTime_not
- delete data.field.contractEndTime_not
- admin.req('api-opration/contract', JSON.stringify(data.field),
- function (data) {
- layer.closeAll('loading');
- if (data.code === 0) {
- var orderData = data.data;
- //处理订单明细数据
- var listDetailData = new Array();
- $.each(listData, function (index, item) {
- var detailData = {
- orderId: orderData.id + '',
- proId: item.termType == null ? item.id + '' : "0",
- proType: item.proType,
- proName: item.proName,
- isShare: item.isShare,
- ailightCount: item.ailightCount != null ? item.ailightCount : 0,
- recordCount: item.recordCount != null ? item.recordCount : 0,
- termType: item.termType,
- proBegintime: item.beginTime != "" ? item.beginTime +
- ' 00:00:00' : "",
- proEndtime: item.endTime != "" ? item.endTime +
- ' 00:00:00' : "",
- orderAilightCount: item.ailightCount,
- orderRecordCount: item.recordCount != null ? item.recordCount : 0,
- };
- listDetailData.push(detailData);
- })
+ var count = 0;
+ if (listData != null) {
+ listData.forEach(element => {
+ if (element.proType == 1) {
+ count += element.ailightCount;
+ }
+ });
+ }
+ if (count != data.field.contractNum) {
+ layer.closeAll('loading');
+ layer.msg("合同读片充值量与套餐充值量不一致")
+ return false;
+ }
+ if (data.field != null) {
+ var len = listData != null && listData.length > 0 ? listData.length : 0
+ layer.confirm("确定要将待充值列表中的" + len + "个产品充值给当前医院的科室吗?", {
+ btn: ["确定", "返回"]
+ }, function () {
+ isRun = true;
+ data.field.contractBeginTime = data.field.contractBeginTime +
+ " 00:00:00";
+ data.field.contractEndTime = data.field.contractEndTime +
+ " 23:59:59";
+ data.field.contractTime = data.field.contractTime +
+ " 00:00:00";
+ // data.field.contractTime = data.field.contractTime + " 00:00:00";
+ delete data.field.contractNum_not
+ delete data.field.contractBeginTime_not
+ delete data.field.contractEndTime_not
+ admin.req('api-opration/contract', JSON.stringify(data.field),
+ function (data) {
+ layer.closeAll('loading');
+ if (data.code === 0) {
+ var orderData = data.data;
+ //处理订单明细数据
+ var listDetailData = new Array();
+ $.each(listData, function (index, item) {
+ var detailData = {
+ orderId: orderData.id + '',
+ proId: item.termType == null ? item.id + '' : "0",
+ proType: item.proType,
+ proName: item.proName,
+ isShare: item.isShare,
+ ailightCount: item.ailightCount != null ? item.ailightCount : 0,
+ recordCount: item.recordCount != null ? item.recordCount : 0,
+ termType: item.termType,
+ proBegintime: item.beginTime != "" ? item.beginTime +
+ ' 00:00:00' : "",
+ proEndtime: item.endTime != "" ? item.endTime +
+ ' 00:00:00' : "",
+ orderAilightCount: item.ailightCount,
+ orderRecordCount: item.recordCount != null ? item.recordCount : 0,
+ };
+ listDetailData.push(detailData);
+ })
- if (listDetailData.length <=0) {
- var detailData = {
- orderId: orderData.id + '',
- proId: "0",
- proType: 1,
- proName: "软件服务周期",
- isShare: 0,
- ailightCount: 0,
- recordCount: 0,
- proBegintime: $("#contractBeginTime").val()+' 00:00:00' ,
- proEndtime: $("#contractEndTime").val()+' 00:00:00' ,
- orderAilightCount: 0,
- orderRecordCount: 0,
- };
- listDetailData.push(detailData)
- }
- //提交订单数据
- admin.req(
- 'api-opration/productorderdetail/saveall',
- JSON.stringify(listDetailData),
- function (data) {
- isRun = false;
- layer.closeAll('loading');
- if (data.code === 0) {
- //现将临时数据清理
- admin.putTempData(
- "t_tempProduct",
- "");
- layer.msg(data.msg, {
- icon: 1,
- time: 2000
- }, function () {
- admin
- .finishPopupCenter();
- });
- } else {
- layer.msg(data.msg, {
- icon: 2,
- time: 1000
- });
- }
- }, 'POST');
- // layer.closeAll();
- // layer.msg("充值数据成功!");
- // isRun = false;
- } else {
- layer.msg(data.msg, {
- icon: 2,
- time: 1000
- });
- isRun = false;
+ if (listDetailData.length <= 0) {
+ var detailData = {
+ orderId: orderData.id + '',
+ proId: "0",
+ proType: 1,
+ proName: "软件服务周期",
+ isShare: 0,
+ ailightCount: 0,
+ recordCount: 0,
+ proBegintime: $("#contractBeginTime").val() + ' 00:00:00',
+ proEndtime: $("#contractEndTime").val() + ' 00:00:00',
+ orderAilightCount: 0,
+ orderRecordCount: 0,
+ };
+ listDetailData.push(detailData)
}
- }, 'POST');
- })
- } else {
- layer.msg("数据异常!", {
- icon: 2,
- time: 1000
- });
- }
+ //提交订单数据
+ admin.req(
+ 'api-opration/productorderdetail/saveall',
+ JSON.stringify(listDetailData),
+ function (data) {
+ isRun = false;
+ layer.closeAll('loading');
+ if (data.code === 0) {
+ //现将临时数据清理
+ admin.putTempData(
+ "t_tempProduct",
+ "");
+ layer.msg(data.msg, {
+ icon: 1,
+ time: 2000
+ }, function () {
+ admin
+ .finishPopupCenter();
+ });
+ } else {
+ layer.msg(data.msg, {
+ icon: 2,
+ time: 1000
+ });
+ }
+ }, 'POST');
+ // layer.closeAll();
+ // layer.msg("充值数据成功!");
+ // isRun = false;
+ } else {
+ layer.msg(data.msg, {
+ icon: 2,
+ time: 1000
+ });
+ isRun = false;
+ }
+ }, 'POST');
+ })
+ } else {
+ layer.msg("数据异常!", {
+ icon: 2,
+ time: 1000
+ });
+ }
// } else {
// layer.msg("请先将要充值的产品加入待充值!", {
// icon: 2,
--
Gitblit v1.8.0