diff --git a/js/car_basic/child/framework_contract_edit_oper.js b/js/car_basic/child/framework_contract_edit_oper.js index 5b9a280..b70defa 100644 --- a/js/car_basic/child/framework_contract_edit_oper.js +++ b/js/car_basic/child/framework_contract_edit_oper.js @@ -145,10 +145,10 @@ function checkValue2(that, type) { } } } else if (type === 4) { // 投标下浮率 - const regex = /^(?:[0-9]|[1-9][0-9]|(?:0|[1-9][0-9])(?:\.[0-9]{1,3})?)$/; - if (!regex.test(value) && value) { + const regex = /^(?:0(?:\.[0-9]{1,3})?|[1-9]\d?(?:\.[0-9]{1,3})?)$/; + if (!regex.test(value) && value || parseFloat(value) >= 100) { $(that).val(''); - return layer.msg('投标下浮率填写范围在(0-99.999),请重新输入!', { icon: 5 }) + return layer.msg('投标下浮率填写范围在(0-99.999),请重新输入!', { icon: 5 }); } if (!value) { $(that).parents('td').next().html('0'); @@ -486,10 +486,10 @@ function checkValue3(that, type) { } } } else if (type === 3) { // 投标下浮率 - const regex = /^(?:[0-9]|[1-9][0-9]|(?:0|[1-9][0-9])(?:\.[0-9]{1,3})?)$/; - if (!regex.test(value) && value) { + const regex = /^(?:0(?:\.[0-9]{1,3})?|[1-9]\d?(?:\.[0-9]{1,3})?)$/; + if (!regex.test(value) && value || parseFloat(value) >= 100) { $(that).val(''); - return layer.msg('投标下浮率填写范围在(0-99.999),请重新输入!', { icon: 5 }) + return layer.msg('投标下浮率填写范围在(0-99.999),请重新输入!', { icon: 5 }); } if (!value) { $(that).parents('td').next().html('0'); diff --git a/js/car_basic/child/framework_contract_oper.js b/js/car_basic/child/framework_contract_oper.js index c08cecf..f3913dd 100644 --- a/js/car_basic/child/framework_contract_oper.js +++ b/js/car_basic/child/framework_contract_oper.js @@ -140,10 +140,10 @@ function checkValue2(that, type) { } } } else if (type === 4) { // 投标下浮率 - const regex = /^(?:[0-9]|[1-9][0-9]|(?:0|[1-9][0-9])(?:\.[0-9]{1,3})?)$/; - if (!regex.test(value) && value) { + const regex = /^(?:0(?:\.[0-9]{1,3})?|[1-9]\d?(?:\.[0-9]{1,3})?)$/; + if (!regex.test(value) && value || parseFloat(value) >= 100) { $(that).val(''); - return layer.msg('投标下浮率填写范围在(0-99.999),请重新输入!', { icon: 5 }) + return layer.msg('投标下浮率填写范围在(0-99.999),请重新输入!', { icon: 5 }); } if (!value) { $(that).parents('td').next().html('0'); @@ -475,10 +475,10 @@ function checkValue3(that, type) { } } } else if (type === 3) { // 投标下浮率 - const regex = /^(?:[0-9]|[1-9][0-9]|(?:0|[1-9][0-9])(?:\.[0-9]{1,3})?)$/; - if (!regex.test(value) && value) { + const regex = /^(?:0(?:\.[0-9]{1,3})?|[1-9]\d?(?:\.[0-9]{1,3})?)$/; + if (!regex.test(value) && value || parseFloat(value) >= 100) { $(that).val(''); - return layer.msg('投标下浮率填写范围在(0-99.999),请重新输入!', { icon: 5 }) + return layer.msg('投标下浮率填写范围在(0-99.999),请重新输入!', { icon: 5 }); } if (!value) { $(that).parents('td').next().html('0'); diff --git a/js/car_demand_plan/child/apply_plan_detail.js b/js/car_demand_plan/child/apply_plan_detail.js index 386d35a..340b948 100644 --- a/js/car_demand_plan/child/apply_plan_detail.js +++ b/js/car_demand_plan/child/apply_plan_detail.js @@ -253,7 +253,7 @@ function initTable() { cols: [ [ { - width: '9.8%', + width: '8%', title: "序号", align: "center", templet: function (d) { @@ -262,7 +262,7 @@ function initTable() { }, { field: "type", - width: '15%', + width: '10%', title: "类型", unresize: true, align: "center", @@ -270,7 +270,7 @@ function initTable() { }, { field: "name", - width: '15%', + width: '10%', title: "名称", unresize: true, align: "center", @@ -295,6 +295,13 @@ function initTable() { return setNullValue(d.unit); }, }, + { + field: "carSpec", + width: '14%', + title: "所需规格", + unresize: true, + align: "center", + }, { field: "needNum", width: '10%', @@ -308,8 +315,8 @@ function initTable() { }, { field: "backDate", - width: '10%', - title: "预计使用时间", + width: '12%', + title: "预计使用时间(天)", unresize: true, align: "center", sort: true, @@ -320,7 +327,7 @@ function initTable() { }, { field: "remark", - width: '15%', + width: '10%', title: "备注", sort: true, unresize: true, @@ -350,8 +357,12 @@ function initTable() { } // 数量颜色 -function setNumColor(value) { - return '' + value + ""; +function setNumColor(value, isNeedNum) { + if (isNeedNum) { + return '' + value + ""; + } else { + return '' + value + ""; + } } // 导出 diff --git a/js/car_demand_plan/child/apply_plan_form.js b/js/car_demand_plan/child/apply_plan_form.js index 21084e3..04745bd 100644 --- a/js/car_demand_plan/child/apply_plan_form.js +++ b/js/car_demand_plan/child/apply_plan_form.js @@ -118,11 +118,10 @@ function submitApply(data) { return layer.msg('未添加申请明细数据', { icon: 7 }); } - // 校验附件是否上传 - if (fileList.length === 0) { - return layer.msg('请上传附件', { icon: 7 }); - } - + // 校验附件是否上传 - 移除必填校验 + // if (fileList.length === 0) { + // return layer.msg('请上传附件', { icon: 7 }); + // } for (let i = 0; i < list.length; i++) { if (parseInt(list[i].needNum) === 0) { @@ -133,12 +132,13 @@ function submitApply(data) { // } } - let routePointStr = ""; // $('input[name="routePoint"]').each(function (index, item) { let routePoint = $('input[name="routePoint"]').eq(index).val(); // 拼接字符串 - routePointStr += routePoint + "routePoint;"; + if(routePoint) { + routePointStr += routePoint + "routePoint;"; + } }) console.log("routePointStr",routePointStr) @@ -182,18 +182,21 @@ function submitApply(data) { function getBaseTableData() { let tableData = []; $('#baseTable tbody tr').each(function (index, item) { - let times = $(this).find('td').eq(7).find('input[name="times"]').val(); - let needNum = $(this).find('td').eq(6).find('input[name="needNum"]').val(); + let times = $(this).find('td').eq(8).find('input[name="times"]').val(); + let needNum = $(this).find('td').eq(7).find('input[name="needNum"]').val(); + let carSpec = $(this).find('td').eq(6).find('input[name="carSpec"]').val(); + tableData.push({ modelId: $(this).attr('id'), type: $(this).find('td').eq(2).html(), name: $(this).find('td').eq(3).html(), model: $(this).find('td').eq(4).html(), unit: $(this).find('td').eq(5).html(), + carSpec: carSpec ? carSpec : '', needNum: needNum ? needNum : 0, // needDay: times ? times : 0, backDate: times ? times : 0, - remark: $(this).find('td').eq(8).find('input[name="remarks"]').val(), + remark: $(this).find('td').eq(9).find('input[name="remarks"]').val(), }) }) return tableData; @@ -287,23 +290,27 @@ function setTableData(results) { html += "
-上传附件*
+上传附件
@@ -214,17 +169,18 @@
- + - 序号 -类型 -名称 -规格 -单位 -*需用量 -预计使用时间 -备注 +序号 +类型 +名称 +规格 +单位 +所需规格 +*需用量 +预计使用天数 +备注