Quellcode durchsuchen

Merge branch '金隅分支' of http://123.57.209.16:3000/bjquanjiang/DigitalScholl into 金隅分支

金隅分支
zhangli vor 3 Jahren
Ursprung
Commit
7e48aba9aa
9 geänderte Dateien mit 1167 neuen und 0 gelöschten Zeilen
  1. +35
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsOutApplyController.cs
  2. +67
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsForm.cshtml
  3. +366
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsForm.js
  4. +44
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsIndex.cshtml
  5. +267
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsIndex.js
  6. +75
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/IndexTwo.cshtml
  7. +286
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/IndexTwo.js
  8. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  9. +21
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsOutApply/Ass_AssetsOutApplyEntity.cs

+ 35
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsOutApplyController.cs Datei anzeigen

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

namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
{
@@ -38,6 +39,36 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
{
return View();
}

/// <summary>
/// 资产调拨多选页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult AssetsIndex()
{
return View();
}

/// <summary>
/// 资产调拨多选页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult AssetsForm()
{
return View();
}
/// <summary>
/// 资产调拨多选页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult IndexTwo()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
@@ -82,6 +113,10 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
{
var Ass_AssetsOutApplyData = ass_AssetsOutApplyIBLL.GetAss_AssetsOutApplyEntity( keyValue );
var Ass_AssetsOutItemApplyData = ass_AssetsOutApplyIBLL.GetAss_AssetsOutItemApplyList( Ass_AssetsOutApplyData.AOId );
Ass_AssetsOutApplyData.AOINewDepartment = Ass_AssetsOutItemApplyData.FirstOrDefault().AOINewDepartment;
Ass_AssetsOutApplyData.AOINewUsePeople = Ass_AssetsOutItemApplyData.FirstOrDefault().AOINewUsePeople;
Ass_AssetsOutApplyData.AOINewStorageId = Ass_AssetsOutItemApplyData.FirstOrDefault().AOINewStorageId;
Ass_AssetsOutApplyData.AOINewRoomId = Ass_AssetsOutItemApplyData.FirstOrDefault().AOINewRoomId;
var jsonData = new {
Ass_AssetsOutApply = Ass_AssetsOutApplyData,
Ass_AssetsOutItemApply = Ass_AssetsOutItemApplyData,


+ 67
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsForm.cshtml Datei anzeigen

@@ -0,0 +1,67 @@
@{
ViewBag.Title = "调拨申请";
Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
var NewAOCode = "@ViewBag.AOCode";
</script>
<div class="lr-form-wrap">
<div class="col-xs-12 lr-form-item" data-table="Ass_AssetsOutApply">
<div class="lr-form-item-title">调拨单流水号</div>
<input id="AOCode" type="text" class="form-control" />
</div>
@*<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply">
<div class="lr-form-item-title">出库总价</div>
<input id="AOPrice" type="text" class="form-control" />
</div>*@
@*<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply">
<div class="lr-form-item-title">调拨原因</div>
<div id="AOReasonType"></div>
</div>*@

@*<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply">
<div class="lr-form-item-title">部门</div>
<div id="AODepartment"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply">
<div class="lr-form-item-title">库房</div>
<div id="AOStorageId"></div>
</div>*@
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply">
<div class="lr-form-item-title">申请时间</div>
<input id="AOCreateTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply">
<div class="lr-form-item-title">申请人</div>
<input id="AOCreateUserId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply">
<div class="lr-form-item-title">新使用部门<font face="宋体">*</font></div>
<div id="AOINewDepartment" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply">
<div class="lr-form-item-title">新使用人员<font face="宋体">*</font></div>
<div id="AOINewUsePeople" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply">
<div class="lr-form-item-title">新楼宇名称<font face="宋体">*</font></div>
<div id="AOINewStorageId" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply">
<div class="lr-form-item-title">新房间号<font face="宋体">*</font></div>
<div id="AOINewRoomId" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply">
<div class="lr-form-item-title">项目名称</div>
<input id="AOProjectName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">明细操作</div>
<input id="detailadd" type="button" class="btn btn-success" value="新增明细" />
<input id="detaildel" type="button" class="btn btn-danger" value="移除明细" />
</div>
<div class="col-xs-12 lr-form-item lr-form-item-grid">
<div id="Ass_AssetsOutItemApply"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsForm.js")

+ 366
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsForm.js Datei anzeigen

@@ -0,0 +1,366 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2019-03-29 11:49
* 描 述:出库申请
*/
var acceptClick;
var keyValue = request('keyValue');
// 设置权限
var setAuthorize;
// 设置表单数据
var setFormData;
// 验证数据是否填写完整
var validForm;
// 保存数据
var save;
var refreshGirdData;
var selectedRow;
var tempdatra = new Array();
//总价计算
var pricecount = 0;
var bootstrap = function ($, learun) {
"use strict";
// 设置权限
setAuthorize = function (data) {
};
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
$("#detailadd").on('click', function () {
selectedRow = null;
learun.layerForm({
id: 'formitem',
title: '新增明细',
url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/IndexTwo',
width: 860,
height: 600,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
$("#detaildel").on('click', function () {
var keyValue = $('#Ass_AssetsOutItemApply').jfGridValue('AOIId');
console.log(keyValue);
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res, index) {
if (res) {
$.each(tempdatra, function (key, val) {
if (tempdatra[key].AOIId === keyValue) {
pricecount -= tempdatra[key].AOIPrice * tempdatra[key].AOIStock;
tempdatra.splice(key, 1);
}
});
$("#AOPrice").val(pricecount);
$('#Ass_AssetsOutItemApply').jfGridSet('refreshdata', tempdatra.sort(sortNumber));
top.layer.close(index);
}
});
}
});
page.bind();
page.initData();
},
bind: function () {
//新楼宇
$('#AOINewStorageId').lrselect({
type: 'tree',
allowSearch: true,
url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetTree',
param: {},
select: function (val) {
var storageId = "";
if (val) {
storageId = val.value;
}
$('#AOINewRoomId').lrselectRefresh({
url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetListForStorageId?storageId=' + storageId,
text: "RCode",
value: "RId", allowSearch: true
});
}
});
//新房间
$('#AOINewRoomId').lrselect({ value: 'RId', text: 'RCode', allowSearch: true });
$('#AOINewDepartment').lrselect({
type: 'tree',
allowSearch: true,
url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree',
param: {},
select: function (val) {
var departmentId = "";
if (val) {
departmentId = val.value;
}
$('#AOINewUsePeople').lrselectRefresh({
url: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByDepartmentId?departmentId=' + departmentId,
text: "F_RealName",
value: "F_UserId",
})
}
});
$('#AOINewUsePeople').lrselect({ value: 'F_UserId', text: 'F_RealName' });
$('#AOReasonType').lrDataItemSelect({ code: 'ReasonType' });
$('#AOCreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
$('#AOCreateUserId')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
$('#AOCreateUserId').val(learun.clientdata.get(['userinfo']).realName);
$('#AODepartment').lrselect({
type: 'tree',
allowSearch: true,
url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree',
param: {}
});
$('#AOStorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' });
$('#Ass_AssetsOutItemApply').jfGrid({
headData: [
{
label: '资产编号', name: 'AOICode', width: 150, align: 'left'
},
{
label: '资产名称', name: 'AOIName', width: 150, align: 'left'
},
{
label: '资产类别', name: 'AOITId', width: 150, align: 'left', formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_AssetsType',
key: value,
keyId: 'atid',
callback: function (_data) {
callback(_data['aname']);
}
});
}
},
{
label: '单价', name: 'AOIPrice', width: 100, align: 'left'
},
//{
// label: '数量', name: 'AOIStock', width: 80, align: 'left'
//},
{
label: '单位', name: 'AOIUnit', width: 80, align: 'left', formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'sldw',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: "使用人", name: "AOIUserPeople", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
key: value,
keyId: 'f_userid',
callback: function (_data) {
callback(_data['f_realname']);
}
});
}
},
{
label: "原部门", name: "AOIOldDepartment", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
key: value,
keyId: 'id',
callback: function (_data) {
callback(_data['name']);
}
});
}
},
{
label: "原楼宇", name: "AOIStorageId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData',
key: value,
keyId: 'sid',
callback: function (_data) {
callback(_data['sname']);
}
});
}
},
{
label: "原房间", name: "AOIRoomId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_Storage_Room',
key: value,
keyId: 'rid',
callback: function (_data) {
callback(_data['rcode']);
}
});
}
},
{
label: "新使用人", name: "AOINewUsePeople", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
key: value,
keyId: 'f_userid',
callback: function (_data) {
callback(_data['f_realname']);
}
});
}
},
{
label: "新部门", name: "AOINewDepartment", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
key: value,
keyId: 'id',
callback: function (_data) {
callback(_data['name']);
}
});
}
},
{
label: "新楼宇", name: "AOINewStorageId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData',
key: value,
keyId: 'sid',
callback: function (_data) {
callback(_data['sname']);
}
});
}
},
{
label: "新房间", name: "AOINewRoomId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_Storage_Room',
key: value,
keyId: 'rid',
callback: function (_data) {
callback(_data['rcode']);
}
});
}
},
{
label: '资产型号', name: 'AOIModel', width: 100, align: 'left'
},
{
label: '生产厂家', name: 'AOIManufacturer', width: 100, align: 'left'
},
{
label: '资产规格', name: 'AOISpecification', width: 100, align: 'left'
},
{
label: '用途', name: 'AOIUse', width: 100, align: 'left'
},
],
height: 400,
mainId: 'AOIId',
reloadSelected: false
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
tempdatra = data[id];
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
if (data[id].AOPrice) {
pricecount = data[id].AOPrice;
}
}
}
});
} else {
$("#AOCode").val(NewAOCode);
}
}
};
refreshGirdData = function (temprow) {
var ifnewrow = true;
$.each(tempdatra, function (key, val) {
if (tempdatra[key].AOIId === temprow.AOIId) {
tempdatra[key] = temprow;
ifnewrow = false;
}
});
if (ifnewrow) {
tempdatra.push(temprow);
}
//总价计算
pricecount = 0;
for (var i = 0; i < tempdatra.length; i++) {
pricecount += tempdatra[i].AOIPrice * tempdatra[i].AOIStock;
}
$("#AOPrice").val(pricecount);
$('#Ass_AssetsOutItemApply').jfGridSet('refreshdata', tempdatra.sort(sortNumber));
};
function sortNumber(a, b) {
return a.AOIOrder - b.AOIOrder;
}
// 设置表单数据
setFormData = function (processId) {
if (!!processId) {
$.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/GetFormDataByProcessId?processId=' + processId, function (data) {
for (var id in data) {
if (!!data[id] && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
if (id == 'Ass_AssetsOutApply') {
keyValue = data[id].AOId;
}
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
// 验证数据是否填写完整
validForm = function () {
if (!$('#form').lrValidform()) {
return false;
}
var datas = $('#Ass_AssetsOutItemApply').jfGridGet('rowdatas');
if (datas == null || datas.length == 0) {
learun.alert.warning("申请未包含明细!请先新增明细!");
return false;
}
return true;
};
// 保存数据
save = function (processId, callBack, i) {
var postData = {};
var formData = $('[data-table="Ass_AssetsOutApply"]').lrGetFormData();
if (!!processId) {
formData.AOProcessId = processId;
}
//出库类型改为调拨(金隅)
formData.AOReasonType = 3;
postData.strEntity = JSON.stringify(formData);
postData.strass_AssetsOutItemApplyList = JSON.stringify($('#Ass_AssetsOutItemApply').jfGridGet('rowdatas'));
$.lrSaveForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack(res, formData, i);
}
});
};
page.init();
}

+ 44
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsIndex.cshtml Datei anzeigen

@@ -0,0 +1,44 @@
@{
ViewBag.Title = "出库申请";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="datesearch"></div>
</div>
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">申请单号</div>
<input id="AOCode" type="text" class="form-control" />
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;录入</a>
<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-address-card"></i>&nbsp;查看</a>
</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_incom" class="btn btn-default"><i class="fa fa-mail-reply-all"></i>&nbsp;查看缺货单</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsIndex.js")

+ 267
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsIndex.js Datei anzeigen

@@ -0,0 +1,267 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2019-03-29 11:49
* 描 述:出库申请
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var startTime;
var endTime;
var processId = '';
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 时间搜索框
$('#datesearch').lrdate({
dfdata: [
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
],
// 月
mShow: false,
premShow: false,
// 季度
jShow: false,
prejShow: false,
// 年
ysShow: false,
yxShow: false,
preyShow: false,
yShow: false,
// 默认
dfvalue: '3',
selectfn: function (begin, end) {
startTime = begin;
endTime = end;
page.search();
}
});
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'formAss_AssetsOutApply',
title: '新增',
url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/AssetsForm',
width: 1000,
height: 750,
callBack: function (id) {
var res = false;
// 验证数据
res = top[id].validForm();
// 保存数据
if (res) {
//processId = learun.newGuid();
//res = top[id].save(processId, refreshGirdData);
res = top[id].save('', function () {
page.search();
});
}
return res;
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('AOId');
if (learun.checkrow(keyValue)) {
var AAStatus = $('#gridtable').jfGridValue('AOStatus');
if (AAStatus !== 0) {
learun.alert.warning("当前项目已提交不能编辑!");
return;
}
learun.layerForm({
id: 'formAss_AssetsOutApply',
title: '编辑',
url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/AssetsForm?keyValue=' + keyValue,
width: 1000,
height: 750,
callBack: function (id) {
var res = false;
// 验证数据
res = top[id].validForm();
// 保存数据
if (res) {
res = top[id].save('', function () {
page.search();
});
}
return res;
}
});
}
});
// 查看申请
$('#lr_view').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('AOId');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'formAss_AssetsInfoApply',
title: '查看调拨申请',
url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/FormView?keyValue=' + keyValue,
width: 1000,
height: 600,
btn: null
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('AOId');
console.log(keyValue);
if (learun.checkrow(keyValue)) {
var AAStatus = $('#gridtable').jfGridValue('AOStatus');
if (AAStatus !== 0) {
learun.alert.warning("当前项目已提交不能删除!");
return;
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutItemApply/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//  提交
$('#lr_submit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('AOId');
if (learun.checkrow(keyValue)) {
var AAStatus = $('#gridtable').jfGridValue('AOStatus');
if (AAStatus !== 0) {
learun.alert.warning("当前项目已提交,请耐心等待审批!");
return;
}
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
processId = learun.newGuid();
learun.postForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutItemApply/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (res) {
refreshGirdData(res, {});
});
}
});
}
});
//缺货单
$('#lr_incom').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('AOId');
if (learun.checkrow(keyValue)) {
var AOAIId = $('#gridtable').jfGridValue('AOAIId');
if (AOAIId == null || AOAIId === undefined || AOAIId === "") {
learun.alert.warning("当前项目不含缺货单!");
return;
}
learun.layerForm({
id: 'formAss_AssetsOutApplyIncomplete',
title: '查看缺货单',
url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApplyIncomplete/AssetsForm?keyValue=' + keyValue,
width: 1000,
height: 700,
btn: ["调拨", "关闭"],
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/GetPageList',
headData: [
{ label: "调拨单流水号", name: "AOCode", width: 200, align: "left" },
{ label: "调拨总价", name: "AOPrice", width: 100, align: "left" },
//{
// label: "出库原因", name: "AOReasonType", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
// learun.clientdata.getAsync('dataItem', {
// key: value,
// code: 'ReasonType',
// callback: function (_data) {
// callback(_data.text);
// }
// });
// }
//},
{ label: "项目名称", name: "AOProjectName", width: 150, align: "left" },
{ label: "申请时间", name: "AOCreateTime", width: 150, align: "left" },
{
label: "申请人", name: "AOCreateUserId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('user', {
key: value,
callback: function (_data) {
callback(_data.name);
}
});
}
},
{
label: "审批状态", name: "AOStatus", width: 100, align: "left",
formatter: function (cellvalue, row) {
if (cellvalue === 1) {
return '<span class=\"label label-warning\">审批中</span>';
} else if (cellvalue === 2) {
return '<span class=\"label label-success\">审批通过</span>';
} else {
return '<span class=\"label label-default\" >草稿</span>';
}
}
},
{
label: "调拨状态", name: "AOOutStatus", width: 100, align: "left",
formatter: function (cellvalue, row) {
if (cellvalue === 0) {
return '<span class=\"label label-warning\">待调拨</span>';
} else if (cellvalue === 2) {
return '<span class=\"label label-success\">调拨完成</span>';
} else {
return '<span class=\"label label-default\" >部分调拨</span>';
}
}
}
],
mainId: 'AOId',
isPage: true,
sidx: 'AOCreateTime',
sord: 'DASC'
});
},
search: function (param) {
param = param || {};
param.StartTime = startTime;
param.EndTime = endTime;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function (res, postData) {
if (res && res.code && res.code == 200) {
// 发起流程
var postData = {
schemeCode: 'Ass_AssetsOutApply',// 填写流程对应模板编号
processId: processId,
level: '1',
};
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) {
learun.loading(false);
});

}
page.search();
};
page.init();
}

+ 75
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/IndexTwo.cshtml Datei anzeigen

@@ -0,0 +1,75 @@
@{
/**/

ViewBag.Title = "在册登记明细";
Layout = "~/Views/Shared/_Index.cshtml";
}
<script src="/Content/js/qrcode.min.js"></script>
<script src="/Content/Lodop/LodopFuncs.js"></script>
<div class="qrcodeBox" style="display:none">
<div style="">
<div id="qrcode" style="margin:0 auto 5px;"></div>
<div class="qrcodeTxt" style="font-size:12px;"></div>
</div>
</div>
<div class="lr-layout lr-layout-left-center ">
<div class="lr-layout-left">
<div class="lr-layout-wrap">
<div class="lr-layout-title lrlt ">资产类别</div>
<div id="dataTree" class="lr-layout-body"></div>
</div>
</div>
<div class="lr-layout-center">
<div class="lr-layout-wrap ">
<div class="lr-layout-title">
<span id="titleinfo" class="lrlt">列表信息</span>
</div>
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">金隅编号</div>
<input id="AICodeNumJY" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">部门</div>
<div id="AIDepartment"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">资产名称</div>
<input id="AIASSName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">楼宇名称</div>
<div id="AIIStorageId"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">房间号</div>
<div id="AIIStoragePosition"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">资产状态</div>
<div id="AIASSState"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">资产属性</div>
<div id="AIAssType"></div>
</div>

</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/IndexTwo.js")

+ 286
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/IndexTwo.js Datei anzeigen

@@ -0,0 +1,286 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2019-03-29 11:27
* 描 述:在册登记明细
*/
var refreshGirdData;
var acceptClick;
var AId = request("AId");
var currentUser = request("currentUser");//我的资产需要用到
var IsDelete = request("IsDelete");//报废资产需要使用
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
if (currentUser) {
setTimeout("hiddenButton()", 300);

}

},
bind: function () {

// 初始化左侧树形数据lr_printBar
$('#dataTree').lrtree({
url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItem/GetTypeTree',
nodeClick: function (item) {
page.search({ AIASSClass: item.value });
}
});
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 400, 400);
//$('#AIIStorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' });
$('#AIIStorageId').lrselect({
type: 'tree',
allowSearch: true,
url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetTree',
param: {},
select: function (val) {
var storageId = "";
if (val) {
storageId = val.value;
}
$('#AIIStoragePosition').lrselectRefresh({
url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetListForStorageId?storageId=' + storageId,
text: "RCode",
value: "RId", allowSearch: true
});
}
});
//房间
$('#AIIStoragePosition').lrselect({ value: 'RId', text: 'RCode', allowSearch: true });
$('#AIASSState').lrDataItemSelect({ code: 'AssState' });
$('#AIAssType').lrDataItemSelect({ code: 'AssType' });
$('#AIDepartment').lrDepartmentSelect();
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});


},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItem/GetPageList',
headData: [
//{ label: "明细编号", name: "AICode", width: 200, align: "left" },
//{ label: "序号", name: "AICodeNum", width: 100, align: "left" },
{ label: "资产编号", name: "AICodeNumJY", width: 200, align: "left" },
{
label: "楼宇名称", name: "AIIStorageId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData',
key: value,
keyId: 'sid',
callback: function (_data) {
callback(_data['sname']);
}
});
}
},
{
label: "房间号", name: "AIIStoragePosition", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_Storage_Room',
key: value,
keyId: 'rid',
callback: function (_data) {
callback(_data['rcode']);
}
});
}
},
{
label: "房间功能", name: "RFunction", width: 150, align: "left"
},
{
label: "房间面积", name: "RArea", width: 100, align: "left"
},
{
label: "房间状态", name: "REnabled", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'RoomState',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "资产名称", name: "AIASSName", width: 200, align: "left" },
{ label: "资产规格", name: "AISpecification", width: 100, align: "left" },
{
label: "资产型号", name: "AISpecificationtype", width: 100, align: "left"
},
{
label: "计量单位", name: "AIUnits", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem',
{
key: value,
code: 'sldw',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: "资产状态", name: "AIASSState", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'AssState',
callback: function (_data) {
callback(_data.text);
}
});
}
},
//{ label: "管理部门", name: "AdministrativeDepartment", width: 100, align: "left" },
{
label: "管理部门", name: "AIDepartment", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('department', {
key: value,
callback: function (_data) {
callback(_data.name);
}
});
}
},
{
label: "使用人", name: "AIUsePeople", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
key: value,
keyId: 'f_userid',
callback: function (_data) {
callback(_data['f_realname']);
}
});
}
},
{ label: "存放地点", name: "AIPlace", width: 100, align: "left" },
{ label: "资产原价值", name: "AIAssValue", width: 100, align: "left" },
{ label: "购置日期", name: "AIAddTime", width: 100, align: "left" },
{ label: "备注", name: "AIRemark", width: 100, align: "left" },
{ label: "折旧方法", name: "DepreciationMethod", width: 100, align: "left" },
{ label: "折旧状态", name: "DepreciationStatus", width: 100, align: "left" },
{ label: "折旧年限", name: "UsefulLife", width: 100, align: "left" },
{ label: "月折旧额", name: "MonthlyDepreciation", width: 100, align: "left" },
{ label: "已提折旧月数", name: "MonthsOfDepreciation", width: 100, align: "left" },
{ label: "月折旧率", name: "MonthlyDepreciationRate", width: 100, align: "left" },
{ label: "累计折旧", name: "AccumulatedDepreciation", width: 100, align: "left" },
{ label: "净值", name: "NetWorth", width: 100, align: "left" },
{ label: "车辆行驶证所有人", name: "VehicleLicenseUser", width: 100, align: "left" },
{ label: "车辆识别号", name: "AIVehicleNumber", width: 100, align: "left" },
{ label: "车牌号", name: "AIPlateNumber", width: 100, align: "left" },
{ label: "面积", name: "AIBuiltArea", width: 100, align: "left" },
{ label: "权属证号", name: "AIOwnership", width: 100, align: "left" },
{ label: "土地使用权类型", name: "LandUseType", width: 100, align: "left" },
{ label: "土地使用权人/房屋所有权人", name: "LandUseUser", width: 200, align: "left" }

],
mainId: 'AIId',
isMultiselect: true,
isPage: true,
sidx: 'AICodeNum'
});
page.search();
},
search: function (param) {
param = param || {};
param.AId = AId;
if (currentUser) {
var userInfo = top.learun.clientdata.get(['userinfo']);
param.userId = userInfo.userId;
}
param.AIIsScrap = false;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
page.search();
};
// 保存数据
acceptClick = function (callBack) {
var selectedRow = $('#gridtable').jfGridGet('rowdata');
callBack(selectedRow);

};
page.init();
}


Date.prototype.Format = function (fmt) { //author: meizz
var o = {
"M+": this.getMonth() + 1, //月份
"d+": this.getDate(), //日
"H+": this.getHours(), //小时
"m+": this.getMinutes(), //分
"s+": this.getSeconds(), //秒
"q+": Math.floor((this.getMonth() + 3) / 3), //季度
"S": this.getMilliseconds() //毫秒
};
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
for (var k in o)
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
return fmt;
}


function datedifference(sDate1, sDate2) { //sDate1和sDate2是2006-12-18格式
var dateSpan,
tempDate,
iDays;
sDate1 = Date.parse(sDate1);
sDate2 = Date.parse(sDate2);
dateSpan = sDate2 - sDate1;
dateSpan = Math.abs(dateSpan);
iDays = Math.floor(dateSpan / (24 * 3600 * 1000));
return iDays;
};



function AddPrintContent(html) {
var myHtml = myHtml = html;
// var strBodyStyle="<style>"+document.getElementById("style1").innerHTML+"</style>";
// var strFormHtml=strBodyStyle+"<body>"+myHtml+"</body>";
var strFormHtml = "<body>" + myHtml + "</body>";

LODOP = getLodop();
LODOP.PRINT_INIT("资产编号");
LODOP.SET_PRINT_PAGESIZE(2, '40mm', '32.3mm', "");

LODOP.SET_PRINT_MODE("PRINT_DUPLEX", 2);
LODOP.SET_PRINT_MODE("PRINT_DEFAULTSOURCE", 7);

LODOP.ADD_PRINT_HTM(10, 8, '40mm', '30mm', strFormHtml);
//打印预览
// LODOP.SET_SHOW_MODE("LANDSCAPE_DEFROTATED",1);
// var TaskID1=LODOP.PREVIEW();
// 直接打印
var TaskID1 = LODOP.PRINT();

};
function hiddenButton() {

$("#lr_add").hide();
$("#lr_printBar").hide();
$("#lr_edit").hide();
$("#lr_delete").hide();
$("#lr_detail").hide();
$("#lr_import").hide();
}


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Datei anzeigen

@@ -878,6 +878,7 @@
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsInfoItemApply\Form.js" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsInfoItemApply\FormPurchase.js" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsInfoItemApply\Index.js" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsOutApply\AssetsForm.js" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsInfoItem\Form.js" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsInfoItem\FormView.js" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsInfoItem\Index.js" />
@@ -891,7 +892,9 @@
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsOutApplyIncomplete\Index.js" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsOutApply\Form.js" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsOutApply\FormView.js" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsOutApply\AssetsIndex.js" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsOutApply\Index.js" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsOutApply\IndexTwo.js" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsOutItemApply\Form.js" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsOutItemApply\Index.js" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsType\Form.js" />
@@ -7350,6 +7353,9 @@
<Content Include="Areas\AssetManagementSystem\Views\Ass_Acceptance\Form.cshtml" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_Acceptance\FormView.cshtml" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsInfoItemApply\FormJY.cshtml" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsOutApply\AssetsIndex.cshtml" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsOutApply\AssetsForm.cshtml" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsOutApply\IndexTwo.cshtml" />
<None Include="Areas\EducationalAdministration\Views\SchoolNews\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\StuTuition.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\IsHelpForm.cshtml" />


+ 21
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsOutApply/Ass_AssetsOutApplyEntity.cs Datei anzeigen

@@ -72,6 +72,27 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
[Column("AOPROJECTNAME")]
public string AOProjectName { get; set; }

/// <summary>
/// 新使用部门
/// </summary>
[NotMapped]
public string AOINewDepartment { get; set; }
/// <summary>
/// 新使用人员
/// </summary>
[NotMapped]
public string AOINewUsePeople { get; set; }
/// <summary>
/// 新楼宇名称
/// </summary>
[NotMapped]
public string AOINewStorageId { get; set; }
/// <summary>
/// 新房间号
/// </summary>
[NotMapped]
public string AOINewRoomId { get; set; }

#endregion

#region 扩展操作


Laden…
Abbrechen
Speichern