漏洞修改
This commit is contained in:
parent
8f24d1b970
commit
563ee1812b
|
|
@ -204,7 +204,7 @@
|
|||
// 初始化页面
|
||||
function initPage(miniAdmin){
|
||||
var options = {
|
||||
iniUrl: "api/init.json", // 初始化接口
|
||||
iniUrl: "api/initback.json", // 初始化接口
|
||||
clearUrl: "api/clear.json", // 缓存清理接口
|
||||
urlHashLocation: true, // 是否打开hash定位
|
||||
bgColorDefault: false, // 主题默认配置
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ function queryTable(type) {
|
|||
let flag = checkValue(keyWord);
|
||||
if (flag) {
|
||||
$('#keyWord').val('');
|
||||
return layer.msg('关键字查询包含特殊字符,请重新输入', { icon: 2 });
|
||||
return layer.msg('关键字查询包含特殊字符,请重新输入', {icon: 2});
|
||||
}
|
||||
reloadTable(1);
|
||||
} else if (type === 2) {
|
||||
|
|
@ -40,17 +40,17 @@ function reloadData() {
|
|||
// 重载表格
|
||||
function reloadTable(pageNum) {
|
||||
table.reload("currentTableId", {
|
||||
page: {
|
||||
curr: pageNum ? pageNum : 1,
|
||||
page: {
|
||||
curr: pageNum ? pageNum : 1,
|
||||
},
|
||||
where: {
|
||||
encryptedData: JSON.stringify({
|
||||
'keyWord': $('#keyWord').val(),
|
||||
'startDate': $('#startDate').val(),
|
||||
'endDate': $('#endDate').val()
|
||||
}),
|
||||
},
|
||||
},
|
||||
where: {
|
||||
encryptedData: JSON.stringify({
|
||||
'keyWord': $('#keyWord').val(),
|
||||
'startDate': $('#startDate').val(),
|
||||
'endDate': $('#endDate').val()
|
||||
}),
|
||||
},
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ function initTable() {
|
|||
limitName: 'pageSize'
|
||||
},
|
||||
parseData: function (res) { // res 即为原始返回的数据
|
||||
if(res.code === 401){
|
||||
if (res.code === 401) {
|
||||
closeWindowOpen();
|
||||
}
|
||||
return {
|
||||
|
|
@ -89,7 +89,7 @@ function initTable() {
|
|||
cols: [
|
||||
[
|
||||
{
|
||||
width: '5.9%',
|
||||
width: '5%',
|
||||
title: "序号",
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
|
|
@ -102,7 +102,7 @@ function initTable() {
|
|||
title: "计划编号",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
sort:true,
|
||||
sort: true,
|
||||
},
|
||||
{
|
||||
field: "proName",
|
||||
|
|
@ -110,23 +110,23 @@ function initTable() {
|
|||
title: "工程名称",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
sort:true,
|
||||
sort: true,
|
||||
},
|
||||
{
|
||||
field: "needTime",
|
||||
width: '10%',
|
||||
width: '8%',
|
||||
title: "需用日期",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
sort:true,
|
||||
sort: true,
|
||||
},
|
||||
{
|
||||
field: "creator",
|
||||
width: '10%',
|
||||
width: '8%',
|
||||
title: "申请人",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
sort:true,
|
||||
sort: true,
|
||||
},
|
||||
{
|
||||
field: "createTime",
|
||||
|
|
@ -134,15 +134,15 @@ function initTable() {
|
|||
title: "申请时间",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
sort:true,
|
||||
sort: true,
|
||||
},
|
||||
{
|
||||
field: "remark",
|
||||
width: '14%',
|
||||
width: '10%',
|
||||
title: "备注",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
sort:true,
|
||||
sort: true,
|
||||
templet: function (d) {
|
||||
if (d.remark) {
|
||||
if (d.remark.length > 100) {
|
||||
|
|
@ -162,9 +162,26 @@ function initTable() {
|
|||
title: "审核状态",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
sort:true,
|
||||
sort: true,
|
||||
templet: function (d) {
|
||||
return getCheckStatus(d.statusType, d.status);
|
||||
return getCheckStatus(d.statusType, d.status, d.mode);
|
||||
},
|
||||
},
|
||||
{
|
||||
field: "mode",
|
||||
width: '8%',
|
||||
title: "状态",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
sort: true,
|
||||
templet: function (d) {
|
||||
if (d.mode == '0') {
|
||||
return "<span style='color:rgba(214,214,214,0.56);margin:0 5px 0 5px;font-size:16px'>●</span>草稿";
|
||||
} else {
|
||||
return "<span style='color:#19BE6B;margin:0 5px 0 5px;font-size:16px'>●</span>已提交";
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -176,7 +193,7 @@ function initTable() {
|
|||
let status = getCheckStatus(d.statusType, d.status);
|
||||
let html = "";
|
||||
html += "<a onclick='applyPlanDetail(" + JSON.stringify(d) + ")'>详情</a>";
|
||||
if (status.indexOf('驳回') > -1 || status.indexOf('已撤回') > -1) {
|
||||
if (status.indexOf('驳回') > -1 || status.indexOf('已撤回') > -1 || d.mode == '0') {
|
||||
html += "<div class='splitLine'>|</div><a onclick='editApplyPlan(" + JSON.stringify(d) + ")'>修改</a>";
|
||||
}
|
||||
return html;
|
||||
|
|
@ -204,12 +221,14 @@ function exportExcel() {
|
|||
}
|
||||
|
||||
|
||||
|
||||
//审核状态
|
||||
function getCheckStatus(statusType, status) {
|
||||
function getCheckStatus(statusType, status, mode) {
|
||||
var company = "";
|
||||
if(statusType === '0' && status === '0'){
|
||||
return "<span style='color:#FF9900;margin:0 5px 0 5px;font-size:16px'>●</span>已撤回";
|
||||
if (mode == '0') {
|
||||
return "<span style='color:rgba(214,214,214,0.56);margin:0 5px 0 5px;font-size:16px'>●</span>未提交";
|
||||
}
|
||||
if (statusType === '0' && status === '0') {
|
||||
return "<span style='color:#FF9900;margin:0 5px 0 5px;font-size:16px'>●</span>已撤回";
|
||||
}
|
||||
if (statusType === '1') {
|
||||
return "<span style='color:#19BE6B;margin:0 5px 0 5px;font-size:16px;'>●</span>审核通过";
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ let jjDataArr = []; // 配件数据
|
|||
let proList = []; // 工程下拉选
|
||||
let delIdArr = [];
|
||||
let detailIdArr = [];
|
||||
|
||||
function setParams(obj) {
|
||||
objParam = JSON.parse(obj);
|
||||
layui.use(['form', 'layer', 'laydate', 'upload', 'table'], function () {
|
||||
|
|
@ -106,14 +107,15 @@ function getPlanDetailsList() {
|
|||
jjDataArr.push(obj);
|
||||
detailIdArr.push(item.id);
|
||||
})
|
||||
$('#no_data_title').css({ 'display': 'none' });
|
||||
$('#no_data_title').css({'display': 'none'});
|
||||
$('#search-info').removeAttr('style');
|
||||
$('#table-box').removeAttr('style');
|
||||
setTableData(jjDataArr);
|
||||
}
|
||||
}
|
||||
|
||||
function saveData2() {
|
||||
function saveData2(mode) {
|
||||
$('#mode').val(mode);
|
||||
$('#formSubmit').trigger('click')
|
||||
}
|
||||
|
||||
|
|
@ -135,11 +137,11 @@ function submitApply(data) {
|
|||
let list = getBaseTableData();
|
||||
// 校验配件入库数量
|
||||
if (list.length === 0) {
|
||||
return layer.msg('未添加机具数据', { icon: 7 });
|
||||
return layer.msg('未添加机具数据', {icon: 7});
|
||||
}
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (parseInt(list[i].needNum) === 0) {
|
||||
return layer.msg('机具明细,第' + (i + 1) + '行,未填写需用量', { icon: 7 });
|
||||
return layer.msg('机具明细,第' + (i + 1) + '行,未填写需用量', {icon: 7});
|
||||
}
|
||||
// if (parseInt(list[i].times) === 0) {
|
||||
// return layer.msg('机具明细,第' + (i + 1) + '行,未填写需用天数', { icon: 7 });
|
||||
|
|
@ -160,7 +162,7 @@ function submitApply(data) {
|
|||
if (delDetailArr && delDetailArr.length > 0) {
|
||||
data.field.delIds = delDetailArr;
|
||||
}
|
||||
let loadingMsg = layer.msg('正在提交保存,请稍等...', { icon: 16, shade: 0.01, time: '0' });
|
||||
let loadingMsg = layer.msg('正在提交保存,请稍等...', {icon: 16, shade: 0.01, time: '0'});
|
||||
let url = dataUrl + 'backstage/planApplication/updatePlan';
|
||||
let params = {
|
||||
encryptedData: JSON.stringify(data.field)
|
||||
|
|
@ -173,14 +175,14 @@ function submitApply(data) {
|
|||
$('.save').removeClass("layui-btn-disabled").attr("disabled", false);
|
||||
$('.cancel').removeClass("layui-btn-disabled").attr("disabled", false);
|
||||
if (result.code === 200) {
|
||||
parent.layer.msg(result.msg, { icon: 1 });
|
||||
parent.layer.msg(result.msg, {icon: 1});
|
||||
closePage(1);
|
||||
} else {
|
||||
layer.msg(result.msg, { icon: 2 });
|
||||
layer.msg(result.msg, {icon: 2});
|
||||
}
|
||||
}, function (xhr, status, error) {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
layer.msg('服务异常,请稍后重试', { icon: 16, scrollbar: false, time: 2000 });
|
||||
layer.msg('服务异常,请稍后重试', {icon: 16, scrollbar: false, time: 2000});
|
||||
$('.save').removeClass("layui-btn-disabled").attr("disabled", false);
|
||||
$('.cancel').removeClass("layui-btn-disabled").attr("disabled", false);
|
||||
errorFn(xhr, status, error)
|
||||
|
|
@ -226,6 +228,7 @@ function chooseFitType() {
|
|||
let params = {};
|
||||
openIframeByParamObj("choose_fit_type", '选择需求计划机具类型<span style="color:red;font-size:14px">(设备类请备注大、中、小)</span>', "./choose_tool_type_list.html", '92%', '95%', params);
|
||||
}
|
||||
|
||||
// 查询
|
||||
function search() {
|
||||
let keyWord = $('#pName').val();
|
||||
|
|
@ -270,7 +273,7 @@ function addFitDatas(data) {
|
|||
} else { // 第一次添加数据
|
||||
jjDataArr = JSON.parse(data);
|
||||
if (jjDataArr && jjDataArr.length > 0) {
|
||||
$('#no_data_title').css({ 'display': 'none' });
|
||||
$('#no_data_title').css({'display': 'none'});
|
||||
$('#search-info').removeAttr('style');
|
||||
$('#table-box').removeAttr('style');
|
||||
setTableData(jjDataArr);
|
||||
|
|
@ -316,7 +319,7 @@ function setTableData(results) {
|
|||
html += "<tr><td colspan='9' class='center'>没有相关数据</td></tr>";
|
||||
}
|
||||
$("#baseTable tbody").empty().append(html);
|
||||
$('.refund-date').each(function(){
|
||||
$('.refund-date').each(function () {
|
||||
laydate.render({
|
||||
elem: this, // 指定元素
|
||||
type: 'date' // 可选,指定为日期类型,默认即是'date'
|
||||
|
|
@ -376,10 +379,10 @@ function sel(selectStatus, that, id) {
|
|||
// 删除选中
|
||||
function delFitType() {
|
||||
if (delIdArr.length == 0) {
|
||||
layer.msg('请先选择需要删除的数据!', { icon: 7 })
|
||||
layer.msg('请先选择需要删除的数据!', {icon: 7})
|
||||
return;
|
||||
}
|
||||
let layerIndex = layer.confirm('<h5 style="color:red">确定要删除选中数据吗!</h5>', { title: '操作提示' }, function () {
|
||||
let layerIndex = layer.confirm('<h5 style="color:red">确定要删除选中数据吗!</h5>', {title: '操作提示'}, function () {
|
||||
layer.close(layerIndex);
|
||||
for (let i = 0; i < delIdArr.length; i++) {
|
||||
for (let j = 0; j < jjDataArr.length; j++) {
|
||||
|
|
@ -393,8 +396,8 @@ function delFitType() {
|
|||
|
||||
if (jjDataArr.length === 0) {
|
||||
$('#no_data_title').removeAttr('style');
|
||||
$('#search-info').css({ 'display': 'none' });
|
||||
$('#table-box').css({ 'display': 'none' });
|
||||
$('#search-info').css({'display': 'none'});
|
||||
$('#table-box').css({'display': 'none'});
|
||||
} else {
|
||||
// setTableData(jjDataArr);
|
||||
handleDelTableData(delIdArr);
|
||||
|
|
@ -457,7 +460,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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ let pageNum = 1, tableIns; // 定义分页
|
|||
let jjDataArr = []; // 配件数据
|
||||
let proList = []; // 工程下拉选
|
||||
let delIdArr = [];
|
||||
|
||||
function setParams(obj) {
|
||||
objParam = JSON.parse(obj);
|
||||
layui.use(['form', 'layer', 'laydate', 'upload', 'table'], function () {
|
||||
|
|
@ -48,7 +49,8 @@ function setSelectData(proList) {
|
|||
layui.form.render();
|
||||
}
|
||||
|
||||
function saveData2() {
|
||||
function saveData2(mode) {
|
||||
$('#mode').val(mode);
|
||||
$('#formSubmit').trigger('click')
|
||||
}
|
||||
|
||||
|
|
@ -68,23 +70,22 @@ function setNumColor(value, type) { // 1.需要量 2.已发货量 3.差缺量
|
|||
// 提交
|
||||
function submitApply(data) {
|
||||
let list = getBaseTableData();
|
||||
console.log(list.length)
|
||||
// 校验配件入库数量
|
||||
if (list.length === 0) {
|
||||
return layer.msg('未添加机具数据', { icon: 7 });
|
||||
return layer.msg('未添加机具数据', {icon: 7});
|
||||
}
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (list[i].needNum === 0) {
|
||||
return layer.msg('机具明细,第' + (i + 1) + '行,未填写需用量', { icon: 7 });
|
||||
return layer.msg('机具明细,第' + (i + 1) + '行,未填写需用量', {icon: 7});
|
||||
}
|
||||
// if (list[i].times === 0) {
|
||||
// return layer.msg('机具明细,第' + (i + 1) + '行,未填写需用天数', { icon: 7 });
|
||||
// }
|
||||
|
||||
}
|
||||
data.field.jsonData = JSON.stringify(list);
|
||||
let loadingMsg = layer.msg('正在提交保存,请稍等...', { icon: 16, shade: 0.01, time: '0' });
|
||||
let loadingMsg = layer.msg('正在提交保存,请稍等...', {icon: 16, shade: 0.01, time: '0'});
|
||||
let url = dataUrl + 'backstage/planApplication/addPlan';
|
||||
let params = {
|
||||
encryptedData:JSON.stringify(data.field)
|
||||
encryptedData: JSON.stringify(data.field)
|
||||
};
|
||||
ajaxRequest(url, 'POST', params, true, function () {
|
||||
$('.save').addClass("layui-btn-disabled").attr("disabled", true);
|
||||
|
|
@ -94,14 +95,14 @@ function submitApply(data) {
|
|||
$('.save').removeClass("layui-btn-disabled").attr("disabled", false);
|
||||
$('.cancel').removeClass("layui-btn-disabled").attr("disabled", false);
|
||||
if (result.code === 200) {
|
||||
parent.layer.msg(result.msg, { icon: 1 });
|
||||
parent.layer.msg(result.msg, {icon: 1});
|
||||
closePage(1);
|
||||
} else {
|
||||
layer.msg(result.msg, { icon: 2 });
|
||||
layer.msg(result.msg, {icon: 2});
|
||||
}
|
||||
}, function (xhr, status, error) {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
layer.msg('服务异常,请稍后重试', { icon: 16, scrollbar: false, time: 2000 });
|
||||
layer.msg('服务异常,请稍后重试', {icon: 16, scrollbar: false, time: 2000});
|
||||
$('.save').removeClass("layui-btn-disabled").attr("disabled", false);
|
||||
$('.cancel').removeClass("layui-btn-disabled").attr("disabled", false);
|
||||
errorFn(xhr, status, error)
|
||||
|
|
@ -180,7 +181,7 @@ function addFitDatas(data) {
|
|||
} else { // 第一次添加数据
|
||||
jjDataArr = JSON.parse(data);
|
||||
if (jjDataArr && jjDataArr.length > 0) {
|
||||
$('#no_data_title').css({ 'display': 'none' });
|
||||
$('#no_data_title').css({'display': 'none'});
|
||||
$('#search-info').removeAttr('style');
|
||||
$('#table-box').removeAttr('style');
|
||||
setTableData(jjDataArr);
|
||||
|
|
@ -277,10 +278,10 @@ function sel(selectStatus, that, id) {
|
|||
// 删除选中
|
||||
function delFitType() {
|
||||
if (delIdArr.length == 0) {
|
||||
layer.msg('请先选择需要删除的数据!', { icon: 7 })
|
||||
layer.msg('请先选择需要删除的数据!', {icon: 7})
|
||||
return;
|
||||
}
|
||||
let layerIndex = layer.confirm('<h5 style="color:red">确定要删除选中数据吗!</h5>', { title: '操作提示' }, function () {
|
||||
let layerIndex = layer.confirm('<h5 style="color:red">确定要删除选中数据吗!</h5>', {title: '操作提示'}, function () {
|
||||
layer.close(layerIndex);
|
||||
for (let i = 0; i < delIdArr.length; i++) {
|
||||
for (let j = 0; j < jjDataArr.length; j++) {
|
||||
|
|
@ -293,13 +294,13 @@ function delFitType() {
|
|||
}
|
||||
if (jjDataArr.length === 0) {
|
||||
$('#no_data_title').removeAttr('style');
|
||||
$('#search-info').css({ 'display': 'none' });
|
||||
$('#table-box').css({ 'display': 'none' });
|
||||
$('#search-info').css({'display': 'none'});
|
||||
$('#table-box').css({'display': 'none'});
|
||||
} else {
|
||||
// setTableData(jjDataArr);
|
||||
handleDelTableData(delIdArr);
|
||||
}
|
||||
delIdArr.splice(0,delIdArr.length);
|
||||
delIdArr.splice(0, delIdArr.length);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -356,7 +357,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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,12 +8,36 @@ 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', 'upload'], function () {
|
||||
|
||||
form = layui.form;
|
||||
table = layui.table;
|
||||
element = layui.element;
|
||||
layer = layui.layer;
|
||||
util = layui.util;
|
||||
upload = layui.upload;
|
||||
// 渲染
|
||||
upload.render({
|
||||
elem: '#file', // 绑定多个元素
|
||||
headers: {
|
||||
authorization: sessionStorage.getItem("gz-token"),
|
||||
},
|
||||
url: dataUrl + "backstage/planApplication/importExcelTools", // 此处配置你自己的上传接口即可
|
||||
accept: 'file', // 普通文件
|
||||
acceptMime: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel',
|
||||
exts: 'xlsx|xls', // 为空表示不限制文件后缀(如需限制特定类型,写如:'doc|docx|pdf|xlsx|jpg')
|
||||
done: function (res) {
|
||||
if (res.code == 200){
|
||||
$.each(res.data, function (index, value) {
|
||||
huancun.push(value.id);
|
||||
huancunObj.push(value);
|
||||
})
|
||||
$('#num').html(huancun.length);
|
||||
}
|
||||
layer.msg('上传成功');
|
||||
console.log(res);
|
||||
}
|
||||
});
|
||||
initTable();
|
||||
});
|
||||
}
|
||||
|
|
@ -25,13 +49,13 @@ function queryTable(type) {
|
|||
let flag = checkValue(pName);
|
||||
if (flag) {
|
||||
$('#pName').val('');
|
||||
return layer.msg('物机名称查询包含特殊字符,请重新输入', { icon: 2 });
|
||||
return layer.msg('物机名称查询包含特殊字符,请重新输入', {icon: 2});
|
||||
}
|
||||
let name = $('#name').val();
|
||||
let flag2 = checkValue(name);
|
||||
if (flag2) {
|
||||
$('#name').val('');
|
||||
return layer.msg('规格查询包含特殊字符,请重新输入', { icon: 2 });
|
||||
return layer.msg('规格查询包含特殊字符,请重新输入', {icon: 2});
|
||||
}
|
||||
reloadTable(1);
|
||||
} else if (type === 2) {
|
||||
|
|
@ -45,16 +69,16 @@ function queryTable(type) {
|
|||
// 重载表格
|
||||
function reloadTable(pageNum) {
|
||||
table.reload("currentTableId", {
|
||||
page: {
|
||||
curr: pageNum ? pageNum : 1,
|
||||
page: {
|
||||
curr: pageNum ? pageNum : 1,
|
||||
},
|
||||
where: {
|
||||
encryptedData: JSON.stringify({
|
||||
'pName': $('#pName').val(),
|
||||
'name': $('#name').val(),
|
||||
}),
|
||||
},
|
||||
},
|
||||
where: {
|
||||
encryptedData: JSON.stringify({
|
||||
'pName': $('#pName').val(),
|
||||
'name': $('#name').val(),
|
||||
}),
|
||||
},
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -80,7 +104,7 @@ function initTable() {
|
|||
limitName: 'pageSize'
|
||||
},
|
||||
parseData: function (res) { // res 即为原始返回的数据
|
||||
if(res.code === 401){
|
||||
if (res.code === 401) {
|
||||
closeWindowOpen();
|
||||
}
|
||||
if (jjDetailArr && res.list) {
|
||||
|
|
@ -103,7 +127,7 @@ function initTable() {
|
|||
},
|
||||
cols: [
|
||||
[
|
||||
{ type: 'checkbox', width: '5%' },
|
||||
{type: 'checkbox', width: '5%'},
|
||||
{
|
||||
width: '6%',
|
||||
title: "序号",
|
||||
|
|
@ -118,7 +142,7 @@ function initTable() {
|
|||
title: "物机类型",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
sort:true,
|
||||
sort: true,
|
||||
},
|
||||
{
|
||||
field: "pName",
|
||||
|
|
@ -126,7 +150,7 @@ function initTable() {
|
|||
title: "物机名称",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
sort:true,
|
||||
sort: true,
|
||||
},
|
||||
{
|
||||
field: "name",
|
||||
|
|
@ -134,7 +158,7 @@ function initTable() {
|
|||
title: "规格",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
sort:true,
|
||||
sort: true,
|
||||
},
|
||||
{
|
||||
field: "unit",
|
||||
|
|
@ -142,7 +166,7 @@ function initTable() {
|
|||
width: '10%',
|
||||
unresize: true,
|
||||
align: "center",
|
||||
sort:true,
|
||||
sort: true,
|
||||
},
|
||||
{
|
||||
field: "needNum",
|
||||
|
|
@ -212,14 +236,14 @@ function initTable() {
|
|||
const regex = /^(0|[1-9]\d{0,6})$/;
|
||||
if (!regex.test(value)) {
|
||||
obj.reedit();
|
||||
return layer.msg('格式不正确,最大输入6位数,且为正整数!', { icon: 7 })
|
||||
return layer.msg('格式不正确,最大输入6位数,且为正整数!', {icon: 7})
|
||||
}
|
||||
}
|
||||
} else if (field === 'remarks') { // 备注
|
||||
if (value) {
|
||||
if (value.length > 255) {
|
||||
obj.reedit();
|
||||
return layer.msg('备注最多输入255位!', { icon: 7 })
|
||||
return layer.msg('备注最多输入255位!', {icon: 7})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -298,7 +322,7 @@ function removeByValue(arr, val) {
|
|||
function saveData2(params) {
|
||||
let dataArr = [];
|
||||
if (huancun.length === 0) {
|
||||
return layer.msg('未添加数据', { icon: 7 });
|
||||
return layer.msg('未添加数据', {icon: 7});
|
||||
} else {
|
||||
$.each(huancunObj, function (index, item) {
|
||||
dataArr.push(item);
|
||||
|
|
@ -313,10 +337,11 @@ function saveData2(params) {
|
|||
}
|
||||
}
|
||||
}
|
||||
let layerIndex = layer.confirm('<h5 style="color:red">数据即将被添加,请仔细检查数据是否有错误!</h5>', { title: '操作提示' }, function () {
|
||||
let layerIndex = layer.confirm('<h5 style="color:red">数据即将被添加,请仔细检查数据是否有错误!</h5>', {title: '操作提示'}, function () {
|
||||
layer.close(layerIndex);
|
||||
closePage(1, JSON.stringify(dataArr));
|
||||
});
|
||||
|
||||
// 替换对象
|
||||
function updateOrAddObject2(id, newObject) {
|
||||
const index = dataArr.findIndex(obj => obj.id === id);
|
||||
|
|
@ -336,4 +361,8 @@ function closePage(type, params) {
|
|||
window.parent.addFitDatas(params);
|
||||
}
|
||||
parent.layer.close(index); // 再执行关闭
|
||||
}
|
||||
}
|
||||
|
||||
function toolsDownload() {
|
||||
window.location.href = '../../../template/机具类型导入模板.xlsx';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ function reloadTable(pageNum) {
|
|||
encryptedData: JSON.stringify({
|
||||
'keyWord': $('#keyWord').val(),
|
||||
'auditStatus': $('#auditStatus').val(),
|
||||
'mode': $('#mode').val(),
|
||||
}),
|
||||
},
|
||||
},
|
||||
|
|
@ -66,6 +67,7 @@ function initTable() {
|
|||
encryptedData: JSON.stringify({
|
||||
'keyWord': $('#keyWord').val(),
|
||||
'auditStatus': $('#auditStatus').val(),
|
||||
'mode': $('#mode').val(),
|
||||
}),
|
||||
},
|
||||
request: {
|
||||
|
|
|
|||
|
|
@ -12,121 +12,126 @@
|
|||
</head>
|
||||
|
||||
<body>
|
||||
<div id="main-box">
|
||||
<div id="basic-box">
|
||||
<form class="layui-form layuimini-form" onclick="return false;" lay-filter="formInfo">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label required" style="width: 100px !important;">申请工程</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="projectId" id="projectId" lay-verify="required" lay-search
|
||||
<div id="main-box">
|
||||
<div id="basic-box">
|
||||
<form class="layui-form layuimini-form" onclick="return false;" lay-filter="formInfo">
|
||||
<div class="layui-form-item">
|
||||
<input class="layui-input" id="mode" autocomplete="off" name="mode"
|
||||
lay-verify="required" readonly style="cursor: pointer;display: none">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label required" style="width: 100px !important;">申请工程</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="projectId" id="projectId" lay-verify="required" lay-search
|
||||
class="layui-select">
|
||||
</select>
|
||||
</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">
|
||||
<div class="layui-input-prefix">
|
||||
<i class="layui-icon layui-icon-date"></i>
|
||||
</div>
|
||||
<input class="layui-input" id="needTime" autocomplete="off" name="needTime"
|
||||
lay-verify="required" readonly style="cursor: pointer;">
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<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="projectPart" id="projectPart" 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 class="layui-inline">
|
||||
<label class="layui-form-label required" style="width: 110px !important;">需用日期</label>
|
||||
<div class="layui-input-inline layui-input-wrap">
|
||||
<div class="layui-input-prefix">
|
||||
<i class="layui-icon layui-icon-date"></i>
|
||||
</div>
|
||||
<input class="layui-input" id="needTime" autocomplete="off" name="needTime"
|
||||
lay-verify="required" readonly style="cursor: pointer;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label required" style="width: 100px !important;">计划说明</label>
|
||||
<div class="layui-input-inline" style="width: 764px;">
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<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="projectPart" id="projectPart" 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>
|
||||
<div class="layui-input-inline" style="width: 764px;">
|
||||
<textarea placeholder="请输入计划说明" lay-verify="required" id="remark" name="remark"
|
||||
class="layui-textarea" maxLength="250" lay-affix="clear"></textarea>
|
||||
</div>
|
||||
class="layui-textarea" maxLength="250" lay-affix="clear"></textarea>
|
||||
</div>
|
||||
<button type="submit" id="formSubmit" class="layui-btn" lay-submit="" lay-filter="formData"
|
||||
</div>
|
||||
<button type="submit" id="formSubmit" class="layui-btn" lay-submit="" lay-filter="formData"
|
||||
style="display: none;"></button>
|
||||
</form>
|
||||
<div class="title layout">
|
||||
<span style="font-weight:700;text-decoration:none;color:#409EFF;">▋</span>
|
||||
<p>机具明细</p>
|
||||
</div>
|
||||
<!-- 无数据时-展示 -->
|
||||
<div id="no_data_title" class="layout">
|
||||
<img src="../../../images/no_data_icon.png" alt="无数据">
|
||||
<p style="font-size: 16px;font-weight: bold;">您还没选择需用机具类型</p>
|
||||
<p style="color: #999999;">请先添加机具类型后再执申请操作</p>
|
||||
<button class="layui-btn layui-bg-blue" onclick="chooseFitType()">选择机具类型</button>
|
||||
</div>
|
||||
<fieldset class="table-search-fieldset" id="search-info" style="display: none;">
|
||||
<legend>搜索信息</legend>
|
||||
<div style="margin: 10px 10px 10px 10px">
|
||||
<form class="layui-form layui-form-pane" action="#" onsubmit="return false;">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline" style="width: 200px;">
|
||||
<input type="text" name="pName" id="pName" autocomplete="off" class="layui-input"
|
||||
lay-affix="clear" placeholder="输入物机名称" maxlength="30">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline" style="width: 200px;">
|
||||
<input type="text" name="name" id="name" autocomplete="off" class="layui-input"
|
||||
lay-affix="clear" placeholder="输入规格" maxlength="30">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<button class="layui-btn layui-bg-blue" onclick="search()"><i class="layui-icon"></i> 搜
|
||||
索</button>
|
||||
<button class="layui-btn layui-btn-primary" onclick="resetSearch()"><i
|
||||
class="layui-icon layui-icon-refresh"></i> 重 置</button>
|
||||
<!-- <button class="layui-btn layui-bg-blue" onclick="chooseFitType()">选择机具</button> -->
|
||||
<!-- <button class="layui-btn layui-bg-red" onclick="delFitType()">删除选中</button> -->
|
||||
</form>
|
||||
<div class="title layout">
|
||||
<span style="font-weight:700;text-decoration:none;color:#409EFF;">▋</span>
|
||||
<p>机具明细</p>
|
||||
</div>
|
||||
<!-- 无数据时-展示 -->
|
||||
<div id="no_data_title" class="layout">
|
||||
<img src="../../../images/no_data_icon.png" alt="无数据">
|
||||
<p style="font-size: 16px;font-weight: bold;">您还没选择需用机具类型</p>
|
||||
<p style="color: #999999;">请先添加机具类型后再执申请操作</p>
|
||||
<button class="layui-btn layui-bg-blue" onclick="chooseFitType()">选择机具类型</button>
|
||||
</div>
|
||||
<fieldset class="table-search-fieldset" id="search-info" style="display: none;">
|
||||
<legend>搜索信息</legend>
|
||||
<div style="margin: 10px 10px 10px 10px">
|
||||
<form class="layui-form layui-form-pane" action="#" onsubmit="return false;">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline" style="width: 200px;">
|
||||
<input type="text" name="pName" id="pName" autocomplete="off" class="layui-input"
|
||||
lay-affix="clear" placeholder="输入物机名称" maxlength="30">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="table-box" table-responsive style="display: none;" id="table-box">
|
||||
<table id="baseTable" class="classTable table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 5%" class="center">
|
||||
<input id="allCheck" onclick="selectAll(this.checked)" type="checkbox">
|
||||
</th>
|
||||
<th style="width: 5%" class="center">序号</th>
|
||||
<th style="width: 10%" class="center">物机类型</th>
|
||||
<th style="width: 15%" class="center">物机名称</th>
|
||||
<th style="width: 10%" class="center">规格</th>
|
||||
<th style="width: 10%" class="center">单位</th>
|
||||
<th style="width: 12%" class="center"><span style="color: red;">*</span>需用量</th>
|
||||
<th style="width: 18%" class="center"><span style="color: red;">*</span>预计使用时间</th>
|
||||
<th style="width: 15%" class="center">备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline" style="width: 200px;">
|
||||
<input type="text" name="name" id="name" autocomplete="off" class="layui-input"
|
||||
lay-affix="clear" placeholder="输入规格" maxlength="30">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<button class="layui-btn layui-bg-blue" onclick="search()"><i class="layui-icon"></i> 搜
|
||||
索
|
||||
</button>
|
||||
<button class="layui-btn layui-btn-primary" onclick="resetSearch()"><i
|
||||
class="layui-icon layui-icon-refresh"></i> 重 置
|
||||
</button>
|
||||
<button class="layui-btn layui-bg-blue" onclick="chooseFitType()">选择机具</button>
|
||||
<button class="layui-btn layui-bg-red" onclick="delFitType()">删除选中</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-box">
|
||||
<button class="layui-btn layui-bg-blue save" onclick="saveData2()">提交申请</button>
|
||||
<button class="layui-btn layui-btn-primary cancel" onclick="closePage()">返回</button>
|
||||
</fieldset>
|
||||
<div class="table-box" table-responsive style="display: none;" id="table-box">
|
||||
<table id="baseTable" class="classTable table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 5%" class="center">
|
||||
<input id="allCheck" onclick="selectAll(this.checked)" type="checkbox">
|
||||
</th>
|
||||
<th style="width: 5%" class="center">序号</th>
|
||||
<th style="width: 10%" class="center">物机类型</th>
|
||||
<th style="width: 15%" class="center">物机名称</th>
|
||||
<th style="width: 10%" class="center">规格</th>
|
||||
<th style="width: 10%" class="center">单位</th>
|
||||
<th style="width: 12%" class="center"><span style="color: red;">*</span>需用量</th>
|
||||
<th style="width: 18%" class="center"><span style="color: red;">*</span>预计使用时间</th>
|
||||
<th style="width: 15%" class="center">备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-box">
|
||||
<button class="layui-btn layui-bg-blue save" onclick="saveData2('0')">保存草稿</button>
|
||||
<button class="layui-btn layui-bg-blue save" onclick="saveData2('1')">提交申请</button>
|
||||
<button class="layui-btn layui-btn-primary cancel" onclick="closePage()">返回</button>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="../../../lib/jquery-3.4.1/jquery-3.7.1.min.js" charset="utf-8"></script>
|
||||
<script src="../../../js/public.js" charset="utf-8"></script>
|
||||
|
|
|
|||
|
|
@ -12,120 +12,125 @@
|
|||
</head>
|
||||
|
||||
<body>
|
||||
<div id="main-box">
|
||||
<div id="basic-box">
|
||||
<form class="layui-form layuimini-form" onclick="return false;">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label required" style="width: 100px !important;">申请工程</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="projectId" id="projectId" lay-verify="required" lay-search
|
||||
<div id="main-box">
|
||||
<div id="basic-box">
|
||||
<form class="layui-form layuimini-form" onclick="return false;">
|
||||
<div class="layui-form-item">
|
||||
<input class="layui-input" id="mode" autocomplete="off" name="mode"
|
||||
lay-verify="required" readonly style="cursor: pointer;display: none">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label required" style="width: 100px !important;">申请工程</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="projectId" id="projectId" lay-verify="required" lay-search
|
||||
class="layui-select">
|
||||
</select>
|
||||
</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">
|
||||
<div class="layui-input-prefix">
|
||||
<i class="layui-icon layui-icon-date"></i>
|
||||
</div>
|
||||
<input class="layui-input" id="needTime" autocomplete="off" name="needTime"
|
||||
lay-verify="required" readonly style="cursor: pointer;">
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<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="projectPart" id="projectPart" autocomplete="off"
|
||||
lay-verify="required" maxlength="50" lay-affix="clear">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label required" style="width: 110px !important;">需用日期</label>
|
||||
<div class="layui-input-inline layui-input-wrap">
|
||||
<div class="layui-input-prefix">
|
||||
<i class="layui-icon layui-icon-date"></i>
|
||||
</div>
|
||||
<input class="layui-input" id="needTime" autocomplete="off" name="needTime"
|
||||
lay-verify="required" readonly style="cursor: pointer;">
|
||||
</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" maxlength="50" lay-affix="clear">-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label required" style="width: 100px !important;">计划说明</label>
|
||||
<div class="layui-input-inline" style="width: 764px;">
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<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="projectPart" id="projectPart" 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" maxlength="50" lay-affix="clear">-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label required" style="width: 100px !important;">计划说明</label>
|
||||
<div class="layui-input-inline" style="width: 764px;">
|
||||
<textarea placeholder="请输入计划说明" lay-verify="required" id="remark" name="remark"
|
||||
class="layui-textarea" maxLength="250" lay-affix="clear"></textarea>
|
||||
</div>
|
||||
class="layui-textarea" maxLength="250" lay-affix="clear"></textarea>
|
||||
</div>
|
||||
<button type="submit" id="formSubmit" class="layui-btn" lay-submit="" lay-filter="formData"
|
||||
</div>
|
||||
<button type="submit" id="formSubmit" class="layui-btn" lay-submit="" lay-filter="formData"
|
||||
style="display: none;"></button>
|
||||
</form>
|
||||
<div class="title layout">
|
||||
<span style="font-weight:700;text-decoration:none;color:#409EFF;">▋</span>
|
||||
<p>机具明细</p>
|
||||
</div>
|
||||
<!-- 无数据时-展示 -->
|
||||
<div id="no_data_title" class="layout">
|
||||
<img src="../../../images/no_data_icon.png" alt="无数据">
|
||||
<p style="font-size: 16px;font-weight: bold;">您还没选择需用机具类型</p>
|
||||
<p style="color: #999999;">请先添加机具类型后再执申请操作</p>
|
||||
<button class="layui-btn layui-bg-blue" onclick="chooseFitType()">选择机具类型</button>
|
||||
</div>
|
||||
<fieldset class="table-search-fieldset" id="search-info" style="display: none;">
|
||||
<legend>搜索信息</legend>
|
||||
<div style="margin: 10px 10px 10px 10px">
|
||||
<form class="layui-form layui-form-pane" action="#" onsubmit="return false;">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline" style="width: 200px;">
|
||||
<input type="text" name="pName" id="pName" autocomplete="off" class="layui-input"
|
||||
lay-affix="clear" placeholder="输入物机名称" maxlength="30">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline" style="width: 200px;">
|
||||
<input type="text" name="name" id="name" autocomplete="off" class="layui-input"
|
||||
lay-affix="clear" placeholder="输入规格" maxlength="30">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<button class="layui-btn layui-bg-blue" onclick="search()"><i class="layui-icon"></i> 搜
|
||||
索</button>
|
||||
<button class="layui-btn layui-btn-primary" onclick="resetSearch()"><i
|
||||
class="layui-icon layui-icon-refresh"></i> 重 置</button>
|
||||
<button class="layui-btn layui-bg-blue" onclick="chooseFitType()">选择机具</button>
|
||||
<button class="layui-btn layui-bg-red" onclick="delFitType()">删除选中</button>
|
||||
</form>
|
||||
<div class="title layout">
|
||||
<span style="font-weight:700;text-decoration:none;color:#409EFF;">▋</span>
|
||||
<p>机具明细</p>
|
||||
</div>
|
||||
<!-- 无数据时-展示 -->
|
||||
<div id="no_data_title" class="layout">
|
||||
<img src="../../../images/no_data_icon.png" alt="无数据">
|
||||
<p style="font-size: 16px;font-weight: bold;">您还没选择需用机具类型</p>
|
||||
<p style="color: #999999;">请先添加机具类型后再执申请操作</p>
|
||||
<button class="layui-btn layui-bg-blue" onclick="chooseFitType()">选择机具类型</button>
|
||||
</div>
|
||||
<fieldset class="table-search-fieldset" id="search-info" style="display: none;">
|
||||
<legend>搜索信息</legend>
|
||||
<div style="margin: 10px 10px 10px 10px">
|
||||
<form class="layui-form layui-form-pane" action="#" onsubmit="return false;">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline" style="width: 200px;">
|
||||
<input type="text" name="pName" id="pName" autocomplete="off" class="layui-input"
|
||||
lay-affix="clear" placeholder="输入物机名称" maxlength="30">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="table-box" table-responsive style="display: none;" id="table-box">
|
||||
<table id="baseTable" class="classTable table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 5%" class="center">
|
||||
<input id="allCheck" onclick="selectAll(this.checked)" type="checkbox">
|
||||
</th>
|
||||
<th style="width: 5%" class="center">序号</th>
|
||||
<th style="width: 10%" class="center">物机类型</th>
|
||||
<th style="width: 15%" class="center">物机名称</th>
|
||||
<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"><span style="color: red;">*</span>预计使用时间</th>
|
||||
<th style="width: 15%" class="center">备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline" style="width: 200px;">
|
||||
<input type="text" name="name" id="name" autocomplete="off" class="layui-input"
|
||||
lay-affix="clear" placeholder="输入规格" maxlength="30">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<button class="layui-btn layui-bg-blue" onclick="search()"><i class="layui-icon"></i> 搜
|
||||
索
|
||||
</button>
|
||||
<button class="layui-btn layui-btn-primary" onclick="resetSearch()"><i
|
||||
class="layui-icon layui-icon-refresh"></i> 重 置
|
||||
</button>
|
||||
<button class="layui-btn layui-bg-blue" onclick="chooseFitType()">选择机具</button>
|
||||
<button class="layui-btn layui-bg-red" onclick="delFitType()">删除选中</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-box">
|
||||
<button class="layui-btn layui-bg-blue save" onclick="saveData2()">提交申请</button>
|
||||
<button class="layui-btn layui-btn-primary cancel" onclick="closePage()">返回</button>
|
||||
</fieldset>
|
||||
<div class="table-box" table-responsive style="display: none;" id="table-box">
|
||||
<table id="baseTable" class="classTable table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 5%" class="center">
|
||||
<input id="allCheck" onclick="selectAll(this.checked)" type="checkbox">
|
||||
</th>
|
||||
<th style="width: 5%" class="center">序号</th>
|
||||
<th style="width: 10%" class="center">物机类型</th>
|
||||
<th style="width: 15%" class="center">物机名称</th>
|
||||
<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"><span style="color: red;">*</span>预计使用时间</th>
|
||||
<th style="width: 15%" class="center">备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-box">
|
||||
<button class="layui-btn layui-bg-blue save" onclick="saveData2('0')">保存草稿</button>
|
||||
<button class="layui-btn layui-bg-blue save" onclick="saveData2('1')">提交申请</button>
|
||||
<button class="layui-btn layui-btn-primary cancel" onclick="closePage()">返回</button>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="../../../lib/jquery-3.4.1/jquery-3.7.1.min.js" charset="utf-8"></script>
|
||||
<script src="../../../js/public.js" charset="utf-8"></script>
|
||||
|
|
|
|||
|
|
@ -34,47 +34,56 @@
|
|||
</style>
|
||||
|
||||
<body>
|
||||
<div class="layuimini-container">
|
||||
<div class="layuimini-main">
|
||||
<fieldset class="table-search-fieldset">
|
||||
<legend>搜索信息</legend>
|
||||
<div style="margin: 10px 10px 10px 10px">
|
||||
<form class="layui-form layui-form-pane" action="#" onsubmit="return false;">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline" style="width: 250px;">
|
||||
<input type="text" name="pName" id="pName" autocomplete="off"
|
||||
class="layui-input" lay-affix="clear" placeholder="输入物机名称" maxlength="30">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline" style="width: 250px;">
|
||||
<input type="text" name="name" id="name" autocomplete="off"
|
||||
class="layui-input" lay-affix="clear" placeholder="输入规格" maxlength="30">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<button class="layui-btn layui-bg-blue" onclick="queryTable(1)"><i
|
||||
class="layui-icon"></i> 搜 索</button>
|
||||
<button class="layui-btn layui-btn-primary" onclick="queryTable(2)"><i
|
||||
class="layui-icon layui-icon-refresh"></i> 重 置</button>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<p style="color: red;font-weight: bold;">已选:<span id="num">0</span></p>
|
||||
<div class="layuimini-container">
|
||||
<div class="layuimini-main">
|
||||
<fieldset class="table-search-fieldset">
|
||||
<legend>搜索信息</legend>
|
||||
<div style="margin: 10px 10px 10px 10px">
|
||||
<form class="layui-form layui-form-pane" action="#" onsubmit="return false;">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline" style="width: 250px;">
|
||||
<input type="text" name="pName" id="pName" autocomplete="off"
|
||||
class="layui-input" lay-affix="clear" placeholder="输入物机名称" maxlength="30">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="table-box" table-responsive style="z-index: 1;">
|
||||
<table class="layui-hide" id="currentTableId" lay-filter="currentTableId2"></table>
|
||||
</div>
|
||||
<div class="btn-box">
|
||||
<button class="layui-btn layui-bg-blue save" onclick="saveData2()">确定</button>
|
||||
<button class="layui-btn layui-btn-primary cancel" onclick="closePage()">取消</button>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline" style="width: 250px;">
|
||||
<input type="text" name="name" id="name" autocomplete="off"
|
||||
class="layui-input" lay-affix="clear" placeholder="输入规格" maxlength="30">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<button class="layui-btn layui-bg-blue" onclick="queryTable(1)"><i
|
||||
class="layui-icon"></i> 搜 索
|
||||
</button>
|
||||
<button class="layui-btn layui-btn-primary" onclick="queryTable(2)"><i
|
||||
class="layui-icon layui-icon-refresh"></i> 重 置
|
||||
</button>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<p style="color: red;font-weight: bold;">已选:<span id="num">0</span></p>
|
||||
</div>
|
||||
<div class="layui-inline" style="float: right">
|
||||
<button class="layui-btn layui-bg-blue" onclick="toolsDownload()">模版下载</button>
|
||||
<button type="button" id="file" class="layui-btn layui-bg-blue" lay-options="{accept: 'file'}">
|
||||
<i class="layui-icon layui-icon-upload"></i>
|
||||
上传文件
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="table-box" table-responsive style="z-index: 1;">
|
||||
<table class="layui-hide" id="currentTableId" lay-filter="currentTableId2"></table>
|
||||
</div>
|
||||
<div class="btn-box">
|
||||
<button class="layui-btn layui-bg-blue save" onclick="saveData2()">确定</button>
|
||||
<button class="layui-btn layui-btn-primary cancel" onclick="closePage()">取消</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="../../../lib/jquery-3.4.1/jquery-3.7.1.min.js" charset="utf-8"></script>
|
||||
<script src="../../../js/public.js" charset="utf-8"></script>
|
||||
|
|
|
|||
|
|
@ -49,6 +49,8 @@
|
|||
<div style="margin: 10px 10px 10px 10px">
|
||||
<form class="layui-form layui-form-pane" action="#" onsubmit="return false;">
|
||||
<input type="text" value="1" id="auditStatus" name="auditStatus" hidden>
|
||||
<input type="text" value="1" id="mode" name="mode" hidden>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline" style="width: 300px;">
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue