Commit 3a4102e9 authored by 何波's avatar 何波

历史回单

parent 1c41ac0b
......@@ -206,26 +206,25 @@
margin-bottom: 15px;
/* gap: 10px; */
}
.form-rows {
display: flex;
align-items: center;
}
.form-label {
width: 210px;
text-align: right;
color: #333;
}
.form-label .required {
.required {
color: red;
margin-right: 4px;
}
.form-input,
.form-select {
padding: 5px 8px;
border: 1px solid #d9d9d9;
width: 230px;
}
.select-down-icon {
height: 31px;
width: 32px;
......@@ -236,7 +235,6 @@
border: 1px solid #d9d9d9;
border-left: none;
}
.down-arrow {
width: 0;
height: 0;
......@@ -244,34 +242,27 @@
border-right: 6px solid transparent;
border-top: 8px solid #b0b0b0;
}
.form-select.hide {
appearance: none;
}
.form-input.small {
width: 111px;
}
.px-2 {
padding-left: 2px;
padding-right: 2px;
}
.form-input.x-small {
width: 84px;
}
.form-input.wide {
width: 234px;
}
.radio-group {
display: flex;
gap: 30px;
margin-left: 10px;
}
.radio-group label {
display: flex;
align-items: center;
......@@ -280,12 +271,10 @@
margin-right: 5px;
}
}
.form-tip {
color: #0066b3;
margin-left: 8px;
}
.form-question {
cursor: pointer;
margin-left: 8px;
......@@ -299,11 +288,9 @@
color: #fff;
padding-left: 4px;
}
.question1 {
margin-left: 30px;
}
.question2 {
margin-left: 70px;
}
......@@ -326,7 +313,6 @@
margin: 30px 0;
padding-left: 120px;
}
.buttonx,
.btn-group button {
background-color: #1f93d5;
......@@ -362,32 +348,26 @@
padding: 10px;
border: 1px solid #e8e8e8;
}
.tips-title {
color: red;
font-weight: bold;
margin-bottom: 10px;
}
.tips-section p {
line-height: 1.8;
color: #333;
}
.mt-24 {
margin-top: 24px;
}
.mt-20 {
margin-top: 20px;
}
.date-picker {
width: 27px;
height: 27px;
position: relative;
}
.date-picker .date-input {
position: absolute;
top: 0;
......@@ -397,12 +377,10 @@
opacity: 0;
z-index: 1;
}
.date-picker .dateimg {
width: 27px;
height: 27px;
}
#myForm {
position: relative;
}
......@@ -584,7 +562,7 @@
oninput="startDate = this.value"
onblur="handleBlur('dateFrom')"
/>
<div class="date-picker" id="sDate">
<div class="date-picker" id="sDateMain">
<img class="dateimg" src="./images/date.png" alt="" />
</div>
<span>-</span>
......@@ -596,7 +574,7 @@
oninput="endDate = this.value"
onblur="handleBlur('dateTo')"
/>
<div class="date-picker" id="eDate">
<div class="date-picker" id="eDateMain">
<img class="dateimg" src="./images/date.png" alt="" />
</div>
</div>
......@@ -649,62 +627,74 @@
<table id="conditionTB" class="tableHide" cellpadding="0" cellspacing="0" border="0" width="100%" style="display: none;">
<tbody>
<tr>
<td class="hideTitle">账户查询:</td>
<td colspan="3">
<select class="select" size="1" name="conditionType" id="conditionType">
<option value="0">账户名称</option>
<option value="1">账号</option>
</select>
<input class="inTxt" name="conditionValue" type="text" size="20" maxlength="40" value="" style="width:135px">
<td class="hideTitle">
<span class="required">*</span>
起止日期:
</td>
</tr>
<tr>
<td class="hideTitle">币种:</td>
<td colspan="3" class="form-rows">
<input
type="text"
id="dateFroms"
class="form-input small x-small"
oninput="sxstartDate = this.value"
onblur="handleBlurs('dateFroms')"
/>
<div class="date-picker" id="sDateFilter">
<img class="dateimg" src="./images/date.png" alt="" />
</div>
<span>-</span>
<input
type="text"
id="dateTos"
class="form-input small x-small"
oninput="sxendDate = this.value"
onblur="handleBlurs('dateTos')"
/>
<div class="date-picker" id="eDateFilter">
<img class="dateimg" src="./images/date.png" alt="" />
</div>
</td>
<td class="hideTitle">状态:</td>
<td>
<select name="curType" id="curType" class="select slSty1" size="1">
<option value="">全部</option>
<option value="156">人民币元</option>
<option value="344">香港元</option>
<option value="446">澳门元</option>
<option value="901">新台币</option>
<option value="840">美元</option>
<option value="978">欧元</option>
<option value="826">英镑</option>
</select>
<select name="LCS_Cd" id="LCS_Cd" class="select slSty1">
<option value="">全部</option>
<option value="0"> 历史回单数据预约待处理</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="7">文件已下载</option>
</select>
</td>
<td class="hideTitle">签约类型:</td>
</tr>
<tr>
<td class="hideTitle">账 号:</td>
<td>
<select class="select slSty1" name="signType" id="signType" size="1">
<option value="2">全部</option>
<option value="0">签约账户</option>
<option value="1">授权账户</option>
</select>
<select class="form-select">
<option value="1">42050110239900001031 中科软盈(武汉)科技有限公司</option>
</select>
</td>
</tr>
<tr>
<td class="hideTitle">账户分组:</td>
<td class="hideTitle"></td>
<td>
<select class="select slSty1" name="ACC_SORT" id="ACC_SORT" size="1">
<option value="">全部</option>
</select>
<input type="text" class="form-input wide" name="counterName" placeholder="请输入模糊账号或模糊账户名称" />
<span class="form-tip">模糊搜索</span>
</td>
<td class="hideTitle">钞汇鉴别:</td>
</tr>
<tr>
<td class="hideTitle">预约任务编号:</td>
<td>
<select class="select slSty1" name="CshExCd" id="CshExCd" size="1">
<option value="0">全部</option>
<option value="1"></option>
<option value="2"></option>
</select>
<input type="text" name="PK_ID" value="">
</td>
</tr>
<tr>
<td></td>
<td colspan="3">
<button class="buttonx" type="submit">查询</button>
</td>
</tr><tr>
</tr>
</tbody>
</table>
......@@ -723,7 +713,7 @@
<td nowrap="">预约日期</td>
<td nowrap="">状态</td>
</tr>
<tr onmouseover="tdOver(this)" onmouseout="tdOut(this)" onclick="trClick(this)" class="tableListBody">
<tr onclick="trClick(this)" class="tableListBody">
<td nowrap=""><input type="radio" name="CREDIT"></td>
<input type="hidden" name="AccNo1" value="42050123704500001941">
<input type="hidden" name="MdRcd_PK_ID1" value="20260507400001295065">
......@@ -738,7 +728,7 @@
历史回单数据不存在
</td>
</tr>
<tr onmouseover="tdOver(this)" onmouseout="tdOut(this)" onclick="trClick(this)" class="tableListBody">
<tr onclick="trClick(this)" class="tableListBody">
<td nowrap=""><input type="radio" name="CREDIT"></td>
<input type="hidden" name="AccNo1" value="42050123704500001941">
<input type="hidden" name="MdRcd_PK_ID1" value="20260428400001252654">
......@@ -758,7 +748,7 @@
<div class="tableFooter">
<div class="footerLine">
共 2 条
<div class="splitPage"><script>SplitPage("1", "1", "", "", "AA")</script><a style="margin-right:8px;" href="javascript:TxtSubmit(&quot;PAGE|&quot;,&quot;1|&quot;,AA)">首页</a><span style="margin-right:8px;">&lt;上一页</span><span class="curPageNum">1</span><span style="margin-right:8px;">下一页&gt;</span><span style="margin-right:8px;"><b>1</b></span>到第<input type="text" id="splitPage1778145521055" class="inPage" maxlength="4" ><a class="pageGoTo" href="javascript:jumpToPage('1','','',AA,'splitPage1778145521055')">转至</a><input type="text" name="donothinghidetext" style="display:none;" value=""></div>
<div class="splitPage"><a style="margin-right:8px;" href="javascript:TxtSubmit(&quot;PAGE|&quot;,&quot;1|&quot;,AA)">首页</a><span style="margin-right:8px;">&lt;上一页</span><span class="curPageNum">1</span><span style="margin-right:8px;">下一页&gt;</span><span style="margin-right:8px;"><b>1</b></span>到第<input type="text" id="splitPage1778145521055" class="inPage" maxlength="4" ><a class="pageGoTo" href="javascript:jumpToPage('1','','',AA,'splitPage1778145521055')">转至</a><input type="text" name="donothinghidetext" style="display:none;" value=""></div>
</div>
</div>
<!-- 温馨提示 -->
......@@ -780,11 +770,144 @@ function sendHeight() {
value: pageHeight + 50
}, '*');
}
window.addEventListener('load', sendHeight);
const form = document.getElementById('myForm');
// formn表单返回
document.getElementById('backButton').addEventListener('click', function() {
window.history.back();
// 日期格式
function getTodayYYYYMMDD() {
const now = new Date();
now.setDate(now.getDate() - 1);
const y = now.getFullYear();
const m = String(now.getMonth() + 1).padStart(2, '0');
const d = String(now.getDate()).padStart(2, '0');
return `${y}${m}${d}`;
}
/**
* 解析 YYYYMMDD 格式为 Date 对象
* @param {string} dateStr - 8位数字字符串,如 20250101
* @returns {Date}
*/
function parseYYYYMMDD(dateStr) {
const year = parseInt(dateStr.substring(0, 4));
const month = parseInt(dateStr.substring(4, 6)) - 1;
const day = parseInt(dateStr.substring(6, 8));
return new Date(year, month, day);
}
/**
* 检测 YYYYMMDD 格式的日期间隔是否大于三个月
* @param {string} startStr - 开始日期,如 20250101
* @param {string} endStr - 结束日期,如 20260101
* @returns {boolean}
*/
function isOver90DaysYYYYMMDD(startStr, endStr) {
const start = parseYYYYMMDD(startStr);
const end = parseYYYYMMDD(endStr);
const diffDays = (end - start) / (1000 * 60 * 60 * 24);
return Math.abs(diffDays) > 90;
}
let startDate = "";
let endDate = "";
let sxstartDate = '';
let sxendDate = '';
// 页面加载默认赋值
window.addEventListener("DOMContentLoaded", () => {
const today = getTodayYYYYMMDD();
startDate = today;
endDate = today;
sxstartDate = today;
sxendDate = today;
document.getElementById("dateFrom").value = startDate;
document.getElementById("dateTo").value = endDate;
document.getElementById("dateFroms").value = endDate;
document.getElementById("dateTos").value = endDate;
});
const handleBlur = (dateId) => {
console.log(
"handleBlur",
startDate,
endDate,
isOver90DaysYYYYMMDD(startDate, endDate),
);
if (startDate && endDate && isOver90DaysYYYYMMDD(startDate, endDate)) {
alert("预约时间段不能超过3个月!");
if (dateId === "dateFrom") {
startDate = "";
} else {
endDate = "";
}
document.getElementById(dateId).value = "";
return;
}
if (dateId === "dateFrom") {
document.getElementById(dateId).value = startDate;
} else {
document.getElementById(dateId).value = endDate;
}
};
const handleBlurs = (dateId) => {
if (sxstartDate && sxendDate && isOver90DaysYYYYMMDD(sxstartDate, sxendDate)) {
alert("预约时间段不能超过3个月!");
if (dateId === "dateFroms") {
sxstartDate = "";
} else {
sxendDate = "";
}
document.getElementById(dateId).value = "";
return;
}
if (dateId === "dateFroms") {
document.getElementById(dateId).value = sxstartDate;
} else {
document.getElementById(dateId).value = sxendDate;
}
};
// 主日期选择器
new CalendarPlugin({
trigger: '#sDateMain',
onSelect(date) {
startDate = date.replaceAll('-', '');
handleBlur('dateFrom');
}
});
new CalendarPlugin({
trigger: '#eDateMain',
onSelect(date) {
endDate = date.replaceAll('-', '');
handleBlur('dateTo');
}
});
// 筛选日期选择器
new CalendarPlugin({
trigger: '#sDateFilter',
onSelect(date) {
sxstartDate = date.replaceAll('-', '');
handleBlurs('dateFroms');
}
});
new CalendarPlugin({
trigger: '#eDateFilter',
onSelect(date) {
sxendDate = date.replaceAll('-', '');
handleBlurs('dateTos');
}
});
// 快速日期
document.querySelectorAll("input[name=quickDate]").forEach((el) => {
el.addEventListener("change", () => {
const days = parseInt(el.value, 10);
const now = new Date();
const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, "0"); // 补零
const day = String(now.getDate()).padStart(2, "0");
const formattedDate = `${year}-${month}-${day}`;
const today = new Date(formattedDate);
const from = new Date(today.getTime() - days * 86400000);
const fmt = (d) =>
d.getFullYear() +
String(d.getMonth() + 1).padStart(2, "0") +
String(d.getDate()).padStart(2, "0");
startDate = fmt(from);
endDate = fmt(today);
document.getElementById("dateFrom").value = startDate;
document.getElementById("dateTo").value = endDate;
});
});
function openFilter(element) {
var isChecked = element.checked;
......
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