This commit is contained in:
cwchen 2024-11-16 16:41:18 +08:00
parent 5f95075ae7
commit 5199d99e01
5 changed files with 18 additions and 12 deletions

View File

@ -114,6 +114,9 @@ function initTable() {
title: "成本价格(元)",
unresize: true,
align: "center",
templet: function (d) {
return '¥ ' + d.allPrice;
},
},
{
field: "inputDay",

View File

@ -338,7 +338,7 @@ function setTableData(results) {
function setFormInput(value, type) {
let html = '<form class="layui-form layuimini-form"><div class="layui-inline">';
if (type === 1) { // 本次退回量
html += '<input class="layui-input" name="ghNum" onblur="checkValue(this,1)" value="' + setNullValue(value) + '" autocomplete="off" lay-verify="required" maxlength="9" lay-affix="clear">';
html += '<input class="layui-input" name="ghNum" onblur="checkValue(this,1)" value="' + setNullValue(value) + '" autocomplete="off" lay-verify="required" maxlength="9">';
} else if (type === 2) { // 备注
html += '<input class="layui-input" placeholder="请输入备注" id="remark" name="remark" value="' + setNullValue(value) + '" maxLength="255" lay-affix="clear"></input>';
}

View File

@ -178,9 +178,10 @@ function submitApply(data) {
if (length === 0) {
return layer.msg('请上传附件证明', { icon: 7 });
}
// 校验配件入库数量
if (list.length === 0) {
return layer.msg('未填写配件入库数量', { icon: 7 });
for (let i = 0; i < list.length; i++) {
if (list[i].partPrice === 0 || list[i].partPrice === '0') {
return layer.msg('入库配件明细,第' + (i + 1) + '行,未填写单价', { icon: 7 });
}
}
data.field.details = list;
data.field.id = objParam.id;
@ -324,9 +325,9 @@ function setTableData(results) {
function setFormInput(value, type) {
let html = '<form class="layui-form layuimini-form"><div class="layui-inline">';
if (type === 1) { // 入库量
html += '<input class="layui-input" name="num" onblur="checkValue(this,1)" value="' + setNullValue(value) + '" autocomplete="off" lay-verify="required" maxlength="9" lay-affix="clear">';
html += '<input class="layui-input" name="num" onblur="checkValue(this,1)" value="' + setNullValue(value) + '" autocomplete="off" lay-verify="required" maxlength="9">';
} else if (type === 2) { // 单价
html += '<input class="layui-input" name="price" onblur="checkValue(this,2)" value="' + setNullValue(value) + '" autocomplete="off" lay-verify="required" maxlength="9" lay-affix="clear">';
html += '<input class="layui-input" name="price" onblur="checkValue(this,2)" value="' + setNullValue(value) + '" autocomplete="off" lay-verify="required" maxlength="9">';
} else if (type === 3) { // 厂家
html += '<select class="layui-select" name="manufacturer" id="manufacturer" lay-search>' +
setSelectData(value) +

View File

@ -121,9 +121,11 @@ function submitApply(data) {
return layer.msg('未填写配件入库数量', { icon: 7 });
}
for (let i = 0; i < list.length; i++) {
if (list[i].inputNum === 0 || list[i].inputNum === '0') {
return layer.msg('入库配件明细,第' + (i + 1) + '行,未填写配件入库数量', { icon: 7 });
return layer.msg('入库配件明细,第' + (i + 1) + '行,未填写本次入库量', { icon: 7 });
}
if (list[i].partPrice === 0 || list[i].partPrice === '0') {
return layer.msg('入库配件明细,第' + (i + 1) + '行,未填写单价', { icon: 7 });
}
}
data.field.details = list;
@ -304,9 +306,9 @@ function setTableData(results) {
function setFormInput(value, type) {
let html = '<form class="layui-form layuimini-form"><div class="layui-inline">';
if (type === 1) { // 入库量
html += '<input class="layui-input" name="num" onblur="checkValue(this,1)" value="' + setNullValue(value) + '" autocomplete="off" lay-verify="required" maxlength="9" lay-affix="clear">';
html += '<input class="layui-input" name="num" onblur="checkValue(this,1)" value="' + setNullValue(value) + '" autocomplete="off" lay-verify="required" maxlength="9">';
} else if (type === 2) { // 单价
html += '<input class="layui-input" name="price" onblur="checkValue(this,2)" value="' + setNullValue(value) + '" autocomplete="off" lay-verify="required" maxlength="9" lay-affix="clear">';
html += '<input class="layui-input" name="price" onblur="checkValue(this,2)" value="' + setNullValue(value) + '" autocomplete="off" lay-verify="required" maxlength="9">';
} else if (type === 3) { // 厂家
html += '<select class="layui-select" name="manufacturer" id="manufacturer" lay-search>' +
setSelectData(value) +

View File

@ -227,9 +227,9 @@ function setTableData(results) {
function setFormInput(value, type) {
let html = '<form class="layui-form layuimini-form"><div class="layui-inline">';
if (type === 1) { // 需用量
html += '<input class="layui-input" name="needNum" onblur="checkValue(this,1,\'需用量\')" value="' + setNullValue(value) + '" autocomplete="off" lay-verify="required" maxlength="9" lay-affix="clear">';
html += '<input class="layui-input" name="needNum" onblur="checkValue(this,1,\'需用量\')" value="' + setNullValue(value) + '" autocomplete="off" lay-verify="required" maxlength="9">';
} else if (type === 2) { // 需用天数
html += '<input class="layui-input" name="times" onblur="checkValue(this,2,\'需用天数\')" value="' + setNullValue(value) + '" autocomplete="off" lay-verify="required" maxlength="9" lay-affix="clear">';
html += '<input class="layui-input" name="times" onblur="checkValue(this,2,\'需用天数\')" value="' + setNullValue(value) + '" autocomplete="off" lay-verify="required" maxlength="9">';
} else if (type === 3) { // 备注
html += '<input class="layui-input" placeholder="请输入备注" id="remarks" name="remarks" value="' + setNullValue(value) + '" maxLength="255" lay-affix="clear"></input>';
}