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

资产采购托管到表单布局

上级 acdfc7e7
......@@ -61,7 +61,9 @@ layui.config({
{ 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: '资产类型', width: 100 },
{ field: 'typeId', title: '资产类型', width: 100, templet: function(d) {
return sysDictDataUtil.getDictDataNameByCodeAndKey("ADM_ASSET_TYPE", d.typeId);
}},
{ field: 'numberPrefix', title: '资产编号前缀', width: 140 },
{ field: 'readPrice', title: '参考价', width: 80 },
]],
......
// 资产采购
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'fileUpload', 'form'], function(exports) {
winui.renderColor();
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form;
var serviceClassName = sysServiceMation["assetManagePurchase"]["key"];
var fromHtml = "";
var allChooseAsset = {};
var selOption = getFileContent('tpl/template/select-option.tpl');
// 获取当前登录员工信息
systemCommonUtil.getSysCurrentLoginUserMation(function (data) {
$("#useTitle").html("资产采购申请单-" + getYMDFormatDate() + '-' + data.bean.userName);
$("#useName").html(data.bean.userName);
});
// 资产来源
sysDictDataUtil.queryDictDataListByDictTypeCode(sysDictData["admAssetFrom"]["key"], function (data) {
fromHtml = getDataUseHandlebars(selOption, data);
});
skyeyeEnclosure.init('enclosureUpload');
// 资产
initTableChooseUtil.initTable({
id: "assetList",
cols: [
{id: 'assetId', title: '资产', formType: 'chooseInput', width: '150', iconClassName: 'chooseAssetBtn', verify: 'required'},
{id: 'fromId', title: '来源', formType: 'select', width: '100', verify: 'required', modelHtml: fromHtml},
{id: 'number', title: '采购数量', formType: 'input', width: '100', className: 'change-input number', verify: 'required|number', value: '1'},
{id: 'unitPrice', title: '采购单价', formType: 'input', width: '100', className: 'change-input unitPrice', verify: 'required|money'},
{id: 'amountOfMoney', title: '采购金额', formType: 'detail', width: '100'},
{id: 'remark', title: '备注', formType: 'input', width: '100'}
],
deleteRowCallback: function (trcusid) {
delete allChooseAsset[trcusid];
calculatedTotalPrice();
},
addRowCallback: function (trcusid) {
calculatedTotalPrice();
},
form: form,
minData: 1
});
matchingLanguage();
form.render();
// 数量,单价变化
$("body").on("input", ".number, .unitPrice", function () {
calculatedTotalPrice();
});
$("body").on("change", ".number, .unitPrice", function () {
calculatedTotalPrice();
});
// 计算总价
function calculatedTotalPrice() {
var allPrice = 0;
$.each(initTableChooseUtil.getDataRowIndex('assetList'), function (i, item) {
// 获取行坐标
var thisRowKey = item;
// 获取数量
var number = parseInt(isNull($("#number" + thisRowKey).val()) ? "0" : $("#number" + thisRowKey).val());
// 获取单价
var unitPrice = parseFloat(isNull($("#unitPrice" + thisRowKey).val()) ? "0" : $("#unitPrice" + thisRowKey).val());
// 输出金额
$("#amountOfMoney" + thisRowKey).html((number * unitPrice).toFixed(2));
allPrice += parseFloat($("#amountOfMoney" + thisRowKey).html());
});
$("#allPrice").html(allPrice.toFixed(2));
}
// 保存为草稿
form.on('submit(formAddBean)', function(data) {
if(winui.verifyForm(data.elem)) {
saveData("1", "");
}
return false;
});
// 提交审批
form.on('submit(formSubBean)', function(data) {
if(winui.verifyForm(data.elem)) {
activitiUtil.startProcess(serviceClassName, null, function (approvalId) {
saveData("2", approvalId);
});
}
return false;
});
function saveData(subType, approvalId) {
var result = initTableChooseUtil.getDataList('assetList');
if (!result.checkResult) {
return false;
}
var tableData = new Array();
var noError = false;
$.each(result.dataList, function(i, item) {
// 获取行编号
var thisRowKey = item["trcusid"].replace("tr", "");
if (parseInt(item.rkNum) == 0) {
$("#number" + thisRowKey).addClass("layui-form-danger");
$("#number" + thisRowKey).focus();
winui.window.msg('数量不能为0', {icon: 2, time: 2000});
noError = true;
return false;
}
var product = allChooseAsset["tr" + thisRowKey];
item["assetId"] = product.id;
if (inTableDataArrayByAssetarId(item.assetId, item.fromId, tableData)) {
winui.window.msg('一张单中不允许出现相同来源的资产信息.', {icon: 2, time: 2000});
noError = true;
return false;
}
tableData.push(item);
});
if (noError) {
return false;
}
var params = {
title: $("#useTitle").html(),
remark: $("#remark").val(),
assetListStr: JSON.stringify(tableData),
enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload'),
allPrice: $("#allPrice").html(),
subType: subType, // 表单类型 1.保存草稿 2.提交审批
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "asset019", params: params, type: 'json', callback: function(json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
// 判断选中的资产以及来源是否也在数组中
function inTableDataArrayByAssetarId(assetId, fromId, array) {
var isIn = false;
$.each(array, function(i, item) {
if(item.assetId === assetId && item.fromId === fromId) {
isIn = true;
return false;
}
});
return isIn;
}
$("body").on("click", ".chooseAssetBtn", function() {
var trId = $(this).parent().parent().attr("trcusid");
adminAssistantUtil.assetCheckType = false; // 选择类型,默认单选,true:多选,false:单选
adminAssistantUtil.openAssetChoosePage(function (checkAssetMation){
// 获取表格行号
var thisRowKey = trId.replace("tr", "");
$("#assetId" + thisRowKey.toString()).val(checkAssetMation.assetName);
$("#unitPrice" + thisRowKey.toString()).val(checkAssetMation.readPrice);
allChooseAsset[trId] = checkAssetMation;
calculatedTotalPrice();
});
});
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
});
\ No newline at end of file
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui'], function (exports) {
winui.renderColor();
layui.use(['form'], function (form) {
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$;
AjaxPostUtil.request({url: flowableBasePath + "asset021", params: {rowId: parent.rowId}, type: 'json', callback: function (json) {
json.bean.stateName = activitiUtil.showStateName2(json.bean.state, 1);
$("#showForm").html(getDataUseHandlebars($("#useTemplate").html(), json));
// 附件回显
skyeyeEnclosure.showDetails({"enclosureUploadBtn": json.bean.enclosureInfo});
matchingLanguage();
}});
});
});
\ No newline at end of file
// 资产采购
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'fileUpload', 'form'], function(exports) {
winui.renderColor();
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form;
var serviceClassName = sysServiceMation["assetManagePurchase"]["key"];
var fromHtml = "";
var allChooseAsset = {};
var selOption = getFileContent('tpl/template/select-option.tpl');
AjaxPostUtil.request({url: flowableBasePath + "asset023", params: {rowId: parent.rowId}, type: 'json', callback: function(json) {
$("#useTitle").html(json.bean.title);
$("#useName").html(json.bean.userName);
$("#remark").val(json.bean.remark);
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
if(json.bean.state == '1'){
$(".typeTwo").removeClass("layui-hide");
} else {
$(".typeOne").removeClass("layui-hide");
}
// 资产来源
sysDictDataUtil.queryDictDataListByDictTypeCode(sysDictData["admAssetFrom"]["key"], function (data) {
fromHtml = getDataUseHandlebars(selOption, data);
});
// 资产
initTableChooseUtil.initTable({
id: "assetList",
cols: [
{id: 'assetId', title: '资产', formType: 'chooseInput', width: '150', iconClassName: 'chooseAssetBtn', verify: 'required'},
{id: 'fromId', title: '来源', formType: 'select', width: '100', verify: 'required', modelHtml: fromHtml},
{id: 'number', title: '采购数量', formType: 'input', width: '100', className: 'change-input number', verify: 'required|number', value: '1'},
{id: 'unitPrice', title: '采购单价', formType: 'input', width: '100', className: 'change-input unitPrice', verify: 'required|money'},
{id: 'amountOfMoney', title: '采购金额', formType: 'detail', width: '100'},
{id: 'remark', title: '备注', formType: 'input', width: '100'}
],
deleteRowCallback: function (trcusid) {
delete allChooseAsset[trcusid];
calculatedTotalPrice();
},
addRowCallback: function (trcusid) {
calculatedTotalPrice();
},
form: form,
minData: 1
});
initTableChooseUtil.deleteAllRow('assetList');
$.each(json.bean.goods, function(i, item) {
var params = {
"assetId": item.assetName,
"fromId": {
"value": item.fromId
},
"number": item.number,
"unitPrice": item.unitPrice.toFixed(2),
"amountOfMoney": item.amountOfMoney.toFixed(2),
"remark": item.remark
};
var trcusid = initTableChooseUtil.resetData('assetList', params);
// 将规格所属的商品信息加入到对象中存储
allChooseAsset[trcusid] = item;
});
matchingLanguage();
form.render();
}});
// 数量,单价变化
$("body").on("input", ".number, .unitPrice", function () {
calculatedTotalPrice();
});
$("body").on("change", ".number, .unitPrice", function () {
calculatedTotalPrice();
});
// 计算总价
function calculatedTotalPrice() {
var allPrice = 0;
$.each(initTableChooseUtil.getDataRowIndex('assetList'), function (i, item) {
// 获取行坐标
var thisRowKey = item;
// 获取数量
var number = parseInt(isNull($("#number" + thisRowKey).val()) ? "0" : $("#number" + thisRowKey).val());
// 获取单价
var unitPrice = parseFloat(isNull($("#unitPrice" + thisRowKey).val()) ? "0" : $("#unitPrice" + thisRowKey).val());
// 输出金额
$("#amountOfMoney" + thisRowKey).html((number * unitPrice).toFixed(2));
allPrice += parseFloat($("#amountOfMoney" + thisRowKey).html());
});
$("#allPrice").html(allPrice.toFixed(2));
}
// 保存为草稿
form.on('submit(formEditBean)', function(data) {
if(winui.verifyForm(data.elem)) {
saveData('1', "");
}
return false;
});
// 提交审批
form.on('submit(formSubBean)', function(data) {
if(winui.verifyForm(data.elem)) {
activitiUtil.startProcess(serviceClassName, null, function (approvalId) {
saveData("2", approvalId);
});
}
return false;
});
// 工作流中保存
form.on('submit(subBean)', function(data) {
if(winui.verifyForm(data.elem)) {
saveData('3', "");
}
return false;
});
function saveData(subType, approvalId) {
var result = initTableChooseUtil.getDataList('assetList');
if (!result.checkResult) {
return false;
}
var tableData = new Array();
var noError = false;
$.each(result.dataList, function(i, item) {
//获取行编号
var thisRowKey = item["trcusid"].replace("tr", "");
if (parseInt(item.rkNum) == 0) {
$("#number" + thisRowKey).addClass("layui-form-danger");
$("#number" + thisRowKey).focus();
winui.window.msg('数量不能为0', {icon: 2, time: 2000});
noError = true;
return false;
}
var product = allChooseAsset["tr" + thisRowKey];
item["assetId"] = product.id;
if (inTableDataArrayByAssetarId(item.assetId, item.fromId, tableData)) {
winui.window.msg('一张单中不允许出现相同来源的资产信息.', {icon: 2, time: 2000});
noError = true;
return false;
}
tableData.push(item);
});
if (noError) {
return false;
}
var params = {
remark: $("#remark").val(),
assetListStr: JSON.stringify(tableData),
rowId: parent.rowId,
enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload'),
allPrice: $("#allPrice").html(),
subType: subType, // 1:保存为草稿 2.提交到工作流 3.在工作流中编辑
approvalId: approvalId,
};
AjaxPostUtil.request({url: flowableBasePath + "asset024", params: params, type: 'json', callback: function(json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
// 判断选中的资产以及来源是否也在数组中
function inTableDataArrayByAssetarId(assetId, fromId, array) {
var isIn = false;
$.each(array, function(i, item) {
if(item.assetId === assetId && item.fromId === fromId) {
isIn = true;
return false;
}
});
return isIn;
}
$("body").on("click", ".chooseAssetBtn", function() {
var trId = $(this).parent().parent().attr("trcusid");
adminAssistantUtil.assetCheckType = false; // 选择类型,默认单选,true:多选,false:单选
adminAssistantUtil.openAssetChoosePage(function (checkAssetMation){
// 获取表格行号
var thisRowKey = trId.replace("tr", "");
$("#assetId" + thisRowKey.toString()).val(checkAssetMation.assetName);
$("#unitPrice" + thisRowKey.toString()).val(checkAssetMation.readPrice);
allChooseAsset[trId] = checkAssetMation;
calculatedTotalPrice();
});
});
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
});
\ No newline at end of file
var rowId = "";
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate'], function (exports) {
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
laydate = layui.laydate,
table = layui.table;
var serviceClassName = sysServiceMation["assetManagePurchase"]["key"];
// 新增资产采购申请
authBtn('1597244645388');
// '资产采购'页面的选取时间段表格
laydate.render({elem: '#caigouCreateTime', range: '~'});
// 展示资产采购列表
table.render({
id: 'caigouTable',
elem: '#caigouTable',
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: flowableBasePath + 'asset018',
url: sysMainMation.admBasePath + 'asset018',
where: getTableParams(),
even: true,
page: true,
......@@ -32,48 +27,53 @@ layui.config({
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'title', title: '标题', width: 300, templet: function (d) {
return '<a lay-event="caigouDedails" class="notice-title-click">' + d.title + '</a>';
{ field: 'oddNumber', title: '单号', width: 200, align: 'center', templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>';
}},
{ field: 'oddNum', title: '单号', width: 200 },
{ field: 'title', title: '标题', width: 300 },
{ field: 'processInstanceId', title: '流程ID', width: 100, templet: function (d) {
return '<a lay-event="caigouProcessDetails" class="notice-title-click">' + d.processInstanceId + '</a>';
return '<a lay-event="processDetails" class="notice-title-click">' + d.processInstanceId + '</a>';
}},
{ field: 'state', title: '状态', width: 90, templet: function (d) {
return activitiUtil.showStateName2(d.state, 1);
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("flowableStateEnum", 'id', d.state, 'name');
}},
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], width: 150 },
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 257, toolbar: '#caigouTableBar'}
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 },
{ field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 },
{ field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 },
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 257, toolbar: '#messageTableBar'}
]],
done: function(json) {
matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入单号,标题", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
}
});
// 资产采购的操作事件
table.on('tool(caigouTable)', function (obj) {
table.on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'caigouDedails') { //采购详情
caigouDedails(data);
} else if (layEvent === 'caigouEdit') { //编辑采购申请
caigouEdit(data);
} else if (layEvent === 'caigouSubApproval') { //采购提交审批
caigouSubApproval(data);
} else if (layEvent === 'caigouCancellation') { //采购作废
caigouCancellation(data);
} else if (layEvent === 'caigouProcessDetails') { //采购流程详情
if (layEvent === 'details') { //采购详情
details(data);
} else if (layEvent === 'edit') { //编辑采购申请
edit(data);
} else if (layEvent === 'subApproval') { //采购提交审批
subApproval(data);
} else if (layEvent === 'cancellation') { //采购作废
cancellation(data);
} else if (layEvent === 'processDetails') { //采购流程详情
activitiUtil.activitiDetails(data);
} else if (layEvent === 'caigouRevoke') { //撤销采购申请
caigouRevoke(data);
} else if (layEvent === 'revoke') { //撤销采购申请
revoke(data);
}
});
// 资产采购详情
function caigouDedails(data) {
rowId = data.id;
function details(data) {
_openNewWindows({
url: "../../tpl/assetManagePurchase/assetManagePurchaseDetails.html",
url: systemCommonUtil.getUrl('FP2023061900007&id=' + data.id, null),
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "assetManagePurchaseDetails",
area: ['90vw', '90vh'],
......@@ -83,104 +83,84 @@ layui.config({
}
// 撤销资产采购
function caigouRevoke(data) {
function revoke(data) {
var msg = '确认撤销该资产采购申请吗?';
layer.confirm(msg, { icon: 3, title: '撤销操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "asset037", params: {processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) {
AjaxPostUtil.request({url: sysMainMation.admBasePath + "asset037", params: {processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadCaigouTable();
loadTable();
}});
});
}
// 新增资产采购
$("body").on("click", "#addCaigouBean", function() {
$("body").on("click", "#addBean", function() {
_openNewWindows({
url: "../../tpl/assetManagePurchase/assetManagePurchaseAdd.html",
url: systemCommonUtil.getUrl('FP2023061900005', null),
title: "资产采购申请",
pageId: "assetManagePurchaseAdd",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadCaigouTable();
loadTable();
}});
});
// 编辑资产采购申请
function caigouEdit(data) {
rowId = data.id;
function edit(data) {
_openNewWindows({
url: "../../tpl/assetManagePurchase/assetManagePurchaseEdit.html",
url: systemCommonUtil.getUrl('FP2023061900006&id=' + data.id, null),
title: "编辑资产采购申请",
pageId: "assetManagePurchaseEdit",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadCaigouTable();
loadTable();
}
});
}
// 资产采购作废
function caigouCancellation(data) {
function cancellation(data) {
var msg = '确认作废该条采购申请吗?';
layer.confirm(msg, { icon: 3, title: '作废操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "asset022", params: {rowId: data.id}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: sysMainMation.admBasePath + "asset022", params: {id: data.id}, type: 'json', callback: function (json) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadCaigouTable();
loadTable();
}});
});
}
// 资产采购提交审批
function caigouSubApproval(data) {
function subApproval(data) {
layer.confirm(systemLanguage["com.skyeye.approvalOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.approvalOperation"][languageType]}, function (index) {
layer.close(index);
activitiUtil.startProcess(serviceClassName, null, function (approvalId) {
var params = {
rowId: data.id,
id: data.id,
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "asset020", params: params, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: sysMainMation.admBasePath + "asset020", params: params, type: 'json', callback: function (json) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadCaigouTable();
loadTable();
}});
});
});
}
form.render();
form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) {
table.reloadData("caigouTable", {page: {curr: 1}, where: getTableParams()});
}
return false;
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
// 刷新采购数据
$("body").on("click", "#reloadCaigouTable", function() {
loadCaigouTable();
});
// 刷新采购列表数据
function loadCaigouTable(){
table.reloadData("caigouTable", {where: getTableParams()});
}
function getTableParams() {
var startTime = "", endTime = "";
if (!isNull($("#caigouCreateTime").val())) {
startTime = $("#caigouCreateTime").val().split('~')[0].trim() + ' 00:00:00';
endTime = $("#caigouCreateTime").val().split('~')[1].trim() + ' 23:59:59';
}
return {
state: $("#caigouState").val(),
startTime: startTime,
endTime: endTime
};
}
function getTableParams() {
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('assetManagePurchaseList', {});
});
......@@ -8,7 +8,7 @@
</head>
<body>
<div class="winui-toolbar">
<div class="winui-tool" style="text-align: left;">
<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="addBean" class="winui-toolbtn search-table-btn-right" auth="1596958747047"><i class="fa fa-plus" aria-hidden="true"></i>用品采购申请</button>
</div>
......
<!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 style="margin:0 auto;padding:20px;">
<form class="layui-form" action="" id="showForm">
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">标题<i class="red">*</i></label>
<div class="layui-input-block ver-center" id="useTitle">
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">步骤</label>
<div class="layui-input-block ver-center">
填单
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">责任人<i class="red">*</i></label>
<div class="layui-input-block ver-center" id="useName">
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">资产<i class="red">*</i></label>
<div class="layui-input-block" id="assetList">
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">共计金额:</label>
<div class="layui-input-block ver-center" id="allPrice">
0.00
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">相关描述</label>
<div class="layui-input-block">
<textarea id="remark" name="remark" placeholder="请输入相关描述" class="layui-textarea" style="height: 100px;" maxlength="200"></textarea>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">相关附件</label>
<div class="layui-input-block" id="enclosureUpload">
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<div class="layui-input-block">
<button class="winui-btn" id="cancle"><language showName="com.skyeye.cancel"></language></button>
<button class="winui-btn" lay-submit lay-filter="formAddBean">保存为草稿</button>
<button class="winui-btn" lay-submit lay-filter="formSubBean">提交审批</button>
</div>
</div>
</form>
</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/assetManagePurchase/'}).use('assetManagePurchaseAdd');
</script>
</body>
</html>
\ No newline at end of file
<!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 style="margin:0 auto;padding:20px;">
<form class="layui-form" action="" id="showForm">
</form>
</div>
<!-- useTemplate -->
<script type="text/x-handlebars-template" id="useTemplate">
{{#bean}}
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">标题</label>
<div class="layui-input-block ver-center">
{{title}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">单号</label>
<div class="layui-input-block ver-center">
{{oddNumber}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">状态</label>
<div class="layui-input-block ver-center">
{{{stateName}}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">步骤</label>
<div class="layui-input-block ver-center">
填单
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">责任人</label>
<div class="layui-input-block ver-center">
{{userName}}
</div>
</div>
<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>来源</th>
<th>采购数量</th>
<th>采购单价</th>
<th>采购金额</th>
<th>状态</th>
<th>备注</th>
</tr>
</thead>
<tbody id="useTable" class="insurance-table">
{{#each goods}}
<tr>
<td>{{typeName}}</td>
<td>{{assetName}}</td>
<td>{{fromId}}</td>
<td>{{number}}</td>
<td>{{unitPrice}}</td>
<td>{{amountOfMoney}}</td>
<td>{{stateName}}</td>
<td>{{remark}}</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">共计金额</label>
<div class="layui-input-block ver-center">
{{allPrice}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">相关描述</label>
<div class="layui-input-block ver-center">
{{remark}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">相关附件</label>
<div class="layui-input-block ver-center" id="enclosureUploadBtn">
</div>
</div>
{{/bean}}
</script>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/assetManagePurchase/'}).use('assetManagePurchaseDetails');
</script>
</body>
</html>
\ No newline at end of file
<!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 style="margin:0 auto;padding:20px;">
<form class="layui-form" action="" id="showForm">
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">标题<i class="red">*</i></label>
<div class="layui-input-block ver-center" id="useTitle">
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">步骤</label>
<div class="layui-input-block ver-center">
填单
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">责任人<i class="red">*</i></label>
<div class="layui-input-block ver-center" id="useName">
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">资产<i class="red">*</i></label>
<div class="layui-input-block" id="assetList">
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">共计金额:</label>
<div class="layui-input-block ver-center" id="allPrice">
0.00
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">相关描述</label>
<div class="layui-input-block">
<textarea id="remark" name="remark" placeholder="请输入相关描述" class="layui-textarea" style="height: 100px;" maxlength="200"></textarea>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">相关附件</label>
<div class="layui-input-block" id="enclosureUpload">
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<div class="layui-input-block">
<button class="winui-btn" id="cancle"><language showName="com.skyeye.cancel"></language></button>
<button class="winui-btn typeOne layui-hide" lay-submit lay-filter="formEditBean">保存为草稿</button>
<button class="winui-btn typeOne layui-hide" lay-submit lay-filter="formSubBean">提交审批</button>
<button class="winui-btn typeTwo layui-hide" lay-submit lay-filter="subBean"><language showName="com.skyeye.save"></language></button>
</div>
</div>
</form>
</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/assetManagePurchase/'}).use('assetManagePurchaseEdit');
</script>
</body>
</html>
\ No newline at end of file
......@@ -7,62 +7,32 @@
<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">
<select id="caigouState">
<option value="">全部</option>
<option value="0">草稿</option>
<option value="1">审核中</option>
<option value="2">审核通过</option>
<option value="3">审核不通过</option>
<option value="4">作废</option>
<option value="5">撤销</option>
</select>
</div>
<label class="layui-form-label">申请时间</label>
<div class="layui-input-inline">
<input type="text" id="caigouCreateTime" name="caigouCreateTime" 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">
<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="addBean" class="winui-toolbtn search-table-btn-right" auth="1597244645388"><i class="fa fa-plus" aria-hidden="true"></i>资产采购申请</button>
</div>
<div class="winui-toolbar">
<div class="winui-tool" style="text-align: left;">
<button id="reloadCaigouTable" class="winui-toolbtn"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button id="addCaigouBean" class="winui-toolbtn" auth="1597244645388"><i class="fa fa-plus" aria-hidden="true"></i>资产采购申请</button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="caigouTable" lay-filter="caigouTable"></table>
<script type="text/html" id="caigouTableBar">
{{# if(d.editRow == '1'){ }}
{{# if(auth('1597244631374')){ }}
<a class="layui-btn layui-btn-xs" lay-event="caigouSubApproval">提交审批</a>
{{# } }}
{{# if(auth('1597244622917')){ }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="caigouCancellation">作废</a>
{{# } }}
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="messageTableBar">
{{# if(d.editRow == '1'){ }}
{{# if(auth('1597244631374')) { }}
<a class="layui-btn layui-btn-xs" lay-event="subApproval">提交审批</a>
{{# } }}
{{# if(d.editRow == '1' || d.editRow == '2'){ }}
{{# if(auth('1597244663541')){ }}
<a class="layui-btn layui-btn-xs" lay-event="caigouEdit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# if(auth('1597244622917')) { }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="cancellation">作废</a>
{{# } }}
{{# if(d.editRow == '2'){ }}
{{# if(auth('1597244615531')){ }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="caigouRevoke">撤销</a>
{{# } }}
{{# if(auth('1597244645388')) { }}
<a class="layui-btn layui-btn-xs" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
</script>
</div>
{{# } }}
{{# if(d.editRow == '2') { }}
{{# if(auth('1597244615531')){ }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="revoke">撤销</a>
{{# } }}
{{# } }}
</script>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
......
......@@ -79,7 +79,7 @@ function inTableDataArrayByAssetarId(materialId, unitId, array) {
}
/**
* 商品规格加载变化事件
* 商品规格加载变化事件--组件使用
*
* @param form 表单对象
* @param allChooseProduct 商品对象
......@@ -94,7 +94,6 @@ function mUnitChangeEvent(form, allChooseProduct, unitPriceKey, calcPriceCallbac
// 当前当前行选中的商品信息
if (!isNull(thisRowValue)) {
var product = allChooseProduct["tr" + thisRowKey];
console.log(product)
$.each(product.materialNorms, function (j, bean) {
if (thisRowValue == bean.id) {
var rkNum = parseInt($("#rkNum" + thisRowKey).val());
......
......@@ -16,7 +16,7 @@ var adminAssistantUtil = {
},
/**
* 资产选择页面
* 资产选择页面---组件管理使用
*
* @param callback 回调函数
*/
......
......@@ -456,7 +456,7 @@ var dsFormUtil = {
var transKey = dsFormUtil.getKeyIdToMation(key);
var itemData = itemVal[transKey];
if (!isNull(itemData)) {
map[key] = itemData.name;
map[key] = itemData.name || itemData.dictName;
} else {
map[key] = '';
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册