配件入库

This commit is contained in:
cwchen 2024-11-13 11:03:54 +08:00
parent 35a38d17ca
commit f4f958762e
3 changed files with 32 additions and 34 deletions

View File

@ -1,51 +1,49 @@
let objParam;
let id = getUrlParam('id'); // 批次ID
let time = getUrlParam('time'); // 批次日期
let form, table, element, tableIns, layer;
let pageNum = 1;
function setParams(params) {
objParam = JSON.parse(params);
layui.use(["form", "table", 'element', 'layer'], function () {
console.error(objParam);
$('#code').html(objParam.code);
$('#titleName').html(objParam.inputDay + '配件入库记录');
layui.use(["form", "table", 'element', 'layer'], function () {
form = layui.form;
table = layui.table;
element = layui.element;
layer = layui.layer;
getOutDetails();
initTable();
getInputDetails();
// initTable();
});
}
// 基本信息和附件文档接口
function getOutDetails() {
// 获取配件到货入库详情
function getInputDetails() {
let params = {
encryptedData: JSON.stringify({
'proId': objParam.proId,
'id': id
'id': objParam.id
})
};
let url = dataUrl + 'backstage/planOut/getOutDetails';
let url = dataUrl + 'backstage/partInput/getInputDetails';
ajaxRequest(url, "POST", params, true, function () {
}, function (result) {
console.error(result);
if (result.code === 200) {
setBasicValue(result.data);
setFileTable(result.data.fileList);
setTableData(result.data);
} else {
setBasicValue(null);
setFileTable(null);
}
}, function (xhr, status, error) {
errorFn(xhr, status, error)
}, null);
}
function setBasicValue(obj) {
if (obj) {
$('#userName').html(obj.userName); parseInt();
$('#createDay').html(obj.createDay + '<a style="margin:0 5px;color:#409EFF;cursor: pointer;" onclick=\'viewGs(' + JSON.stringify(obj) + ')\'>查看概述</a>');
$('#remark').html(obj.remarks);
// 基本数据表格赋值
function setTableData(obj) {
$('#codeValue').html(obj.code + '<a style="margin:0 5px;color:#409EFF;cursor: pointer;" onclick=\'viewGs(' + JSON.stringify(obj) + ')\'>查看概述</a>');
$('#inputNum').html(obj.inputNum);
$('#allPrice').html(obj.allPrice);
$('#inputUser').html(obj.inputUser);
$('#inputDay').html(obj.inputDay);
$('#remark').html(obj.remark);
setFileTable(obj.fileList);
}
}
@ -57,8 +55,8 @@ function setFileTable(fileList) {
$.each(fileList, function (index, item) {
html += '<tr>' +
'<td>' + handleFileType(item.fileName) + item.fileName + '</td>' +
'<td>'+(item.suffix.replace('.',''))+'</td>' +
'<td><img src="../../../images/user_head_icon.png" width="20px" height="20px">' + item.createName + '</td>' +
'<td>入库附件</td>' +
'<td>' + item.createTime + '</td>' +
'<td><a style="margin:0 5px;color:#409EFF;cursor: pointer;" onclick=\'viewFile(' + JSON.stringify(item) + ')\'>预览</a>' +
'<a style="margin:0 5px;color:#409EFF;cursor: pointer;" onclick=\'downLoadFile(' + JSON.stringify(item) + ')\'>下载</a>' +
@ -261,8 +259,8 @@ function viewGs(obj) {
layer.open({
type: 1,
shade: false, // 不显示遮罩
content: '<div style="padding: 1%;">' + obj.details + '</div>',
title: '<h3 style="color: #F56C6C;">' + obj.createDay + '发货概述:</h3>',
content: '<div style="padding: 1%;">' + obj.info + '</div>',
title: '<h3 style="color: #F56C6C;">' + obj.inputDay + '入库概述:</h3>',
btn: ['复制文字', '关闭'],
area: ['60%', '50%'],
move: false,

View File

@ -1,5 +1,5 @@
const dataUrl = 'http://127.0.0.1:21995/'; // 数据请求路径
const fileUrl = 'http://127.0.0.1:21995/'; // 文件路径
const fileUrl = 'http://127.0.0.1:21995/statics'; // 文件路径

View File

@ -38,7 +38,7 @@
<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 id="code">20240607096</p>
<p id="code"></p>
</div>
</div>
<div>
@ -60,11 +60,11 @@
<th>入库日期</th>
</tr>
<tr>
<td id="userName"></td>
<td id="createDay"></td>
<td id="createDay2"></td>
<td id="createDay3"></td>
<td id="createDay4"></td>
<td id="codeValue"></td>
<td id="inputNum"></td>
<td id="allPrice"></td>
<td id="inputUser"></td>
<td id="inputDay"></td>
</tr>
<tr>
<th colspan="5">备注</th>
@ -83,8 +83,8 @@
<div id="file-table-box">
<table class="classTable" id="file-table">
<tr>
<th>文件名</th>
<th>文件类型</th>
<th style="width: 30%;">文件名</th>
<th style="width: 10%;">文件类型</th>
<th>上传人员</th>
<th>上传时间</th>
<th>操作</th>