@@ -191,6 +191,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||
var data = new | |||
{ | |||
projectName = "", | |||
applyData=applyEntity.AACreateTime.ToDate().ToString("yyyy年MM月dd日"), | |||
list = ItemList | |||
}; | |||
@@ -1,8 +1,12 @@ | |||
using Learun.Util; | |||
using System; | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.AssetManagementSystem; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using ClosedXML.Excel; | |||
using Learun.Application.Base.SystemModule; | |||
namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||
{ | |||
@@ -16,6 +20,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||
public class Ass_AssetsInfoController : MvcControllerBase | |||
{ | |||
private Ass_AssetsInfoIBLL ass_AssetsInfoIBLL = new Ass_AssetsInfoBLL(); | |||
private DataItemIBLL dataItemIbll=new DataItemBLL(); | |||
#region 视图功能 | |||
@@ -37,6 +42,15 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 打印清单 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Inventory() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -134,6 +148,42 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||
return Success("整理成功"); | |||
} | |||
/// <summary> | |||
/// 根据资产id 获取资产信息 | |||
/// </summary> | |||
/// <param name="assIds">资产id</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetInventoryInfo(string assIds) | |||
{ | |||
var ids = assIds.Split(',').ToList(); | |||
var assList = ass_AssetsInfoIBLL.GetListByIds(ids).ToList(); | |||
var unitList = dataItemIbll.GetDetailList("sldw"); | |||
var ItemList = new List<object>(); | |||
foreach (var item in assList) | |||
{ | |||
ItemList.Add(new | |||
{ | |||
aOrder = assList.IndexOf(item),//序号 | |||
aName = item.AName,//名字 | |||
aUnit = unitList.FirstOrDefault(a => a.F_ItemValue == item.AUnit)?.F_ItemName,//单位 | |||
aNum = item.AStock, | |||
aPrice = item.APrice,//价格 | |||
aAllPrice = item.APrice * item.AStock,//总价格 | |||
}); | |||
} | |||
var data = new | |||
{ | |||
projectName = "", | |||
applyData = DateTime.Now.ToString("yyyy年MM月dd日"), | |||
list = ItemList | |||
}; | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// <param name="keyValue">主键</param> | |||
@@ -6,6 +6,7 @@ using System.Collections.Generic; | |||
using System; | |||
using System.Linq; | |||
using Learun.Application.Base.SystemModule; | |||
using Learun.Application.Organization; | |||
namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||
{ | |||
@@ -20,6 +21,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||
{ | |||
private Ass_AssetsOutApplyIBLL ass_AssetsOutApplyIBLL = new Ass_AssetsOutApplyBLL(); | |||
private DataItemIBLL dataItemIbll=new DataItemBLL(); | |||
private UserIBLL userIbll=new UserBLL(); | |||
#region 视图功能 | |||
@@ -131,6 +133,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||
public ActionResult GetInventoryInfo(string applyId) | |||
{ | |||
var outEntity = ass_AssetsOutApplyIBLL.GetAss_AssetsOutApplyEntity(applyId); | |||
var departmentId = userIbll.GetEntityByUserId(outEntity.AOCreateUserId)?.F_DepartmentId; | |||
var outItem = ass_AssetsOutApplyIBLL.GetAss_AssetsOutItemApplyList(applyId).ToList(); | |||
var unitList= dataItemIbll.GetDetailList("sldw"); | |||
var ItemList = new List<object>(); | |||
@@ -151,6 +154,8 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||
var data = new | |||
{ | |||
projectName = outEntity.AOProjectName, | |||
departmentId, | |||
applyData =outEntity.AOCreateTime.ToDate().ToString("yyyy年MM月dd日"), | |||
list = ItemList | |||
}; | |||
return Success(data); | |||
@@ -5,6 +5,7 @@ using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using Learun.Application.Base.SystemModule; | |||
using Learun.Application.Organization; | |||
namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||
{ | |||
@@ -21,6 +22,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||
private Ass_ReceiveItemIBLL assReceiveItemIbll = new Ass_ReceiveItemBLL(); | |||
private DataItemIBLL dataItemIbll = new DataItemBLL(); | |||
private Ass_AssetsInfoIBLL assAssetsInfoIbll = new Ass_AssetsInfoBLL(); | |||
private UserIBLL userIbll=new UserBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
@@ -121,6 +123,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||
[AjaxOnly] | |||
public ActionResult GetInventoryInfo(string applyId) | |||
{ | |||
var outEntity = ass_ReceiveIBLL.GetAss_ReceiveEntity(applyId); | |||
var outItem = assReceiveItemIbll.GetList(applyId).ToList(); | |||
var unitList = dataItemIbll.GetDetailList("sldw"); | |||
var ItemList = new List<object>(); | |||
@@ -142,6 +145,8 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||
var data = new | |||
{ | |||
projectName = "", | |||
departmentId=outEntity.PDepartment, | |||
applyData=outEntity.RTime.ToDate().ToString("yyyy年MM月dd日"), | |||
list = ItemList | |||
}; | |||
return Success(data); | |||
@@ -43,6 +43,7 @@ | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 录入</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 修改</a> | |||
<a id="lr_arrangement" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 整理资产数据</a> | |||
<a id="lr_inventory" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 打印清单</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_detail" class="btn btn-default"><i class="fa fa-bars"></i> 查看明细</a> | |||
</div> | |||
@@ -103,6 +103,25 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
//打印清单 | |||
$('#lr_inventory').on('click', | |||
function () { | |||
var keyValue = $('#gridtable').jfGridValue('AId'); | |||
console.log(keyValue); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'formAss_AssetsOutApply', | |||
title: '清单', | |||
url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfo/Inventory?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 700, | |||
callBack: function (id) { | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
@@ -189,6 +208,7 @@ var bootstrap = function ($, learun) { | |||
], | |||
mainId: 'AId', | |||
isPage: true, | |||
isMultiselect: true, | |||
sidx: 'AOrder' | |||
}); | |||
page.search(); | |||
@@ -0,0 +1,233 @@ | |||
@{ | |||
ViewBag.Title = "采购申请"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<style> | |||
table, | |||
tr, | |||
td { | |||
padding: 0; | |||
margin: 0; | |||
border-collapse: collapse; | |||
} | |||
table { | |||
/* table-layout: fixed; */ | |||
font-size: 13px; | |||
} | |||
/* .tableT { | |||
text-align: center; | |||
font-size: 20px; | |||
margin-bottom: 15px; | |||
} */ | |||
.table { | |||
width: 100%; | |||
text-align: center; | |||
border-top: 1px solid #000; | |||
border-right: 1px solid #000; | |||
} | |||
.table th { | |||
font-size: 18px; | |||
border-left: 1px solid #000; | |||
padding: 5px 0; | |||
} | |||
.table tr { | |||
border-bottom: 1px solid #000; | |||
} | |||
.table td { | |||
border-left: 1px solid #000; | |||
line-height: 16px; | |||
padding: 3px 5px; | |||
} | |||
.tableTxt { | |||
width: 90%; | |||
margin: 10px auto 0; | |||
line-height: 20px; | |||
overflow: hidden; | |||
} | |||
.tableTxt div { | |||
width: 25%; | |||
float: left; | |||
} | |||
.tableTxt1 div { | |||
width: 50%; | |||
text-align: center; | |||
} | |||
.btn { | |||
width: 100px; | |||
height: 34px; | |||
margin: 30px auto; | |||
border: 1px solid #ccc; | |||
cursor: pointer; | |||
border-radius: 4px; | |||
} | |||
.tableBox { | |||
width: 90%; | |||
margin: 30px auto; | |||
} | |||
#table { | |||
/* display: none; */ | |||
} | |||
</style> | |||
<div id="table"> | |||
<div class="tableBox"> | |||
<div class="btn btn-default" id="btnPrint">打印</div> | |||
<div id="tablediv"> | |||
<table class="table"> | |||
<tr> | |||
<th colspan="8" style="text-align:center">西昌民族幼专入库清单</th> | |||
</tr> | |||
<tr> | |||
<td colspan="4">入库日期</td> | |||
<td colspan="4" id="applyData">2020年 月 日</td> | |||
</tr> | |||
<tr> | |||
<td style="width: 10%;">序 号</td> | |||
<td style="width: 15%;">品 名</td> | |||
<td style="width: 15%;">规 格</td> | |||
<td style="width: 10%;">单 位</td> | |||
<td style="width: 10%;">数 量</td> | |||
<td style="width: 10%;">单 价</td> | |||
<td style="width: 10%;">金 额</td> | |||
<td style="width: 20%;">用 途</td> | |||
</tr> | |||
<tr> | |||
<td>合计</td> | |||
<td>(人民币)大写:</td> | |||
<td colspan="3" id="moneyUp"></td> | |||
<td colspan="2">(人民币)小写:</td> | |||
<td id='moneyLow'>1333.00</td> | |||
</tr> | |||
</table> | |||
<div class="tableTxt tableTxt1"> | |||
<div>验收人:</div> | |||
<div>经办人:</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<script> | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var keyValue = request('keyValue'); | |||
var page = { | |||
init: function () { | |||
page.initGrid(); | |||
page.bind(); | |||
}, | |||
initGrid: function () { | |||
learun.httpAsync('get', top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfo/GetInventoryInfo?assIds=' + keyValue, {}, function (val) { | |||
$('#projectName').html(val.projectName); | |||
$('#applyData').html(val.applyData); | |||
var price = parseFloat(0), str = ''; | |||
for (var i = 0; i < val.list.length; i++) { | |||
var entity = val.list[i]; | |||
str += '<tr><td>' + i + '</td>';//序号 | |||
str += '<td>' + entity.aName + '</td>';//品名 | |||
str += '<td></td>';//规格 | |||
str += '<td>' + (entity.aUnit ? entity.aUnit : '') + '</td>';//单位 | |||
str += '<td>' + entity.aNum + '</td>';//数量 | |||
str += '<td>' + (entity.aPrice ? entity.aPrice : 0) + '</td>';//单价 | |||
str += '<td>' + (entity.aAllPrice ? entity.aAllPrice : 0) + '</td>';//金额 | |||
str += '<td></td></tr>';//用途 | |||
//累计金额 | |||
if (entity.aAllPrice) { | |||
price += parseFloat(entity.aAllPrice); | |||
} | |||
} | |||
$('.table').find('tr').eq(2).after(str); | |||
$('#moneyUp').html(digitUppercase(price)); | |||
$('#moneyLow').html(number_format(price, 2)); | |||
}) | |||
}, | |||
bind: function () { | |||
$("#btnPrint").on('click', | |||
function () { | |||
$('.tablediv').print(); | |||
}); | |||
} | |||
} | |||
page.init(); | |||
var digitUppercase = function (n) { | |||
var fraction = ['角', '分']; | |||
var digit = [ | |||
'零', '壹', '贰', '叁', '肆', | |||
'伍', '陆', '柒', '捌', '玖' | |||
]; | |||
var unit = [ | |||
['元', '万', '亿'], | |||
['', '拾', '佰', '仟'] | |||
]; | |||
var head = n < 0 ? '欠' : ''; | |||
n = Math.abs(n); | |||
var s = ''; | |||
for (var i = 0; i < fraction.length; i++) { | |||
s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, ''); | |||
} | |||
s = s || '整'; | |||
n = Math.floor(n); | |||
for (var i = 0; i < unit[0].length && n > 0; i++) { | |||
var p = ''; | |||
for (var j = 0; j < unit[1].length && n > 0; j++) { | |||
p = digit[n % 10] + unit[1][j] + p; | |||
n = Math.floor(n / 10); | |||
} | |||
s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s; | |||
} | |||
return head + s.replace(/(零.)*零元/, '元') | |||
.replace(/(零.)+/g, '零') | |||
.replace(/^整$/, '零元整'); | |||
} | |||
var number_format = function (number, decimals, dec_point, thousands_sep) { | |||
/* | |||
* 参数说明: | |||
* number:要格式化的数字 | |||
* decimals:保留几位小数 | |||
* dec_point:小数点符号 | |||
* thousands_sep:千分位符号 | |||
* */ | |||
number = (number + '').replace(/[^0-9+-Ee.]/g, ''); | |||
var n = !isFinite(+number) ? 0 : +number, | |||
prec = !isFinite(+decimals) ? 2 : Math.abs(decimals), | |||
sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep, | |||
dec = (typeof dec_point === 'undefined') ? '.' : dec_point, | |||
s = '', | |||
toFixedFix = function (n, prec) { | |||
var k = Math.pow(10, prec); | |||
return '' + Math.ceil(n * k) / k; | |||
}; | |||
s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.'); | |||
var re = /(-?\d+)(\d{3})/; | |||
while (re.test(s[0])) { | |||
s[0] = s[0].replace(re, "$1" + sep + "$2"); | |||
} | |||
if ((s[1] || '').length < prec) { | |||
s[1] = s[1] || ''; | |||
s[1] += new Array(prec - s[1].length + 1).join('0'); | |||
} | |||
return s.join(dec); | |||
} | |||
} | |||
</script> | |||
@@ -4,88 +4,95 @@ | |||
} | |||
<style> | |||
table, | |||
tr, | |||
td { | |||
padding: 0; | |||
margin: 0; | |||
border-collapse: collapse; | |||
} | |||
table { | |||
/* table-layout: fixed; */ | |||
font-size: 13px; | |||
} | |||
table, | |||
tr, | |||
td { | |||
padding: 0; | |||
margin: 0; | |||
border-collapse: collapse; | |||
} | |||
/* .tableT { | |||
text-align: center; | |||
font-size: 20px; | |||
margin-bottom: 15px; | |||
} */ | |||
table { | |||
/* table-layout: fixed; */ | |||
font-size: 13px; | |||
} | |||
.table { | |||
width: 100%; | |||
/* .tableT { | |||
text-align: center; | |||
border-top: 1px solid #000; | |||
border-right: 1px solid #000; | |||
} | |||
.table th{ | |||
font-size: 18px; | |||
border-left: 1px solid #000; | |||
padding: 5px 0; | |||
} | |||
.table tr { | |||
border-bottom: 1px solid #000; | |||
} | |||
font-size: 20px; | |||
margin-bottom: 15px; | |||
} */ | |||
.table { | |||
width: 100%; | |||
text-align: center; | |||
border-top: 1px solid #000; | |||
border-right: 1px solid #000; | |||
} | |||
.table td { | |||
border-left: 1px solid #000; | |||
line-height: 16px; | |||
padding: 3px 5px; | |||
} | |||
.tableTxt{ | |||
width: 90%; | |||
margin: 10px auto 0; | |||
line-height: 20px; | |||
overflow: hidden; | |||
} | |||
.tableTxt div{ | |||
width: 25%; | |||
float: left; | |||
} | |||
.tableTxt1 div{ | |||
width: 50%; | |||
text-align: center; | |||
} | |||
.btn { | |||
width: 100px; | |||
height: 34px; | |||
margin: 30px auto; | |||
border: 1px solid #ccc; | |||
cursor: pointer; | |||
border-radius: 4px; | |||
} | |||
.table th { | |||
font-size: 18px; | |||
border-left: 1px solid #000; | |||
padding: 5px 0; | |||
} | |||
.tableBox { | |||
width: 90%; | |||
margin: 30px auto; | |||
} | |||
#table{ | |||
/* display: none; */ | |||
} | |||
.table tr { | |||
border-bottom: 1px solid #000; | |||
} | |||
.table td { | |||
border-left: 1px solid #000; | |||
line-height: 16px; | |||
padding: 3px 5px; | |||
} | |||
.tableTxt { | |||
width: 90%; | |||
margin: 10px auto 0; | |||
line-height: 20px; | |||
overflow: hidden; | |||
} | |||
.tableTxt div { | |||
width: 25%; | |||
float: left; | |||
} | |||
.tableTxt1 div { | |||
width: 50%; | |||
text-align: center; | |||
} | |||
.btn { | |||
width: 100px; | |||
height: 34px; | |||
margin: 30px auto; | |||
border: 1px solid #ccc; | |||
cursor: pointer; | |||
border-radius: 4px; | |||
} | |||
.tableBox { | |||
width: 90%; | |||
margin: 30px auto; | |||
} | |||
#table { | |||
/* display: none; */ | |||
} | |||
</style> | |||
<div id="table"> | |||
<div class="tableBox"> | |||
<div class="btn btn-default" id="btnPrint">打印</div> | |||
<div id="table"> | |||
<div class="tableBox"> | |||
<div class="btn btn-default" id="btnPrint">打印</div> | |||
<div id="tablediv"> | |||
<table class="table"> | |||
<tr> | |||
<th colspan="8" style="text-align:center">西昌民族幼专入库清单</th> | |||
</tr> | |||
<tr> | |||
<td colspan="4">入库日期</td> | |||
<td colspan="4">2020年 月 日</td> | |||
<td colspan="4" id="applyData">2020年 月 日</td> | |||
</tr> | |||
<tr> | |||
<td style="width: 10%;">序 号</td> | |||
@@ -110,8 +117,9 @@ | |||
<div>经办人:</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<script> | |||
var bootstrap = function ($, learun) { | |||
@@ -126,6 +134,7 @@ | |||
initGrid: function () { | |||
learun.httpAsync('get', top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoApply/GetInventoryInfo?applyId=' + keyValue, {}, function (val) { | |||
$('#projectName').html(val.projectName); | |||
$('#applyData').html(val.applyData); | |||
var price = parseFloat(0), str = ''; | |||
for (var i = 0; i < val.list.length; i++) { | |||
var entity = val.list[i]; | |||
@@ -133,7 +142,7 @@ | |||
str += '<td>' + entity.aName + '</td>';//品名 | |||
str += '<td></td>';//规格 | |||
str += '<td>' + (entity.aUnit ? entity.aUnit : '') + '</td>';//单位 | |||
str += '<td>'+entity.aNum+'</td>';//数量 | |||
str += '<td>' + entity.aNum + '</td>';//数量 | |||
str += '<td>' + (entity.aPrice ? entity.aPrice : 0) + '</td>';//单价 | |||
str += '<td>' + (entity.aAllPrice ? entity.aAllPrice : 0) + '</td>';//金额 | |||
str += '<td></td></tr>';//用途 | |||
@@ -151,7 +160,7 @@ | |||
bind: function () { | |||
$("#btnPrint").on('click', | |||
function () { | |||
$('.table').print(); | |||
$('.tablediv').print(); | |||
}); | |||
} | |||
@@ -68,6 +68,7 @@ | |||
width: 90%; | |||
margin: 30px auto; | |||
} | |||
.btn { | |||
width: 100px; | |||
height: 34px; | |||
@@ -83,44 +84,46 @@ | |||
</style> | |||
<div id="table"> | |||
<div class="tableBox"> | |||
<div class="btn btn-default" id="btnPrint">打印</div> | |||
<table class="table"> | |||
<tr> | |||
<th colspan="8" style="text-align: center">西昌民族幼专出库清单</th> | |||
</tr> | |||
<tr> | |||
<td>部门</td> | |||
<td></td> | |||
<td>项目名称</td> | |||
<td colspan="5" id="projectName"></td> | |||
</tr> | |||
<tr> | |||
<td colspan="4">领用/出库日期</td> | |||
<td colspan="4">2020年 月 日</td> | |||
</tr> | |||
<tr> | |||
<td style="width: 10%;">序 号</td> | |||
<td style="width: 15%;">品 名</td> | |||
<td style="width: 15%;">规 格</td> | |||
<td style="width: 10%;">单 位</td> | |||
<td style="width: 10%;">数 量</td> | |||
<td style="width: 10%;">单 价</td> | |||
<td style="width: 10%;">金 额</td> | |||
<td style="width: 20%;">用 途</td> | |||
</tr> | |||
<tr> | |||
<td>合计</td> | |||
<td>(人民币)大写:</td> | |||
<td colspan="3" id="moneyUp"></td> | |||
<td colspan="2">(人民币)小写:</td> | |||
<td id='moneyLow'>1333.00</td> | |||
</tr> | |||
</table> | |||
<div class="tableTxt"> | |||
<div>项目负责人:</div> | |||
<div>验收人:</div> | |||
<div>领用人:</div> | |||
<div>经办人:</div> | |||
<div class="btn btn-default" id="btnPrint">打印</div> | |||
<div id="tablediv"> | |||
<table class="table"> | |||
<tr> | |||
<th colspan="8" style="text-align: center">西昌民族幼专出库清单</th> | |||
</tr> | |||
<tr> | |||
<td>部门</td> | |||
<td id="departmentName"></td> | |||
<td>项目名称</td> | |||
<td colspan="5" id="projectName"></td> | |||
</tr> | |||
<tr> | |||
<td colspan="4">领用/出库日期</td> | |||
<td colspan="4" id="applyData">2020年 月 日</td> | |||
</tr> | |||
<tr> | |||
<td style="width: 10%;">序 号</td> | |||
<td style="width: 15%;">品 名</td> | |||
<td style="width: 15%;">规 格</td> | |||
<td style="width: 10%;">单 位</td> | |||
<td style="width: 10%;">数 量</td> | |||
<td style="width: 10%;">单 价</td> | |||
<td style="width: 10%;">金 额</td> | |||
<td style="width: 20%;">用 途</td> | |||
</tr> | |||
<tr> | |||
<td>合计</td> | |||
<td>(人民币)大写:</td> | |||
<td colspan="3" id="moneyUp"></td> | |||
<td colspan="2">(人民币)小写:</td> | |||
<td id='moneyLow'>1333.00</td> | |||
</tr> | |||
</table> | |||
<div class="tableTxt"> | |||
<div>项目负责人:</div> | |||
<div>验收人:</div> | |||
<div>领用人:</div> | |||
<div>经办人:</div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -136,34 +139,48 @@ | |||
}, | |||
initGrid: function () { | |||
learun.httpAsync('get', top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/GetInventoryInfo?applyId=' + keyValue, {}, function (val) { | |||
$('#projectName').html(val.projectName); | |||
var price = parseFloat(0), str = ''; | |||
for (var i = 0; i < val.list.length; i++) { | |||
var entity = val.list[i]; | |||
str += '<tr><td>' + i + '</td>';//序号 | |||
str += '<td>' + entity.aName + '</td>';//品名 | |||
str += '<td></td>';//规格 | |||
str += '<td>' + (entity.aUnit ? entity.aUnit : '') + '</td>';//单位 | |||
str += '<td>1</td>';//数量 | |||
str += '<td>' + (entity.aPrice ? entity.aPrice : 0) + '</td>';//单价 | |||
str += '<td>' + (entity.aAllPrice ? entity.aAllPrice : 0) + '</td>';//金额 | |||
str += '<td></td></tr>';//用途 | |||
//累计金额 | |||
if (entity.aAllPrice) { | |||
price += parseFloat(entity.aAllPrice); | |||
learun.httpAsync('get', | |||
top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/GetInventoryInfo?applyId=' + keyValue, | |||
{}, | |||
function (val) { | |||
$('#projectName').html(val.projectName); | |||
$('#applyData').html(val.applyData); | |||
learun.clientdata.getAllAsync('sourceData', { | |||
code: 'classdata', | |||
callback: function (dataes) { | |||
if (dataes) { | |||
var aa = dataes.find(a => a.id == val.departmentId).name; | |||
$('#departmentName').html(aa); | |||
} | |||
} | |||
}); | |||
var price = parseFloat(0), str = ''; | |||
for (var i = 0; i < val.list.length; i++) { | |||
var entity = val.list[i]; | |||
str += '<tr><td>' + i + '</td>'; //序号 | |||
str += '<td>' + entity.aName + '</td>'; //品名 | |||
str += '<td></td>'; //规格 | |||
str += '<td>' + (entity.aUnit ? entity.aUnit : '') + '</td>'; //单位 | |||
str += '<td>1</td>'; //数量 | |||
str += '<td>' + (entity.aPrice ? entity.aPrice : 0) + '</td>'; //单价 | |||
str += '<td>' + (entity.aAllPrice ? entity.aAllPrice : 0) + '</td>'; //金额 | |||
str += '<td></td></tr>'; //用途 | |||
//累计金额 | |||
if (entity.aAllPrice) { | |||
price += parseFloat(entity.aAllPrice); | |||
} | |||
} | |||
} | |||
$('.table').find('tr').eq(3).after(str); | |||
$('#moneyUp').html(digitUppercase(price)); | |||
$('#moneyLow').html(number_format(price,2)); | |||
}) | |||
$('.table').find('tr').eq(3).after(str); | |||
$('#moneyUp').html(digitUppercase(price)); | |||
$('#moneyLow').html(number_format(price, 2)); | |||
}); | |||
}, | |||
bind: function () { | |||
$("#btnPrint").on('click', | |||
function() { | |||
$('.table').print(); | |||
function () { | |||
$('.tablediv').print(); | |||
}); | |||
} | |||
@@ -63,6 +63,7 @@ | |||
width: 50%; | |||
text-align: center; | |||
} | |||
.btn { | |||
width: 100px; | |||
height: 34px; | |||
@@ -83,44 +84,46 @@ | |||
</style> | |||
<div id="table"> | |||
<div class="tableBox"> | |||
<div class="btn btn-default" id="btnPrint">打印</div> | |||
<table class="table"> | |||
<tr> | |||
<th colspan="8" style="text-align: center">西昌民族幼专出库清单</th> | |||
</tr> | |||
<tr> | |||
<td>部门</td> | |||
<td></td> | |||
<td>项目名称</td> | |||
<td colspan="5" id="projectName"></td> | |||
</tr> | |||
<tr> | |||
<td colspan="4">领用/出库日期</td> | |||
<td colspan="4">2020年 月 日</td> | |||
</tr> | |||
<tr> | |||
<td style="width: 10%;">序 号</td> | |||
<td style="width: 15%;">品 名</td> | |||
<td style="width: 15%;">规 格</td> | |||
<td style="width: 10%;">单 位</td> | |||
<td style="width: 10%;">数 量</td> | |||
<td style="width: 10%;">单 价</td> | |||
<td style="width: 10%;">金 额</td> | |||
<td style="width: 20%;">用 途</td> | |||
</tr> | |||
<tr> | |||
<td>合计</td> | |||
<td>(人民币)大写:</td> | |||
<td colspan="3" id="moneyUp"></td> | |||
<td colspan="2">(人民币)小写:</td> | |||
<td id='moneyLow'>1333.00</td> | |||
</tr> | |||
</table> | |||
<div class="tableTxt"> | |||
<div>项目负责人:</div> | |||
<div>验收人:</div> | |||
<div>领用人:</div> | |||
<div>经办人:</div> | |||
<div class="btn btn-default" id="btnPrint">打印</div> | |||
<div class="tablediv"> | |||
<table class="table"> | |||
<tr> | |||
<th colspan="8" style="text-align: center">西昌民族幼专出库清单</th> | |||
</tr> | |||
<tr> | |||
<td>部门</td> | |||
<td id="departmentName"></td> | |||
<td>项目名称</td> | |||
<td colspan="5" id="projectName"></td> | |||
</tr> | |||
<tr> | |||
<td colspan="4">领用/出库日期</td> | |||
<td colspan="4" id="applyData">2020年 月 日</td> | |||
</tr> | |||
<tr> | |||
<td style="width: 10%;">序 号</td> | |||
<td style="width: 15%;">品 名</td> | |||
<td style="width: 15%;">规 格</td> | |||
<td style="width: 10%;">单 位</td> | |||
<td style="width: 10%;">数 量</td> | |||
<td style="width: 10%;">单 价</td> | |||
<td style="width: 10%;">金 额</td> | |||
<td style="width: 20%;">用 途</td> | |||
</tr> | |||
<tr> | |||
<td>合计</td> | |||
<td>(人民币)大写:</td> | |||
<td colspan="3" id="moneyUp"></td> | |||
<td colspan="2">(人民币)小写:</td> | |||
<td id='moneyLow'>1333.00</td> | |||
</tr> | |||
</table> | |||
<div class="tableTxt"> | |||
<div>项目负责人:</div> | |||
<div>验收人:</div> | |||
<div>领用人:</div> | |||
<div>经办人:</div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -138,15 +141,26 @@ | |||
initGrid: function () { | |||
learun.httpAsync('get', top.$.rootUrl + '/AssetManagementSystem/Ass_Receive/GetInventoryInfo?applyId=' + keyValue, {}, function (val) { | |||
$('#projectName').html(val.projectName); | |||
$('#applyData').html(val.applyData); | |||
learun.clientdata.getAllAsync('sourceData', { | |||
code: 'classdata', | |||
callback: function (dataes) { | |||
if (dataes) { | |||
var aa = dataes.find(a => a.id == val.departmentId).name; | |||
$('#departmentName').html(aa); | |||
} | |||
} | |||
}); | |||
var price = parseFloat(0), str = ''; | |||
for (var i = 0; i < val.list.length; i++) { | |||
var entity = val.list[i]; | |||
str += '<tr><td>' + i + '</td>';//序号 | |||
str += '<td>' + entity.aName + '</td>';//品名 | |||
str += '<td></td>';//规格 | |||
str += '<td>' + (entity.aUnit?entity.aUnit:'') + '</td>';//单位 | |||
str += '<td>' + (entity.aUnit ? entity.aUnit : '') + '</td>';//单位 | |||
str += '<td>' + entity.aNum + '</td>';//数量 | |||
str += '<td>' + (entity.aPrice?entity.aPrice:0) + '</td>';//单价 | |||
str += '<td>' + (entity.aPrice ? entity.aPrice : 0) + '</td>';//单价 | |||
str += '<td>' + (entity.aAllPrice ? entity.aAllPrice : 0) + '</td>';//金额 | |||
str += '<td></td></tr>';//用途 | |||
@@ -163,7 +177,7 @@ | |||
bind: function () { | |||
$("#btnPrint").on('click', | |||
function () { | |||
$('.table').print(); | |||
$('.tablediv').print(); | |||
}); | |||
} | |||
@@ -6886,6 +6886,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuAttendanceLeave\IndexInStudent.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuLeaveManagement\CheckForm.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuLeaveManagement\CheckIndex.cshtml" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsInfo\Inventory.cshtml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile1.pubxml" /> | |||
@@ -222,6 +222,25 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||
} | |||
} | |||
public IEnumerable<Ass_AssetsInfoEntity> GetListByIds(List<string> ids) | |||
{ | |||
try | |||
{ | |||
return ass_AssetsInfoService.GetListByIds(ids); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
@@ -58,5 +58,6 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||
IEnumerable<Ass_AssetsInfoEntity> GetList(string queryJson); | |||
Ass_AssetsInfoEntity GetAss_AssetsInfoEntityByCode(string code); | |||
IEnumerable<Ass_AssetsInfoEntity> GetListByIds(List<string> ids); | |||
} | |||
} |
@@ -449,5 +449,24 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||
} | |||
} | |||
} | |||
public IEnumerable<Ass_AssetsInfoEntity> GetListByIds(List<string> ids) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository().FindList<Ass_AssetsInfoEntity>(m => ids.Contains(m.AId)); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
} | |||
} |