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