@@ -7,26 +7,17 @@ | |||
</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> | |||
<div class="lr-form-item-title">出库单流水号</div> | |||
<input id="AOCode" type="text" class="form-control" readonly="readonly" /> | |||
</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" readonly="readonly" /> | |||
</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 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" readonly="readonly" /> | |||
</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="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> | |||
<input id="AOCreateTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" /> | |||
@@ -35,10 +26,6 @@ | |||
<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">项目名称</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="新增明细" /> | |||
@@ -83,13 +83,6 @@ var bootstrap = function ($, learun) { | |||
$('#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: [ | |||
{ | |||
@@ -113,9 +106,9 @@ var bootstrap = function ($, learun) { | |||
{ | |||
label: '单价', name: 'AOIPrice', width: 100, align: 'left' | |||
}, | |||
//{ | |||
// label: '数量', name: 'AOIStock', width: 80, 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', { | |||
@@ -128,95 +121,14 @@ var bootstrap = function ($, learun) { | |||
} | |||
}, | |||
{ | |||
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: "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: 'AOIEName', width: 100, align: 'left' | |||
}, | |||
{ | |||
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', | |||
@@ -303,8 +215,6 @@ var bootstrap = function ($, learun) { | |||
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) { | |||
@@ -3,35 +3,27 @@ | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap"> | |||
<div class="col-xs-12 lr-form-item" data-table="Ass_AssetsOutApply"> | |||
<div class="lr-form-item-title">调拨单流水号</div> | |||
<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" readonly="readonly" /> | |||
</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" readonly="readonly" /> | |||
<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" readonly="readonly"/> | |||
</div> | |||
@*<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply"> | |||
<div class="lr-form-item-title">出库原因</div> | |||
<div id="AOReasonType" readonly="readonly"></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="AOReasonType" readonly="readonly" ></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="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">项目名称</div> | |||
<input id="AOProjectName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item lr-form-item-grid"> | |||
<div class="col-xs-12 lr-form-item lr-form-item-grid" > | |||
<div id="Ass_AssetsOutItemApply"></div> | |||
</div> | |||
</div> | |||
@@ -34,12 +34,6 @@ var bootstrap = function ($, learun) { | |||
$('#AOReasonType').lrDataItemSelect({ code: 'ReasonType' }); | |||
$('#AOCreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); | |||
$('#AOCreateUserId')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | |||
$('#AODepartment').lrselect({ | |||
type: 'tree', | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', | |||
param: {} | |||
}); | |||
$('#AOCreateUserId').val(learun.clientdata.get(['userinfo']).realName); | |||
$('#Ass_AssetsOutItemApply').jfGrid({ | |||
headData: [ | |||
@@ -78,84 +72,6 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}, | |||
{ | |||
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: "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: 'AOIEName', width: 100, align: 'left' | |||
}, | |||
@@ -164,13 +80,7 @@ var bootstrap = function ($, learun) { | |||
}, | |||
{ | |||
label: '生产厂家', name: 'AOIManufacturer', width: 100, align: 'left' | |||
}, | |||
{ | |||
label: '资产规格', name: 'AOISpecification', width: 100, align: 'left' | |||
}, | |||
{ | |||
label: '用途', name: 'AOIUse', width: 100, align: 'left' | |||
}, | |||
} | |||
], | |||
height: 400, | |||
mainId: 'AAIId', | |||
@@ -219,7 +129,7 @@ var bootstrap = function ($, learun) { | |||
return a.AOIOrder - b.AOIOrder; | |||
} | |||
// 设置表单数据 | |||
setFormData = function (processId,param,callback) { | |||
setFormData = function (processId, param, callback) { | |||
if (!!processId) { | |||
$.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/GetFormDataByProcessId?processId=' + processId, function (data) { | |||
for (var id in data) { | |||
@@ -235,7 +145,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
}); | |||
} | |||
callback&& callback() | |||
callback && callback() | |||
} | |||
// 验证数据是否填写完整 | |||
validForm = function () { | |||
@@ -110,7 +110,7 @@ var bootstrap = function ($, learun) { | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'formAss_AssetsInfoApply', | |||
title: '查看调拨申请', | |||
title: '查看出库申请', | |||
url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/FormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 600, | |||
@@ -170,7 +170,7 @@ var bootstrap = function ($, learun) { | |||
url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApplyIncomplete/Form?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 700, | |||
btn: ["调拨", "关闭"], | |||
btn: ["出库", "关闭"], | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
@@ -183,19 +183,19 @@ var bootstrap = function ($, learun) { | |||
$('#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: "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" }, | |||
{ | |||
@@ -222,14 +222,14 @@ var bootstrap = function ($, learun) { | |||
} | |||
}, | |||
{ | |||
label: "调拨状态", name: "AOOutStatus", width: 100, align: "left", | |||
label: "出库状态", name: "AOOutStatus", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue === 0) { | |||
return '<span class=\"label label-warning\">待调拨</span>'; | |||
return '<span class=\"label label-warning\">待出库</span>'; | |||
} else if (cellvalue === 2) { | |||
return '<span class=\"label label-success\">调拨完成</span>'; | |||
return '<span class=\"label label-success\">出库完成</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >部分调拨</span>'; | |||
return '<span class=\"label label-default\" >部分出库</span>'; | |||
} | |||
} | |||
} | |||
@@ -37,10 +37,10 @@ | |||
<div class="lr-form-item-title">单价</div> | |||
<input id="AOIPrice" type="text" class="form-control" readonly="readonly" /> | |||
</div> | |||
@*<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutItemApply"> | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutItemApply"> | |||
<div class="lr-form-item-title">数量<font face="宋体">*</font></div> | |||
<input id="AOIStock" type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatint" /> | |||
</div>*@ | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutItemApply"> | |||
<div class="lr-form-item-title">资产规格</div> | |||
<input id="AOISpecification" type="text" class="form-control" readonly="readonly" /> | |||
@@ -49,7 +49,7 @@ | |||
<div class="lr-form-item-title">用途</div> | |||
<input id="AOIUse" type="text" class="form-control" readonly="readonly" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutItemApply"> | |||
@*<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutItemApply"> | |||
<div class="lr-form-item-title">原使用部门</div> | |||
<div id="AOIOldDepartment" readonly="readonly"> </div> | |||
</div> | |||
@@ -72,7 +72,7 @@ | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutItemApply"> | |||
<div class="lr-form-item-title">新库存位置<font face="宋体">*</font></div> | |||
<div id="AOINewStorageId" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
</div>*@ | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutItemApply"> | |||
<div class="lr-form-item-title">用途</div> | |||
<input id="AOIUse" type="text" class="form-control" readonly="readonly" /> | |||
@@ -27,62 +27,38 @@ var bootstrap = function ($, learun) { | |||
// 访问数据接口地址 | |||
url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsType/GetAllTree' | |||
}); | |||
$('#AOIUsePeople').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_userid', text: 'f_realname' }); | |||
$('#AOIOldDepartment').lrselect({ | |||
type: 'tree', | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', | |||
param: {} | |||
}); | |||
$('#AOIStorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); | |||
$('#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' }); | |||
$('#AOINewStorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); | |||
$("#AAOldCode").lrlayerselect({ | |||
treeUrl: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsType/GetAllTree', | |||
treeParentId: '', | |||
treeValueId: '', | |||
treeTextId: '', | |||
dataUrl: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItem/GetList', | |||
dataTreeId: 'AIASSClass', | |||
dataValueId: 'aiid', | |||
dataTextId: 'aiassname', | |||
treeParentId: 'atptid', | |||
treeValueId: 'atid', | |||
treeTextId: 'aname', | |||
dataUrl: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfo/GetList', | |||
dataTreeId: 'ATId', | |||
dataValueId: 'AId', | |||
dataTextId: 'AName', | |||
grid: [ | |||
{ label: '资产编号', name: 'aicodenumjy', width: 150, align: 'left' }, | |||
{ label: '资产名称', name: 'aiassname', width: 150, align: 'left' }, | |||
{ label: '资产编号', name: 'ACode', width: 200, align: 'left' }, | |||
{ label: '资产名称', name: 'AName', width: 200, align: 'left' }, | |||
{ label: "库存", name: "AStock", width: 80, 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', | |||
label: "单位", name: "AUnit", width: 80, align: "left", formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
keyId: 'sid', | |||
code: 'sldw', | |||
callback: function (_data) { | |||
callback(_data['sname']); | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "资产型号", name: "amodel", width: 150, align: "left" }, | |||
{ label: "生产厂家", name: "amanufacturer", width: 150, align: "left" }, | |||
{ label: "英文名称", name: "AEName", width: 200, align: "left" }, | |||
{ label: "资产型号", name: "AModel", width: 200, align: "left" }, | |||
{ label: "生产厂家", name: "AManufacturer", width: 200, align: "left" }, | |||
{ | |||
label: "供应商", name: "asupplierid", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { | |||
label: "供应商", name: "ASupplierId", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_SupplierData', | |||
key: value, | |||
@@ -97,26 +73,27 @@ var bootstrap = function ($, learun) { | |||
select: function (values, texts) { | |||
if (values && values.length > 0) { | |||
//绑定 | |||
$.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItem/GetFormData?keyValue=' + values[0], function (data) { | |||
data = data.Ass_AssetsInfoItem; | |||
$('#AOITId').lrselectSet(data.AIASSClass); | |||
$('#AOICode').val(data.AICodeNumJY); | |||
$('#AOIName').val(data.AIASSName); | |||
$('#AOIUnit').lrselectSet(data.AIUnits); | |||
$('#AOIModel').val(data.AISpecificationtype); | |||
$('#AOIManufacturer').val(data.AIManufacturer); | |||
$('#AOIPrice').val(data.AIAssValue); | |||
$('#AOISpecification').val(data.AISpecification); | |||
$('#AOIUse').val(data.AIUse); | |||
$('#AOIOldDepartment').lrselectSet(data.AIDepartment); | |||
$('#AOIUsePeople').lrselectSet(data.AIUsePeople); | |||
$('#AOIStorageId').lrselectSet(data.AIIStorageId); | |||
$.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfo/GetFormData?keyValue=' + values[0], function (data) { | |||
data = data.Ass_AssetsInfo; | |||
$('#AOITId').lrselectSet(data.ATId); | |||
$('#AOICode').val(data.ACode); | |||
$('#AOIName').val(data.AName); | |||
$('#AOIUnit').lrselectSet(data.AUnit); | |||
$('#AOIEName').val(data.AEName); | |||
$('#AOIModel').val(data.AModel); | |||
$('#AOIManufacturer').val(data.AManufacturer); | |||
$('#AOIPrice').val(data.APrice); | |||
maxstock = data.AStock; | |||
if (data.HasDetail === true) { | |||
$("#AOIStock").attr("checkexpession", "PositiveInteger"); | |||
} else { | |||
$("#AOIStock").attr("checkexpession", "PositiveFloatint"); | |||
} | |||
}); | |||
} | |||
}, | |||
isMultiple: false | |||
}); | |||
$('#AOIUnit').lrDataItemSelect({ code: 'sldw' }); | |||
}); $('#AOIUnit').lrDataItemSelect({ code: 'sldw' }); | |||
$('#AOIPhoto').lrUploader(); | |||
}, | |||
@@ -278,7 +278,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||
var assinfoapp = db.FindEntity<Ass_AssetsInfoApplyEntity>(m => m.AAProcessId == processId); | |||
var assPurchase = db.FindEntity<Ass_PurchaseEntity>(a => a.PId == assinfoapp.PId); | |||
//通知申请人 | |||
var purchaseApplyEntity = db.FindEntity<Ass_PurchaseApplyEntity>(a => a.PAId = assPurchase.PAId); | |||
var purchaseApplyEntity = db.FindEntity<Ass_PurchaseApplyEntity>(a => a.PAId == assPurchase.PAId); | |||
purchaseApplyEntity.PIsInStorage = "已入库"; | |||
db.Update(purchaseApplyEntity); | |||
if (null != assPurchase) | |||
@@ -286,8 +286,6 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||
ac.ACInOrOut = false; | |||
ac.ACReasonType = assinfoapp.AOReasonType; | |||
ac.ACDetailId = assinfoapp.AOId; | |||
ac.ACDepartment = assinfoapp.AODepartment; | |||
ac.ACStorageId = assinfoapp.AOStorageId; | |||
bool ifinsertac = false; | |||
var Ass_AssetsOutItemApplyList = | |||
@@ -302,220 +300,173 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||
Ass_AssetsOutApplyIncomplete.AOCreateTime = DateTime.Now; | |||
Ass_AssetsOutApplyIncomplete.AOOutStatus = 0; | |||
//存放位置变动 | |||
foreach (var outItemApply in Ass_AssetsOutItemApplyList) | |||
{ | |||
var Ass_AssetsInfoItemList = db.FindEntity<Ass_AssetsInfoItemEntity>(m => m.AICodeNumJY == outItemApply.AOICode); | |||
if (Ass_AssetsInfoItemList != null) | |||
//先检查库存 | |||
var assinfoitem = assinfo.FirstOrDefault(m => m.ACode == outItemApply.AOICode); | |||
if (assinfoitem.AStock >= outItemApply.AOIStock) | |||
{ | |||
//调拨 | |||
if (assinfoapp.AOReasonType.ToInt() == 3) | |||
ifinsertac = true; | |||
//库存充足 | |||
if (assinfoitem.HasDetail == true)//有明细 | |||
{ | |||
//消耗品 | |||
if (Ass_AssetsInfoItemList.AIAssType == 1) | |||
//库存明细 | |||
var Ass_AssetsInfoItemList = | |||
db.FindList<Ass_AssetsInfoItemEntity>(m => m.AId == assinfoitem.AId && m.AIIsInStorage == true).Take(outItemApply.AOIStock.ToInt()).ToList(); | |||
for (int i = 0; i < Ass_AssetsInfoItemList.Count; i++) | |||
{ | |||
db.Delete(Ass_AssetsInfoItemList); | |||
//库存减1 | |||
var assinfofather = | |||
db.FindEntity<Ass_AssetsInfoEntity>(a => a.AId == Ass_AssetsInfoItemList.AId); | |||
if (assinfofather.AStock > 1) | |||
{ | |||
assinfofather.AStock = assinfofather.AStock - 1; | |||
} | |||
db.Update(assinfofather); | |||
var Ass_AssetsChangeItem = new Ass_AssetsChangeItemEntity(); | |||
Ass_AssetsChangeItem.Create(); | |||
Ass_AssetsChangeItem.ACId = ac.ACId; | |||
Ass_AssetsChangeItem.AIId = Ass_AssetsInfoItemList[i].AIId; | |||
Ass_AssetsChangeItem.ACOldStock = assinfoitem.AStock; | |||
Ass_AssetsChangeItem.AAmount = 1; | |||
Ass_AssetsChangeItem.ACNewStock = Ass_AssetsChangeItem.ACOldStock - 1; | |||
Ass_AssetsChangeItem.ACTime = DateTime.Now; | |||
Ass_AssetsChangeItem.ACUserId = assinfoapp.AOCreateUserId; | |||
Ass_AssetsChangeItem.ACInOrOut = false; | |||
Ass_AssetsChangeItem.ACReasonType = assinfoapp.AOReasonType; | |||
Ass_AssetsChangeItem.ACCStorageId = Ass_AssetsInfoItemList[i].AIIStorageId; | |||
Ass_AssetsChangeItem.ACCStoragePosition = Ass_AssetsInfoItemList[i].AIIStoragePosition; | |||
db.Insert(Ass_AssetsChangeItem); | |||
//明细在库状态 | |||
Ass_AssetsInfoItemList[i].AIIsInStorage = false; | |||
db.Update(Ass_AssetsInfoItemList[i]); | |||
} | |||
Ass_AssetsInfoItemList.AIDepartment = outItemApply.AOINewDepartment; | |||
Ass_AssetsInfoItemList.AIIStorageId = outItemApply.AOINewStorageId; | |||
var storageInfo = | |||
db.FindEntity<Ass_StorageEntity>(a => a.SId == outItemApply.AOINewStorageId); | |||
Ass_AssetsInfoItemList.AIIStoragePosition = storageInfo?.SAdress; | |||
Ass_AssetsInfoItemList.AIUsePeople = outItemApply.AOINewUsePeople; | |||
} | |||
//出库 | |||
else//无明细 | |||
{ | |||
var Ass_AssetsInfoItem = | |||
db.FindEntity<Ass_AssetsInfoItemEntity>(m => m.AId == assinfoitem.AId); | |||
var Ass_AssetsChangeItem = new Ass_AssetsChangeItemEntity(); | |||
Ass_AssetsChangeItem.Create(); | |||
Ass_AssetsChangeItem.ACId = ac.ACId; | |||
Ass_AssetsChangeItem.AIId = Ass_AssetsInfoItem.AIId; | |||
Ass_AssetsChangeItem.ACOldStock = assinfoitem.AStock; | |||
Ass_AssetsChangeItem.AAmount = outItemApply.AOIStock; | |||
Ass_AssetsChangeItem.ACNewStock = Ass_AssetsChangeItem.ACOldStock - outItemApply.AOIStock; | |||
Ass_AssetsChangeItem.ACTime = DateTime.Now; | |||
Ass_AssetsChangeItem.ACUserId = assinfoapp.AOCreateUserId; | |||
Ass_AssetsChangeItem.ACInOrOut = false; | |||
Ass_AssetsChangeItem.ACReasonType = assinfoapp.AOReasonType; | |||
Ass_AssetsChangeItem.ACCStorageId = Ass_AssetsInfoItem.AIIStorageId; | |||
Ass_AssetsChangeItem.ACCStoragePosition = Ass_AssetsInfoItem.AIIStoragePosition; | |||
db.Insert(Ass_AssetsChangeItem); | |||
//在库状态 | |||
if (Ass_AssetsChangeItem.ACNewStock == 0) | |||
{ | |||
Ass_AssetsInfoItem.AIIsInStorage = false; | |||
db.Update(Ass_AssetsInfoItem); | |||
} | |||
} | |||
//库存扣减 | |||
assinfoitem.AStock = assinfoitem.AStock - outItemApply.AOIStock; | |||
} | |||
else | |||
{ | |||
//库存不足 | |||
IsAllOutOrNot = false; | |||
if (assinfoitem.HasDetail == true) //有明细 | |||
{ | |||
//库存明细 | |||
var Ass_AssetsInfoItemList = | |||
db.FindList<Ass_AssetsInfoItemEntity>(m => m.AId == assinfoitem.AId && m.AIIsInStorage == true).ToList(); | |||
for (int i = 0; i < Ass_AssetsInfoItemList.Count; i++) | |||
{ | |||
ifinsertac = true; | |||
var Ass_AssetsChangeItem = new Ass_AssetsChangeItemEntity(); | |||
Ass_AssetsChangeItem.Create(); | |||
Ass_AssetsChangeItem.ACId = ac.ACId; | |||
Ass_AssetsChangeItem.AIId = Ass_AssetsInfoItemList[i].AIId; | |||
Ass_AssetsChangeItem.ACOldStock = assinfoitem.AStock; | |||
Ass_AssetsChangeItem.AAmount = 1; | |||
Ass_AssetsChangeItem.ACNewStock = Ass_AssetsChangeItem.ACOldStock - 1; | |||
Ass_AssetsChangeItem.ACTime = DateTime.Now; | |||
Ass_AssetsChangeItem.ACUserId = assinfoapp.AOCreateUserId; | |||
Ass_AssetsChangeItem.ACInOrOut = false; | |||
Ass_AssetsChangeItem.ACReasonType = assinfoapp.AOReasonType; | |||
Ass_AssetsChangeItem.ACCStorageId = Ass_AssetsInfoItemList[i].AIIStorageId; | |||
Ass_AssetsChangeItem.ACCStoragePosition = Ass_AssetsInfoItemList[i].AIIStoragePosition; | |||
db.Insert(Ass_AssetsChangeItem); | |||
//明细在库状态 | |||
Ass_AssetsInfoItemList[i].AIIsInStorage = false; | |||
db.Update(Ass_AssetsInfoItemList[i]); | |||
} | |||
//缺货明细 | |||
var Ass_AssetsOutItemApplyIncomplete = new Ass_AssetsOutItemApplyIncompleteEntity(); | |||
Ass_AssetsOutItemApplyIncomplete.Create(); | |||
Ass_AssetsOutItemApplyIncomplete.AOAIId = Ass_AssetsOutApplyIncomplete.AOAIId; | |||
Ass_AssetsOutItemApplyIncomplete.AOICode = outItemApply.AOICode; | |||
Ass_AssetsOutItemApplyIncomplete.AOIName = outItemApply.AOIName; | |||
Ass_AssetsOutItemApplyIncomplete.AOITId = outItemApply.AOITId; | |||
Ass_AssetsOutItemApplyIncomplete.AOIEName = outItemApply.AOIEName; | |||
Ass_AssetsOutItemApplyIncomplete.AOIPhoto = outItemApply.AOIPhoto; | |||
Ass_AssetsOutItemApplyIncomplete.AOIContent = outItemApply.AOIContent; | |||
Ass_AssetsOutItemApplyIncomplete.AOIOrder = outItemApply.AOIOrder; | |||
Ass_AssetsOutItemApplyIncomplete.AOIModel = outItemApply.AOIModel; | |||
Ass_AssetsOutItemApplyIncomplete.AOIManufacturer = outItemApply.AOIManufacturer; | |||
Ass_AssetsOutItemApplyIncomplete.AOIHopeStock = outItemApply.AOIStock; | |||
Ass_AssetsOutItemApplyIncomplete.AOIOutStock = Ass_AssetsInfoItemList.Count; | |||
Ass_AssetsOutItemApplyIncomplete.AOIStock = outItemApply.AOIStock - Ass_AssetsInfoItemList.Count; | |||
Ass_AssetsOutItemApplyIncomplete.AOIPrice = outItemApply.AOIPrice; | |||
//总价计算 | |||
Ass_AssetsOutApplyIncomplete.AOPrice += Ass_AssetsOutItemApplyIncomplete.AOIPrice * Ass_AssetsOutItemApplyIncomplete.AOIStock; | |||
Ass_AssetsOutItemApplyIncomplete.AOIUnit = outItemApply.AOIUnit; | |||
db.Insert(Ass_AssetsOutItemApplyIncomplete); | |||
} | |||
else | |||
{ | |||
Ass_AssetsInfoItemList.AIIsInStorage = false; | |||
if (assinfoitem.AStock > 0) | |||
{ | |||
ifinsertac = true; | |||
var Ass_AssetsInfoItem = | |||
db.FindEntity<Ass_AssetsInfoItemEntity>(m => m.AId == assinfoitem.AId); | |||
var Ass_AssetsChangeItem = new Ass_AssetsChangeItemEntity(); | |||
Ass_AssetsChangeItem.Create(); | |||
Ass_AssetsChangeItem.ACId = ac.ACId; | |||
Ass_AssetsChangeItem.AIId = Ass_AssetsInfoItem.AIId; | |||
Ass_AssetsChangeItem.ACOldStock = assinfoitem.AStock; | |||
Ass_AssetsChangeItem.AAmount = assinfoitem.AStock; | |||
Ass_AssetsChangeItem.ACNewStock = 0; | |||
Ass_AssetsChangeItem.ACTime = DateTime.Now; | |||
Ass_AssetsChangeItem.ACUserId = assinfoapp.AOCreateUserId; | |||
Ass_AssetsChangeItem.ACInOrOut = false; | |||
Ass_AssetsChangeItem.ACReasonType = assinfoapp.AOReasonType; | |||
Ass_AssetsChangeItem.ACCStorageId = Ass_AssetsInfoItem.AIIStorageId; | |||
Ass_AssetsChangeItem.ACCStoragePosition = Ass_AssetsInfoItem.AIIStoragePosition; | |||
db.Insert(Ass_AssetsChangeItem); | |||
//在库状态 | |||
Ass_AssetsInfoItem.AIIsInStorage = false; | |||
db.Update(Ass_AssetsInfoItem); | |||
} | |||
//缺货明细 | |||
var Ass_AssetsOutItemApplyIncomplete = new Ass_AssetsOutItemApplyIncompleteEntity(); | |||
Ass_AssetsOutItemApplyIncomplete.Create(); | |||
Ass_AssetsOutItemApplyIncomplete.AOAIId = Ass_AssetsOutApplyIncomplete.AOAIId; | |||
Ass_AssetsOutItemApplyIncomplete.AOICode = outItemApply.AOICode; | |||
Ass_AssetsOutItemApplyIncomplete.AOIName = outItemApply.AOIName; | |||
Ass_AssetsOutItemApplyIncomplete.AOITId = outItemApply.AOITId; | |||
Ass_AssetsOutItemApplyIncomplete.AOIEName = outItemApply.AOIEName; | |||
Ass_AssetsOutItemApplyIncomplete.AOIPhoto = outItemApply.AOIPhoto; | |||
Ass_AssetsOutItemApplyIncomplete.AOIContent = outItemApply.AOIContent; | |||
Ass_AssetsOutItemApplyIncomplete.AOIOrder = outItemApply.AOIOrder; | |||
Ass_AssetsOutItemApplyIncomplete.AOIModel = outItemApply.AOIModel; | |||
Ass_AssetsOutItemApplyIncomplete.AOIManufacturer = outItemApply.AOIManufacturer; | |||
Ass_AssetsOutItemApplyIncomplete.AOIHopeStock = outItemApply.AOIStock; | |||
Ass_AssetsOutItemApplyIncomplete.AOIOutStock = assinfoitem.AStock; | |||
Ass_AssetsOutItemApplyIncomplete.AOIStock = outItemApply.AOIStock - assinfoitem.AStock; | |||
Ass_AssetsOutItemApplyIncomplete.AOIPrice = outItemApply.AOIPrice; | |||
//总价计算 | |||
Ass_AssetsOutApplyIncomplete.AOPrice += Ass_AssetsOutItemApplyIncomplete.AOIPrice * Ass_AssetsOutItemApplyIncomplete.AOIStock; | |||
Ass_AssetsOutItemApplyIncomplete.AOIUnit = outItemApply.AOIUnit; | |||
db.Insert(Ass_AssetsOutItemApplyIncomplete); | |||
} | |||
db.Update(Ass_AssetsInfoItemList); | |||
//库存扣减 | |||
assinfoitem.AStock = 0; | |||
} | |||
////先检查库存 | |||
//var assinfoitem = assinfo.FirstOrDefault(m => m.ACode == outItemApply.AOICode); | |||
//if (assinfoitem.AStock >= outItemApply.AOIStock) | |||
//{ | |||
// ifinsertac = true; | |||
// //库存充足 | |||
// if (assinfoitem.HasDetail == true)//有明细 | |||
// { | |||
// //库存明细 | |||
// var Ass_AssetsInfoItemList = | |||
// db.FindList<Ass_AssetsInfoItemEntity>(m => m.AId == assinfoitem.AId && m.AIIsInStorage == true).Take(outItemApply.AOIStock.ToInt()).ToList(); | |||
// for (int i = 0; i < Ass_AssetsInfoItemList.Count; i++) | |||
// { | |||
// var Ass_AssetsChangeItem = new Ass_AssetsChangeItemEntity(); | |||
// Ass_AssetsChangeItem.Create(); | |||
// Ass_AssetsChangeItem.ACId = ac.ACId; | |||
// Ass_AssetsChangeItem.AIId = Ass_AssetsInfoItemList[i].AIId; | |||
// Ass_AssetsChangeItem.ACOldStock = assinfoitem.AStock; | |||
// Ass_AssetsChangeItem.AAmount = 1; | |||
// Ass_AssetsChangeItem.ACNewStock = Ass_AssetsChangeItem.ACOldStock - 1; | |||
// Ass_AssetsChangeItem.ACTime = DateTime.Now; | |||
// Ass_AssetsChangeItem.ACUserId = assinfoapp.AOCreateUserId; | |||
// Ass_AssetsChangeItem.ACInOrOut = false; | |||
// Ass_AssetsChangeItem.ACReasonType = assinfoapp.AOReasonType; | |||
// Ass_AssetsChangeItem.ACCStorageId = Ass_AssetsInfoItemList[i].AIIStorageId; | |||
// Ass_AssetsChangeItem.ACCStoragePosition = Ass_AssetsInfoItemList[i].AIIStoragePosition; | |||
// db.Insert(Ass_AssetsChangeItem); | |||
// //明细在库状态 | |||
// Ass_AssetsInfoItemList[i].AIIsInStorage = false; | |||
// Ass_AssetsInfoItemList[i].AIDepartment = assinfoapp.AODepartment; | |||
// Ass_AssetsInfoItemList[i].AIIStorageId = assinfoapp.AOStorageId; | |||
// Ass_AssetsInfoItemList[i].AIIStoragePosition = this.BaseRepository().FindEntity<Ass_StorageEntity>(a => a.SId == assinfoapp.AOStorageId)?.SAdress; | |||
// db.Update(Ass_AssetsInfoItemList[i]); | |||
// } | |||
// } | |||
// else//无明细 | |||
// { | |||
// var Ass_AssetsInfoItem = | |||
// db.FindEntity<Ass_AssetsInfoItemEntity>(m => m.AId == assinfoitem.AId); | |||
// var Ass_AssetsChangeItem = new Ass_AssetsChangeItemEntity(); | |||
// Ass_AssetsChangeItem.Create(); | |||
// Ass_AssetsChangeItem.ACId = ac.ACId; | |||
// Ass_AssetsChangeItem.AIId = Ass_AssetsInfoItem.AIId; | |||
// Ass_AssetsChangeItem.ACOldStock = assinfoitem.AStock; | |||
// Ass_AssetsChangeItem.AAmount = outItemApply.AOIStock; | |||
// Ass_AssetsChangeItem.ACNewStock = Ass_AssetsChangeItem.ACOldStock - outItemApply.AOIStock; | |||
// Ass_AssetsChangeItem.ACTime = DateTime.Now; | |||
// Ass_AssetsChangeItem.ACUserId = assinfoapp.AOCreateUserId; | |||
// Ass_AssetsChangeItem.ACInOrOut = false; | |||
// Ass_AssetsChangeItem.ACReasonType = assinfoapp.AOReasonType; | |||
// Ass_AssetsChangeItem.ACCStorageId = Ass_AssetsInfoItem.AIIStorageId; | |||
// Ass_AssetsChangeItem.ACCStoragePosition = Ass_AssetsInfoItem.AIIStoragePosition; | |||
// db.Insert(Ass_AssetsChangeItem); | |||
// //在库状态 | |||
// if (Ass_AssetsChangeItem.ACNewStock == 0) | |||
// { | |||
// Ass_AssetsInfoItem.AIIsInStorage = false; | |||
// db.Update(Ass_AssetsInfoItem); | |||
// } | |||
// } | |||
// //库存扣减 | |||
// assinfoitem.AStock = assinfoitem.AStock - outItemApply.AOIStock; | |||
//} | |||
//else | |||
//{ | |||
// //库存不足 | |||
// IsAllOutOrNot = false; | |||
// if (assinfoitem.HasDetail == true) //有明细 | |||
// { | |||
// //库存明细 | |||
// var Ass_AssetsInfoItemList = | |||
// db.FindList<Ass_AssetsInfoItemEntity>(m => m.AId == assinfoitem.AId && m.AIIsInStorage == true).ToList(); | |||
// for (int i = 0; i < Ass_AssetsInfoItemList.Count; i++) | |||
// { | |||
// ifinsertac = true; | |||
// var Ass_AssetsChangeItem = new Ass_AssetsChangeItemEntity(); | |||
// Ass_AssetsChangeItem.Create(); | |||
// Ass_AssetsChangeItem.ACId = ac.ACId; | |||
// Ass_AssetsChangeItem.AIId = Ass_AssetsInfoItemList[i].AIId; | |||
// Ass_AssetsChangeItem.ACOldStock = assinfoitem.AStock; | |||
// Ass_AssetsChangeItem.AAmount = 1; | |||
// Ass_AssetsChangeItem.ACNewStock = Ass_AssetsChangeItem.ACOldStock - 1; | |||
// Ass_AssetsChangeItem.ACTime = DateTime.Now; | |||
// Ass_AssetsChangeItem.ACUserId = assinfoapp.AOCreateUserId; | |||
// Ass_AssetsChangeItem.ACInOrOut = false; | |||
// Ass_AssetsChangeItem.ACReasonType = assinfoapp.AOReasonType; | |||
// Ass_AssetsChangeItem.ACCStorageId = Ass_AssetsInfoItemList[i].AIIStorageId; | |||
// Ass_AssetsChangeItem.ACCStoragePosition = Ass_AssetsInfoItemList[i].AIIStoragePosition; | |||
// db.Insert(Ass_AssetsChangeItem); | |||
// //明细在库状态 | |||
// Ass_AssetsInfoItemList[i].AIIsInStorage = false; | |||
// db.Update(Ass_AssetsInfoItemList[i]); | |||
// } | |||
// //缺货明细 | |||
// var Ass_AssetsOutItemApplyIncomplete = new Ass_AssetsOutItemApplyIncompleteEntity(); | |||
// Ass_AssetsOutItemApplyIncomplete.Create(); | |||
// Ass_AssetsOutItemApplyIncomplete.AOAIId = Ass_AssetsOutApplyIncomplete.AOAIId; | |||
// Ass_AssetsOutItemApplyIncomplete.AOICode = outItemApply.AOICode; | |||
// Ass_AssetsOutItemApplyIncomplete.AOIName = outItemApply.AOIName; | |||
// Ass_AssetsOutItemApplyIncomplete.AOITId = outItemApply.AOITId; | |||
// Ass_AssetsOutItemApplyIncomplete.AOIEName = outItemApply.AOIEName; | |||
// Ass_AssetsOutItemApplyIncomplete.AOIPhoto = outItemApply.AOIPhoto; | |||
// Ass_AssetsOutItemApplyIncomplete.AOIContent = outItemApply.AOIContent; | |||
// Ass_AssetsOutItemApplyIncomplete.AOIOrder = outItemApply.AOIOrder; | |||
// Ass_AssetsOutItemApplyIncomplete.AOIModel = outItemApply.AOIModel; | |||
// Ass_AssetsOutItemApplyIncomplete.AOIManufacturer = outItemApply.AOIManufacturer; | |||
// Ass_AssetsOutItemApplyIncomplete.AOIHopeStock = outItemApply.AOIStock; | |||
// Ass_AssetsOutItemApplyIncomplete.AOIOutStock = Ass_AssetsInfoItemList.Count; | |||
// Ass_AssetsOutItemApplyIncomplete.AOIStock = outItemApply.AOIStock - Ass_AssetsInfoItemList.Count; | |||
// Ass_AssetsOutItemApplyIncomplete.AOIPrice = outItemApply.AOIPrice; | |||
// //总价计算 | |||
// Ass_AssetsOutApplyIncomplete.AOPrice += Ass_AssetsOutItemApplyIncomplete.AOIPrice * Ass_AssetsOutItemApplyIncomplete.AOIStock; | |||
// Ass_AssetsOutItemApplyIncomplete.AOIUnit = outItemApply.AOIUnit; | |||
// db.Insert(Ass_AssetsOutItemApplyIncomplete); | |||
// } | |||
// else | |||
// { | |||
// if (assinfoitem.AStock > 0) | |||
// { | |||
// ifinsertac = true; | |||
// var Ass_AssetsInfoItem = | |||
// db.FindEntity<Ass_AssetsInfoItemEntity>(m => m.AId == assinfoitem.AId); | |||
// var Ass_AssetsChangeItem = new Ass_AssetsChangeItemEntity(); | |||
// Ass_AssetsChangeItem.Create(); | |||
// Ass_AssetsChangeItem.ACId = ac.ACId; | |||
// Ass_AssetsChangeItem.AIId = Ass_AssetsInfoItem.AIId; | |||
// Ass_AssetsChangeItem.ACOldStock = assinfoitem.AStock; | |||
// Ass_AssetsChangeItem.AAmount = assinfoitem.AStock; | |||
// Ass_AssetsChangeItem.ACNewStock = 0; | |||
// Ass_AssetsChangeItem.ACTime = DateTime.Now; | |||
// Ass_AssetsChangeItem.ACUserId = assinfoapp.AOCreateUserId; | |||
// Ass_AssetsChangeItem.ACInOrOut = false; | |||
// Ass_AssetsChangeItem.ACReasonType = assinfoapp.AOReasonType; | |||
// Ass_AssetsChangeItem.ACCStorageId = Ass_AssetsInfoItem.AIIStorageId; | |||
// Ass_AssetsChangeItem.ACCStoragePosition = Ass_AssetsInfoItem.AIIStoragePosition; | |||
// db.Insert(Ass_AssetsChangeItem); | |||
// //在库状态 | |||
// Ass_AssetsInfoItem.AIIsInStorage = false; | |||
// db.Update(Ass_AssetsInfoItem); | |||
// } | |||
// //缺货明细 | |||
// var Ass_AssetsOutItemApplyIncomplete = new Ass_AssetsOutItemApplyIncompleteEntity(); | |||
// Ass_AssetsOutItemApplyIncomplete.Create(); | |||
// Ass_AssetsOutItemApplyIncomplete.AOAIId = Ass_AssetsOutApplyIncomplete.AOAIId; | |||
// Ass_AssetsOutItemApplyIncomplete.AOICode = outItemApply.AOICode; | |||
// Ass_AssetsOutItemApplyIncomplete.AOIName = outItemApply.AOIName; | |||
// Ass_AssetsOutItemApplyIncomplete.AOITId = outItemApply.AOITId; | |||
// Ass_AssetsOutItemApplyIncomplete.AOIEName = outItemApply.AOIEName; | |||
// Ass_AssetsOutItemApplyIncomplete.AOIPhoto = outItemApply.AOIPhoto; | |||
// Ass_AssetsOutItemApplyIncomplete.AOIContent = outItemApply.AOIContent; | |||
// Ass_AssetsOutItemApplyIncomplete.AOIOrder = outItemApply.AOIOrder; | |||
// Ass_AssetsOutItemApplyIncomplete.AOIModel = outItemApply.AOIModel; | |||
// Ass_AssetsOutItemApplyIncomplete.AOIManufacturer = outItemApply.AOIManufacturer; | |||
// Ass_AssetsOutItemApplyIncomplete.AOIHopeStock = outItemApply.AOIStock; | |||
// Ass_AssetsOutItemApplyIncomplete.AOIOutStock = assinfoitem.AStock; | |||
// Ass_AssetsOutItemApplyIncomplete.AOIStock = outItemApply.AOIStock - assinfoitem.AStock; | |||
// Ass_AssetsOutItemApplyIncomplete.AOIPrice = outItemApply.AOIPrice; | |||
// //总价计算 | |||
// Ass_AssetsOutApplyIncomplete.AOPrice += Ass_AssetsOutItemApplyIncomplete.AOIPrice * Ass_AssetsOutItemApplyIncomplete.AOIStock; | |||
// Ass_AssetsOutItemApplyIncomplete.AOIUnit = outItemApply.AOIUnit; | |||
// db.Insert(Ass_AssetsOutItemApplyIncomplete); | |||
// } | |||
// //库存扣减 | |||
// assinfoitem.AStock = 0; | |||
//} | |||
//db.Update(assinfoitem); | |||
db.Update(assinfoitem); | |||
} | |||
//出库单 | |||
if (ifinsertac) | |||