This commit is contained in:
parent
28bfcbb4b3
commit
bb6dd29410
|
|
@ -272,6 +272,7 @@ function exportExcel() {
|
|||
function viewFile(obj) {
|
||||
let fileName = obj.fileName.toLowerCase();
|
||||
if (fileName.indexOf('png') > -1 || fileName.indexOf('jpg') > -1 || fileName.indexOf('jpeg') > -1) {
|
||||
console.log("调用系统自带预览服务:" + fileUrl + obj.fileUrl);
|
||||
layer.photos({
|
||||
shade: 0.5,
|
||||
photos: {
|
||||
|
|
@ -281,12 +282,14 @@ function viewFile(obj) {
|
|||
{
|
||||
"alt": "layer",
|
||||
"pid": 1,
|
||||
"src": fileUrl + obj.fileUrl + '?token=' + sessionStorage.getItem("gz-token"),
|
||||
"src": fileUrl + obj.fileUrl,
|
||||
// "src": fileUrl + obj.fileUrl + '?token=' + sessionStorage.getItem("gz-token"),
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
} else {
|
||||
console.log("调用公司预览服务");
|
||||
// 调用公司的预览文件的服务
|
||||
commonViewFile(obj.fileUrl);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ function setTableData(results) {
|
|||
html += "<td>" + l.model + "</td>";
|
||||
html += "<td>" + l.unit + "</td>";
|
||||
html += "<td>" + setFormInput(l.needNum, 1) + "</td>";
|
||||
html += "<td>" + setFormInput(l.times == null ? 0 : l.times, 2) + "</td>";
|
||||
html += "<td>" + setFormInput(l.times, 2) + "</td>";
|
||||
html += "<td>" + setFormInput(l.remarks, 3) + "</td>";
|
||||
html += "</tr>";
|
||||
}
|
||||
|
|
@ -284,6 +284,14 @@ function setTableData(results) {
|
|||
html += "<tr><td colspan='9' class='center'>没有相关数据</td></tr>";
|
||||
}
|
||||
$("#baseTable tbody").empty().append(html);
|
||||
|
||||
// 渲染日期选择器
|
||||
$('.refund-date').each(function(){
|
||||
laydate.render({
|
||||
elem: this, // 指定元素
|
||||
type: 'date' // 可选,指定为日期类型,默认即是'date'
|
||||
});
|
||||
});
|
||||
layui.form.render();
|
||||
}
|
||||
|
||||
|
|
@ -292,7 +300,7 @@ function setFormInput(value, type) {
|
|||
if (type === 1) { // 需用量
|
||||
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">';
|
||||
html += '<input class="layui-input refund-date" name="times" id="refundDate" value="' + setNullValue(value) + '" autocomplete="off">';
|
||||
} else if (type === 3) { // 备注
|
||||
html += '<input class="layui-input" placeholder="请输入备注" id="remarks" name="remarks" value="' + setNullValue(value) + '" maxLength="60" lay-affix="clear"></input>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ function initTable() {
|
|||
{
|
||||
field: "times",
|
||||
width: '15%',
|
||||
title: "<span style='color:red'> * </span>需用天数",
|
||||
title: "<span style='color:red'> * </span>预计使用时间",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
edit: 'text',
|
||||
|
|
@ -218,14 +218,6 @@ function initTable() {
|
|||
return layer.msg('需用量格式不正确,最大数量只能输入10,且为正整数!', { icon: 7 })
|
||||
}
|
||||
}
|
||||
} else if (field === 'times') { // 需用天数
|
||||
if (value) {
|
||||
const regex = /^(0|[1-9]\d{0,6})$/;
|
||||
if (!regex.test(value)) {
|
||||
obj.reedit();
|
||||
return layer.msg('需用天数格式不正确,最大输入6位数,且为正整数!', { icon: 7 })
|
||||
}
|
||||
}
|
||||
} else if (field === 'remarks') { // 备注
|
||||
if (value) {
|
||||
if (value.length > 255) {
|
||||
|
|
|
|||
|
|
@ -56,10 +56,10 @@
|
|||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>所需运输车辆车长</th>
|
||||
<th>所需运输车辆车宽</th>
|
||||
<th>所需运输车辆车高</th>
|
||||
<th>预计运输物品重量</th>
|
||||
<th>所需运输车辆车长(米)</th>
|
||||
<th>所需运输车辆车宽(米)</th>
|
||||
<th>所需运输车辆车高(米)</th>
|
||||
<th>预计运输物品重量(吨)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="carLength"></td>
|
||||
|
|
|
|||
|
|
@ -50,13 +50,13 @@
|
|||
lay-verify="required" maxlength="50" 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 layui-input-wrap">
|
||||
<input class="layui-input" name="projectContent" id="projectContent" autocomplete="off"
|
||||
lay-verify="required" maxlength="50" 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 layui-input-wrap">-->
|
||||
<!-- <input class="layui-input" name="projectContent" id="projectContent" autocomplete="off"-->
|
||||
<!-- lay-verify="required" maxlength="50" lay-affix="clear">-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label required" style="width: 100px !important;">计划说明</label>
|
||||
|
|
@ -69,31 +69,46 @@
|
|||
<div class="layui-form-item" style="display: flex;">
|
||||
<div class="layui-inline" style="display: flex;">
|
||||
<label class="layui-form-label required" style="width: 120px !important;">所需运输车辆车长</label>
|
||||
<div class="layui-input-inline" style="display: flex;">
|
||||
<input class="layui-input" name="carLength" id="carLength" autocomplete="off"
|
||||
lay-verify="required" maxlength="50" lay-affix="clear" style="width: 150px;" type="number">
|
||||
<span style="margin-left: 5px;margin-top:10px">米</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline" style="display: flex;">
|
||||
<label class="layui-form-label required" style="width: 120px !important;">所需运输车辆车宽</label>
|
||||
<div class="layui-input-inline" style="display: flex;">
|
||||
<input class="layui-input" name="carWidth" id="carWidth" autocomplete="off"
|
||||
lay-verify="required" maxlength="50" lay-affix="clear" style="width: 150px;" type="number">
|
||||
<span style="margin-left: 5px;margin-top:10px">米</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline" style="display: flex;">
|
||||
<label class="layui-form-label required" style="width: 120px !important;">所需运输车辆车高</label>
|
||||
<div class="layui-input-inline" style="display: flex;">
|
||||
<input class="layui-input" name="carHeight" id="carHeight" autocomplete="off"
|
||||
lay-verify="required" maxlength="50" lay-affix="clear" style="width: 150px;" type="number">
|
||||
<span style="margin-left: 5px;margin-top:10px">米</span>
|
||||
<div class="layui-input-inline" style="width: 800px !important;">
|
||||
<input type="radio" name="carLength" value="10" title="10米及以下" checked>
|
||||
<input type="radio" name="carLength" value="12" title="12米">
|
||||
<input type="radio" name="carLength" value="14" title="14米">
|
||||
<input type="radio" name="carLength" value="16" title="16米">
|
||||
<input type="radio" name="carLength" value="18" title="18米">
|
||||
<input type="radio" name="carLength" value="20" title="20米及以上">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item" style="display: flex;">
|
||||
<div class="layui-inline" style="display: flex;">
|
||||
<label class="layui-form-label required" style="width: 120px !important;">所需运输车辆车宽</label>
|
||||
<div class="layui-input-inline" style="width: 800px !important;">
|
||||
<input type="radio" name="carWidth" value="2" title="2米以内" checked>
|
||||
<input type="radio" name="carWidth" value="2.3" title="2.3米">
|
||||
<input type="radio" name="carWidth" value="2.5" title="2.5米">
|
||||
<input type="radio" name="carWidth" value="3.0" title="3.0米">
|
||||
<input type="radio" name="carWidth" value="3.2" title="3.2米">
|
||||
<input type="radio" name="carWidth" value="3.5" title="3.5米及以上">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item" style="display: flex;">
|
||||
<div class="layui-inline" style="display: flex;">
|
||||
<label class="layui-form-label required" style="width: 120px !important;">所需运输车辆车高</label>
|
||||
<div class="layui-input-inline" style="width: 800px !important;">
|
||||
<input type="radio" name="carHeight" value="1.0" title="1米及以下" checked>
|
||||
<input type="radio" name="carHeight" value="1.5" title="1.5米">
|
||||
<input type="radio" name="carHeight" value="2.0" title="2.0米">
|
||||
<input type="radio" name="carHeight" value="2.5" title="2.5米">
|
||||
<input type="radio" name="carHeight" value="3.0" title="3.0米">
|
||||
<input type="radio" name="carHeight" value="4.0" title="4.0米">
|
||||
<input type="radio" name="carHeight" value="5.0" title="5.0米及以上">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item" style="display: flex;">
|
||||
<div class="layui-inline" style="display: flex;">
|
||||
<label class="layui-form-label required" style="width: 120px !important;">预计运输物品重量</label>
|
||||
|
|
|
|||
|
|
@ -50,13 +50,13 @@
|
|||
lay-verify="required" maxlength="50" 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 layui-input-wrap">
|
||||
<input class="layui-input" name="projectContent" id="projectContent" autocomplete="off"
|
||||
lay-verify="required" maxlength="50" 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 layui-input-wrap">-->
|
||||
<!-- <input class="layui-input" name="projectContent" id="projectContent" autocomplete="off"-->
|
||||
<!-- lay-verify="required" maxlength="50" lay-affix="clear">-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label required" style="width: 100px !important;">计划说明</label>
|
||||
|
|
@ -69,35 +69,49 @@
|
|||
style="display: none;"></button>
|
||||
|
||||
|
||||
|
||||
<div class="layui-form-item" style="display: flex;">
|
||||
<div class="layui-inline" style="display: flex;">
|
||||
<label class="layui-form-label required" style="width: 120px !important;">所需运输车辆车长</label>
|
||||
<div class="layui-input-inline" style="display: flex;">
|
||||
<input class="layui-input" name="carLength" id="carLength" autocomplete="off"
|
||||
lay-verify="required" maxlength="50" lay-affix="clear" style="width: 150px;" type="number">
|
||||
<span style="margin-left: 5px;margin-top:10px">米</span>
|
||||
<div class="layui-form-item" style="display: flex;">
|
||||
<div class="layui-inline" style="display: flex;">
|
||||
<label class="layui-form-label required" style="width: 120px !important;">所需运输车辆车长</label>
|
||||
<div class="layui-input-inline" style="width: 800px !important;">
|
||||
<input type="radio" name="carLength" value="10" title="10米及以下" checked>
|
||||
<input type="radio" name="carLength" value="12" title="12米">
|
||||
<input type="radio" name="carLength" value="14" title="14米">
|
||||
<input type="radio" name="carLength" value="16" title="16米">
|
||||
<input type="radio" name="carLength" value="18" title="18米">
|
||||
<input type="radio" name="carLength" value="20" title="20米及以上">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline" style="display: flex;">
|
||||
<label class="layui-form-label required" style="width: 120px !important;">所需运输车辆车宽</label>
|
||||
<div class="layui-input-inline" style="display: flex;">
|
||||
<input class="layui-input" name="carWidth" id="carWidth" autocomplete="off"
|
||||
lay-verify="required" maxlength="50" lay-affix="clear" style="width: 150px;" type="number">
|
||||
<span style="margin-left: 5px;margin-top:10px">米</span>
|
||||
|
||||
<div class="layui-form-item" style="display: flex;">
|
||||
<div class="layui-inline" style="display: flex;">
|
||||
<label class="layui-form-label required" style="width: 120px !important;">所需运输车辆车宽</label>
|
||||
<div class="layui-input-inline" style="width: 800px !important;">
|
||||
<input type="radio" name="carWidth" value="2" title="2米以内" checked>
|
||||
<input type="radio" name="carWidth" value="2.3" title="2.3米">
|
||||
<input type="radio" name="carWidth" value="2.5" title="2.5米">
|
||||
<input type="radio" name="carWidth" value="3.0" title="3.0米">
|
||||
<input type="radio" name="carWidth" value="3.2" title="3.2米">
|
||||
<input type="radio" name="carWidth" value="3.5" title="3.5米及以上">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline" style="display: flex;">
|
||||
<label class="layui-form-label required" style="width: 120px !important;">所需运输车辆车高</label>
|
||||
<div class="layui-input-inline" style="display: flex;">
|
||||
<input class="layui-input" name="carHeight" id="carHeight" autocomplete="off"
|
||||
lay-verify="required" maxlength="50" lay-affix="clear" style="width: 150px;" type="number">
|
||||
<span style="margin-left: 5px;margin-top:10px">米</span>
|
||||
|
||||
<div class="layui-form-item" style="display: flex;">
|
||||
<div class="layui-inline" style="display: flex;">
|
||||
<label class="layui-form-label required" style="width: 120px !important;">所需运输车辆车高</label>
|
||||
<div class="layui-input-inline" style="width: 800px !important;">
|
||||
<input type="radio" name="carHeight" value="1.0" title="1米及以下" checked>
|
||||
<input type="radio" name="carHeight" value="1.5" title="1.5米">
|
||||
<input type="radio" name="carHeight" value="2.0" title="2.0米">
|
||||
<input type="radio" name="carHeight" value="2.5" title="2.5米">
|
||||
<input type="radio" name="carHeight" value="3.0" title="3.0米">
|
||||
<input type="radio" name="carHeight" value="4.0" title="4.0米">
|
||||
<input type="radio" name="carHeight" value="5.0" title="5.0米及以上">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item" style="display: flex;">
|
||||
<div class="layui-inline" style="display: flex;">
|
||||
<label class="layui-form-label required" style="width: 120px !important;">预计运输物品重量</label>
|
||||
|
|
|
|||
Loading…
Reference in New Issue