提交 12f9884e 编写于 作者: Skyeye云's avatar Skyeye云

行政获取用品类别列表整改

上级 c9fae78a
...@@ -5,7 +5,6 @@ var userReturnList = new Array();//选择用户返回的集合或者进行回显 ...@@ -5,7 +5,6 @@ var userReturnList = new Array();//选择用户返回的集合或者进行回显
var chooseOrNotMy = "1";//人员列表中是否包含自己--1.包含;其他参数不包含 var chooseOrNotMy = "1";//人员列表中是否包含自己--1.包含;其他参数不包含
var chooseOrNotEmail = "2";//人员列表中是否必须绑定邮箱--1.必须;其他参数没必要 var chooseOrNotEmail = "2";//人员列表中是否必须绑定邮箱--1.必须;其他参数没必要
var checkType = "2";//人员选择类型,1.多选;其他。单选 var checkType = "2";//人员选择类型,1.多选;其他。单选
var typeId = "";//用品类别Id
// 用品信息 // 用品信息
layui.config({ layui.config({
...@@ -19,37 +18,20 @@ layui.config({ ...@@ -19,37 +18,20 @@ layui.config({
var index = parent.layer.getFrameIndex(window.name); var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$; var $ = layui.$;
initTypeId(); // 获取已经上线的用品类别列表
// 初始化用品类别 adminAssistantUtil.queryAssetArticlesTypeUpStateList(function (data){
function initTypeId(){ $("#typeId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option.tpl'), data));
showGrid({ form.render('select');
id: "typeId", });
url: flowableBasePath + "assetarticles010",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendAfter: function(json){
form.render('select');
}
})
}
// 用品类别的监听事件
form.on('select(typeId)', function(data){
typeId = data.value;
})
skyeyeEnclosure.init('enclosureUpload'); skyeyeEnclosure.init('enclosureUpload');
matchingLanguage(); matchingLanguage();
form.render(); form.render();
form.on('submit(formAddBean)', function (data) { form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
if(isNull(typeId)){
winui.window.msg('请选择用品类别', {icon: 2,time: 2000});
return false;
}
var params = { var params = {
articlesName: $("#articlesName").val(), articlesName: $("#articlesName").val(),
typeId: typeId, typeId: $("#typeId").val(),
specifications: $("#specifications").val(), specifications: $("#specifications").val(),
unitOfMeasurement: $("#unitOfMeasurement").val(), unitOfMeasurement: $("#unitOfMeasurement").val(),
initialNum: $("#initialNum").val(), initialNum: $("#initialNum").val(),
......
...@@ -5,7 +5,6 @@ var userReturnList = new Array();//选择用户返回的集合或者进行回显 ...@@ -5,7 +5,6 @@ var userReturnList = new Array();//选择用户返回的集合或者进行回显
var chooseOrNotMy = "1";//人员列表中是否包含自己--1.包含;其他参数不包含 var chooseOrNotMy = "1";//人员列表中是否包含自己--1.包含;其他参数不包含
var chooseOrNotEmail = "2";//人员列表中是否必须绑定邮箱--1.必须;其他参数没必要 var chooseOrNotEmail = "2";//人员列表中是否必须绑定邮箱--1.必须;其他参数没必要
var checkType = "2";//人员选择类型,1.多选;其他。单选 var checkType = "2";//人员选择类型,1.多选;其他。单选
var typeId = "";//用品类别Id
// 用品信息 // 用品信息
layui.config({ layui.config({
...@@ -19,25 +18,6 @@ layui.config({ ...@@ -19,25 +18,6 @@ layui.config({
var index = parent.layer.getFrameIndex(window.name); var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$; var $ = layui.$;
//初始化用品类别
function initTypeId(id){
showGrid({
id: "typeId",
url: flowableBasePath + "assetarticles010",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendAfter: function(json){
$("#typeId").val(id);
form.render('select');
}
})
}
//用品类别的监听事件
form.on('select(typeId)', function(data){
typeId = data.value;
})
showGrid({ showGrid({
id: "showForm", id: "showForm",
url: flowableBasePath + "assetarticles015", url: flowableBasePath + "assetarticles015",
...@@ -53,9 +33,13 @@ layui.config({ ...@@ -53,9 +33,13 @@ layui.config({
} }
}); });
}, },
ajaxSendAfter:function(json){ ajaxSendAfter:function(json) {
typeId = json.bean.typeId; // 获取已经上线的用品类别列表
initTypeId(json.bean.typeId); adminAssistantUtil.queryAssetArticlesTypeUpStateList(function (data){
$("#typeId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option.tpl'), data));
$("#typeId").val(json.bean.typeId);
form.render('select');
});
var userNames = []; var userNames = [];
userList = [].concat(json.bean.assetAdmin); userList = [].concat(json.bean.assetAdmin);
$.each(json.bean.assetAdmin, function(i, item){ $.each(json.bean.assetAdmin, function(i, item){
...@@ -89,7 +73,7 @@ layui.config({ ...@@ -89,7 +73,7 @@ layui.config({
var params = { var params = {
rowId: parent.rowId, rowId: parent.rowId,
articlesName: $("#articlesName").val(), articlesName: $("#articlesName").val(),
typeId: typeId, typeId: $("#typeId").val(),
specifications: $("#specifications").val(), specifications: $("#specifications").val(),
unitOfMeasurement: $("#unitOfMeasurement").val(), unitOfMeasurement: $("#unitOfMeasurement").val(),
initialNum: $("#initialNum").val(), initialNum: $("#initialNum").val(),
......
...@@ -11,22 +11,13 @@ layui.config({ ...@@ -11,22 +11,13 @@ layui.config({
form = layui.form, form = layui.form,
table = layui.table; table = layui.table;
initTypeId(); // 获取已经上线的用品类别列表
// 初始化用品类别 adminAssistantUtil.queryAssetArticlesTypeUpStateList(function (data){
function initTypeId(){ $("#typeId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option.tpl'), data));
showGrid({ form.render('select');
id: "typeId", });
url: flowableBasePath + "assetarticles010",
params: {}, showliebiaoList();
pagination: false,
template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendAfter: function(json){
form.render('select');
showliebiaoList();
}
})
}
// 展示用品列表 // 展示用品列表
function showliebiaoList(){ function showliebiaoList(){
table.render({ table.render({
......
...@@ -25,64 +25,60 @@ layui.config({ ...@@ -25,64 +25,60 @@ layui.config({
//初始化用品类别 //初始化用品类别
function initTypeHtml() { function initTypeHtml() {
AjaxPostUtil.request({url: flowableBasePath + "assetarticles010", params: {}, type: 'json', callback: function(json) { // 获取已经上线的用品类别列表
if(json.returnCode == 0) { adminAssistantUtil.queryAssetArticlesTypeUpStateList(function (data){
typeHtml = getDataUseHandlebars(selOption, json); //加载类别数据 typeHtml = getDataUseHandlebars(selOption, data);
//渲染 });
form.render(); form.render();
//类型加载变化事件 //类型加载变化事件
form.on('select(selectTypeProperty)', function(data) { form.on('select(selectTypeProperty)', function(data) {
var thisRowNum = data.elem.id.replace("typeId", ""); var thisRowNum = data.elem.id.replace("typeId", "");
var thisRowValue = data.value; var thisRowValue = data.value;
if(!isNull(thisRowValue) && thisRowValue != '请选择') { if(!isNull(thisRowValue) && thisRowValue != '请选择') {
if(inPointArray(thisRowValue, assetArticles)) { if(inPointArray(thisRowValue, assetArticles)) {
//类型对应的用品存在js对象中 //类型对应的用品存在js对象中
var list = getListPointArray(thisRowValue, assetArticles); var list = getListPointArray(thisRowValue, assetArticles);
resetAssetList(thisRowNum, list); //重置选择行的用品列表 resetAssetList(thisRowNum, list); //重置选择行的用品列表
} else {
//类型对应的用品不存在js对象中
AjaxPostUtil.request({url: flowableBasePath + "assetarticles018", params: {typeId: thisRowValue}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
assetArticles.push({
id: thisRowValue,
list: json.rows
});
resetAssetList(thisRowNum, json.rows); //重置选择行的用品列表
} else { } else {
//类型对应的用品不存在js对象中 winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
AjaxPostUtil.request({url: flowableBasePath + "assetarticles018", params: {typeId: thisRowValue}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
assetArticles.push({
id: thisRowValue,
list: json.rows
});
resetAssetList(thisRowNum, json.rows); //重置选择行的用品列表
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
} }
} }});
}); }
}
});
//商品加载变化事件 //商品加载变化事件
form.on('select(selectAssetarProperty)', function(data) { form.on('select(selectAssetarProperty)', function(data) {
var thisRowNum = data.elem.id.replace("assetarId", ""); var thisRowNum = data.elem.id.replace("assetarId", "");
var thisRowValue = data.value; var thisRowValue = data.value;
var thisRowTypeChooseId = $("#typeId" + thisRowNum).val(); var thisRowTypeChooseId = $("#typeId" + thisRowNum).val();
if(!isNull(thisRowValue) && thisRowValue != '请选择') { if(!isNull(thisRowValue) && thisRowValue != '请选择') {
var list = getListPointArray(thisRowTypeChooseId, assetArticles); var list = getListPointArray(thisRowTypeChooseId, assetArticles);
$.each(list, function(i, item) { $.each(list, function(i, item) {
if(item.id === thisRowValue) { if(item.id === thisRowValue) {
$("#specificationsName" + thisRowNum).html(item.specificationsName); $("#specificationsName" + thisRowNum).html(item.specificationsName);
$("#residualNum" + thisRowNum).html(item.residualNum); $("#residualNum" + thisRowNum).html(item.residualNum);
return false; return false;
}
});
} else {
$("#specificationsName" + thisRowNum).html(""); //重置规格为空
$("#residualNum" + thisRowNum).html(""); //重置库存为空
} }
}); });
matchingLanguage();
//初始化一行数据
addRow();
} else { } else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); $("#specificationsName" + thisRowNum).html(""); //重置规格为空
$("#residualNum" + thisRowNum).html(""); //重置库存为空
} }
}}); });
matchingLanguage();
//初始化一行数据
addRow();
} }
skyeyeEnclosure.init('enclosureUpload'); skyeyeEnclosure.init('enclosureUpload');
......
...@@ -43,63 +43,58 @@ layui.config({ ...@@ -43,63 +43,58 @@ layui.config({
//初始化用品类别 //初始化用品类别
function initTypeHtml() { function initTypeHtml() {
AjaxPostUtil.request({url: flowableBasePath + "assetarticles010", params: {}, type: 'json', callback: function(json) { // 获取已经上线的用品类别列表
if(json.returnCode == 0) { adminAssistantUtil.queryAssetArticlesTypeUpStateList(function (data){
typeHtml = getDataUseHandlebars(selOption, json); //加载类别数据 typeHtml = getDataUseHandlebars(selOption, data);
//渲染 });
form.render(); form.render();
//类型加载变化事件 //类型加载变化事件
form.on('select(selectTypeProperty)', function(data) { form.on('select(selectTypeProperty)', function(data) {
var thisRowNum = data.elem.id.replace("typeId", ""); var thisRowNum = data.elem.id.replace("typeId", "");
var thisRowValue = data.value; var thisRowValue = data.value;
if(!isNull(thisRowValue) && thisRowValue != '请选择') { if(!isNull(thisRowValue) && thisRowValue != '请选择') {
if(inPointArray(thisRowValue, assetArticles)) { if(inPointArray(thisRowValue, assetArticles)) {
//类型对应的用品存在js对象中 //类型对应的用品存在js对象中
var list = getListPointArray(thisRowValue, assetArticles); var list = getListPointArray(thisRowValue, assetArticles);
resetAssetList(thisRowNum, list); //重置选择行的用品列表 resetAssetList(thisRowNum, list); //重置选择行的用品列表
} else {
//类型对应的用品不存在js对象中
AjaxPostUtil.request({url: flowableBasePath + "assetarticles018", params: {typeId: thisRowValue}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
assetArticles.push({
id: thisRowValue,
list: json.rows
});
resetAssetList(thisRowNum, json.rows); //重置选择行的用品列表
} else { } else {
//类型对应的用品不存在js对象中 winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
AjaxPostUtil.request({url: flowableBasePath + "assetarticles018", params: {typeId: thisRowValue}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
assetArticles.push({
id: thisRowValue,
list: json.rows
});
resetAssetList(thisRowNum, json.rows); //重置选择行的用品列表
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
} }
} }});
}); }
}
});
//商品加载变化事件 //商品加载变化事件
form.on('select(selectAssetarProperty)', function(data) { form.on('select(selectAssetarProperty)', function(data) {
var thisRowNum = data.elem.id.replace("assetarId", ""); var thisRowNum = data.elem.id.replace("assetarId", "");
var thisRowValue = data.value; var thisRowValue = data.value;
var thisRowTypeChooseId = $("#typeId" + thisRowNum).val(); var thisRowTypeChooseId = $("#typeId" + thisRowNum).val();
if(!isNull(thisRowValue) && thisRowValue != '请选择') { if(!isNull(thisRowValue) && thisRowValue != '请选择') {
var list = getListPointArray(thisRowTypeChooseId, assetArticles); var list = getListPointArray(thisRowTypeChooseId, assetArticles);
$.each(list, function(i, item) { $.each(list, function(i, item) {
if(item.id === thisRowValue) { if(item.id === thisRowValue) {
$("#specificationsName" + thisRowNum).html(item.specificationsName); $("#specificationsName" + thisRowNum).html(item.specificationsName);
$("#residualNum" + thisRowNum).html(item.residualNum); $("#residualNum" + thisRowNum).html(item.residualNum);
return false; return false;
}
});
} else {
$("#specificationsName" + thisRowNum).html(""); //重置规格为空
$("#residualNum" + thisRowNum).html(""); //重置库存为空
} }
}); });
//加载表格数据
initTableAssetList(json.goods);
} else { } else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); $("#specificationsName" + thisRowNum).html(""); //重置规格为空
$("#residualNum" + thisRowNum).html(""); //重置库存为空
} }
}}); });
//加载表格数据
initTableAssetList();
} }
//加载表格数据 //加载表格数据
......
...@@ -28,63 +28,60 @@ layui.config({ ...@@ -28,63 +28,60 @@ layui.config({
// 初始化用品类别 // 初始化用品类别
function initTypeHtml() { function initTypeHtml() {
AjaxPostUtil.request({url: flowableBasePath + "assetarticles010", params: {}, type: 'json', callback: function(json) { // 获取已经上线的用品类别列表
if(json.returnCode == 0) { adminAssistantUtil.queryAssetArticlesTypeUpStateList(function (data){
typeHtml = getDataUseHandlebars(selOption, json); //加载类别数据 typeHtml = getDataUseHandlebars(selOption, data);
matchingLanguage(); });
//渲染 matchingLanguage();
form.render(); //渲染
//类型加载变化事件 form.render();
form.on('select(selectTypeProperty)', function(data) { //类型加载变化事件
var thisRowNum = data.elem.id.replace("typeId", ""); form.on('select(selectTypeProperty)', function(data) {
var thisRowValue = data.value; var thisRowNum = data.elem.id.replace("typeId", "");
if(!isNull(thisRowValue) && thisRowValue != '请选择') { var thisRowValue = data.value;
if(inPointArray(thisRowValue, assetArticles)) { if(!isNull(thisRowValue) && thisRowValue != '请选择') {
//类型对应的用品存在js对象中 if(inPointArray(thisRowValue, assetArticles)) {
var list = getListPointArray(thisRowValue, assetArticles); //类型对应的用品存在js对象中
resetAssetList(thisRowNum, list); //重置选择行的用品列表 var list = getListPointArray(thisRowValue, assetArticles);
resetAssetList(thisRowNum, list); //重置选择行的用品列表
} else {
//类型对应的用品不存在js对象中
AjaxPostUtil.request({url: flowableBasePath + "assetarticles018", params: {typeId: thisRowValue}, type: 'json', method: "POST", callback: function(json) {
if(json.returnCode == 0) {
assetArticles.push({
id: thisRowValue,
list: json.rows
});
resetAssetList(thisRowNum, json.rows); //重置选择行的用品列表
} else { } else {
//类型对应的用品不存在js对象中 winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
AjaxPostUtil.request({url: flowableBasePath + "assetarticles018", params: {typeId: thisRowValue}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
assetArticles.push({
id: thisRowValue,
list: json.rows
});
resetAssetList(thisRowNum, json.rows); //重置选择行的用品列表
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
} }
} }});
}); }
}
});
//商品加载变化事件 //商品加载变化事件
form.on('select(selectAssetarProperty)', function(data) { form.on('select(selectAssetarProperty)', function(data) {
var thisRowNum = data.elem.id.replace("assetarId", ""); var thisRowNum = data.elem.id.replace("assetarId", "");
var thisRowValue = data.value; var thisRowValue = data.value;
var thisRowTypeChooseId = $("#typeId" + thisRowNum).val(); var thisRowTypeChooseId = $("#typeId" + thisRowNum).val();
if(!isNull(thisRowValue) && thisRowValue != '请选择') { if(!isNull(thisRowValue) && thisRowValue != '请选择') {
var list = getListPointArray(thisRowTypeChooseId, assetArticles); var list = getListPointArray(thisRowTypeChooseId, assetArticles);
$.each(list, function(i, item) { $.each(list, function(i, item) {
if(item.id === thisRowValue) { if(item.id === thisRowValue) {
$("#specificationsName" + thisRowNum).html(item.specificationsName); $("#specificationsName" + thisRowNum).html(item.specificationsName);
$("#residualNum" + thisRowNum).html(item.residualNum); $("#residualNum" + thisRowNum).html(item.residualNum);
return false; return false;
}
});
} else {
$("#specificationsName" + thisRowNum).html(""); //重置规格为空
$("#residualNum" + thisRowNum).html(""); //重置库存为空
} }
}); });
//初始化一行数据
addRow();
} else { } else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); $("#specificationsName" + thisRowNum).html(""); //重置规格为空
$("#residualNum" + thisRowNum).html(""); //重置库存为空
} }
}}); });
// 初始化一行数据
addRow();
} }
// 保存为草稿 // 保存为草稿
...@@ -156,7 +153,7 @@ layui.config({ ...@@ -156,7 +153,7 @@ layui.config({
subType: subType, // 表单类型 1.保存草稿 2.提交审批 subType: subType, // 表单类型 1.保存草稿 2.提交审批
approvalId: approvalId approvalId: approvalId
}; };
AjaxPostUtil.request({url: flowableBasePath + "assetarticles019", params: params, type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "assetarticles019", params: params, type: 'json', method: "POST", callback: function(json) {
if(json.returnCode == 0) { if(json.returnCode == 0) {
parent.layer.close(index); parent.layer.close(index);
parent.refreshCode = '0'; parent.refreshCode = '0';
......
...@@ -20,7 +20,7 @@ layui.config({ ...@@ -20,7 +20,7 @@ layui.config({
var sTableData = ""; var sTableData = "";
AjaxPostUtil.request({url: flowableBasePath + "assetarticles021", params: {rowId: parent.rowId}, type: 'json', callback: function(json) { AjaxPostUtil.request({url: flowableBasePath + "assetarticles021", params: {rowId: parent.rowId}, type: 'json', method: "POST", callback: function(json) {
if(json.returnCode == 0) { if(json.returnCode == 0) {
$("#useTitle").html(json.bean.title); $("#useTitle").html(json.bean.title);
$("#useName").html(json.bean.userName); $("#useName").html(json.bean.userName);
...@@ -43,63 +43,58 @@ layui.config({ ...@@ -43,63 +43,58 @@ layui.config({
//初始化用品类别 //初始化用品类别
function initTypeHtml() { function initTypeHtml() {
AjaxPostUtil.request({url: flowableBasePath + "assetarticles010", params: {}, type: 'json', callback: function(json) { // 获取已经上线的用品类别列表
if(json.returnCode == 0) { adminAssistantUtil.queryAssetArticlesTypeUpStateList(function (data){
typeHtml = getDataUseHandlebars(selOption, json); //加载类别数据 typeHtml = getDataUseHandlebars(selOption, data);
//渲染 });
form.render(); form.render();
//类型加载变化事件 //类型加载变化事件
form.on('select(selectTypeProperty)', function(data) { form.on('select(selectTypeProperty)', function(data) {
var thisRowNum = data.elem.id.replace("typeId", ""); var thisRowNum = data.elem.id.replace("typeId", "");
var thisRowValue = data.value; var thisRowValue = data.value;
if(!isNull(thisRowValue) && thisRowValue != '请选择') { if(!isNull(thisRowValue) && thisRowValue != '请选择') {
if(inPointArray(thisRowValue, assetArticles)) { if(inPointArray(thisRowValue, assetArticles)) {
//类型对应的用品存在js对象中 //类型对应的用品存在js对象中
var list = getListPointArray(thisRowValue, assetArticles); var list = getListPointArray(thisRowValue, assetArticles);
resetAssetList(thisRowNum, list); //重置选择行的用品列表 resetAssetList(thisRowNum, list); //重置选择行的用品列表
} else {
//类型对应的用品不存在js对象中
AjaxPostUtil.request({url: flowableBasePath + "assetarticles018", params: {typeId: thisRowValue}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
assetArticles.push({
id: thisRowValue,
list: json.rows
});
resetAssetList(thisRowNum, json.rows); //重置选择行的用品列表
} else { } else {
//类型对应的用品不存在js对象中 winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
AjaxPostUtil.request({url: flowableBasePath + "assetarticles018", params: {typeId: thisRowValue}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
assetArticles.push({
id: thisRowValue,
list: json.rows
});
resetAssetList(thisRowNum, json.rows); //重置选择行的用品列表
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
} }
} }});
}); }
}
});
//商品加载变化事件 //商品加载变化事件
form.on('select(selectAssetarProperty)', function(data) { form.on('select(selectAssetarProperty)', function(data) {
var thisRowNum = data.elem.id.replace("assetarId", ""); var thisRowNum = data.elem.id.replace("assetarId", "");
var thisRowValue = data.value; var thisRowValue = data.value;
var thisRowTypeChooseId = $("#typeId" + thisRowNum).val(); var thisRowTypeChooseId = $("#typeId" + thisRowNum).val();
if(!isNull(thisRowValue) && thisRowValue != '请选择') { if(!isNull(thisRowValue) && thisRowValue != '请选择') {
var list = getListPointArray(thisRowTypeChooseId, assetArticles); var list = getListPointArray(thisRowTypeChooseId, assetArticles);
$.each(list, function(i, item) { $.each(list, function(i, item) {
if(item.id === thisRowValue) { if(item.id === thisRowValue) {
$("#specificationsName" + thisRowNum).html(item.specificationsName); $("#specificationsName" + thisRowNum).html(item.specificationsName);
$("#residualNum" + thisRowNum).html(item.residualNum); $("#residualNum" + thisRowNum).html(item.residualNum);
return false; return false;
}
});
} else {
$("#specificationsName" + thisRowNum).html(""); //重置规格为空
$("#residualNum" + thisRowNum).html(""); //重置库存为空
} }
}); });
//加载表格数据
initTableAssetList();
} else { } else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); $("#specificationsName" + thisRowNum).html(""); //重置规格为空
$("#residualNum" + thisRowNum).html(""); //重置库存为空
} }
}}); });
//加载表格数据
initTableAssetList();
} }
//加载表格数据 //加载表格数据
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">用品类别<i class="red">*</i></label> <label class="layui-form-label">用品类别<i class="red">*</i></label>
<div class="layui-input-block"> <div class="layui-input-block">
<select lay-filter="typeId" lay-search="" id="typeId"> <select lay-filter="typeId" lay-search="" id="typeId" win-verify="required">
</select> </select>
</div> </div>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">用品类别<i class="red">*</i></label> <label class="layui-form-label">用品类别<i class="red">*</i></label>
<div class="layui-input-block"> <div class="layui-input-block">
<select lay-filter="typeId" lay-search="" id="typeId"> <select lay-filter="typeId" lay-search="" id="typeId" win-verify="required">
</select> </select>
</div> </div>
......
...@@ -27,6 +27,7 @@ var customerJS = { ...@@ -27,6 +27,7 @@ var customerJS = {
"shopUtil": "../../assets/lib/layui/customer/shopUtil.js", // 商城模块相关工具 "shopUtil": "../../assets/lib/layui/customer/shopUtil.js", // 商城模块相关工具
"indexMenu": "../../assets/lib/layui/customer/indexMenu.js", // 菜单按钮模块相关工具 "indexMenu": "../../assets/lib/layui/customer/indexMenu.js", // 菜单按钮模块相关工具
"proUtil": "../../assets/lib/layui/customer/proUtil.js", // 项目管理模块相关工具 "proUtil": "../../assets/lib/layui/customer/proUtil.js", // 项目管理模块相关工具
"adminAssistantUtil": "../../assets/lib/layui/customer/adminAssistantUtil.js", // 行政管理模块相关工具
}; };
//系统基础信息 //系统基础信息
......
// 行政管理模块相关工具
var adminAssistantUtil = {
/**
* 获取已经上线的用品类别列表
*
* @param callback 回执函数
*/
queryAssetArticlesTypeUpStateList: function (callback){
AjaxPostUtil.request({url: flowableBasePath + "assetarticles010", params: {}, type: 'json', method: "GET", callback: function(json) {
if(json.returnCode == 0) {
if(typeof(callback) == "function") {
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}, async: false});
},
};
...@@ -44,6 +44,9 @@ var AjaxPostUtil = { ...@@ -44,6 +44,9 @@ var AjaxPostUtil = {
for(var pro in newOptions) { for(var pro in newOptions) {
this.options[pro] = newOptions[pro]; this.options[pro] = newOptions[pro];
} }
if(isNull(String(newOptions['method']))){
this.options['method'] = 'POST';
}
}, },
// 格式化请求参数 // 格式化请求参数
formateParameters: function() { formateParameters: function() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册