This commit is contained in:
parent
5f95075ae7
commit
5199d99e01
|
|
@ -114,6 +114,9 @@ function initTable() {
|
||||||
title: "成本价格(元)",
|
title: "成本价格(元)",
|
||||||
unresize: true,
|
unresize: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
templet: function (d) {
|
||||||
|
return '¥ ' + d.allPrice;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "inputDay",
|
field: "inputDay",
|
||||||
|
|
|
||||||
|
|
@ -338,7 +338,7 @@ function setTableData(results) {
|
||||||
function setFormInput(value, type) {
|
function setFormInput(value, type) {
|
||||||
let html = '<form class="layui-form layuimini-form"><div class="layui-inline">';
|
let html = '<form class="layui-form layuimini-form"><div class="layui-inline">';
|
||||||
if (type === 1) { // 本次退回量
|
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) { // 备注
|
} else if (type === 2) { // 备注
|
||||||
html += '<input class="layui-input" placeholder="请输入备注" id="remark" name="remark" value="' + setNullValue(value) + '" maxLength="255" lay-affix="clear"></input>';
|
html += '<input class="layui-input" placeholder="请输入备注" id="remark" name="remark" value="' + setNullValue(value) + '" maxLength="255" lay-affix="clear"></input>';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -178,9 +178,10 @@ function submitApply(data) {
|
||||||
if (length === 0) {
|
if (length === 0) {
|
||||||
return layer.msg('请上传附件证明', { icon: 7 });
|
return layer.msg('请上传附件证明', { icon: 7 });
|
||||||
}
|
}
|
||||||
// 校验配件入库数量
|
for (let i = 0; i < list.length; i++) {
|
||||||
if (list.length === 0) {
|
if (list[i].partPrice === 0 || list[i].partPrice === '0') {
|
||||||
return layer.msg('未填写配件入库数量', { icon: 7 });
|
return layer.msg('入库配件明细,第' + (i + 1) + '行,未填写单价', { icon: 7 });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
data.field.details = list;
|
data.field.details = list;
|
||||||
data.field.id = objParam.id;
|
data.field.id = objParam.id;
|
||||||
|
|
@ -324,9 +325,9 @@ function setTableData(results) {
|
||||||
function setFormInput(value, type) {
|
function setFormInput(value, type) {
|
||||||
let html = '<form class="layui-form layuimini-form"><div class="layui-inline">';
|
let html = '<form class="layui-form layuimini-form"><div class="layui-inline">';
|
||||||
if (type === 1) { // 入库量
|
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) { // 单价
|
} 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) { // 厂家
|
} else if (type === 3) { // 厂家
|
||||||
html += '<select class="layui-select" name="manufacturer" id="manufacturer" lay-search>' +
|
html += '<select class="layui-select" name="manufacturer" id="manufacturer" lay-search>' +
|
||||||
setSelectData(value) +
|
setSelectData(value) +
|
||||||
|
|
|
||||||
|
|
@ -121,9 +121,11 @@ function submitApply(data) {
|
||||||
return layer.msg('未填写配件入库数量', { icon: 7 });
|
return layer.msg('未填写配件入库数量', { icon: 7 });
|
||||||
}
|
}
|
||||||
for (let i = 0; i < list.length; i++) {
|
for (let i = 0; i < list.length; i++) {
|
||||||
|
|
||||||
if (list[i].inputNum === 0 || list[i].inputNum === '0') {
|
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;
|
data.field.details = list;
|
||||||
|
|
@ -304,9 +306,9 @@ function setTableData(results) {
|
||||||
function setFormInput(value, type) {
|
function setFormInput(value, type) {
|
||||||
let html = '<form class="layui-form layuimini-form"><div class="layui-inline">';
|
let html = '<form class="layui-form layuimini-form"><div class="layui-inline">';
|
||||||
if (type === 1) { // 入库量
|
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) { // 单价
|
} 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) { // 厂家
|
} else if (type === 3) { // 厂家
|
||||||
html += '<select class="layui-select" name="manufacturer" id="manufacturer" lay-search>' +
|
html += '<select class="layui-select" name="manufacturer" id="manufacturer" lay-search>' +
|
||||||
setSelectData(value) +
|
setSelectData(value) +
|
||||||
|
|
|
||||||
|
|
@ -227,9 +227,9 @@ function setTableData(results) {
|
||||||
function setFormInput(value, type) {
|
function setFormInput(value, type) {
|
||||||
let html = '<form class="layui-form layuimini-form"><div class="layui-inline">';
|
let html = '<form class="layui-form layuimini-form"><div class="layui-inline">';
|
||||||
if (type === 1) { // 需用量
|
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) { // 需用天数
|
} 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) { // 备注
|
} else if (type === 3) { // 备注
|
||||||
html += '<input class="layui-input" placeholder="请输入备注" id="remarks" name="remarks" value="' + setNullValue(value) + '" maxLength="255" lay-affix="clear"></input>';
|
html += '<input class="layui-input" placeholder="请输入备注" id="remarks" name="remarks" value="' + setNullValue(value) + '" maxLength="255" lay-affix="clear"></input>';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue