提交 d8266b26 编写于 作者: doc_wei's avatar doc_wei

资产归还整改完成

上级 e8af369a
......@@ -11,7 +11,6 @@
- [项目功能结构](https://docs.qq.com/flowchart/DYUFQQnlCUm9Ua2FI)
- [企业版信息以及价格表](https://docs.qq.com/doc/DQlRxcVRMWWVjbU1i?_from=1&disableReturnList=1)
- `企业版所有功能部署包`以及`设计思路`获取方式:扫码进入知识星球
- **最低1.8W即可获得企业版所有源代码**
- **五人团已凑齐三人,差两人开团**
- 作者本人承诺,知识星球人数达到1000人,即开放所有功能模块源代码(仅供星球内部成员使用)
......
......@@ -59,11 +59,11 @@ layui.config({
caigouEdit(data);
} else if (layEvent === 'caigouSubApproval') { //采购提交审批
caigouSubApproval(data);
} else if (layEven === 'caigouCancellation') {//采购作废
} else if (layEvent === 'caigouCancellation') {//采购作废
caigouCancellation(data);
} else if (layEven === 'caigouProcessDetails') {//采购流程详情
} else if (layEvent === 'caigouProcessDetails') {//采购流程详情
activitiUtil.activitiDetails(data);
} else if (layEven === 'caigouRevoke') {//撤销采购申请
} else if (layEvent === 'caigouRevoke') {//撤销采购申请
caigouRevoke(data);
}
});
......
var assetList = new Array(); //资产集合
// 资产归还
layui.config({
base: basePath,
......@@ -12,72 +10,40 @@ layui.config({
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form;
var rowNum = 1; //表格的序号
var typeHtml = "";
var returntableTemplate = $("#returntableTemplate").html();
var selOption = getFileContent('tpl/template/select-option.tpl');
var allChooseAssetReport = {};
// 获取当前登录员工信息
systemCommonUtil.getSysCurrentLoginUserMation(function (data) {
$("#useTitle").html("资产归还申请单-" + getYMDFormatDate() + '-' + data.bean.userName);
$("#useName").html(data.bean.userName);
});
initTypeHtml();
function initTypeHtml() {
// 资产类型
sysDictDataUtil.queryDictDataListByDictTypeCode(sysDictData["admAssetType"]["key"], function (data) {
typeHtml = getDataUseHandlebars(selOption, data);
});
form.render();
//类型加载变化事件
form.on('select(selectTypeProperty)', function(data) {
var thisRowNum = data.elem.id.replace("typeId", "");
var thisRowValue = data.value;
if (!isNull(thisRowValue) && thisRowValue != '请选择') {
if(inPointArray(thisRowValue, assetList)) {
//类型对应的资产存在js对象中
var list = getListPointArray(thisRowValue, assetList);
resetAssetList(thisRowNum, list); //重置选择行的资产列表
} else {
//类型对应的资产不存在js对象中
AjaxPostUtil.request({url: flowableBasePath + "asset026", params: {typeId: thisRowValue}, type: 'json', callback: function(json) {
assetList.push({
id: thisRowValue,
list: json.rows
});
resetAssetList(thisRowNum, json.rows); //重置选择行的资产列表
}});
}
}
});
skyeyeEnclosure.init('enclosureUpload');
//商品加载变化事件
form.on('select(selectAssetarProperty)', function(data) {
var thisRowNum = data.elem.id.replace("assetId", "");
var thisRowValue = data.value;
var thisRowTypeChooseId = $("#typeId" + thisRowNum).val();
if (!isNull(thisRowValue) && thisRowValue != '请选择') {
var list = getListPointArray(thisRowTypeChooseId, assetList);
$.each(list, function(i, item) {
if(item.id === thisRowValue) {
$("#specificationsName" + thisRowNum).html(item.specificationsName);
$("#assetNum" + thisRowNum).html(item.assetNum);
return false;
}
});
} else {
$("#specificationsName" + thisRowNum).html(""); //重置规格为空
$("#assetNum" + thisRowNum).html(""); //重置编号为空
}
});
// 初始化一行数据
addRow();
matchingLanguage();
}
// 资产
initTableChooseUtil.initTable({
id: "assetReportList",
cols: [
{id: 'assetReportId', title: '资产', formType: 'chooseInput', width: '150', iconClassName: 'chooseMyUseAssetReportBtn', verify: 'required'},
{id: 'specifications', title: '规格', formType: 'detail', width: '150'},
{id: 'assetNum', title: '编号', formType: 'detail', width: '150'},
{id: 'assetImg', title: '图片', formType: 'detail', width: '80'},
{id: 'storageArea', title: '存放区域', formType: 'detail', width: '150'},
{id: 'remark', title: '备注', formType: 'input', width: '100'}
],
deleteRowCallback: function (trcusid) {
delete allChooseAssetReport[trcusid];
},
addRowCallback: function (trcusid) {
},
form: form,
minData: 1
});
matchingLanguage();
form.render();
skyeyeEnclosure.init('enclosureUpload');
// 保存为草稿
form.on('submit(formAddBean)', function(data) {
if(winui.verifyForm(data.elem)) {
......@@ -97,29 +63,26 @@ layui.config({
});
function saveData(subType, approvalId) {
// 获取已选资产数据
var rowTr = $("#returnTable tr");
if(rowTr.length == 0) {
winui.window.msg('请选择需要归还的资产~', {icon: 2, time: 2000});
var result = initTableChooseUtil.getDataList('assetReportList');
if (!result.checkResult) {
return false;
}
var tableData = new Array();
var noError = false; //循环遍历表格数据时,是否有其他错误信息
$.each(rowTr, function(i, item) {
var rowNum = $(item).attr("trcusid").replace("tr", "");
if(inTableDataArrayByAssetarId($("#assetId" + rowNum).val(), tableData)){
winui.window.msg('归还单存在相同的资产', {icon: 2, time: 2000});
var noError = false;
$.each(result.dataList, function(i, item) {
// 获取行编号
var thisRowKey = item["trcusid"].replace("tr", "");
var assetReport = allChooseAssetReport["tr" + thisRowKey];
if (judgeInPoingArr(tableData, "assetReportId", assetReport.id)) {
winui.window.msg('领用单存在相同的资产', {icon: 2, time: 2000});
noError = true;
return false;
}
var row = {
typeId: $("#typeId" + rowNum).val(),
assetId: $("#assetId" + rowNum).val(),
remark: $("#remark" + rowNum).val()
};
tableData.push(row);
item["assetReportId"] = assetReport.id;
tableData.push(item);
});
if(noError) {
if (noError) {
return false;
}
......@@ -137,94 +100,26 @@ layui.config({
}});
}
//判断选中的资产是否也在数组中
function inTableDataArrayByAssetarId(str, array) {
var isIn = false;
$.each(array, function(i, item) {
if(item.assetId === str) {
isIn = true;
return false;
}
$("body").on("click", ".chooseMyUseAssetReportBtn", function() {
var trId = $(this).parent().parent().attr("trcusid");
adminAssistantUtil.myUseAssetReportCheckType = false; // 选择类型,默认单选,true:多选,false:单选
adminAssistantUtil.openMyUseAssetReportChoosePage(function (checkMyUseAssetReportMation) {
// 获取表格行号
var thisRowKey = trId.replace("tr", "");
$("#assetReportId" + thisRowKey.toString()).val(checkMyUseAssetReportMation.assetName);
$("#specifications" + thisRowKey.toString()).html(checkMyUseAssetReportMation.specifications);
$("#assetNum" + thisRowKey.toString()).html(checkMyUseAssetReportMation.assetNum);
$("#assetImg" + thisRowKey.toString()).html('<img src="' + systemCommonUtil.getFilePath(checkMyUseAssetReportMation.assetImg) + '" class="photo-img">');
$("#storageArea" + thisRowKey.toString()).html(checkMyUseAssetReportMation.storageArea);
allChooseAssetReport[trId] = checkMyUseAssetReportMation;
});
return isIn;
}
//新增行
$("body").on("click", "#addRow", function() {
addRow();
});
//删除行
$("body").on("click", "#deleteRow", function() {
deleteRow();
// 图片查看
$("body").on("click", ".photo-img", function() {
systemCommonUtil.showPicImg($(this).attr("src"));
});
//新增行
function addRow() {
var par = {
id: "row" + rowNum.toString(), //checkbox的id
trId: "tr" + rowNum.toString(), //行的id
typeId: "typeId" + rowNum.toString(), //类型id
assetId: "assetId" + rowNum.toString(), //资产id
specificationsName: "specificationsName" + rowNum.toString(), //规格id
assetNum: "assetNum" + rowNum.toString(), //库存id
remark: "remark" + rowNum.toString() //备注id
};
$("#returnTable").append(getDataUseHandlebars(returntableTemplate, par));
//赋值给资产类别
$("#" + "typeId" + rowNum.toString()).html(typeHtml);
form.render('select');
form.render('checkbox');
rowNum++;
}
//删除行
function deleteRow() {
var checkRow = $("#returnTable input[type='checkbox'][name='tableCheckRow']:checked");
if(checkRow.length > 0) {
$.each(checkRow, function(i, item) {
$(item).parent().parent().remove();
});
} else {
winui.window.msg('请选择要删除的行', {icon: 2, time: 2000});
}
}
//根据类型重置资产列表
function resetAssetList(thisRowNum, list) {
var sHtml = getDataUseHandlebars(selOption, {
rows: list
});
$("#assetId" + thisRowNum).html(sHtml); //重置商品列表下拉框
$("#specificationsName" + thisRowNum).html(""); //重置规格为空
$("#assetNum" + thisRowNum).html(""); //重置编号为空
form.render('select');
}
//判断是否在数组中
function inPointArray(str, array) {
var isIn = false;
$.each(array, function(i, item) {
if(item.id === str) {
isIn = true;
return false;
}
});
return isIn;
}
//获取指定key对应的集合
function getListPointArray(str, array) {
var isList = [];
$.each(array, function(i, item) {
if(item.id === str) {
$.extend(true, isList, item.list);
return false;
}
});
return isList;
}
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
......
......@@ -20,5 +20,10 @@ layui.config({
matchingLanguage();
}});
// 图片查看
$("body").on("click", ".photo-img", function() {
systemCommonUtil.showPicImg($(this).attr("src"));
});
});
});
\ No newline at end of file
var assetList = new Array(); //资产集合
// 资产归还
layui.config({
base: basePath,
......@@ -12,13 +10,8 @@ layui.config({
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form;
var rowNum = 1; //表格的序号
var typeHtml = "";
var usetableTemplate = $("#usetableTemplate").html();
var selOption = getFileContent('tpl/template/select-option.tpl');
var sTableData = "";
var allChooseAssetReport = {};
AjaxPostUtil.request({url: flowableBasePath + "asset031", params: {rowId: parent.rowId}, type: 'json', callback: function(json) {
$("#useTitle").html(json.bean.title);
......@@ -32,61 +25,44 @@ layui.config({
} else {
$(".typeOne").removeClass("layui-hide");
}
sTableData = json.bean.goods;
initTypeHtml();
matchingLanguage();
}});
function initTypeHtml() {
// 资产类型
sysDictDataUtil.queryDictDataListByDictTypeCode(sysDictData["admAssetType"]["key"], function (data) {
typeHtml = getDataUseHandlebars(selOption, data);
});
form.render();
//类型加载变化事件
form.on('select(selectTypeProperty)', function(data) {
var thisRowNum = data.elem.id.replace("typeId", "");
var thisRowValue = data.value;
if (!isNull(thisRowValue) && thisRowValue != '请选择') {
if(inPointArray(thisRowValue, assetList)) {
//类型对应的资产存在js对象中
var list = getListPointArray(thisRowValue, assetList);
resetAssetList(thisRowNum, list); //重置选择行的资产列表
} else {
//类型对应的资产不存在js对象中
AjaxPostUtil.request({url: flowableBasePath + "asset026", params: {typeId: thisRowValue}, type: 'json', callback: function(json) {
assetList.push({
id: thisRowValue,
list: json.rows
});
resetAssetList(thisRowNum, json.rows); //重置选择行的资产列表
}});
}
}
// 资产
initTableChooseUtil.initTable({
id: "assetReportList",
cols: [
{id: 'assetReportId', title: '资产', formType: 'chooseInput', width: '150', iconClassName: 'chooseMyUseAssetReportBtn', verify: 'required'},
{id: 'specifications', title: '规格', formType: 'detail', width: '150'},
{id: 'assetNum', title: '编号', formType: 'detail', width: '150'},
{id: 'assetImg', title: '图片', formType: 'detail', width: '80'},
{id: 'storageArea', title: '存放区域', formType: 'detail', width: '150'},
{id: 'remark', title: '备注', formType: 'input', width: '100'}
],
deleteRowCallback: function (trcusid) {
delete allChooseAssetReport[trcusid];
},
addRowCallback: function (trcusid) {
},
form: form,
minData: 1
});
//商品加载变化事件
form.on('select(selectAssetarProperty)', function(data) {
var thisRowNum = data.elem.id.replace("assetId", "");
var thisRowValue = data.value;
var thisRowTypeChooseId = $("#typeId" + thisRowNum).val();
if (!isNull(thisRowValue) && thisRowValue != '请选择') {
var list = getListPointArray(thisRowTypeChooseId, assetList);
$.each(list, function(i, item) {
if(item.id === thisRowValue) {
$("#specificationsName" + thisRowNum).html(item.specificationsName);
$("#assetNum" + thisRowNum).html(item.assetNum);
return false;
}
});
} else {
$("#specificationsName" + thisRowNum).html(""); //重置规格为空
$("#assetNum" + thisRowNum).html(""); //重置库存为空
}
initTableChooseUtil.deleteAllRow('assetReportList');
$.each(json.bean.goods, function(i, item) {
var params = {
"assetReportId": item.assetName,
"specifications": item.specifications,
"assetNum": item.assetNum,
"assetImg": '<img src="' + systemCommonUtil.getFilePath(item.assetImg) + '" class="photo-img">',
"storageArea": item.storageArea,
"remark": item.remark
};
var trcusid = initTableChooseUtil.resetData('assetReportList', params);
item["id"] = item.assetReportId;
allChooseAssetReport[trcusid] = item;
});
//加载表格数据
initTableAssetList();
}
matchingLanguage();
}});
//加载表格数据
function initTableAssetList() {
......@@ -122,29 +98,26 @@ layui.config({
});
function saveData(subType, approvalId) {
// 获取已选资产数据
var rowTr = $("#useTable tr");
if(rowTr.length == 0) {
winui.window.msg('请选择需要归还的资产~', {icon: 2, time: 2000});
var result = initTableChooseUtil.getDataList('assetReportList');
if (!result.checkResult) {
return false;
}
var tableData = new Array();
var noError = false; //循环遍历表格数据时,是否有其他错误信息
$.each(rowTr, function(i, item) {
var rowNum = $(item).attr("trcusid").replace("tr", "");
var assetNum = parseInt($("#assetNum" + rowNum).html());
if(inTableDataArrayByAssetarId($("#assetId" + rowNum).val(), tableData)){
winui.window.msg('归还单存在相同的资产', {icon: 2, time: 2000});
var noError = false;
$.each(result.dataList, function(i, item) {
// 获取行编号
var thisRowKey = item["trcusid"].replace("tr", "");
var assetReport = allChooseAssetReport["tr" + thisRowKey];
if (judgeInPoingArr(tableData, "assetReportId", assetReport.id)) {
winui.window.msg('领用单存在相同的资产', {icon: 2, time: 2000});
noError = true;
return false;
}
var row = {
assetReportId: $("#assetId" + rowNum).val(),
remark: $("#remark" + rowNum).val()
};
tableData.push(row);
item["assetReportId"] = assetReport.id;
tableData.push(item);
});
if(noError) {
if (noError) {
return false;
}
......@@ -162,147 +135,26 @@ layui.config({
}});
}
//判断选中的资产是否也在数组中
function inTableDataArrayByAssetarId(str, array) {
var isIn = false;
$.each(array, function(i, item) {
if(item.assetId === str) {
isIn = true;
return false;
}
$("body").on("click", ".chooseMyUseAssetReportBtn", function() {
var trId = $(this).parent().parent().attr("trcusid");
adminAssistantUtil.myUseAssetReportCheckType = false; // 选择类型,默认单选,true:多选,false:单选
adminAssistantUtil.openMyUseAssetReportChoosePage(function (checkMyUseAssetReportMation) {
// 获取表格行号
var thisRowKey = trId.replace("tr", "");
$("#assetReportId" + thisRowKey.toString()).val(checkMyUseAssetReportMation.assetName);
$("#specifications" + thisRowKey.toString()).html(checkMyUseAssetReportMation.specifications);
$("#assetNum" + thisRowKey.toString()).html(checkMyUseAssetReportMation.assetNum);
$("#assetImg" + thisRowKey.toString()).html('<img src="' + systemCommonUtil.getFilePath(checkMyUseAssetReportMation.assetImg) + '" class="photo-img">');
$("#storageArea" + thisRowKey.toString()).html(checkMyUseAssetReportMation.storageArea);
allChooseAssetReport[trId] = checkMyUseAssetReportMation;
});
return isIn;
}
//新增行
$("body").on("click", "#addRow", function() {
addRow();
});
//删除行
$("body").on("click", "#deleteRow", function() {
deleteRow();
// 图片查看
$("body").on("click", ".photo-img", function() {
systemCommonUtil.showPicImg($(this).attr("src"));
});
//加载数据行
function addDataRow(item) {
var thisRowNum = rowNum.toString();
var par = {
id: "row" + thisRowNum, //checkbox的id
trId: "tr" + thisRowNum, //行的id
typeId: "typeId" + thisRowNum, //类型id
assetId: "assetId" + thisRowNum, //资产id
specificationsName: "specificationsName" + thisRowNum, //规格id
assetNum: "assetNum" + thisRowNum, //编号
remark: "remark" + thisRowNum //备注id
};
$("#useTable").append(getDataUseHandlebars(usetableTemplate, par));
//赋值给资产类别
$("#" + "typeId" + thisRowNum).html(typeHtml);
//数据回显
$("#typeId" + thisRowNum).val(item.typeId);
$("#specificationsName" + thisRowNum).html(item.specificationsName);
$("#remark" + thisRowNum).val(item.remark);
$("#assetNum" + thisRowNum).html(item.assetNum);
var thisRowValue = item.typeId;
if (!isNull(thisRowValue) && thisRowValue != '请选择') {
if(inPointArray(thisRowValue, assetList)) {
//类型对应的资产存在js对象中
var list = getListPointArray(thisRowValue, assetList);
//重置选择行的资产列表
var sHtml = getDataUseHandlebars(selOption, {rows: list});
$("#assetId" + thisRowNum).html(sHtml); //重置商品列表下拉框
$("#assetId" + thisRowNum).val(item.assetId);
form.render('select');
} else {
//类型对应的资产不存在js对象中
AjaxPostUtil.request({url: flowableBasePath + "asset026", params: {typeId: thisRowValue}, type: 'json', callback: function(json) {
assetList.push({
id: thisRowValue,
list: json.rows
});
//重置选择行的资产列表
var sHtml = getDataUseHandlebars(selOption, json);
$("#assetId" + thisRowNum).html(sHtml); //重置商品列表下拉框
$("#assetId" + thisRowNum).val(item.assetId);
form.render('select');
}, async: false});
}
}
form.render('select');
form.render('checkbox');
rowNum++;
}
//新增行
function addRow() {
var par = {
id: "row" + rowNum.toString(), //checkbox的id
trId: "tr" + rowNum.toString(), //行的id
typeId: "typeId" + rowNum.toString(), //类型id
assetId: "assetId" + rowNum.toString(), //资产id
specificationsName: "specificationsName" + rowNum.toString(), //规格id
assetNum: "assetNum" + rowNum.toString(), //编号
remark: "remark" + rowNum.toString() //备注id
};
$("#useTable").append(getDataUseHandlebars(usetableTemplate, par));
//赋值给资产类别
$("#" + "typeId" + rowNum.toString()).html(typeHtml);
form.render('select');
form.render('checkbox');
rowNum++;
}
//删除行
function deleteRow() {
var checkRow = $("#useTable input[type='checkbox'][name='tableCheckRow']:checked");
if(checkRow.length > 0) {
$.each(checkRow, function(i, item) {
$(item).parent().parent().remove();
});
} else {
winui.window.msg('请选择要删除的行', {icon: 2, time: 2000});
}
}
//根据类型重置用户列表
function resetAssetList(thisRowNum, list) {
var sHtml = getDataUseHandlebars(selOption, {
rows: list
});
$("#assetId" + thisRowNum).html(sHtml); //重置商品列表下拉框
$("#specificationsName" + thisRowNum).html(""); //重置规格为空
$("#assetNum" + thisRowNum).html(""); //重置库存为空
form.render('select');
}
//判断是否在数组中
function inPointArray(str, array) {
var isIn = false;
$.each(array, function(i, item) {
if(item.id === str) {
isIn = true;
return false;
}
});
return isIn;
}
//获取指定key对应的集合
function getListPointArray(str, array) {
var isList = [];
$.each(array, function(i, item) {
if(item.id === str) {
$.extend(true, isList, item.list);
return false;
}
});
return isList;
}
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
......
......@@ -62,11 +62,11 @@ layui.config({
returnEdit(data);
} else if (layEvent === 'returnSubApproval') { //归还提交审批
returnSubApproval(data);
} else if (layEven === 'returnCancellation') {//归还作废
} else if (layEvent === 'returnCancellation') {//归还作废
returnCancellation(data);
} else if (layEven === 'returnProcessDetails') {//归还流程详情
} else if (layEvent === 'returnProcessDetails') {//归还流程详情
activitiUtil.activitiDetails(data);
} else if (layEven === 'returnRevoke') {//撤销归还申请
} else if (layEvent === 'returnRevoke') {//撤销归还申请
returnRevoke(data);
}
});
......
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form', 'tableCheckBoxUtil'], function (exports) {
winui.renderColor();
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form,
table = layui.table,
tableCheckBoxUtil = layui.tableCheckBoxUtil;
// 选择类型,默认单选,true:多选,false:单选
var myUseAssetReportCheckType = isNull(parent.adminAssistantUtil.myUseAssetReportCheckType) ? false : parent.adminAssistantUtil.myUseAssetReportCheckType;
// 设置提示信息
var s = '我已申领资产选择规则:1.已审批通过的资产';
if(myUseAssetReportCheckType){
s += '2.多选;';
// 多选保存的资产对象信息
var checkMyUseAssetReportMation = [].concat(parent.adminAssistantUtil.checkMyUseAssetReportMation);
// 初始化值
var ids = [];
$.each(checkMyUseAssetReportMation, function(i, item) {
ids.push(item.id);
});
tableCheckBoxUtil.setIds({
gridId: 'messageTable',
fieldName: 'id',
ids: ids
});
tableCheckBoxUtil.init({
gridId: 'messageTable',
filterId: 'messageTable',
fieldName: 'id'
});
} else {
s += '如没有查到要选择的资产信息,请检查资产信息是否满足当前规则。双击要选择的数据即可选中';
$("#saveCheckBox").hide();
}
$("#showInfo").html(s);
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: flowableBasePath + 'myhasmation001',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ type: myUseAssetReportCheckType ? 'checkbox' : 'radio', rowspan: '3', fixed: 'left' },
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], rowspan: '3', fixed: 'left', type: 'numbers' },
{ field: 'assetName', title: '资产名称', align: 'left', width: 120 },
{ field: 'assetImg', title: '图片', align: 'center', width: 60, templet: function (d) {
return '<img src="' + systemCommonUtil.getFilePath(d.assetImg) + '" class="photo-img" lay-event="assetImg">';
}},
{ field: 'typeName', title: '类型', align: 'left', width: 100 },
{ field: 'assetNum', title: '资产编号', align: 'left', width: 150 },
{ field: 'specifications', title: '资产规格', align: 'left', width: 120 },
{ field: 'assetAdmin', title: '管理员', align: 'left', width: 120 },
{ field: 'createTime', title: '申领时间', align: 'center', width: 150 },
]],
done: function(res) {
matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, res.searchFilter, form, "请输入资产名称,资产编号", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
if (myUseAssetReportCheckType) {
// 设置选中
tableCheckBoxUtil.checkedDefault({
gridId: 'messageTable',
fieldName: 'id'
});
} else {
$('#messageTable').next().find('.layui-table-body').find("table" ).find("tbody").children("tr").on('dblclick',function() {
var dubClick = $('#messageTable').next().find('.layui-table-body').find("table").find("tbody").find(".layui-table-hover");
dubClick.find("input[type='radio']").prop("checked", true);
form.render();
var chooseIndex = JSON.stringify(dubClick.data('index'));
var obj = res.rows[chooseIndex];
parent.adminAssistantUtil.checkMyUseAssetReportMation = obj;
parent.refreshCode = '0';
parent.layer.close(index);
});
$('#messageTable').next().find('.layui-table-body').find("table" ).find("tbody").children("tr").on('click',function() {
var click = $('#messageTable').next().find('.layui-table-body').find("table").find("tbody").find(".layui-table-hover");
click.find("input[type='radio']").prop("checked", true);
form.render();
});
}
}
});
table.on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'assetImg') { // 图片预览
systemCommonUtil.showPicImg(systemCommonUtil.getFilePath(data.assetImg));
}
});
// 保存
$("body").on("click", "#saveCheckBox", function() {
var selectedData = tableCheckBoxUtil.getValue({
gridId: 'messageTable'
});
if (selectedData.length == 0) {
winui.window.msg("请选择资产", {icon: 2, time: 2000});
return false;
}
AjaxPostUtil.request({url: flowableBasePath + "queryAssetReportListByIds", params: {ids: selectedData.toString()}, type: 'json', method: "POST", callback: function (json) {
parent.adminAssistantUtil.checkMyUseAssetReportMation = [].concat(json.rows);
parent.layer.close(index);
parent.refreshCode = '0';
}});
});
form.render();
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function getTableParams() {
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('assetReportUnUseChoose', {});
});
\ No newline at end of file
......@@ -65,9 +65,9 @@ layui.config({
revertEdit(data);
} else if (layEvent === 'revertsubapproval') { //提交审批
revertSubApproval(data);
} else if (layEven === 'revertcancellation') {//归还作废
} else if (layEvent === 'revertcancellation') {//归还作废
revertCancellation(data);
} else if (layEven === 'revertrevoke') {//撤销
} else if (layEvent === 'revertrevoke') {//撤销
revertrevoke(data);
}
});
......
var rowId = "";
layui.config({
base: basePath,
version: skyeyeVersion
......@@ -37,6 +35,9 @@ layui.config({
]],
done: function(json) {
matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入资产名称,资产编号", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
}
});
......@@ -48,31 +49,17 @@ layui.config({
}
});
$("body").on("click", "#reloadmessageTable", function() {
form.render();
$("body").on("click", "#reloadmessageTable", function() {
loadTable();
});
form.render();
form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) {
refreshTable();
}
return false;
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function refreshTable(){
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
}
function getTableParams() {
return {
assetName: $("#assetName").val(),
assetNum: $("#assetNum").val(),
specifications: $("#specifications").val()
};
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('myAssetManagement', {});
......
......@@ -65,9 +65,9 @@ layui.config({
revertEdit(data);
} else if (layEvent === 'revertsubapproval') { //提交审批
revertSubApproval(data);
} else if (layEven === 'revertcancellation') {//归还作废
} else if (layEvent === 'revertcancellation') {//归还作废
revertCancellation(data);
} else if (layEven === 'revertrevoke') {//撤销
} else if (layEvent === 'revertrevoke') {//撤销
revertrevoke(data);
}
});
......
......@@ -29,28 +29,9 @@
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">资产<i class="red">*</i></label>
<div class="layui-input-block">
<div class="winui-toolbar">
<div class="winui-tool" style="text-align: left;">
<button id="addRow" class="winui-toolbtn" type="button"><i class="fa fa-plus" aria-hidden="true"></i>新增行</button>
<button id="deleteRow" class="winui-toolbtn" type="button"><i class="fa fa-trash-o" aria-hidden="true"></i>删除行</button>
</div>
</div>
<table class="layui-table">
<thead>
<tr>
<th></th>
<th>资产类别<i class="red">*</i></th>
<th>资产名称<i class="red">*</i></th>
<th style="min-width: 100px;">规格</th>
<th style="min-width: 100px;">编号</th>
<th>备注</th>
</tr>
</thead>
<tbody id="returnTable" class="insurance-table">
</tbody>
</table>
</div>
<div class="layui-input-block" id="assetReportList">
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">相关描述</label>
......@@ -72,19 +53,7 @@
</div>
</form>
</div>
<!-- returntableTemplate -->
<script type="text/x-handlebars-template" id="returntableTemplate">
<tr trcusid="{{trId}}">
<td><input type="checkbox" rowId="{{id}}" lay-filter="checkboxProperty" name="tableCheckRow"/></td>
<td><select id="{{typeId}}" lay-filter="selectTypeProperty" win-verify="required"></select></td>
<td><select id="{{assetId}}" lay-filter="selectAssetarProperty" win-verify="required"></select></td>
<td id="{{specificationsName}}"></td>
<td id="{{assetNum}}"></td>
<td><input type="text" class="layui-input" id="{{remark}}"/></td>
</tr>
</script>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
......
......@@ -49,29 +49,31 @@
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">资产</label>
<div class="layui-input-block">
<table class="layui-table">
<thead>
<tr>
<th>资产类别</th>
<th>资产名称</th>
<th style="min-width: 100px;">规格</th>
<th style="min-width: 100px;">编号</th>
<th>状态</th>
<th>备注</th>
</tr>
</thead>
<tbody id="useTable" class="insurance-table">
{{#each goods}}
<tr>
<td>{{typeName}}</td>
<td>{{assetName}}</td>
<td>{{specificationsName}}</td>
<td>{{assetNum}}</td>
<td>{{stateName}}</td>
<td>{{remark}}</td>
</tr>
{{/each}}
</tbody>
<table class="layui-table">
<thead>
<tr>
<th>资产</th>
<th style="width: 150px;">规格</th>
<th style="width: 150px;">编号</th>
<th style="width: 80px;">图片</th>
<th style="width: 150px;">存放区域</th>
<th>状态</th>
<th>备注</th>
</tr>
</thead>
<tbody id="useTable" class="insurance-table">
{{#each goods}}
<tr>
<td>{{assetName}}</td>
<td>{{specifications}}</td>
<td>{{assetNum}}</td>
<td><img src="{{assetImg}}" class="photo-img"></td>
<td>{{storageArea}}</td>
<td>{{stateName}}</td>
<td>{{remark}}</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
</div>
......
......@@ -29,28 +29,9 @@
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">资产<i class="red">*</i></label>
<div class="layui-input-block">
<div class="winui-toolbar">
<div class="winui-tool" style="text-align: left;">
<button id="addRow" class="winui-toolbtn" type="button"><i class="fa fa-plus" aria-hidden="true"></i>新增行</button>
<button id="deleteRow" class="winui-toolbtn" type="button"><i class="fa fa-trash-o" aria-hidden="true"></i>删除行</button>
</div>
</div>
<table class="layui-table">
<thead>
<tr>
<th></th>
<th>资产类别<i class="red">*</i></th>
<th>资产名称<i class="red">*</i></th>
<th style="min-width: 100px;">规格</th>
<th style="min-width: 100px;">编号</th>
<th>备注</th>
</tr>
</thead>
<tbody id="useTable" class="insurance-table">
</tbody>
</table>
</div>
<div class="layui-input-block" id="assetReportList">
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">相关描述</label>
......@@ -75,18 +56,6 @@
</form>
</div>
<!-- usetableTemplate -->
<script type="text/x-handlebars-template" id="usetableTemplate">
<tr trcusid="{{trId}}">
<td><input type="checkbox" rowId="{{id}}" lay-filter="checkboxProperty" name="tableCheckRow"/></td>
<td><select id="{{typeId}}" lay-filter="selectTypeProperty" win-verify="required"></select></td>
<td><select id="{{assetId}}" lay-filter="selectAssetarProperty" win-verify="required"></select></td>
<td id="{{specificationsName}}"></td>
<td id="{{assetNum}}"></td>
<td><input type="text" class="layui-input" id="{{remark}}"/></td>
</tr>
</script>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div class="winui-tip alert-info" id="showInfo">
</div>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button id="saveCheckBox" class="winui-toolbtn search-table-btn-right" type="button"><i class="fa fa-save" aria-hidden="true"></i><language showName="com.skyeye.save"></language></button>
</div>
</div>
<div style="margin:auto 10px;">
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
</div>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/assetReportManage/'}).use('assetReportMyUseChoose');
</script>
</body>
</html>
\ No newline at end of file
......@@ -7,38 +7,16 @@
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div style="margin:0 auto; height: 100%;">
<div class="txtcenter" style="margin:0 auto; padding-top: 10px;">
<form class="layui-form layui-form-pane" action="" autocomplete="off">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">资产名称</label>
<div class="layui-input-inline">
<input type="text" id="assetName" name="assetName" placeholder="请输入资产名称" class="layui-input" />
</div>
<label class="layui-form-label">资产编号</label>
<div class="layui-input-inline">
<input type="text" id="assetNum" name="assetNum" placeholder="请输入资产编号" class="layui-input" />
</div>
<label class="layui-form-label">资产规格</label>
<div class="layui-input-inline">
<input type="text" id="specifications" name="specifications" placeholder="请输入资产规格" class="layui-input" />
</div>
<button type="reset" class="layui-btn layui-btn-primary list-form-search"><language showName="com.skyeye.reset"></language></button>
<button class="layui-btn list-form-search" lay-submit lay-filter="formSearch"><language showName="com.skyeye.search2"></language></button>
</div>
</div>
</form>
<div class="winui-toolbar">
<div class="winui-tool" style="text-align: left;">
<button id="reloadmessageTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
</div>
<div class="winui-toolbar">
<div class="winui-tool" style="text-align: left;">
<button id="reloadmessageTable" class="winui-toolbtn"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
......
......@@ -105,7 +105,7 @@ layui.config({
var layEvent = obj.event;
if (layEvent === 'approve') { //审批员工的申诉申请
approve(data);
} else if (layEven === 'appealdetails'){ //员工的申诉申请详情
} else if (layEvent === 'appealdetails'){ //员工的申诉申请详情
appealdetails(data);
}
});
......
......@@ -155,15 +155,15 @@ layui.config({
var layEvent = obj.event;
if (layEvent === 'fullTime') {
detail(data, '1');
} else if (layEven === 'absenteeism'){
} else if (layEvent === 'absenteeism'){
detail(data, '2');
} else if (layEven === 'lackTime'){
} else if (layEvent === 'lackTime'){
detail(data, '3');
} else if (layEven === 'late'){
} else if (layEvent === 'late'){
detail(data, '4');
} else if (layEven === 'leaveEarly'){
} else if (layEvent === 'leaveEarly'){
detail(data, '5');
} else if (layEven === 'missing'){
} else if (layEvent === 'missing'){
detail(data, '6');
}
});
......
......@@ -42,7 +42,7 @@ layui.config({
var layEvent = obj.event;
if (layEvent === 'download') { //下载
download(data, obj);
} else if (layEven === 'creatFile') { //同步文件
} else if (layEvent === 'creatFile') { //同步文件
creatFile(data, obj);
}
});
......
......@@ -43,7 +43,7 @@ layui.config({
var layEvent = obj.event;
if(layEvent === 'delet'){ // 删除
delet(data);
} else if (layEven === 'edit'){ // 编辑
} else if (layEvent === 'edit'){ // 编辑
edit(data);
}
});
......
......@@ -56,7 +56,7 @@ layui.config({
var layEvent = obj.event;
if(layEvent === 'delet'){ // 删除
delet(data);
} else if (layEven === 'edit'){ // 编辑
} else if (layEvent === 'edit'){ // 编辑
edit(data);
} else if (layEvent === 'details') { // 详情
details(data);
......
......@@ -49,9 +49,9 @@ layui.config({
var layEvent = obj.event;
if (layEvent === 'control') { // 表单设计
control(data);
} else if (layEven === 'delet'){ // 删除
} else if (layEvent === 'delet'){ // 删除
delet(data);
} else if (layEven === 'edit'){ // 编辑
} else if (layEvent === 'edit'){ // 编辑
edit(data);
}
});
......
......@@ -45,7 +45,7 @@ layui.config({
var layEvent = obj.event;
if(layEvent === 'delet'){ // 删除
delet(data);
} else if (layEven === 'edit'){ // 编辑
} else if (layEvent === 'edit'){ // 编辑
edit(data);
}
});
......
......@@ -92,7 +92,7 @@ layui.config({
var layEvent = obj.event;
if (layEvent === 'details') { //详情
details(data);
} else if (layEven === 'historyDetails'){ // 盘点历史
} else if (layEvent === 'historyDetails'){ // 盘点历史
historyDetails(data);
}
});
......
......@@ -69,9 +69,9 @@ layui.config({
deleteSupplier(data);
} else if (layEvent === 'enabled') { //启用
editEnabled(data);
} else if (layEven == 'unenabled'){ //禁用
} else if (layEvent == 'unenabled'){ //禁用
editNotEnabled(data)
} else if (layEven == 'select'){ //详情
} else if (layEvent == 'select'){ //详情
selectSupplier(data)
}
});
......
......@@ -101,7 +101,7 @@ layui.config({
var layEvent = obj.event;
if (layEvent === 'read') { //阅读
read(data);
} else if (layEven === 'del'){ //删除
} else if (layEvent === 'del'){ //删除
del(data);
}
});
......
......@@ -65,11 +65,11 @@ layui.config({
var layEvent = obj.event;
if (layEvent === 'repeal') { //撤回
repeal(data);
} else if (layEven === 'reading'){ //阅读日志详情
} else if (layEvent === 'reading'){ //阅读日志详情
reading(data);
} else if (layEven === 'mydel'){ //删除我发送的日志
} else if (layEvent === 'mydel'){ //删除我发送的日志
mydel(data);
} else if (layEven === 'send'){ //发送我撤回的日志
} else if (layEvent === 'send'){ //发送我撤回的日志
send(data);
}
});
......
......@@ -51,13 +51,13 @@ layui.config({
deletemember(data);
} else if (layEvent === 'enabled') { //启用
editEnabled(data);
} else if (layEven == 'unenabled'){ //禁用
} else if (layEvent == 'unenabled'){ //禁用
editNotEnabled(data)
} else if (layEven == 'select'){ //详情
} else if (layEvent == 'select'){ //详情
selectMember(data)
} else if (layEven == 'memberCar'){ //车辆信息
} else if (layEvent == 'memberCar'){ //车辆信息
memberCar(data)
} else if (layEven == 'mealList'){ //套餐购买信息
} else if (layEvent == 'mealList'){ //套餐购买信息
mealList(data)
}
});
......
......@@ -51,13 +51,13 @@ layui.config({
deletemember(data);
} else if (layEvent === 'enabled') { //启用
editEnabled(data);
} else if (layEven == 'unenabled'){ //禁用
} else if (layEvent == 'unenabled'){ //禁用
editNotEnabled(data)
} else if (layEven == 'select'){ //详情
} else if (layEvent == 'select'){ //详情
selectMember(data)
} else if (layEven == 'memberCar'){ //车辆信息
} else if (layEvent == 'memberCar'){ //车辆信息
memberCar(data)
} else if (layEven == 'mealList'){ //套餐购买信息
} else if (layEvent == 'mealList'){ //套餐购买信息
mealList(data)
}
});
......
......@@ -60,13 +60,13 @@ layui.config({
deletemember(data);
} else if (layEvent === 'enabled') { //启用
editEnabled(data);
} else if (layEven == 'unenabled'){ //禁用
} else if (layEvent == 'unenabled'){ //禁用
editNotEnabled(data)
} else if (layEven == 'select'){ //详情
} else if (layEvent == 'select'){ //详情
selectMember(data)
} else if (layEven == 'memberCar'){ //车辆信息
} else if (layEvent == 'memberCar'){ //车辆信息
memberCar(data)
} else if (layEven == 'mealList'){ //套餐购买信息
} else if (layEvent == 'mealList'){ //套餐购买信息
mealList(data)
}
});
......
......@@ -61,13 +61,13 @@ layui.config({
editmember(data);
} else if (layEvent === 'delete') { //删除
deletemember(data);
} else if (layEven == 'select'){ //详情
} else if (layEvent == 'select'){ //详情
selectMember(data)
} else if (layEvent === 'enabled') { // 启用
editEnabled(data);
} else if (layEven == 'unenabled'){ // 禁用
} else if (layEvent == 'unenabled'){ // 禁用
editNotEnabled(data)
} else if (layEven == 'transferCar'){ // 过户
} else if (layEvent == 'transferCar'){ // 过户
transferCar(data)
}
});
......
......@@ -45,7 +45,7 @@ layui.config({
edit(data);
} else if (layEvent === 'delete') { // 删除
delet(data);
} else if (layEven == 'select'){ // 详情
} else if (layEvent == 'select'){ // 详情
select(data)
}
});
......
......@@ -96,11 +96,11 @@ layui.config({
var layEvent = obj.event;
if(layEvent == 'select'){ // 详情
select(data)
} else if (layEven == 'complateKeepFit'){ // 完成保养
} else if (layEvent == 'complateKeepFit'){ // 完成保养
complateKeepFit(data)
} else if (layEven == 'verification'){ // 核销
} else if (layEvent == 'verification'){ // 核销
verification(data)
} else if (layEven == 'cancleOrder'){ // 取消订单
} else if (layEvent == 'cancleOrder'){ // 取消订单
cancleOrder(data)
}
});
......
......@@ -65,7 +65,7 @@ layui.config({
edit(data);
} else if (layEvent === 'delete') { // 删除
delet(data);
} else if (layEven == 'select'){ // 详情
} else if (layEvent == 'select'){ // 详情
select(data)
} else if (layEvent === 'logo') { // logo预览
systemCommonUtil.showPicImg(fileBasePath + data.logo);
......
......@@ -82,15 +82,15 @@ layui.config({
var layEvent = obj.event;
if (layEvent === 'delete') { // 删除
delet(data);
} else if (layEven == 'select'){ // 详情
} else if (layEvent == 'select'){ // 详情
select(data)
} else if (layEven == 'complatePay'){ // 完成支付
complatePay(data)
} else if (layEven == 'cancleOrder'){ // 取消订单
} else if (layEvent == 'complatePay'){ // 完成支付
layEvent(data)
} else if (layEvent == 'cancleOrder'){ // 取消订单
cancleOrder(data)
} else if (layEven == 'refundMealOrder'){ // 退款
} else if (layEvent == 'refundMealOrder'){ // 退款
refundMealOrder(data)
} else if (layEven == 'cancleRefundMealOrder'){ // 取消退款
} else if (layEvent == 'cancleRefundMealOrder'){ // 取消退款
cancleRefundMealOrder(data)
}
});
......
......@@ -92,9 +92,9 @@ layui.config({
var layEvent = obj.event;
if (layEvent === 'rejection') { // 驳回
rejection(data);
} else if (layEven == 'select'){ // 详情
} else if (layEvent == 'select'){ // 详情
select(data)
} else if (layEven == 'pass'){ // 退款
} else if (layEvent == 'pass'){ // 退款
pass(data)
}
});
......
......@@ -54,11 +54,11 @@ layui.config({
edit(data);
} else if (layEvent === 'delete') { // 删除
delet(data);
} else if (layEven == 'select'){ // 详情
} else if (layEvent == 'select'){ // 详情
select(data)
} else if (layEvent === 'enabled') { // 启用
editEnabled(data);
} else if (layEven == 'unenabled'){ // 禁用
} else if (layEvent == 'unenabled'){ // 禁用
editNotEnabled(data)
}
});
......
......@@ -57,4 +57,25 @@ var adminAssistantUtil = {
});
},
/**
* 我申领中的资产明细选择页面
*
* @param callback 回调函数
*/
myUseAssetReportCheckType: false, // 选择类型,默认单选,true:多选,false:单选
checkMyUseAssetReportMation: [], // 选择时返回的对象
openMyUseAssetReportChoosePage: function (callback) {
_openNewWindows({
url: "../../tpl/assetReportManage/assetReportMyUseChoose.html",
title: "资产选择",
pageId: "assetReportUnUseChoose",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
if (typeof (callback) == "function") {
callback(adminAssistantUtil.checkMyUseAssetReportMation);
}
}
});
},
};
......@@ -89,7 +89,7 @@ layui.config({
var layEvent = obj.event;
if (layEvent === 'details'){ // 详情
details(data);
} else if (layEven === 'stateChange'){// 状态变更
} else if (layEvent === 'stateChange'){// 状态变更
stateChange(data);
}
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册