瀏覽代碼

资产入库出库 调拨 打印清单

西昌缴费二期
zhichao lei 4 年之前
父節點
當前提交
b19a8f0046
共有 14 個文件被更改,包括 888 次插入12 次删除
  1. +48
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsInfoApplyController.cs
  2. +58
    -8
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsOutApplyController.cs
  3. +44
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_ReceiveController.cs
  4. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/Index.cshtml
  5. +16
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/Index.js
  6. +222
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/Inventory.cshtml
  7. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItemApply/Form.cshtml
  8. +233
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/Inventory.cshtml
  9. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Receive/Form.cshtml
  10. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Receive/Index.cshtml
  11. +16
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Receive/Index.js
  12. +235
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Receive/Inventory.cshtml
  13. +3
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  14. +8
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfo/Ass_AssetsInfoService.cs

+ 48
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsInfoApplyController.cs 查看文件

@@ -4,6 +4,8 @@ using Learun.Application.TwoDevelopment.AssetManagementSystem;
using System.Web.Mvc;
using System.Collections.Generic;
using System;
using System.Linq;
using Learun.Application.Base.SystemModule;

namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
{
@@ -17,6 +19,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
public class Ass_AssetsInfoApplyController : MvcControllerBase
{
private Ass_AssetsInfoApplyIBLL ass_AssetsInfoApplyIBLL = new Ass_AssetsInfoApplyBLL();
private DataItemIBLL dataItemIbll = new DataItemBLL();

#region 视图功能

@@ -48,6 +51,15 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
{
return View();
}
/// <summary>
/// 打印清单
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Inventory()
{
return View();
}
[HttpGet]
public ActionResult FormViewJY()
{
@@ -149,6 +161,42 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
};
return Success(jsonData);
}


/// <summary>
/// 获取入库清单数据
/// </summary>
/// <param name="applyId">入库清单id</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetInventoryInfo(string applyId)
{
var applyEntity = ass_AssetsInfoApplyIBLL.GetAss_AssetsInfoApplyEntity(applyId);
var applyItemList = ass_AssetsInfoApplyIBLL.GetAss_AssetsInfoItemApplyList(applyId).ToList();
var unitList = dataItemIbll.GetDetailList("sldw");
var ItemList = new List<object>();
foreach (var item in applyItemList)
{
ItemList.Add(new
{
aOrder = applyItemList.IndexOf(item),//序号
aName = item.AAIName,//名字
aUnit = unitList.FirstOrDefault(a => a.F_ItemValue == item.AAIUnit)?.F_ItemName,//单位
aNum = item.AAIStock,
aPrice = item.AAIPrice,//价格
aAllPrice = item.AAIPrice * item.AAIStock,//总价格
});
}
var data = new
{
projectName = "",
list = ItemList
};

return Success(data);
}

#endregion

#region 提交数据


+ 58
- 8
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsOutApplyController.cs 查看文件

@@ -4,6 +4,8 @@ using Learun.Application.TwoDevelopment.AssetManagementSystem;
using System.Web.Mvc;
using System.Collections.Generic;
using System;
using System.Linq;
using Learun.Application.Base.SystemModule;

namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
{
@@ -17,6 +19,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
public class Ass_AssetsOutApplyController : MvcControllerBase
{
private Ass_AssetsOutApplyIBLL ass_AssetsOutApplyIBLL = new Ass_AssetsOutApplyBLL();
private DataItemIBLL dataItemIbll=new DataItemBLL();

#region 视图功能

@@ -27,7 +30,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
[HttpGet]
public ActionResult Index()
{
return View();
return View();
}
/// <summary>
/// 表单查看页
@@ -48,6 +51,15 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
ViewBag.AOCode = "CKSQ_" + CommonHelper.CreateNo();
return View();
}
/// <summary>
/// 出库清单
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Inventory()
{
return View();
}
#endregion

#region 获取数据
@@ -80,9 +92,10 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var Ass_AssetsOutApplyData = ass_AssetsOutApplyIBLL.GetAss_AssetsOutApplyEntity( keyValue );
var Ass_AssetsOutItemApplyData = ass_AssetsOutApplyIBLL.GetAss_AssetsOutItemApplyList( Ass_AssetsOutApplyData.AOId );
var jsonData = new {
var Ass_AssetsOutApplyData = ass_AssetsOutApplyIBLL.GetAss_AssetsOutApplyEntity(keyValue);
var Ass_AssetsOutItemApplyData = ass_AssetsOutApplyIBLL.GetAss_AssetsOutItemApplyList(Ass_AssetsOutApplyData.AOId);
var jsonData = new
{
Ass_AssetsOutApply = Ass_AssetsOutApplyData,
Ass_AssetsOutItemApply = Ass_AssetsOutItemApplyData,
};
@@ -96,9 +109,10 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
[AjaxOnly]
public ActionResult GetFormDataByProcessId(string processId)
{
var Ass_AssetsOutApplyData = ass_AssetsOutApplyIBLL.GetEntityByProcessId( processId );
var Ass_AssetsOutItemApplyData = ass_AssetsOutApplyIBLL.GetAss_AssetsOutItemApplyList( Ass_AssetsOutApplyData.AOId );
var jsonData = new {
var Ass_AssetsOutApplyData = ass_AssetsOutApplyIBLL.GetEntityByProcessId(processId);
var Ass_AssetsOutItemApplyData = ass_AssetsOutApplyIBLL.GetAss_AssetsOutItemApplyList(Ass_AssetsOutApplyData.AOId);
var jsonData = new
{
Ass_AssetsOutApply = Ass_AssetsOutApplyData,
Ass_AssetsOutItemApply = Ass_AssetsOutItemApplyData,
};
@@ -106,6 +120,42 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
}
#endregion


/// <summary>
/// 获取出库清单数据
/// </summary>
/// <param name="applyId">出库单id</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetInventoryInfo(string applyId)
{
var outEntity = ass_AssetsOutApplyIBLL.GetAss_AssetsOutApplyEntity(applyId);
var outItem = ass_AssetsOutApplyIBLL.GetAss_AssetsOutItemApplyList(applyId).ToList();
var unitList= dataItemIbll.GetDetailList("sldw");
var ItemList = new List<object>();
foreach (var item in outItem)
{
ItemList.Add(new
{
aOrder = outItem.IndexOf(item),//序号
aName = item.AOIName,//名字
aUnit =unitList.FirstOrDefault(a=>a.F_ItemValue==item.AOIUnit)?.F_ItemName,//单位
aNum = 1,
aPrice = item.AOIPrice,//价格
aAllPrice = item.AOIPrice,//总价格
});

}

var data = new
{
projectName = outEntity.AOProjectName,
list = ItemList
};
return Success(data);
}

#region 提交数据

/// <summary>
@@ -135,7 +185,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
entity.AOOutStatus = 0;
entity.AOCreateTime = DateTime.Now;
List<Ass_AssetsOutItemApplyEntity> ass_AssetsOutItemApplyList = strass_AssetsOutItemApplyList.ToObject<List<Ass_AssetsOutItemApplyEntity>>();
ass_AssetsOutApplyIBLL.SaveEntity(keyValue,entity,ass_AssetsOutItemApplyList);
ass_AssetsOutApplyIBLL.SaveEntity(keyValue, entity, ass_AssetsOutItemApplyList);
return Success("保存成功!");
}
/// <summary>


+ 44
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_ReceiveController.cs 查看文件

@@ -3,6 +3,8 @@ using System.Data;
using Learun.Application.TwoDevelopment.AssetManagementSystem;
using System.Web.Mvc;
using System.Collections.Generic;
using System.Linq;
using Learun.Application.Base.SystemModule;

namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
{
@@ -17,7 +19,8 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
{
private Ass_ReceiveIBLL ass_ReceiveIBLL = new Ass_ReceiveBLL();
private Ass_ReceiveItemIBLL assReceiveItemIbll = new Ass_ReceiveItemBLL();

private DataItemIBLL dataItemIbll = new DataItemBLL();
private Ass_AssetsInfoIBLL assAssetsInfoIbll = new Ass_AssetsInfoBLL();
#region 视图功能

/// <summary>
@@ -43,6 +46,11 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
{
return View();
}
[HttpGet]
public ActionResult Inventory()
{
return View();
}
#endregion

#region 获取数据
@@ -104,6 +112,41 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
}
#endregion

/// <summary>
/// 获取出库清单数据
/// </summary>
/// <param name="applyId">出库单id</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetInventoryInfo(string applyId)
{
var outItem = assReceiveItemIbll.GetList(applyId).ToList();
var unitList = dataItemIbll.GetDetailList("sldw");
var ItemList = new List<object>();
foreach (var item in outItem)
{
var entity = assAssetsInfoIbll.GetAss_AssetsInfoEntity(item.AID);
ItemList.Add(new
{
aOrder = outItem.IndexOf(item),//序号
aName = entity.AName,//名字
aUnit = unitList.FirstOrDefault(a => a.F_ItemValue == entity.AUnit)?.F_ItemName,//单位
aNum = item.ANum,
aPrice = entity.APrice,//价格
aAllPrice = entity.APrice * int.Parse(item.ANum),//总价格
});

}

var data = new
{
projectName = "",
list = ItemList
};
return Success(data);
}

#region 提交数据

/// <summary>


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/Index.cshtml 查看文件

@@ -37,6 +37,7 @@
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;提交</a>
<a id="lr_inventory" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 打印清单</a>
<a id="lr_viewcg" class="btn btn-default"><i class="fa fa-address-card"></i>&nbsp;查看采购单</a>
</div>
</div>


+ 16
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/Index.js 查看文件

@@ -202,6 +202,22 @@ var bootstrap = function ($, learun) {
});
}
});
//打印清单
$('#lr_inventory').on('click',
function() {
var keyValue = $('#gridtable').jfGridValue('AAId');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'formAss_AssetsOutApply',
title: '清单',
url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoApply/Inventory?keyValue=' + keyValue,
width: 1000,
height: 700,
callBack: function(id) {
}
});
}
});
},
// 初始化列表
initGird: function () {


+ 222
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/Inventory.cshtml 查看文件

@@ -0,0 +1,222 @@
@{
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>
<table class="table">
<tr>
<th colspan="8" style="text-align:center">西昌民族幼专入库清单</th>
</tr>
<tr>
<td colspan="4">入库日期</td>
<td colspan="4">2020年 &nbsp; &nbsp; &nbsp; &nbsp; 月 &nbsp; &nbsp; &nbsp; &nbsp; 日</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>
<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_AssetsInfoApply/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 + '</td>';//单位
str += '<td>1</td>';//数量
str += '<td>' + entity.aPrice + '</td>';//单价
str += '<td>' + entity.aAllPrice + '</td>';//金额
str += '<td></td></tr>';//用途

//累计金额
price += parseFloat(entity.aPrice);
}
$('.table').find('tr').eq(2).after(str);
$('#moneyUp').html(digitUppercase(price));
$('#moneyLow').html(number_format(price, 2));
})
},
bind: function () {
$("#btnPrint").on('click',
function () {
$('.table').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>


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItemApply/Form.cshtml 查看文件

@@ -47,7 +47,7 @@
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply">
<div class="lr-form-item-title">供应商</div>
<div id="AAISupplierId"></div>
<div id="AAISupplierId" readonly="readonly"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply">
<div class="lr-form-item-title">单价<font face="宋体">*</font></div>
@@ -59,7 +59,7 @@
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply">
<div class="lr-form-item-title">数量单位</div>
<div id="AAIUnit" readonly="readonly"></div>
<div id="AAIUnit" ></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply">
<div class="lr-form-item-title">排序<font face="宋体">*</font></div>


+ 233
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/Inventory.cshtml 查看文件

@@ -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;
}

.tableBox {
width: 90%;
margin: 30px auto;
}
.btn {
width: 100px;
height: 34px;
margin: 30px auto;
border: 1px solid #ccc;
cursor: pointer;
border-radius: 4px;
}

#table {
/* display: none; */
}
</style>
<div id="table">
<div class="btn btn-default" id="btnPrint">打印</div>
<div class="tableBox">
<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年 &nbsp; &nbsp; &nbsp; &nbsp; 月 &nbsp; &nbsp; &nbsp; &nbsp; 日</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>
<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_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 + '</td>';//单位
str += '<td>1</td>';//数量
str += '<td>' + entity.aPrice + '</td>';//单价
str += '<td>' + entity.aAllPrice + '</td>';//金额
str += '<td></td></tr>';//用途

//累计金额
price += parseFloat(entity.aPrice);
}
$('.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();

});
}
}
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>

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Receive/Form.cshtml 查看文件

@@ -5,7 +5,7 @@
<div class="lr-form-wrap">
<div class="col-xs-6 lr-form-item" data-table="Ass_Receive">
<div class="lr-form-item-title">申请人</div>
<div id="ReceiveUser" readonly="readonly" class="form-control" ></div>
<div id="ReceiveUser" class="form-control" ></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_Receive">
<div class="lr-form-item-title">申请人部门</div>


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Receive/Index.cshtml 查看文件

@@ -20,6 +20,7 @@
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_view" class="btn btn-default"><i class="fa fa-search-minus"></i>&nbsp;查看</a>
<a id="lr_inventory" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 打印清单</a>
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;提交</a>
</div>
</div>


+ 16
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Receive/Index.js 查看文件

@@ -156,6 +156,22 @@ var bootstrap = function ($, learun) {
});
}
});
//打印清单
$('#lr_inventory').on('click',
function() {
var keyValue = $('#gridtable').jfGridValue('RID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'formAss_AssetsOutApply',
title: '清单',
url: top.$.rootUrl + '/AssetManagementSystem/Ass_Receive/Inventory?keyValue=' + keyValue,
width: 1000,
height: 700,
callBack: function(id) {
}
});
}
});

},
// 初始化列表


+ 235
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Receive/Inventory.cshtml 查看文件

@@ -0,0 +1,235 @@
@{
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>
<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年 &nbsp; &nbsp; &nbsp; &nbsp; 月 &nbsp; &nbsp; &nbsp; &nbsp; 日</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>
<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_Receive/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>' + 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(3).after(str);
$('#moneyUp').html(digitUppercase(price));
$('#moneyLow').html(number_format(price, 2));
})
},
bind: function () {
$("#btnPrint").on('click',
function () {
$('.table').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>

+ 3
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj 查看文件

@@ -6872,6 +6872,9 @@
<Content Include="Areas\AssetManagementSystem\Views\Ass_AllocationItem\Index.cshtml" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_Acceptance\ViewForm.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\LoginUserBind\BindAccountIndex.cshtml" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsOutApply\Inventory.cshtml" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_Receive\Inventory.cshtml" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsInfoApply\Inventory.cshtml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />
<None Include="Properties\PublishProfiles\FolderProfile1.pubxml" />


+ 8
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfo/Ass_AssetsInfoService.cs 查看文件

@@ -283,8 +283,12 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
var Ass_AssetsInfoItem = new Ass_AssetsInfoItemEntity();
Ass_AssetsInfoItem.Create();
Ass_AssetsInfoItem.AId = entity.AId;
Ass_AssetsInfoItem.AIASSName = entity.AName;
Ass_AssetsInfoItem.AIAssValue = entity.APrice;//价值
Ass_AssetsInfoItem.AIUnits = entity.AUnit;//单位
Ass_AssetsInfoItem.AICodeNum = i + 1;
Ass_AssetsInfoItem.AICode = entity.ACode + "_" + Ass_AssetsInfoItem.AICodeNum;
Ass_AssetsInfoItem.AICodeNumJY = entity.ACode + "_" + Ass_AssetsInfoItem.AICodeNum;
Ass_AssetsInfoItem.AIIStorageId = entity.AIIStorageId;
Ass_AssetsInfoItem.AIIStoragePosition = entity.AIIStoragePosition;
Ass_AssetsInfoItem.AIIsInStorage = true;
@@ -298,8 +302,12 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
var Ass_AssetsInfoItem = new Ass_AssetsInfoItemEntity();
Ass_AssetsInfoItem.Create();
Ass_AssetsInfoItem.AId = entity.AId;
Ass_AssetsInfoItem.AIASSName = entity.AName;
Ass_AssetsInfoItem.AIAssValue = entity.APrice;
Ass_AssetsInfoItem.AIUnits = entity.AUnit;//单位
Ass_AssetsInfoItem.AICodeNum = 1;
Ass_AssetsInfoItem.AICode = entity.ACode + "_" + Ass_AssetsInfoItem.AICodeNum;
Ass_AssetsInfoItem.AICodeNumJY = entity.ACode + "_" + Ass_AssetsInfoItem.AICodeNum;
Ass_AssetsInfoItem.AIIStorageId = entity.AIIStorageId;
Ass_AssetsInfoItem.AIIStoragePosition = entity.AIIStoragePosition;
Ass_AssetsInfoItem.AIIsInStorage = false;


Loading…
取消
儲存