需求计划管理归还日期全部改为预计使用时间
This commit is contained in:
parent
4df27b7405
commit
005db7d511
|
|
@ -184,7 +184,7 @@ function initTable() {
|
|||
{
|
||||
field: "backDate",
|
||||
width: '10%',
|
||||
title: "退还日期",
|
||||
title: "预计使用时间",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
sort: true,
|
||||
|
|
@ -277,7 +277,7 @@ function setOperRecordInfo(list, obj) {
|
|||
operData = '完结-审核确认通过,共耗时:' + item.hours + '小时' + minutes + '分钟 原因备注:' + remark + '';
|
||||
} else if (item.auditStatus === '3') {
|
||||
operData = '驳回-给发起人' + creator + ',共间隔:' + item.hours + '小时' + minutes + '分钟 原因备注:' + remark + '';
|
||||
}
|
||||
}
|
||||
html += '<div class="layui-timeline-item">' +
|
||||
'<i class="layui-icon layui-timeline-axis"></i>' +
|
||||
'<div class="layui-timeline-content layui-text">' +
|
||||
|
|
@ -400,4 +400,4 @@ function closePage() {
|
|||
let index = parent.layer.getFrameIndex(window.name); // 先得到当前 iframe层的索引
|
||||
window.parent.queryTable(1);
|
||||
parent.layer.close(index); // 再执行关闭
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ function submitApply(data) {
|
|||
console.error(detailIdArr2);
|
||||
let delDetailArr = getMinus(detailIdArr2, detailIdArr);
|
||||
console.error(delDetailArr);
|
||||
|
||||
|
||||
if (delDetailArr && delDetailArr.length > 0) {
|
||||
data.field.delIds = delDetailArr;
|
||||
}
|
||||
|
|
@ -331,9 +331,9 @@ function setFormInput(value, type) {
|
|||
let html = '<form class="layui-form layuimini-form"><div class="layui-inline">';
|
||||
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) { // 退还日期
|
||||
} 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">';
|
||||
html += '<input class="layui-input refund-date" readonly 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>';
|
||||
}
|
||||
|
|
@ -392,7 +392,7 @@ function delFitType() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (jjDataArr.length === 0) {
|
||||
$('#no_data_title').removeAttr('style');
|
||||
$('#search-info').css({ 'display': 'none' });
|
||||
|
|
@ -472,4 +472,4 @@ function closePage(type) {
|
|||
window.parent.reloadData();
|
||||
}
|
||||
parent.layer.close(index); // 再执行关闭
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
let objParam;
|
||||
let form, table, element, tableIns, layer, util;
|
||||
let form, table, element, tableIns, layer, util,laydate;
|
||||
let pageNum = 1;
|
||||
let quanju = new Array();//全局
|
||||
let huancun = new Array();//缓存
|
||||
|
|
@ -8,12 +8,13 @@ let cjList = [];
|
|||
let jjDetailArr = []; // 入库配件类型数据
|
||||
function setParams(obj) {
|
||||
objParam = JSON.parse(obj);
|
||||
layui.use(["form", "table", 'element', 'layer', 'util'], function () {
|
||||
layui.use(["form", "table", 'element', 'layer', 'util','laydate'], function () {
|
||||
form = layui.form;
|
||||
table = layui.table;
|
||||
element = layui.element;
|
||||
layer = layui.layer;
|
||||
util = layui.util;
|
||||
laydate = layui.laydate;
|
||||
|
||||
$("#saveZipButton").click(function(){
|
||||
importExcel();
|
||||
|
|
@ -159,12 +160,17 @@ function initTable() {
|
|||
},
|
||||
{
|
||||
field: "times",
|
||||
width: '15%',
|
||||
title: "退还日期",
|
||||
width: "15%",
|
||||
title: "预计使用时间",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
edit: 'text',
|
||||
style: 'outline: 1px solid #e6e6e6;outline-offset: -5px;',
|
||||
templet: (d) =>
|
||||
'<div class="layui-input-inline"><input type="text" class="layui-input date-picker" id="date_' +
|
||||
d.id +
|
||||
'" value="' +
|
||||
(d.times || "") +
|
||||
'" readonly></div>',
|
||||
style: "outline: 1px solid #e6e6e6;outline-offset: -5px;",
|
||||
},
|
||||
{
|
||||
field: "remarks",
|
||||
|
|
@ -205,6 +211,21 @@ function initTable() {
|
|||
$('.layui-table th[data-field="0"] input[type="checkbox"]').prop('checked', true);//data-field值默认为0,如果在分页部分自定义了属性名,则需要改成对应的属性名
|
||||
$('.layui-table th[data-field="0"] input[type="checkbox"]').next().addClass('layui-form-checked');//data-field值默认为0,如果在分页部分自定义了属性名,则需要改成对应的属性名
|
||||
}
|
||||
|
||||
// 初始化日期选择器
|
||||
res.data.forEach((item) => {
|
||||
laydate.render({
|
||||
elem: "#date_" + item.id,
|
||||
done: (value) => {
|
||||
// 更新数据
|
||||
const data = {}
|
||||
data.id = item.id
|
||||
data.times = value
|
||||
item.times = data.times
|
||||
updateOrAddObject(item.id, item)
|
||||
},
|
||||
})
|
||||
})
|
||||
},
|
||||
});
|
||||
table.on('edit(currentTableId2)', function (obj) {
|
||||
|
|
@ -410,7 +431,7 @@ function updateTableWithImportedData(data) {
|
|||
const rowIndex = rowData.LAY_INDEX
|
||||
// 更新需用量单元格
|
||||
$(`tr[data-index="${rowIndex}"] td[data-field="needNum"] .layui-table-cell`).text(importedItem.needNum || "")
|
||||
// 更新退还日期单元格
|
||||
// 更新预计使用时间单元格
|
||||
$(`tr[data-index="${rowIndex}"] td[data-field="times"] .layui-table-cell`).text(importedItem.times || "")
|
||||
// 更新备注单元格
|
||||
$(`tr[data-index="${rowIndex}"] td[data-field="remarks"] .layui-table-cell`).text(importedItem.remarks || "")
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
let objParam;
|
||||
let form, table, element, tableIns, layer, util;
|
||||
let form, table, element, tableIns, layer, util,laydate;
|
||||
let pageNum = 1;
|
||||
let quanju = new Array();//全局
|
||||
let huancun = new Array();//缓存
|
||||
|
|
@ -8,12 +8,13 @@ let cjList = [];
|
|||
let jjDetailArr = []; // 入库配件类型数据
|
||||
function setParams(obj) {
|
||||
objParam = JSON.parse(obj);
|
||||
layui.use(["form", "table", 'element', 'layer', 'util'], function () {
|
||||
layui.use(["form", "table", 'element', 'layer', 'util','laydate'], function () {
|
||||
form = layui.form;
|
||||
table = layui.table;
|
||||
element = layui.element;
|
||||
layer = layui.layer;
|
||||
util = layui.util;
|
||||
laydate = layui.laydate;
|
||||
|
||||
$("#saveZipButton").click(function(){
|
||||
importExcel();
|
||||
|
|
@ -160,12 +161,17 @@ function initTable() {
|
|||
},
|
||||
{
|
||||
field: "times",
|
||||
width: '15%',
|
||||
title: "<span style='color:red'> * </span>退还日期",
|
||||
width: "15%",
|
||||
title: "预计使用时间",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
edit: 'text',
|
||||
style: 'outline: 1px solid #e6e6e6;outline-offset: -5px;',
|
||||
templet: (d) =>
|
||||
'<div class="layui-input-inline"><input type="text" class="layui-input date-picker" id="date_' +
|
||||
d.id +
|
||||
'" value="' +
|
||||
(d.times || "") +
|
||||
'" readonly></div>',
|
||||
style: "outline: 1px solid #e6e6e6;outline-offset: -5px;",
|
||||
},
|
||||
{
|
||||
field: "remarks",
|
||||
|
|
@ -206,6 +212,21 @@ function initTable() {
|
|||
$('.layui-table th[data-field="0"] input[type="checkbox"]').prop('checked', true);//data-field值默认为0,如果在分页部分自定义了属性名,则需要改成对应的属性名
|
||||
$('.layui-table th[data-field="0"] input[type="checkbox"]').next().addClass('layui-form-checked');//data-field值默认为0,如果在分页部分自定义了属性名,则需要改成对应的属性名
|
||||
}
|
||||
|
||||
// 初始化日期选择器
|
||||
res.data.forEach((item) => {
|
||||
laydate.render({
|
||||
elem: "#date_" + item.id,
|
||||
done: (value) => {
|
||||
// 更新数据
|
||||
const data = {}
|
||||
data.id = item.id
|
||||
data.times = value
|
||||
item.times = data.times
|
||||
updateOrAddObject(item.id, item)
|
||||
},
|
||||
})
|
||||
})
|
||||
},
|
||||
});
|
||||
table.on('edit(currentTableId2)', function (obj) {
|
||||
|
|
@ -411,7 +432,7 @@ function updateTableWithImportedData(data) {
|
|||
const rowIndex = rowData.LAY_INDEX
|
||||
// 更新需用量单元格
|
||||
$(`tr[data-index="${rowIndex}"] td[data-field="needNum"] .layui-table-cell`).text(importedItem.needNum || "")
|
||||
// 更新退还日期单元格
|
||||
// 更新预计使用时间单元格
|
||||
$(`tr[data-index="${rowIndex}"] td[data-field="times"] .layui-table-cell`).text(importedItem.times || "")
|
||||
// 更新备注单元格
|
||||
$(`tr[data-index="${rowIndex}"] td[data-field="remarks"] .layui-table-cell`).text(importedItem.remarks || "")
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
let objParam;
|
||||
let form, table, element, tableIns, layer, util;
|
||||
let form, table, element, tableIns, layer, util,laydate;
|
||||
let pageNum = 1;
|
||||
let quanju = new Array();//全局
|
||||
let huancun = new Array();//缓存
|
||||
|
|
@ -162,7 +162,7 @@ function initTable() {
|
|||
{
|
||||
field: "times",
|
||||
width: "15%",
|
||||
title: "退还日期",
|
||||
title: "预计使用时间",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
templet: (d) =>
|
||||
|
|
@ -434,7 +434,7 @@ function updateTableWithImportedData(data) {
|
|||
const rowIndex = rowData.LAY_INDEX
|
||||
// 更新需用量单元格
|
||||
$(`tr[data-index="${rowIndex}"] td[data-field="needNum"] .layui-table-cell`).text(Number(importedItem.needNum) || "")
|
||||
// 更新退还日期单元格
|
||||
// 更新预计使用时间单元格
|
||||
$(`tr[data-index="${rowIndex}"] td[data-field="times"] .layui-table-cell`).text(importedItem.times || "")
|
||||
// 更新备注单元格
|
||||
$(`tr[data-index="${rowIndex}"] td[data-field="remarks"] .layui-table-cell`).text(importedItem.remarks || "")
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@
|
|||
<th style="width: 10%" class="center">规格</th>
|
||||
<th style="width: 10%" class="center">单位</th>
|
||||
<th style="width: 15%" class="center"><span style="color: red;">*</span>需用量</th>
|
||||
<th style="width: 15%" class="center">退还日期</th>
|
||||
<th style="width: 15%" class="center">预计使用时间</th>
|
||||
<th style="width: 15%" class="center">备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
@ -134,4 +134,4 @@
|
|||
<script src="../../../js/aq_demand_plan/child/apply_plan_edit_form.js" charset="utf-8"></script>
|
||||
<script src="../../../js/openIframe.js" charset="utf-8"></script>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Reference in New Issue