diff --git a/js/accessory/child/accessory_scrap_form.js b/js/accessory/child/accessory_scrap_form.js index eb0b4ed..2a4d434 100644 --- a/js/accessory/child/accessory_scrap_form.js +++ b/js/accessory/child/accessory_scrap_form.js @@ -371,12 +371,17 @@ function delFitType() { // 校验数据 function checkValue(that, type) { let value = $(that).val(); + let num = $(that).parents('td').prev().html(); if (type === 1) { // 报废数量 const regex = /^(0|[1-9]\d{0,6})$/; if (!regex.test(value) && value) { $(that).val(0); $(that).parents('td').next().html(0); return layer.msg('报废数量输入不合法,最大输入6位数,且为正整数,请重新输入!', { icon: 5 }) + } else if (value && parseInt(value) > parseInt(num)) { + $(that).val(0); + $(that).parents('td').next().html(0); + return layer.msg('报废数量不能超过库存量,请重新输入!', { icon: 5 }) } else if (value) { let price = $(that).parents('td').prev().prev().html(); // 单价 $(that).parents('td').next().html(parseInt(value) * parseFloat(price)); diff --git a/js/accessory/child/choose_fit_type_list.js b/js/accessory/child/choose_fit_type_list.js index 00fef8e..43be86f 100644 --- a/js/accessory/child/choose_fit_type_list.js +++ b/js/accessory/child/choose_fit_type_list.js @@ -40,7 +40,7 @@ function queryTable(type) { reloadTable(1); } else if (type === 2) { $('#name').val(''); - $('#module').val(''); + $('#model').val(''); $('#type').val(''); layui.form.render(); reloadTable(1); diff --git a/js/accessory/child/choose_scrap_fit_type_list.js b/js/accessory/child/choose_scrap_fit_type_list.js index a1a5363..635b2b6 100644 --- a/js/accessory/child/choose_scrap_fit_type_list.js +++ b/js/accessory/child/choose_scrap_fit_type_list.js @@ -202,6 +202,12 @@ function initTable() { obj.reedit(); return layer.msg('格式不正确,最大输入6位数,且为正整数!', { icon: 7 }) } + // 获取累计领料数量 + let num = obj.data.num ? obj.data.num : 0; + if (value > num) { + obj.reedit(); + return layer.msg('报废量不能超过库存量', { icon: 7 }) + } } } else if (field === 'remarks') { // 备注 if (value) { diff --git a/js/accessory/pro_count_list.js b/js/accessory/pro_count_list.js index 91aa774..9e4e536 100644 --- a/js/accessory/pro_count_list.js +++ b/js/accessory/pro_count_list.js @@ -122,7 +122,7 @@ function initTable() { unresize: true, align: "center", templet: function (d) { - return '

领:' + setNullNumValue(d.lyNum) + '

'; + return '

' + setNullNumValue(d.lyNum) + '

'; }, }, @@ -133,7 +133,7 @@ function initTable() { unresize: true, align: "center", templet: function (d) { - return '

领:' + setNullNumValue(d.lyMoney) + '

'; + return '

' + setNullNumValue(d.lyMoney) + '

'; }, }, { diff --git a/js/demandPlan/child/delivery_all_list.js b/js/demandPlan/child/delivery_all_list.js index 5365733..58806f2 100644 --- a/js/demandPlan/child/delivery_all_list.js +++ b/js/demandPlan/child/delivery_all_list.js @@ -1,4 +1,4 @@ -let objParam = JSON.stringify(decodeURIComponent(getUrlParam('obj'))); +let objParam = JSON.parse(decodeURIComponent(getUrlParam('obj'))); let form, table, element, tableIns, layer; let pageNum = 1; layui.use(["form", "table", 'element', 'layer'], function () { diff --git a/js/demandPlan/plan_check_list.js b/js/demandPlan/plan_check_list.js index 4a9f03b..67ea30a 100644 --- a/js/demandPlan/plan_check_list.js +++ b/js/demandPlan/plan_check_list.js @@ -169,8 +169,8 @@ function initTable() { // 导出 function exportExcel() { let params = { - 'proName': $('#proName').val(), - 'status': $('#status').val() + 'keyWord': $('#keyWord').val(), + 'auditStatus': $('#auditStatus').val() } let url = dataUrl + "backstage/planAudit/export"; exportExcelUtil(url, '计划申请审核', JSON.stringify(params)); diff --git a/page/demandPlan/plan_check_list.html b/page/demandPlan/plan_check_list.html index a7e6354..54f87da 100644 --- a/page/demandPlan/plan_check_list.html +++ b/page/demandPlan/plan_check_list.html @@ -38,8 +38,8 @@
@@ -48,7 +48,7 @@ 搜索信息
- +