|
@@ -27,7 +27,7 @@
|
|
|
<div class="input-group-prepend">
|
|
|
<span class="input-group-text">建设项目名称</span>
|
|
|
</div>
|
|
|
- <input type="text" class="form-control" value="项目A" id="build-name" maxlength="100">
|
|
|
+ <input type="text" class="form-control" value="项目A" id="build-name" maxlength="100" oninput="limitReturn(this)">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-12 mb-2">
|
|
@@ -35,7 +35,7 @@
|
|
|
<div class="input-group-prepend">
|
|
|
<span class="input-group-text" style="width:90px">合同编号</span>
|
|
|
</div>
|
|
|
- <input type="text" class="form-control" value="" id="deal-code" maxlength="100">
|
|
|
+ <input type="text" class="form-control" value="" id="deal-code" maxlength="100" oninput="limitReturn(this)">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-12">
|
|
@@ -43,7 +43,7 @@
|
|
|
<div class="input-group-prepend">
|
|
|
<span class="input-group-text" style="width:90px">合同名称</span>
|
|
|
</div>
|
|
|
- <input type="text" class="form-control" value="" id="deal-name" maxlength="100">
|
|
|
+ <input type="text" class="form-control" value="" id="deal-name" maxlength="100" oninput="limitReturn(this)">
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -58,7 +58,7 @@
|
|
|
<div class="input-group-prepend">
|
|
|
<span class="input-group-text">单位名称</span>
|
|
|
</div>
|
|
|
- <input type="text" class="form-control" value="" id="build-company" maxlength="100">
|
|
|
+ <input type="text" class="form-control" value="" id="build-company" maxlength="100" oninput="limitReturn(this)">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-6 pr-0">
|
|
@@ -66,7 +66,7 @@
|
|
|
<div class="input-group-prepend">
|
|
|
<span class="input-group-text">法人代表</span>
|
|
|
</div>
|
|
|
- <input type="text" class="form-control" value="" id="build-corporation" maxlength="100">
|
|
|
+ <input type="text" class="form-control" value="" id="build-corporation" maxlength="100" oninput="limitReturn(this)">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-6">
|
|
@@ -87,7 +87,7 @@
|
|
|
<div class="input-group-prepend">
|
|
|
<span class="input-group-text">单位名称</span>
|
|
|
</div>
|
|
|
- <input type="text" class="form-control" value="" id="contract1-company" maxlength="100">
|
|
|
+ <input type="text" class="form-control" value="" id="contract1-company" maxlength="100" oninput="limitReturn(this)">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-6 pr-0">
|
|
@@ -95,7 +95,7 @@
|
|
|
<div class="input-group-prepend">
|
|
|
<span class="input-group-text">法人代表</span>
|
|
|
</div>
|
|
|
- <input type="text" class="form-control" value="" id="contract1-corporation" maxlength="100">
|
|
|
+ <input type="text" class="form-control" value="" id="contract1-corporation" maxlength="100" oninput="limitReturn(this)">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-6">
|
|
@@ -116,7 +116,7 @@
|
|
|
<div class="input-group-prepend">
|
|
|
<span class="input-group-text">单位名称</span>
|
|
|
</div>
|
|
|
- <input type="text" class="form-control" value="" id="contract2-company" maxlength="100">
|
|
|
+ <input type="text" class="form-control" value="" id="contract2-company" maxlength="100" oninput="limitReturn(this)">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-6 pr-0">
|
|
@@ -124,7 +124,7 @@
|
|
|
<div class="input-group-prepend">
|
|
|
<span class="input-group-text">法人代表</span>
|
|
|
</div>
|
|
|
- <input type="text" class="form-control" value="" id="contract2-corporation" maxlength="100">
|
|
|
+ <input type="text" class="form-control" value="" id="contract2-corporation" maxlength="100" oninput="limitReturn(this)">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-6">
|
|
@@ -145,7 +145,7 @@
|
|
|
<div class="input-group-prepend">
|
|
|
<span class="input-group-text">单位名称</span>
|
|
|
</div>
|
|
|
- <input type="text" class="form-control" value="" id="supervision1-company" maxlength="100">
|
|
|
+ <input type="text" class="form-control" value="" id="supervision1-company" maxlength="100" oninput="limitReturn(this)">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-6 pr-0">
|
|
@@ -153,7 +153,7 @@
|
|
|
<div class="input-group-prepend">
|
|
|
<span class="input-group-text">法人代表</span>
|
|
|
</div>
|
|
|
- <input type="text" class="form-control" value="" id="supervision1-corporation" maxlength="100">
|
|
|
+ <input type="text" class="form-control" value="" id="supervision1-corporation" maxlength="100" oninput="limitReturn(this)">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-6">
|
|
@@ -174,7 +174,7 @@
|
|
|
<div class="input-group-prepend">
|
|
|
<span class="input-group-text">单位名称</span>
|
|
|
</div>
|
|
|
- <input type="text" class="form-control" value="" id="supervision2-company" maxlength="100">
|
|
|
+ <input type="text" class="form-control" value="" id="supervision2-company" maxlength="100" oninput="limitReturn(this)">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-6 pr-0">
|
|
@@ -182,7 +182,7 @@
|
|
|
<div class="input-group-prepend">
|
|
|
<span class="input-group-text">法人代表</span>
|
|
|
</div>
|
|
|
- <input type="text" class="form-control" value="" id="supervision2-corporation" maxlength="100">
|
|
|
+ <input type="text" class="form-control" value="" id="supervision2-corporation" maxlength="100" oninput="limitReturn(this)">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-6">
|
|
@@ -219,7 +219,7 @@
|
|
|
<span class="input-group-text" style="width:90px">长度(KM)</span>
|
|
|
</div>
|
|
|
<input type="text" class="form-control" value="" id="length" min="0" max="10000"
|
|
|
- oninput="limitDealParamLength(this)" onchange="checkNumberValid(this)">
|
|
|
+ oninput="limitDealParamLength(this);limitReturn(this);" onchange="checkNumberValid(this)">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-6 pr-0 mb-2">
|
|
@@ -227,7 +227,7 @@
|
|
|
<div class="input-group-prepend">
|
|
|
<span class="input-group-text">起始桩号</span>
|
|
|
</div>
|
|
|
- <input type="text" class="form-control" value="" id="start-peg" maxlength="100">
|
|
|
+ <input type="text" class="form-control" value="" id="start-peg" maxlength="100" oninput="limitReturn(this)">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-6">
|
|
@@ -235,7 +235,7 @@
|
|
|
<div class="input-group-prepend">
|
|
|
<span class="input-group-text" style="width:90px">终止桩号</span>
|
|
|
</div>
|
|
|
- <input type="text" class="form-control" value="" id="end-peg" maxlength="100">
|
|
|
+ <input type="text" class="form-control" value="" id="end-peg" maxlength="100" oninput="limitReturn(this)">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-6 pr-0 mb-2">
|
|
@@ -243,7 +243,7 @@
|
|
|
<div class="input-group-prepend">
|
|
|
<span class="input-group-text" style="width:66px">车道数</span>
|
|
|
</div>
|
|
|
- <input type="text" class="form-control" value="" id="lane-count" maxlength="100">
|
|
|
+ <input type="text" class="form-control" value="" id="lane-count" maxlength="100" oninput="limitReturn(this)">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-6">
|
|
@@ -251,7 +251,7 @@
|
|
|
<div class="input-group-prepend">
|
|
|
<span class="input-group-text" style="width:90px">合同工期</span>
|
|
|
</div>
|
|
|
- <input type="text" class="form-control" value="" id="deal-period" maxlength="100">
|
|
|
+ <input type="text" class="form-control" value="" id="deal-period" maxlength="100" oninput="limitReturn(this)">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-6 pr-0 mb-2">
|
|
@@ -588,19 +588,19 @@
|
|
|
<div class="sjs-option-height">
|
|
|
<table class="table table-bordered">
|
|
|
<tr><th colspan="2" class="text-center">工程款账户</th></tr>
|
|
|
- <tr><td>开户名称</td><td><input type="text" id="project-name" class="form-control form-control-sm"></td></tr>
|
|
|
- <tr><td>开户银行</td><td><input type="text" id="project-bank" class="form-control form-control-sm"></td></tr>
|
|
|
- <tr><td>开户账号</td><td><input type="text" id="project-account" class="form-control form-control-sm"></td></tr>
|
|
|
- <tr><td>分账划拨比例(%)</td><td><input type="text" id="project-rate" class="form-control form-control-sm"></td></tr>
|
|
|
- <tr><td>联系人</td><td><input type="text" id="project-contact" class="form-control form-control-sm"></td></tr>
|
|
|
- <tr><td>联系电话</td><td><input type="text" id="project-phone" class="form-control form-control-sm"></td></tr>
|
|
|
+ <tr><td>开户名称</td><td><input type="text" id="project-name" class="form-control form-control-sm" oninput="limitReturn(this)"></td></tr>
|
|
|
+ <tr><td>开户银行</td><td><input type="text" id="project-bank" class="form-control form-control-sm" oninput="limitReturn(this)"></td></tr>
|
|
|
+ <tr><td>开户账号</td><td><input type="text" id="project-account" class="form-control form-control-sm" oninput="limitReturn(this)"></td></tr>
|
|
|
+ <tr><td>分账划拨比例(%)</td><td><input type="text" id="project-rate" class="form-control form-control-sm" oninput="limitReturn(this)"></td></tr>
|
|
|
+ <tr><td>联系人</td><td><input type="text" id="project-contact" class="form-control form-control-sm" oninput="limitReturn(this)"></td></tr>
|
|
|
+ <tr><td>联系电话</td><td><input type="text" id="project-phone" class="form-control form-control-sm" oninput="limitReturn(this)"></td></tr>
|
|
|
<tr><th colspan="2" class="text-center">农民工工资专用账户</th></tr>
|
|
|
- <tr><td>开户名称</td><td><input type="text" id="worker-name" class="form-control form-control-sm"></td></tr>
|
|
|
- <tr><td>开户银行</td><td><input type="text" id="worker-bank" class="form-control form-control-sm"></td></tr>
|
|
|
- <tr><td>开户账号</td><td><input type="text" id="worker-account" class="form-control form-control-sm"></td></tr>
|
|
|
- <tr><td>分账划拨比例(%)</td><td><input type="text" id="worker-rate" class="form-control form-control-sm"></td></tr>
|
|
|
- <tr><td>联系人</td><td><input type="text" id="worker-contact" class="form-control form-control-sm"></td></tr>
|
|
|
- <tr><td>联系电话</td><td><input type="text" id="worker-phone" class="form-control form-control-sm"></td></tr>
|
|
|
+ <tr><td>开户名称</td><td><input type="text" id="worker-name" class="form-control form-control-sm" oninput="limitReturn(this)"></td></tr>
|
|
|
+ <tr><td>开户银行</td><td><input type="text" id="worker-bank" class="form-control form-control-sm" oninput="limitReturn(this)"></td></tr>
|
|
|
+ <tr><td>开户账号</td><td><input type="text" id="worker-account" class="form-control form-control-sm" oninput="limitReturn(this)"></td></tr>
|
|
|
+ <tr><td>分账划拨比例(%)</td><td><input type="text" id="worker-rate" class="form-control form-control-sm" oninput="limitReturn(this)"></td></tr>
|
|
|
+ <tr><td>联系人</td><td><input type="text" id="worker-contact" class="form-control form-control-sm" oninput="limitReturn(this)"></td></tr>
|
|
|
+ <tr><td>联系电话</td><td><input type="text" id="worker-phone" class="form-control form-control-sm" oninput="limitReturn(this)"></td></tr>
|
|
|
</table>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -647,6 +647,11 @@
|
|
|
limitReg(obj, /\.{2,}/g); // 过滤第二个.
|
|
|
limitInputMinMax(obj);
|
|
|
}
|
|
|
+
|
|
|
+ function limitReturn(obj) {
|
|
|
+ limitReg(obj, /\s/g);
|
|
|
+ }
|
|
|
+
|
|
|
function checkNumberValid(obj) {
|
|
|
const value = _.toNumber(obj.value);
|
|
|
obj.value = value ? value : '';
|
|
@@ -1190,6 +1195,7 @@
|
|
|
for (let iRow = 0; iRow < sheet.getRowCount(); iRow++) {
|
|
|
const cell = sheet.getCell(iRow, 1);
|
|
|
const defaultStype = sheet.getDefaultStyle();
|
|
|
+ cell.text(cell.text().replace(/\s/g, ''))
|
|
|
if (cell.text().length > 50) {
|
|
|
cell.backColor('#f8d7da');
|
|
|
hint = '章节名称的长度超出范围,请重新输入';
|
|
@@ -1207,6 +1213,9 @@
|
|
|
spread.bind(spreadNS.Events.EditEnding, function (e, info) {
|
|
|
checkSheetData(info.sheet);
|
|
|
});
|
|
|
+ spread.bind(spreadNS.Events.EditEnded, function (e, info) {
|
|
|
+ checkSheetData(info.sheet);
|
|
|
+ });
|
|
|
spread.bind(spreadNS.Events.ClipboardPasted, function (e, info) {
|
|
|
checkSheetData(info.sheet);
|
|
|
});
|
|
@@ -1230,7 +1239,7 @@
|
|
|
const data = {};
|
|
|
for (let iCol = 0; iCol < sheet.getColumnCount(); iCol++) {
|
|
|
const col = spreadSetting.cols[iCol];
|
|
|
- data[col.field] = sheet.getText(iRow, iCol);
|
|
|
+ data[col.field] = sheet.getText(iRow, iCol).replace(/\s/g, '');
|
|
|
if (col.field === 'name') {
|
|
|
if (data.name.length > 50) {
|
|
|
return null;
|