This commit is contained in:
parent
e26da776f1
commit
935c545513
|
|
@ -189,5 +189,6 @@ function exportExcel() {
|
|||
// 详情 审核 出库确认
|
||||
function accessoryOutBoundDetail(obj, type) {
|
||||
obj.type = type;
|
||||
obj.devType = '2'; // 1.工器具 2.设备
|
||||
openIframeByParamObj("accessory_out_bound_detail", "配件出库记录", "../accessory/child/accessory_out_bound_detail.html", "92%", "95%", obj);
|
||||
}
|
||||
|
|
@ -1,16 +1,31 @@
|
|||
let objParam;
|
||||
let form, table, element, tableIns, layer;
|
||||
let form, table, upload, tableIns, layer;
|
||||
let pageNum = 1;
|
||||
|
||||
function setParams(params) {
|
||||
objParam = JSON.parse(params);
|
||||
console.error(objParam);
|
||||
if (objParam.type === 2) { // 审核
|
||||
$('#print').before('<button type="button" class="layui-btn layui-bg-orange" onclick="check()">审核</button>');
|
||||
} else if (objParam.type === 3) { // 出库
|
||||
$('#print').before('<button type="button" class="layui-btn layui-bg-blue" onclick="outBand()">确认出库</button>');
|
||||
}
|
||||
if (objParam.devType === '2') { // 设备
|
||||
let html = '';
|
||||
html += '<tr>' +
|
||||
'<th>内部编号</th><th>使用机型</th><th>使用单位</th><th></th>'
|
||||
'</tr>';
|
||||
html += '<tr>' +
|
||||
'<td>GS511</td><td>机动绞磨 柴油 5T</td><td>xxxxxxxxxxxx工程</td><th></th>'
|
||||
'</tr>';
|
||||
$('#lastTr').before(html);
|
||||
}
|
||||
$('#code').html(objParam.code);
|
||||
$('#titleName').html(objParam.inputDay + '配件入库记录');
|
||||
layui.use(["form", "table", 'element', 'layer'], function () {
|
||||
$('#titleName').html(objParam.inputDay + '配件出库记录');
|
||||
layui.use(["form", "table", 'upload', 'layer'], function () {
|
||||
form = layui.form;
|
||||
table = layui.table;
|
||||
element = layui.element;
|
||||
upload = layui.upload;
|
||||
layer = layui.layer;
|
||||
getInputDetails();
|
||||
initTable();
|
||||
|
|
@ -55,7 +70,7 @@ function setFileTable(fileList) {
|
|||
$.each(fileList, function (index, item) {
|
||||
html += '<tr>' +
|
||||
'<td>' + handleFileType(item.fileName) + item.fileName + '</td>' +
|
||||
'<td>'+(item.suffix.replace('.',''))+'</td>' +
|
||||
'<td>' + (item.suffix.replace('.', '')) + '</td>' +
|
||||
'<td><img src="../../../images/user_head_icon.png" width="20px" height="20px">' + item.createName + '</td>' +
|
||||
'<td>' + item.createTime + '</td>' +
|
||||
'<td><a style="margin:0 5px;color:#409EFF;cursor: pointer;" onclick=\'viewFile(' + JSON.stringify(item) + ')\'>预览</a>' +
|
||||
|
|
|
|||
|
|
@ -1,16 +1,15 @@
|
|||
let objParam;
|
||||
let form, table, element, tableIns, layer;
|
||||
let form, table, upload, tableIns, layer;
|
||||
let pageNum = 1;
|
||||
|
||||
function setParams(params) {
|
||||
objParam = JSON.parse(params);
|
||||
console.error(objParam);
|
||||
$('#code').html(objParam.code);
|
||||
$('#titleName').html(objParam.inputDay + '配件入库记录');
|
||||
layui.use(["form", "table", 'element', 'layer'], function () {
|
||||
layui.use(["form", "table", 'upload', 'layer'], function () {
|
||||
form = layui.form;
|
||||
table = layui.table;
|
||||
element = layui.element;
|
||||
upload = layui.upload;
|
||||
layer = layui.layer;
|
||||
getInputDetails();
|
||||
initTable();
|
||||
|
|
@ -55,7 +54,7 @@ function setFileTable(fileList) {
|
|||
$.each(fileList, function (index, item) {
|
||||
html += '<tr>' +
|
||||
'<td>' + handleFileType(item.fileName) + item.fileName + '</td>' +
|
||||
'<td>'+(item.suffix.replace('.',''))+'</td>' +
|
||||
'<td>' + (item.suffix.replace('.', '')) + '</td>' +
|
||||
'<td><img src="../../../images/user_head_icon.png" width="20px" height="20px">' + item.createName + '</td>' +
|
||||
'<td>' + item.createTime + '</td>' +
|
||||
'<td><a style="margin:0 5px;color:#409EFF;cursor: pointer;" onclick=\'viewFile(' + JSON.stringify(item) + ')\'>预览</a>' +
|
||||
|
|
@ -333,4 +332,14 @@ function print() {
|
|||
console.log('onEnd', new Date())
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 审核
|
||||
function check() {
|
||||
alert('审核');
|
||||
}
|
||||
|
||||
// 出库
|
||||
function outBand() {
|
||||
alert('出库');
|
||||
}
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
var form, layer;
|
||||
let idParam;
|
||||
function setParams(id) {
|
||||
idParam = id;
|
||||
layui.use([ 'form' ], function() {
|
||||
form = layui.form;
|
||||
layer = layui.layer;
|
||||
form.verify();
|
||||
form.on('submit(formData)', function(data) {
|
||||
submitApply(data);
|
||||
});
|
||||
form.on('radio(auditStatus)', function(data) {
|
||||
if (data.value === '2') { // 通过
|
||||
$('#auditRemarksLabel').empty().append('审核意见');
|
||||
$('#auditRemarks').removeAttr('lay-verify');
|
||||
} else if (data.value === '3') { // 不通过
|
||||
$('#auditRemarksLabel').empty().append(
|
||||
'<span class="required_icon">*</span>审核意见');
|
||||
$('#auditRemarks').attr('lay-verify', 'required');
|
||||
}
|
||||
});
|
||||
form.render();
|
||||
});
|
||||
}
|
||||
|
||||
function saveData2() {
|
||||
$('#formSubmit').trigger('click')
|
||||
}
|
||||
|
||||
// 提交
|
||||
function submitApply(data) {
|
||||
let loadingMsg = layer.msg('正在提交保存,请稍等...', {
|
||||
icon : 16,
|
||||
shade : 0.01,
|
||||
time : '0'
|
||||
});
|
||||
console.log(JSON.stringify(data.field));
|
||||
data.field.applyId = idParam;
|
||||
$.ajax({
|
||||
url : bonuspath + '/backstage/planAudit/planAudit',
|
||||
type : 'POST',
|
||||
data : JSON.stringify(data.field),
|
||||
dataType : 'json',
|
||||
contentType : "application/json",
|
||||
beforeSend : function() {
|
||||
$('.save').addClass("layui-btn-disabled").attr("disabled", true);
|
||||
$('.cancel').addClass("layui-btn-disabled").attr("disabled", true);
|
||||
},
|
||||
success : function(result) {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
if (result.res === 1) {
|
||||
top.layer.msg(result.resMsg, {
|
||||
icon : 1
|
||||
});
|
||||
closePage(1);
|
||||
} else {
|
||||
var indexMsg = layer.confirm(result.resMsg, {
|
||||
btn : [ '关闭' ]
|
||||
}, function() {
|
||||
layer.close(indexMsg);
|
||||
});
|
||||
$('.save').removeClass("layui-btn-disabled").attr("disabled",
|
||||
false);
|
||||
$('.cancel').removeClass("layui-btn-disabled").attr("disabled",
|
||||
false);
|
||||
}
|
||||
},
|
||||
error : function(result) {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
layer.msg('服务异常,请稍后重试', {
|
||||
icon : 16,
|
||||
scrollbar : false,
|
||||
time : 2000
|
||||
});
|
||||
$('.save').removeClass("layui-btn-disabled")
|
||||
.attr("disabled", false);
|
||||
$('.cancel').removeClass("layui-btn-disabled").attr("disabled",
|
||||
false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 关闭页面
|
||||
function closePage(type) {
|
||||
let index = parent.layer.getFrameIndex(window.name); // 先得到当前 iframe层的索引
|
||||
if (type == 1) {
|
||||
window.parent.closePage();
|
||||
}
|
||||
parent.layer.close(index); // 再执行关闭
|
||||
}
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button" class="layui-btn layui-bg-blue" onclick="print()">打印</button>
|
||||
<button type="button" id="print" class="layui-btn layui-bg-blue" onclick="print()">打印</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="basic-box">
|
||||
|
|
@ -53,24 +53,28 @@
|
|||
<div id="basic-table">
|
||||
<table class="classTable">
|
||||
<tr>
|
||||
<th>入库编号<span>(系统自动生成)</span></th>
|
||||
<th>入库数量</th>
|
||||
<th>成本价格(元)</th>
|
||||
<th>入库人</th>
|
||||
<th>入库日期</th>
|
||||
<th>单据编号<span>(系统自动生成)</span></th>
|
||||
<th>配件类型</th>
|
||||
<th>出库数量</th>
|
||||
<th>备注</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="codeValue"></td>
|
||||
<td id="inputNum"></td>
|
||||
<td id="allPrice"></td>
|
||||
<td id="inputUser"></td>
|
||||
<td id="inputDay"></td>
|
||||
</tr>
|
||||
<tr id="lastTr">
|
||||
<th>领用</th>
|
||||
<th>制单</th>
|
||||
<th>出库</th>
|
||||
<th>审核</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="5">备注</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5" id="remark"></td>
|
||||
<td id="ly"></td>
|
||||
<td id="zd"></td>
|
||||
<td id="ck"></td>
|
||||
<td id="sh"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
<div class="layout">
|
||||
<img src="../../../images/svg/u418.svg">
|
||||
<div class="layout" style="flex-direction: column;align-items: start;margin-left: 10px;">
|
||||
<p style="font-size: 18px;font-weight: bold;" id="titleName">2024-05-05配件入库记录</p>
|
||||
<p style="font-size: 18px;font-weight: bold;" id="titleName"></p>
|
||||
<p id="code"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>审核</title>
|
||||
<link rel="stylesheet" href="../../../lib/layui-v2.9.18/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="../../../css/font.css" media="all">
|
||||
<link rel="stylesheet" href="../../../css/data_form.css" media="all">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="main-box">
|
||||
<form class="layui-form layuimini-form" onsubmit="return false;" onclick="return false;">
|
||||
<div class="layui-form-item" style="margin-top: 1%;">
|
||||
<label class="layui-form-label required">审核结果</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" lay-filter="auditStatus" name="auditStatus" value="2" title="通过" checked>
|
||||
<input type="radio" lay-filter="auditStatus" name="auditStatus" value="3" title="不通过">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label required" id="auditRemarksLabel">审核意见</label>
|
||||
<div class="layui-input-inline" style="width: 250px;">
|
||||
<textarea placeholder="不通过必须填写审核意见" id="auditRemarks" name="auditRemarks" class="layui-textarea"
|
||||
maxLength="500"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" id="formSubmit" class="layui-btn" lay-submit="" lay-filter="formData"
|
||||
style="display: none;"></button>
|
||||
</form>
|
||||
<div class="btn-box">
|
||||
<button class="layui-btn layui-btn-primary cancel" onclick="closePage()">取消</button>
|
||||
<button class="layui-btn layui-btn-normal save" onclick="saveData2()">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="../../../lib/jquery-3.4.1/jquery-3.4.1.min.js" charset="utf-8"></script>
|
||||
<script src="../../../js/public.js" charset="utf-8"></script>
|
||||
<script src="../../../lib/layui-v2.9.18/layui/layui.js" charset="utf-8"></script>
|
||||
<script src="../../../js/accessory/child/audit_form.js" charset="utf-8"></script>
|
||||
<script src="../../../js/openIframe.js" charset="utf-8"></script>
|
||||
|
||||
</html>
|
||||
Loading…
Reference in New Issue