前端优化
This commit is contained in:
parent
8052446ab6
commit
3dc9e3d106
|
|
@ -424,7 +424,7 @@ function checkValue(that, type) {
|
|||
$(that).parents('td').next().html(0);
|
||||
$(that).parents('td').next().next().html(0);
|
||||
let list = getBaseTableData();
|
||||
return layer.msg('本次退回量输入不合法,最大输入6位数,且为正整数,请重新输入!', { icon: 5 });
|
||||
return layer.msg('本次退回量输入有误,最大输入6位数,且为正整数,请重新输入!', { icon: 5 });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ function checkValue(that, type) {
|
|||
const regex = /^(0|[1-9]\d{0,6})$/;
|
||||
if (!regex.test(value) && value) {
|
||||
$(that).val(0);
|
||||
return layer.msg('可继续使用量输入不合法,请重新输入!', { icon: 5 })
|
||||
return layer.msg('可继续使用量输入有误,请重新输入!', { icon: 5 })
|
||||
} else if (value && parseInt(value) > parseInt(backNum)) {
|
||||
$(that).val(0);
|
||||
return layer.msg('可继续使用量不能超过退回待检量,请重新输入!', { icon: 5 })
|
||||
|
|
@ -224,7 +224,7 @@ function checkValue(that, type) {
|
|||
const regex = /^(0|[1-9]\d{0,6})$/;
|
||||
if (!regex.test(value) && value) {
|
||||
$(that).val(0);
|
||||
return layer.msg('待报废量输入不合法,请重新输入!', { icon: 5 })
|
||||
return layer.msg('待报废量输入有误,请重新输入!', { icon: 5 })
|
||||
} else if (value && parseInt(value) > parseInt(backNum)) {
|
||||
$(that).val(0);
|
||||
return layer.msg('待报废量不能超过退回待检量,请重新输入!', { icon: 5 })
|
||||
|
|
|
|||
|
|
@ -1019,7 +1019,7 @@ function checkValue(that, type) {
|
|||
const regex = /^(0|[1-9]\d{0,6})$/;
|
||||
if (!regex.test(value) && value) {
|
||||
$(that).val(0);
|
||||
return layer.msg('数量输入不合法,请重新输入!', { icon: 5 })
|
||||
return layer.msg('数量输入有误,请重新输入!', { icon: 5 })
|
||||
|
||||
}
|
||||
} else if (type === 2) { // 单价
|
||||
|
|
|
|||
|
|
@ -838,7 +838,7 @@ function checkValue(that, type) {
|
|||
const regex = /^(0|[1-9]\d{0,6})$/;
|
||||
if (!regex.test(value) && value) {
|
||||
$(that).val(0);
|
||||
return layer.msg('数量输入不合法,请重新输入!', { icon: 5 })
|
||||
return layer.msg('数量输入有误,请重新输入!', { icon: 5 })
|
||||
|
||||
}
|
||||
} else if (type === 2) { // 单价
|
||||
|
|
|
|||
|
|
@ -399,7 +399,7 @@ function checkValue(that, type, name) {
|
|||
if (type === 1 || type === 2) { // 需用量 / 需用天数
|
||||
const regex = /^(0|[1-9]\d{0,6})$/;
|
||||
if (!regex.test(value) && value) {
|
||||
layer.msg('' + name + '输入不合法,请重新输入!', { icon: 5 })
|
||||
layer.msg('' + name + '输入有误,请重新输入!', { icon: 5 })
|
||||
$(that).val(0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -307,7 +307,7 @@ function checkValue(that, type, name) {
|
|||
if (type === 1 || type === 2) { // 需用量 / 需用天数
|
||||
const regex = /^(0|[1-9]\d{0,6})$/;
|
||||
if (!regex.test(value) && value) {
|
||||
layer.msg('' + name + '输入不合法,请重新输入!', { icon: 5 })
|
||||
layer.msg('' + name + '输入有误,请重新输入!', { icon: 5 })
|
||||
$(that).val(0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ function checkValue(that, type) {
|
|||
const regex = /^(0|[1-9]\d{0,6})$/;
|
||||
if (!regex.test(value) && value) {
|
||||
$(that).val(0);
|
||||
return layer.msg('采购量输入不合法,请重新输入!', { icon: 5 })
|
||||
return layer.msg('采购量输入有误,请重新输入!', { icon: 5 })
|
||||
}
|
||||
if (value) {
|
||||
// 采购量不能大于需要量
|
||||
|
|
@ -104,7 +104,7 @@ function checkValue(that, type) {
|
|||
const regex = /^(0|[1-9]\d{0,6})$/;
|
||||
if (!regex.test(value) && value) {
|
||||
$(that).val(0);
|
||||
return layer.msg('利库量输入不合法,请重新输入!', { icon: 5 })
|
||||
return layer.msg('利库量输入有误,请重新输入!', { icon: 5 })
|
||||
}
|
||||
if (value) {
|
||||
// 新的利库量与库存量校验
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ function checkValue(that, type) {
|
|||
const regex = /^(0|[1-9]\d{0,6})$/;
|
||||
if (!regex.test(value) && value) {
|
||||
$(that).val(0);
|
||||
return layer.msg('采购量输入不合法,请重新输入!', { icon: 5 })
|
||||
return layer.msg('采购量输入有误,请重新输入!', { icon: 5 })
|
||||
}
|
||||
if (value) {
|
||||
// 采购量不能大于需要量
|
||||
|
|
@ -86,7 +86,7 @@ function checkValue(that, type) {
|
|||
const regex = /^(0|[1-9]\d{0,6})$/;
|
||||
if (!regex.test(value) && value) {
|
||||
$(that).val(0);
|
||||
return layer.msg('利库量输入不合法,请重新输入!', { icon: 5 })
|
||||
return layer.msg('利库量输入有误,请重新输入!', { icon: 5 })
|
||||
}
|
||||
if (value) {
|
||||
// 利库量与库存量校验
|
||||
|
|
|
|||
|
|
@ -436,7 +436,7 @@ function checkValue(that, type) {
|
|||
$(that).parents('td').next().next().html(0);
|
||||
let list = getBaseTableData();
|
||||
setNumAndPrice(list);
|
||||
return layer.msg('本次盘点量输入不合法,最大输入6位数,且为正整数,请重新输入!', { icon: 5 });
|
||||
return layer.msg('本次盘点量输入有误,最大输入6位数,且为正整数,请重新输入!', { icon: 5 });
|
||||
} else if (value) {
|
||||
let storageNum = $(that).parents('td').prev().html(); // 库存量
|
||||
let inventoryProfit = 0, inventoryDeficit = 0; // 盘盈量、盘亏量
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ function initTable() {
|
|||
},
|
||||
{
|
||||
field: "proName",
|
||||
width: '15%',
|
||||
width: '13%',
|
||||
title: "工程名称",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
|
|
@ -130,7 +130,7 @@ function initTable() {
|
|||
},
|
||||
{
|
||||
field: "planCode",
|
||||
width: '10%',
|
||||
width: '12%',
|
||||
title: "需求计划编号",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
|
|
@ -159,6 +159,9 @@ function initTable() {
|
|||
unresize: true,
|
||||
align: "center",
|
||||
sort:true,
|
||||
templet: function (d) {
|
||||
return '<span>¥ '+(d.money ? d.money : 0)+'</span>'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: "manager",
|
||||
|
|
|
|||
|
|
@ -68,7 +68,11 @@
|
|||
<div id="test2" style="margin-left: 10px;">
|
||||
<img src="../../../images/add.png">
|
||||
</div>
|
||||
<p style="color: red;">(最多上传5个附件)</p>
|
||||
<div class="layout" style="flex-direction: column;margin-left: 2px;">
|
||||
<p style="color: red;">提示:最多上传5个附件</p>
|
||||
<p style="color: red;">支持格式:jpg、png、jpeg</p>
|
||||
<p style="color: red;">doc、docx、pdf、xlsx、xls</p>
|
||||
</div>
|
||||
</blockquote>
|
||||
</div>
|
||||
<div class="title layout">
|
||||
|
|
|
|||
|
|
@ -51,7 +51,11 @@
|
|||
<div id="test2" style="margin-left: 10px;">
|
||||
<img src="../../../images/add.png">
|
||||
</div>
|
||||
<p style="color: red;">(最多上传5个附件)</p>
|
||||
<div class="layout" style="flex-direction: column;margin-left: 2px;">
|
||||
<p style="color: red;">提示:最多上传5个附件</p>
|
||||
<p style="color: red;">支持格式:jpg、png、jpeg</p>
|
||||
<p style="color: red;">doc、docx、pdf、xlsx、xls</p>
|
||||
</div>
|
||||
</blockquote>
|
||||
</div>
|
||||
<div class="table-box" table-responsive id="table-box">
|
||||
|
|
|
|||
|
|
@ -90,7 +90,11 @@
|
|||
<div id="test2" style="margin-left: 10px;">
|
||||
<img src="../../../images/add.png">
|
||||
</div>
|
||||
<p style="color: red;">(最多上传5个附件)</p>
|
||||
<div class="layout" style="flex-direction: column;margin-left: 2px;">
|
||||
<p style="color: red;">提示:最多上传5个附件</p>
|
||||
<p style="color: red;">支持格式:jpg、png、jpeg</p>
|
||||
<p style="color: red;">doc、docx、pdf、xlsx、xls</p>
|
||||
</div>
|
||||
</blockquote>
|
||||
</div>
|
||||
<div class="layui-tab layui-tab-brief" lay-filter="demo-filter-tab">
|
||||
|
|
|
|||
|
|
@ -23,15 +23,15 @@
|
|||
<div class="layui-inline">
|
||||
<label class="layui-form-label required" style="width: 100px !important;">合同编号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input" name="code" id="code" autocomplete="off"
|
||||
lay-verify="required" maxlength="30" lay-affix="clear">
|
||||
<input class="layui-input" name="code" id="code" autocomplete="off" lay-verify="required"
|
||||
maxlength="30" lay-affix="clear">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label required" style="width: 110px !important;">合同名称</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input" name="name" id="name" autocomplete="off"
|
||||
lay-verify="required" maxlength="30" lay-affix="clear">
|
||||
<input class="layui-input" name="name" id="name" autocomplete="off" lay-verify="required"
|
||||
maxlength="30" lay-affix="clear">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -40,13 +40,13 @@
|
|||
<label class="layui-form-label required" style="width: 100px;">合同日期</label>
|
||||
<div class="layui-inline" id="ID-laydate-rangeLinked">
|
||||
<div class="layui-input-inline" style="width: 137px;">
|
||||
<input type="text" autocomplete="off" id="startTime" name="startTime" lay-verify="required" class="layui-input" readonly
|
||||
placeholder="开始日期">
|
||||
<input type="text" autocomplete="off" id="startTime" name="startTime"
|
||||
lay-verify="required" class="layui-input" readonly placeholder="开始日期">
|
||||
</div>
|
||||
<div class="layui-form-mid">-</div>
|
||||
<div class="layui-input-inline" style="width: 137px;">
|
||||
<input type="text" autocomplete="off" id="endTime" name="endTime" lay-verify="required" class="layui-input" readonly
|
||||
placeholder="结束日期">
|
||||
<input type="text" autocomplete="off" id="endTime" name="endTime" lay-verify="required"
|
||||
class="layui-input" readonly placeholder="结束日期">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -62,15 +62,16 @@
|
|||
<div class="layui-inline">
|
||||
<label class="layui-form-label required" style="width: 100px !important;">厂家</label>
|
||||
<div class="layui-input-inline">
|
||||
<select class="layui-select" name="supplier" id="supplier" lay-search lay-filter="supplier" lay-verify="required">
|
||||
<select class="layui-select" name="supplier" id="supplier" lay-search lay-filter="supplier"
|
||||
lay-verify="required">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label required" style="width: 110px !important;">合同占比(%)</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input" name="ratio" autocomplete="off"
|
||||
lay-verify="required|ratio" maxlength="30" lay-affix="clear">
|
||||
<input class="layui-input" name="ratio" autocomplete="off" lay-verify="required|ratio"
|
||||
maxlength="30" lay-affix="clear">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -89,7 +90,11 @@
|
|||
<div id="test2" style="margin-left: 10px;">
|
||||
<img src="../../../images/add.png">
|
||||
</div>
|
||||
<p style="color: red;">(最多上传5个附件)</p>
|
||||
<div class="layout" style="flex-direction: column;margin-left: 2px;">
|
||||
<p style="color: red;">提示:最多上传5个附件</p>
|
||||
<p style="color: red;">支持格式:jpg、png、jpeg</p>
|
||||
<p style="color: red;">doc、docx、pdf、xlsx、xls</p>
|
||||
</div>
|
||||
</blockquote>
|
||||
</div>
|
||||
<div class="layui-tab layui-tab-brief" lay-filter="demo-filter-tab">
|
||||
|
|
@ -160,12 +165,13 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="layui-tab-item">
|
||||
<div class="layui-tab layui-tab-brief" id="layui-tab-brief" lay-filter="demo-filter-tab2" id="demo-filter-tab2">
|
||||
<div class="layui-tab layui-tab-brief" id="layui-tab-brief" lay-filter="demo-filter-tab2"
|
||||
id="demo-filter-tab2">
|
||||
<ul class="layui-tab-title" id="layui-tab-title">
|
||||
</ul>
|
||||
<div class="layui-tab-content" id="layui-tab-content">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -77,7 +77,11 @@
|
|||
<div id="test2" style="margin-left: 10px;">
|
||||
<img src="../../../images/add.png">
|
||||
</div>
|
||||
<p style="color: red;">(最多上传5个附件)</p>
|
||||
<div class="layout" style="flex-direction: column;margin-left: 2px;">
|
||||
<p style="color: red;">提示:最多上传5个附件</p>
|
||||
<p style="color: red;">支持格式:jpg、png、jpeg</p>
|
||||
<p style="color: red;">doc、docx、pdf、xlsx、xls</p>
|
||||
</div>
|
||||
</blockquote>
|
||||
</div>
|
||||
<div class="title layout">
|
||||
|
|
|
|||
|
|
@ -77,7 +77,11 @@
|
|||
<div id="test2" style="margin-left: 10px;">
|
||||
<img src="../../../images/add.png">
|
||||
</div>
|
||||
<p style="color: red;">(最多上传5个附件)</p>
|
||||
<div class="layout" style="flex-direction: column;margin-left: 2px;">
|
||||
<p style="color: red;">提示:最多上传5个附件</p>
|
||||
<p style="color: red;">支持格式:jpg、png、jpeg</p>
|
||||
<p style="color: red;">doc、docx、pdf、xlsx、xls</p>
|
||||
</div>
|
||||
</blockquote>
|
||||
</div>
|
||||
<div class="title layout">
|
||||
|
|
|
|||
|
|
@ -55,7 +55,11 @@
|
|||
<div id="test2" style="margin-left: 10px;">
|
||||
<img src="../../../images/add.png">
|
||||
</div>
|
||||
<p style="color: red;">(最多上传5个附件)</p>
|
||||
<div class="layout" style="flex-direction: column;margin-left: 2px;">
|
||||
<p style="color: red;">提示:最多上传5个附件</p>
|
||||
<p style="color: red;">支持格式:jpg、png、jpeg</p>
|
||||
<p style="color: red;">doc、docx、pdf、xlsx、xls</p>
|
||||
</div>
|
||||
</blockquote>
|
||||
</div>
|
||||
<div class="title layout">
|
||||
|
|
|
|||
|
|
@ -66,7 +66,11 @@
|
|||
<div id="test2" style="margin-left: 10px;">
|
||||
<img src="../../../images/add.png">
|
||||
</div>
|
||||
<p style="color: red;">(最多上传5个附件)</p>
|
||||
<div class="layout" style="flex-direction: column;margin-left: 2px;">
|
||||
<p style="color: red;">提示:最多上传5个附件</p>
|
||||
<p style="color: red;">支持格式:jpg、png、jpeg</p>
|
||||
<p style="color: red;">doc、docx、pdf、xlsx、xls</p>
|
||||
</div>
|
||||
</blockquote>
|
||||
</div>
|
||||
<div class="title layout">
|
||||
|
|
|
|||
Loading…
Reference in New Issue