@@ -1342,6 +1342,7 @@ var bootstrap = function ($, learun) { | |||||
var _department = departmentMap[userMap[_jitem.Id].departmentId]; | var _department = departmentMap[userMap[_jitem.Id].departmentId]; | ||||
if (_department) { | if (_department) { | ||||
name = '【' + _department.name + '】' + name; | name = '【' + _department.name + '】' + name; | ||||
//name = '【' + _department.name + '】' + name; | |||||
} | } | ||||
nameList.push(name); | nameList.push(name); | ||||
@@ -1435,7 +1436,7 @@ var bootstrap = function ($, learun) { | |||||
name = '【' + _department.name + '】' + name; | name = '【' + _department.name + '】' + name; | ||||
} | } | ||||
} | } | ||||
var content = item.F_OperationName; | |||||
var content = ''; | |||||
if (item.F_Des) { | if (item.F_Des) { | ||||
content += '【审批意见】' + item.F_Des; | content += '【审批意见】' + item.F_Des; | ||||
} | } | ||||
@@ -75,8 +75,8 @@ var bootstrap = function ($, learun) { | |||||
learun.httpAsync('GET', top.$.rootUrl + '/LR_NewWorkFlow/NWFScheme/GetMyInfoList', {}, function (data) { | learun.httpAsync('GET', top.$.rootUrl + '/LR_NewWorkFlow/NWFScheme/GetMyInfoList', {}, function (data) { | ||||
schemeList = data; | schemeList = data; | ||||
//增加资产申请项目 | //增加资产申请项目 | ||||
schemeList.push({ F_Id: 'f1414358-cb9b-4eaf-927f-66f6d60e9280', F_Name: '采购申请(普通)', F_Code: 'caigoupt', F_Category: '资产类', F_CodeUrl: '/AssetManagementSystem/Ass_AssetsInfoApply/IndexJY' }); | |||||
schemeList.push({ F_Id: '74701b0e-ad01-4836-9304-bb39222d3bcd', F_Name: '采购申请(耗材)', F_Code: 'caigouhc', F_Category: '资产类', F_CodeUrl: '/AssetManagementSystem/Ass_AssetsInfoApply/IndexJYHC' }); | |||||
//schemeList.push({ F_Id: 'f1414358-cb9b-4eaf-927f-66f6d60e9280', F_Name: '采购申请(普通)', F_Code: 'caigoupt', F_Category: '资产类', F_CodeUrl: '/AssetManagementSystem/Ass_AssetsInfoApply/IndexJY' }); | |||||
//schemeList.push({ F_Id: '74701b0e-ad01-4836-9304-bb39222d3bcd', F_Name: '采购申请(耗材)', F_Code: 'caigouhc', F_Category: '资产类', F_CodeUrl: '/AssetManagementSystem/Ass_AssetsInfoApply/IndexJYHC' }); | |||||
render(); | render(); | ||||
}); | }); | ||||
@@ -57,8 +57,13 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
var SendFlag = $('#gridtable').jfGridValue('F_Status'); | var SendFlag = $('#gridtable').jfGridValue('F_Status'); | ||||
if (SendFlag == "1" || SendFlag == "2") { | if (SendFlag == "1" || SendFlag == "2") { | ||||
learun.alert.warning("当前项目已提交不能编辑!"); | |||||
return; | |||||
var IsSend = $('#gridtable').jfGridValue('IsSend'); | |||||
console.log(IsSend, "IsSend") | |||||
if (IsSend != "0") { | |||||
learun.alert.warning("当前项目已提交不能编辑!"); | |||||
return; | |||||
} | |||||
} | } | ||||
learun.layerForm({ | learun.layerForm({ | ||||
id: 'formedit', | id: 'formedit', | ||||
@@ -38,6 +38,25 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||||
{ | { | ||||
return View(); | return View(); | ||||
} | } | ||||
/// <summary> | |||||
/// 表单页 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult IndexDorm() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 全部 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult IndexAll() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | #endregion | ||||
#region 获取数据 | #region 获取数据 | ||||
@@ -256,6 +256,19 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||||
return Success(jsonData); | return Success(jsonData); | ||||
} | } | ||||
/// <summary> | |||||
/// 获取床位数据 | |||||
/// <summary> | |||||
/// <param name="RoomId">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetDormStu(string keyValue) | |||||
{ | |||||
var data = accommodationIBLL.GetDromStu(keyValue).OrderBy(x => x.Class); | |||||
return Success(data); | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取床位数据 | /// 获取床位数据 | ||||
/// <summary> | /// <summary> | ||||
@@ -4,43 +4,55 @@ | |||||
} | } | ||||
<div class="lr-form-wrap"> | <div class="lr-form-wrap"> | ||||
<div id="form"> | <div id="form"> | ||||
<div class="col-xs-6 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">宿舍楼</div> | |||||
<div id="Dormitory"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">单元</div> | |||||
<div id="Unit"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">楼层</div> | |||||
<div id="Floor"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">宿舍<font face="宋体">*</font></div> | |||||
<div id="RId" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">专业部<font face="宋体">*</font></div> | |||||
<div id="DeptNo" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">专业<font face="宋体">*</font></div> | |||||
<div id="MajorNo" isvalid="yes" checkexpession="NotNull"></div> | |||||
@*<div class="col-xs-6 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">宿舍楼</div> | |||||
<div id="Dormitory"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">单元</div> | |||||
<div id="Unit"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">楼层</div> | |||||
<div id="Floor"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">宿舍<font face="宋体">*</font></div> | |||||
<div id="RId" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">专业部<font face="宋体">*</font></div> | |||||
<div id="DeptNo" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">专业<font face="宋体">*</font></div> | |||||
<div id="MajorNo" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">班级<font face="宋体">*</font></div> | |||||
<div id="ClassNo" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div>*@ | |||||
<div class="col-xs-12 lr-form-item" data-table="Acc_DailyAssess"> | |||||
<div class="lr-form-item-title">选择学生<font face="宋体">*</font></div> | |||||
<div id="NewStuNo"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Acc_DailyAssess"> | <div class="col-xs-6 lr-form-item" data-table="Acc_DailyAssess"> | ||||
<div class="lr-form-item-title">班级<font face="宋体">*</font></div> | |||||
<div id="ClassNo" isvalid="yes" checkexpession="NotNull"></div> | |||||
<div class="lr-form-item-title">学号<font face="宋体">*</font></div> | |||||
<input id="StuNo" type="text" class="form-control" readonly="readonly" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Acc_DailyAssess"> | <div class="col-xs-6 lr-form-item" data-table="Acc_DailyAssess"> | ||||
<div class="lr-form-item-title">学生<font face="宋体">*</font></div> | |||||
<div id="StuNo" isvalid="yes" checkexpession="NotNull"></div> | |||||
<div class="lr-form-item-title">姓名<font face="宋体">*</font></div> | |||||
<input id="StuName" type="text" class="form-control" readonly="readonly" isvalid="yes" checkexpession="NotNull" /> | |||||
<input id="Dormitory" hidden="Dormitory" /> | |||||
<input id="Unit" hidden="Unit" /> | |||||
<input id="Floor" hidden="Floor" /> | |||||
<input id="RId" hidden="RId" /> | |||||
<input id="BuildId" hidden="hidden" /> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="Acc_DailyAssess"> | <div class="col-xs-12 lr-form-item" data-table="Acc_DailyAssess"> | ||||
<div class="lr-form-item-title">日期<font face="宋体">*</font></div> | <div class="lr-form-item-title">日期<font face="宋体">*</font></div> | ||||
<input id="Date" type="text" isvalid="yes" checkexpession="NotNull" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss' })" /> | |||||
<input id="Date" type="text" isvalid="yes" checkexpession="NotNull" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" data-dateFmt="yyyy-MM-dd HH:mm:ss" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#Date').trigger('change'); } })" /> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="Acc_DailyAssess"> | <div class="col-xs-12 lr-form-item" data-table="Acc_DailyAssess"> | ||||
<div class="lr-form-item-title">卫生奖分</div> | <div class="lr-form-item-title">卫生奖分</div> | ||||
@@ -6,6 +6,11 @@ | |||||
*/ | */ | ||||
var acceptClick; | var acceptClick; | ||||
var keyValue = request('keyValue'); | var keyValue = request('keyValue'); | ||||
var HkeyValue = request('HkeyValue'); | |||||
var Dormitory = request('Dormitory'); | |||||
var Unit = request('Unit'); | |||||
var Floor = request('Floor'); | |||||
var RId = request('RId'); | |||||
var bootstrap = function ($, learun) { | var bootstrap = function ($, learun) { | ||||
"use strict"; | "use strict"; | ||||
var selectedRow = learun.frameTab.currentIframe().selectedRow; | var selectedRow = learun.frameTab.currentIframe().selectedRow; | ||||
@@ -16,113 +21,127 @@ var bootstrap = function ($, learun) { | |||||
page.initData(); | page.initData(); | ||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
$('#Dormitory').lrDataSourceSelect({ | |||||
code: 'Acc_DormitoryData', value: 'id', text: 'name', select: function (item) { | |||||
if (item) { | |||||
$('#Unit').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||||
param: { code: 'Acc_UnitData', strWhere: "ParentID='" + item.id + "' order by name" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#Unit').lrselect({ | |||||
text: 'name', | |||||
value: 'id', | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#Floor').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||||
param: { code: 'Acc_FloorData', strWhere: "ParentID='" + item.id + "' order by name" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#Floor').lrselect({ | |||||
text: 'name', | |||||
value: 'id', | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#RId').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||||
param: { code: 'Acc_RoomData', strWhere: "ParentID='" + item.id + "' order by name" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#RId').lrselect({ | |||||
text: 'name', | |||||
value: 'id', | |||||
allowSearch: true | |||||
}); | |||||
$('#DeptNo').lrselect({ | |||||
//$('#Dormitory').lrDataSourceSelect({ | |||||
// code: 'Acc_DormitoryData', value: 'id', text: 'name', select: function (item) { | |||||
// if (item) { | |||||
// $('#Unit').lrselectRefresh({ | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||||
// param: { code: 'Acc_UnitData', strWhere: "ParentID='" + item.id + "' order by name" } | |||||
// }); | |||||
// } | |||||
// } | |||||
//}); | |||||
//$('#Unit').lrselect({ | |||||
// text: 'name', | |||||
// value: 'id', | |||||
// select: function (item) { | |||||
// if (item) { | |||||
// $('#Floor').lrselectRefresh({ | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||||
// param: { code: 'Acc_FloorData', strWhere: "ParentID='" + item.id + "' order by name" } | |||||
// }); | |||||
// } | |||||
// } | |||||
//}); | |||||
//$('#Floor').lrselect({ | |||||
// text: 'name', | |||||
// value: 'id', | |||||
// select: function (item) { | |||||
// if (item) { | |||||
// $('#RId').lrselectRefresh({ | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||||
// param: { code: 'Acc_RoomData', strWhere: "ParentID='" + item.id + "' order by name" } | |||||
// }); | |||||
// } | |||||
// } | |||||
//}); | |||||
//$('#RId').lrselect({ | |||||
// text: 'name', | |||||
// value: 'id', | |||||
// allowSearch: true | |||||
//}); | |||||
//$('#DeptNo').lrselect({ | |||||
// allowSearch: true, | |||||
// value: "deptno", | |||||
// text: "deptname", | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', | |||||
// select: function (item) { | |||||
// if (item) { | |||||
// $('#MajorNo').lrselectRefresh({ | |||||
// allowSearch: true, | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
// param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" } | |||||
// }); | |||||
// } else { | |||||
// $('#MajorNo').lrselectRefresh({ | |||||
// allowSearch: true, | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
// param: { strWhere: "1=1 AND CheckMark=1" } | |||||
// }); | |||||
// } | |||||
// } | |||||
//}); | |||||
//$('#MajorNo').lrselect({ | |||||
// allowSearch: true, | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
// value: "majorno", | |||||
// text: "majorname", | |||||
// param: { strWhere: "1=1 AND CheckMark=1" }, | |||||
// select: function (item) { | |||||
// if (item) { | |||||
// $('#ClassNo').lrselectRefresh({ | |||||
// allowSearch: true, | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
// param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" } | |||||
// }); | |||||
// } else { | |||||
// $('#ClassNo').lrselectRefresh({ | |||||
// allowSearch: true, | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
// param: { strWhere: "1=1 AND CheckMark=1" } | |||||
// }); | |||||
// } | |||||
// } | |||||
//}); | |||||
//$('#ClassNo').lrselect({ | |||||
// allowSearch: true, | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
// param: { strWhere: "1=1 AND CheckMark=1" }, | |||||
// value: "classno", | |||||
// text: "classname", | |||||
// select: function (item) { | |||||
// if (item) { | |||||
// $('#StuNo').lrselectRefresh({ | |||||
// allowSearch: true, | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', | |||||
// param: { strWhere: "classno='" + item.classno + "'" } | |||||
// }); | |||||
// } else { | |||||
// $('#StuNo').lrselectRefresh({ | |||||
// allowSearch: true, | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', | |||||
// param: { strWhere: "1=1" } | |||||
// }); | |||||
// } | |||||
// } | |||||
//}); | |||||
//$('#StuNo').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuno', text: 'stuname' }); | |||||
$('#NewStuNo').lrselect({ | |||||
placeholder: "请选择学生", | |||||
allowSearch: true, | allowSearch: true, | ||||
value: "deptno", | |||||
text: "deptname", | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', | |||||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetDormStu?keyValue=' + HkeyValue, | |||||
value: 'StuNo', | |||||
text: 'StuName', | |||||
select: function (item) { | select: function (item) { | ||||
if (item) { | |||||
$('#MajorNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" } | |||||
}); | |||||
} else { | |||||
$('#MajorNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
param: { strWhere: "1=1 AND CheckMark=1" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#MajorNo').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
value: "majorno", | |||||
text: "majorname", | |||||
param: { strWhere: "1=1 AND CheckMark=1" }, | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#ClassNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" } | |||||
}); | |||||
} else { | |||||
$('#ClassNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
param: { strWhere: "1=1 AND CheckMark=1" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#ClassNo').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
param: { strWhere: "1=1 AND CheckMark=1" }, | |||||
value: "classno", | |||||
text: "classname", | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#StuNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', | |||||
param: { strWhere: "classno='" + item.classno + "'" } | |||||
}); | |||||
} else { | |||||
$('#StuNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', | |||||
param: { strWhere: "1=1" } | |||||
}); | |||||
} | |||||
$("#StuName").val(item.StuName); | |||||
$("#StuNo").val(item.StudentID); | |||||
$("#BuildId").val(HkeyValue); | |||||
$("#Dormitory").val(Dormitory); | |||||
$("#Unit").val(Unit); | |||||
$("#Floor").val(Floor); | |||||
$("#RId").val(RId); | |||||
} | } | ||||
}); | }); | ||||
$('#StuNo').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuno', text: 'stuname' }); | |||||
$('#Files').lrUploader(); | $('#Files').lrUploader(); | ||||
}, | }, | ||||
initData: function () { | initData: function () { | ||||
@@ -13,7 +13,7 @@ | |||||
<div class="lr-layout-tool-item"> | <div class="lr-layout-tool-item"> | ||||
<div id="multiple_condition_query"> | <div id="multiple_condition_query"> | ||||
<div class="lr-query-formcontent"> | <div class="lr-query-formcontent"> | ||||
<div class="col-xs-6 lr-form-item"> | |||||
@*<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">宿舍楼</div> | <div class="lr-form-item-title">宿舍楼</div> | ||||
<div id="Dormitory"></div> | <div id="Dormitory"></div> | ||||
</div> | </div> | ||||
@@ -28,7 +28,7 @@ | |||||
<div class="col-xs-6 lr-form-item"> | <div class="col-xs-6 lr-form-item"> | ||||
<div class="lr-form-item-title">宿舍</div> | <div class="lr-form-item-title">宿舍</div> | ||||
<div id="RId" ></div> | <div id="RId" ></div> | ||||
</div> | |||||
</div>*@ | |||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">专业部</div> | <div class="lr-form-item-title">专业部</div> | ||||
<div id="DeptNo"></div> | <div id="DeptNo"></div> | ||||
@@ -51,16 +51,14 @@ | |||||
</div> | </div> | ||||
<div class="lr-layout-tool-right"> | <div class="lr-layout-tool-right"> | ||||
<div class=" btn-group btn-group-sm"> | <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_refresh" class="btn btn-default"><i class="fa fa-refresh"></i>刷新</a> | |||||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | <a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | ||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | <a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | ||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | <a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | ||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||||
@*<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||||
<a id="lr_addQuickly" class="btn btn-default"><i class="fa fa-plus"></i> 快速新增</a> | <a id="lr_addQuickly" class="btn btn-default"><i class="fa fa-plus"></i> 快速新增</a> | ||||
</div> | |||||
</div>*@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="lr-layout-body" id="gridtable"></div> | <div class="lr-layout-body" id="gridtable"></div> | ||||
@@ -6,6 +6,11 @@ | |||||
*/ | */ | ||||
var selectedRow; | var selectedRow; | ||||
var refreshGirdData; | var refreshGirdData; | ||||
var HkeyValue = request('keyValue'); | |||||
var Dormitory = request('Dormitory'); | |||||
var Unit = request('Unit'); | |||||
var Floor = request('Floor'); | |||||
var RId = request('RId'); | |||||
var bootstrap = function ($, learun) { | var bootstrap = function ($, learun) { | ||||
"use strict"; | "use strict"; | ||||
var startTime; | var startTime; | ||||
@@ -50,45 +55,45 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
}); | }); | ||||
$('#Dormitory').lrDataSourceSelect({ | |||||
code: 'Acc_DormitoryData', value: 'id', text: 'name', select: function (item) { | |||||
if (item) { | |||||
$('#Unit').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||||
param: { code: 'Acc_UnitData', strWhere: "ParentID='" + item.id + "' order by name" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#Unit').lrselect({ | |||||
text: 'name', | |||||
value: 'id', | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#Floor').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||||
param: { code: 'Acc_FloorData', strWhere: "ParentID='" + item.id + "' order by name" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#Floor').lrselect({ | |||||
text: 'name', | |||||
value: 'id', | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#RId').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||||
param: { code: 'Acc_RoomData', strWhere: "ParentID='" + item.id + "' order by name" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#RId').lrselect({ | |||||
text: 'name', | |||||
value: 'id', | |||||
allowSearch: true | |||||
}); | |||||
//$('#Dormitory').lrDataSourceSelect({ | |||||
// code: 'Acc_DormitoryData', value: 'id', text: 'name', select: function (item) { | |||||
// if (item) { | |||||
// $('#Unit').lrselectRefresh({ | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||||
// param: { code: 'Acc_UnitData', strWhere: "ParentID='" + item.id + "' order by name" } | |||||
//}); | |||||
//} | |||||
//} | |||||
//}); | |||||
//$('#Unit').lrselect({ | |||||
// text: 'name', | |||||
//value: 'id', | |||||
//select: function (item) { | |||||
// if (item) { | |||||
// $('#Floor').lrselectRefresh({ | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||||
// param: { code: 'Acc_FloorData', strWhere: "ParentID='" + item.id + "' order by name" } | |||||
//}); | |||||
//} | |||||
//} | |||||
//}); | |||||
//$('#Floor').lrselect({ | |||||
// text: 'name', | |||||
//value: 'id', | |||||
//select: function (item) { | |||||
// if (item) { | |||||
// $('#RId').lrselectRefresh({ | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||||
// param: { code: 'Acc_RoomData', strWhere: "ParentID='" + item.id + "' order by name" } | |||||
//}); | |||||
//} | |||||
//} | |||||
//}); | |||||
//$('#RId').lrselect({ | |||||
// text: 'name', | |||||
//value: 'id', | |||||
//allowSearch: true | |||||
//}); | |||||
$('#DeptNo').lrselect({ | $('#DeptNo').lrselect({ | ||||
allowSearch: true, | allowSearch: true, | ||||
value: "deptno", | value: "deptno", | ||||
@@ -147,7 +152,7 @@ var bootstrap = function ($, learun) { | |||||
learun.layerForm({ | learun.layerForm({ | ||||
id: 'form', | id: 'form', | ||||
title: '新增', | title: '新增', | ||||
url: top.$.rootUrl + '/LogisticsManagement/Acc_DailyAssess/Form', | |||||
url: top.$.rootUrl + '/LogisticsManagement/Acc_DailyAssess/Form?HkeyValue=' + HkeyValue + '&Dormitory=' + Dormitory + '&Unit=' + Unit + '&Floor=' + Floor + '&RId=' + RId, | |||||
width: 800, | width: 800, | ||||
height: 600, | height: 600, | ||||
callBack: function (id) { | callBack: function (id) { | ||||
@@ -163,7 +168,7 @@ var bootstrap = function ($, learun) { | |||||
learun.layerForm({ | learun.layerForm({ | ||||
id: 'form', | id: 'form', | ||||
title: '编辑', | title: '编辑', | ||||
url: top.$.rootUrl + '/LogisticsManagement/Acc_DailyAssess/Form?keyValue=' + keyValue, | |||||
url: top.$.rootUrl + '/LogisticsManagement/Acc_DailyAssess/Form?keyValue=' + keyValue + '&HkeyValue=' + HkeyValue + '&Dormitory=' + Dormitory + '&Unit=' + Unit + '&Floor=' + Floor + '&RId=' + RId, | |||||
width: 800, | width: 800, | ||||
height: 600, | height: 600, | ||||
callBack: function (id) { | callBack: function (id) { | ||||
@@ -322,7 +327,8 @@ var bootstrap = function ($, learun) { | |||||
{ label: "奖扣分原因", name: "Reason", width: 200, align: "left" }, | { label: "奖扣分原因", name: "Reason", width: 200, align: "left" }, | ||||
], | ], | ||||
mainId: 'Id', | mainId: 'Id', | ||||
isPage: true | |||||
isPage: true, | |||||
sidx: 'Date desc' | |||||
}); | }); | ||||
page.search(); | page.search(); | ||||
}, | }, | ||||
@@ -330,6 +336,7 @@ var bootstrap = function ($, learun) { | |||||
param = param || {}; | param = param || {}; | ||||
param.StartTime = startTime; | param.StartTime = startTime; | ||||
param.EndTime = endTime; | param.EndTime = endTime; | ||||
param.SqlParameter = "and BuildId ='" + HkeyValue + "'"; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
} | } | ||||
}; | }; | ||||
@@ -0,0 +1,65 @@ | |||||
@{ | |||||
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-6 lr-form-item"> | |||||
<div class="lr-form-item-title">宿舍楼</div> | |||||
<div id="Dormitory"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">单元</div> | |||||
<div id="Unit"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">楼层</div> | |||||
<div id="Floor"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">宿舍</div> | |||||
<div id="RId" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">专业部</div> | |||||
<div id="DeptNo"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">专业</div> | |||||
<div id="MajorNo"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">班级</div> | |||||
<div id="ClassNo"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">学生姓名</div> | |||||
<input id="StuName" 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_addQuickly" class="btn btn-default"><i class="fa fa-plus"></i> 快速新增</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Acc_DailyAssess/IndexAll.js") |
@@ -0,0 +1,295 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2020-08-11 16:55 | |||||
* 描 述:寝室日常考核管理 | |||||
*/ | |||||
var selectedRow; | |||||
var refreshGirdData; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var startTime; | |||||
var endTime; | |||||
var page = { | |||||
init: function () { | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 300, 400); | |||||
// 时间搜索框 | |||||
$('#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: '1', | |||||
selectfn: function (begin, end) { | |||||
startTime = begin; | |||||
endTime = end; | |||||
page.search(); | |||||
} | |||||
}); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
$('#Dormitory').lrDataSourceSelect({ | |||||
code: 'Acc_DormitoryData', value: 'id', text: 'name', select: function (item) { | |||||
if (item) { | |||||
$('#Unit').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||||
param: { code: 'Acc_UnitData', strWhere: "ParentID='" + item.id + "' order by name" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#Unit').lrselect({ | |||||
text: 'name', | |||||
value: 'id', | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#Floor').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||||
param: { code: 'Acc_FloorData', strWhere: "ParentID='" + item.id + "' order by name" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#Floor').lrselect({ | |||||
text: 'name', | |||||
value: 'id', | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#RId').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||||
param: { code: 'Acc_RoomData', strWhere: "ParentID='" + item.id + "' order by name" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#RId').lrselect({ | |||||
text: 'name', | |||||
value: 'id', | |||||
allowSearch: true | |||||
}); | |||||
$('#DeptNo').lrselect({ | |||||
allowSearch: true, | |||||
value: "deptno", | |||||
text: "deptname", | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#MajorNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" } | |||||
}); | |||||
} else { | |||||
$('#MajorNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
param: { strWhere: "1=1 AND CheckMark=1" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#MajorNo').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
value: "majorno", | |||||
text: "majorname", | |||||
param: { strWhere: "1=1 AND CheckMark=1" }, | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#ClassNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" } | |||||
}); | |||||
} else { | |||||
$('#ClassNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
param: { strWhere: "1=1 AND CheckMark=1" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#ClassNo').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
param: { strWhere: "1=1 AND CheckMark=1" }, | |||||
value: "classno", | |||||
text: "classname" | |||||
}); | |||||
// 快速新增 | |||||
$('#lr_addQuickly').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||||
//console.log(selectedRow); | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '快速新增', | |||||
url: top.$.rootUrl + '/LogisticsManagement/Acc_DailyAssess/Form', | |||||
width: 800, | |||||
height: 600, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/LogisticsManagement/Acc_DailyAssess/GetPageList', | |||||
headData: [ | |||||
{ | |||||
label: "专业部", name: "DeptNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||||
key: value, | |||||
keyId: 'deptno', | |||||
callback: function (_data) { | |||||
callback(_data['deptname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "专业", name: "MajorNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||||
key: value, | |||||
keyId: 'majorno', | |||||
callback: function (_data) { | |||||
callback(_data['majorname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "班级", name: "ClassNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||||
key: value, | |||||
keyId: 'classno', | |||||
callback: function (_data) { | |||||
callback(_data['classname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "宿舍楼", name: "Dormitory", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Acc_DormitoryData', | |||||
key: value, | |||||
keyId: 'id', | |||||
callback: function (_data) { | |||||
callback(_data['name']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "单元", name: "Unit", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Acc_UnitData', | |||||
key: value, | |||||
keyId: 'id', | |||||
callback: function (_data) { | |||||
callback(_data['name']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "楼层", name: "Floor", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Acc_FloorData', | |||||
key: value, | |||||
keyId: 'id', | |||||
callback: function (_data) { | |||||
callback(_data['name']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "寝室号", name: "RId", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Acc_RoomData', | |||||
key: value, | |||||
keyId: 'id', | |||||
callback: function (_data) { | |||||
callback(_data['name']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "学生姓名", name: "StuNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic', | |||||
key: value, | |||||
keyId: 'stuno', | |||||
callback: function (_data) { | |||||
callback(_data['stuname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "日期", name: "Date", width: 130, align: "left" }, | |||||
{ label: "卫生奖分", name: "AddScoreHealth", width: 100, align: "left" }, | |||||
{ label: "卫生扣分", name: "MinusScoreHealth", width: 100, align: "left" }, | |||||
{ label: "纪律奖分", name: "AddScore", width: 100, align: "left" }, | |||||
{ label: "纪律扣分", name: "MinusScore", width: 100, align: "left" }, | |||||
{ label: "奖扣分原因", name: "Reason", width: 200, align: "left" }, | |||||
], | |||||
mainId: 'Id', | |||||
isPage: true, | |||||
sidx: 'Date desc' | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
param.StartTime = startTime; | |||||
param.EndTime = endTime; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
page.search(); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,80 @@ | |||||
@{ | |||||
ViewBag.Title = "寝室日常"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
<div class="lr-layout lr-layout-left-center" id="lr_layout"> | |||||
<div class="lr-layout-left"> | |||||
<div class="lr-layout-wrap"> | |||||
<div class="lr-layout-title lrlt "> | |||||
树形列表 | |||||
<a id="tree_refresh" onmouseover="this.style.cursor='hand'">刷新</a> | |||||
</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="Name" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">宿舍楼</div> | |||||
<div id="ApartmentId"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">单元</div> | |||||
<div id="UnitId"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">楼层</div> | |||||
<div id="FloorId"></div> | |||||
</div> | |||||
@*<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">类别</div> | |||||
<input id="BuildType" type="text" class="form-control" /> | |||||
</div>*@ | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">系</div> | |||||
<div id="Dept"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">专业</div> | |||||
<div id="Major"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">班级</div> | |||||
<div id="Class"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">性别</div> | |||||
<div id="Sex"></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 class=" btn-group btn-group-sm" learun-authorize="yes"> | |||||
<a id="lr_view" class="btn btn-default"><i class="fa fa-plus"></i> 查看</a> | |||||
<a id="lr_viewall" class="btn btn-default"><i class="fa fa-plus"></i> 查看全部</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Acc_DailyAssess/IndexDorm.js") |
@@ -0,0 +1,374 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2019-04-26 15:02 | |||||
* 描 述:学生宿舍管理 | |||||
*/ | |||||
var refreshGirdData; | |||||
var selectedParent = {}; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
page.initTree(); | |||||
page.initGird(); | |||||
page.search({ ParentID: '' }); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 420, 400); | |||||
//宿舍楼 | |||||
$('#ApartmentId').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DormitoryInfo', | |||||
param: { strWhere: " BuildType='1' order by Name asc" }, | |||||
value: "id", | |||||
text: "name", | |||||
select: function (item) { | |||||
if (!!item) { | |||||
//单元 | |||||
$('#UnitId').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DormitoryInfo', | |||||
param: { strWhere: " BuildType='2' and ApartmentId='" + item.id + "'" }, | |||||
value: "id", | |||||
text: "name", | |||||
select: function (item) { | |||||
if (!!item) { | |||||
//楼层 | |||||
$('#FloorId').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DormitoryInfo', | |||||
param: { strWhere: " BuildType='3' and UnitId='" + item.id + "'" }, | |||||
value: "id", | |||||
text: "name" | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#UnitId').lrselect({ allowSearch: true }); | |||||
$('#FloorId').lrselect({ allowSearch: true }); | |||||
$('#Sex').lrDataItemSelect({ code: 'usersex' }); | |||||
//.lrRadioCheckbox({ | |||||
// type: 'radio', | |||||
// code: 'usersex', | |||||
//}); | |||||
$('#Class').lrselect({ | |||||
value: "classno", | |||||
text: "classname" | |||||
}); | |||||
$('#Dept').lrselect({ | |||||
value: "deptno", | |||||
text: "deptname", | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#Major').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||||
param: { code: "CdMajorInfo", strWhere: "DeptNo='" + item.deptno + "'" } | |||||
}); | |||||
} | |||||
else { | |||||
$('#Major').lrselectRefresh({ | |||||
url: "", | |||||
data: [] | |||||
}); | |||||
} | |||||
$('#Class').lrselectRefresh({ | |||||
url: "", | |||||
data: [] | |||||
}); | |||||
} | |||||
}); | |||||
$('#Major').lrselect({ | |||||
value: "majorno", | |||||
text: "majorname", | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#Class').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||||
param: { code: "bjsj", strWhere: "DeptNo='" + item.deptno + "' and majorno='" + item.majorno + "'" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#Major').on("click", | |||||
function () { | |||||
var data = $('#Dept').lrselectGet(); | |||||
if (!data) { | |||||
learun.alert.error('请先选择系'); | |||||
} | |||||
}); | |||||
$('#Class').on("click", | |||||
function () { | |||||
var data1 = $('#Dept').lrselectGet(); | |||||
var data2 = $('#Major').lrselectGet(); | |||||
if (!data1 || !data2) { | |||||
learun.alert.error('请先选择系和专业'); | |||||
} | |||||
}); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 查看 | |||||
$('#lr_view').on('click', function () { | |||||
var BuildType = $('#gridtable').jfGridValue('BuildType'); | |||||
var Dormitory = $('#gridtable').jfGridValue('ApartmentId'); | |||||
var Unit = $('#gridtable').jfGridValue('UnitId'); | |||||
var Floor = $('#gridtable').jfGridValue('FloorId'); | |||||
var RId = $('#gridtable').jfGridValue('ID'); | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
if (BuildType != '4') { | |||||
return learun.alert.warning("请选择宿舍!"); | |||||
} | |||||
learun.layerForm({ | |||||
id: 'index', | |||||
title: '查看', | |||||
url: top.$.rootUrl + '/LogisticsManagement/Acc_DailyAssess/Index?keyValue=' + keyValue + '&Dormitory=' + Dormitory + '&Unit=' + Unit + '&Floor=' + Floor + '&RId=' + RId, | |||||
width: 1200, | |||||
height: 800, | |||||
btn: null, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 查看 | |||||
$('#lr_viewall').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'indexall', | |||||
title: '查看全部', | |||||
url: top.$.rootUrl + '/LogisticsManagement/Acc_DailyAssess/IndexAll', | |||||
width: 1200, | |||||
height: 800, | |||||
btn: null, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
if (keyValue.indexOf(',') != -1) { | |||||
learun.alert.warning("只能选择一条记录进行编辑!"); | |||||
return false; | |||||
} | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/Form?keyValue=' + keyValue, | |||||
width: 900, | |||||
height: 550, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 删除 | |||||
$('#lr_delete').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/DeleteForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
//刷新左侧的树 | |||||
$("#tree_refresh").on("click", function () { | |||||
page.initTree(); | |||||
}); | |||||
}, | |||||
//初始化左侧树 | |||||
initTree: function () { | |||||
// 初始化左侧树形数据 | |||||
$('#dataTree').lrtree({ | |||||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetTree', | |||||
nodeClick: function (item) { | |||||
selectedParent.ID = item.value; | |||||
selectedParent.Name = item.text; | |||||
selectedParent.BuildType = item.title; | |||||
if (item.parent) { | |||||
if (!item.parent.parentId) { | |||||
selectedParent.ChildType = "2"; | |||||
} else { | |||||
selectedParent.ChildType = "0"; | |||||
} | |||||
} | |||||
else { | |||||
selectedParent.ChildType = "1"; | |||||
} | |||||
if (item.text.indexOf("室") > -1) { | |||||
selectedParent.ChildType = "5"; | |||||
} | |||||
var param = {}; | |||||
if (item.title == '1') | |||||
param.ApartmentId = item.value; | |||||
else if (item.title == '2') | |||||
param.UnitId = item.value; | |||||
else if (item.title == '3') | |||||
param.FloorId = item.value; | |||||
//page.initGird(); | |||||
//page.search({ ParentID: item.value }); | |||||
page.search(param); | |||||
} | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
//宿舍数据 | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetPageList', | |||||
headData: [ | |||||
{ label: "名称", name: "Name", width: 100, align: "left" }, | |||||
{ | |||||
label: "宿舍楼", name: "ApartmentName", width: 100, align: "left" | |||||
}, | |||||
{ | |||||
label: "单元", name: "UnitName", width: 100, align: "left" | |||||
}, | |||||
{ | |||||
label: "楼层", name: "FloorName", width: 100, align: "left" | |||||
}, | |||||
//{ | |||||
// label: "学生", name: "StudentID", width: 100, align: "left", | |||||
// formatterAsync: function (callback, value, row, op, $cell) { | |||||
// learun.clientdata.getAsync('custmerData', { | |||||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic', | |||||
// key: value, | |||||
// keyId: 'stuid', | |||||
// callback: function (_data) { | |||||
// callback(_data['stuname']); | |||||
// } | |||||
// }); | |||||
// } | |||||
//}, | |||||
{ label: "位置", name: "Address", width: 100, align: "left" }, | |||||
{ | |||||
label: "校区", name: "Campus", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', | |||||
key: value, | |||||
keyId: 'f_companyid', | |||||
callback: function (_data) { | |||||
callback(_data['f_fullname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "系", name: "Dept", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||||
key: value, | |||||
keyId: 'deptno', | |||||
callback: function (_data) { | |||||
callback(_data['deptname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "专业", name: "Major", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||||
key: value, | |||||
keyId: 'majorno', | |||||
callback: function (_data) { | |||||
callback(_data['majorname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "班级", name: "Class", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||||
key: value, | |||||
keyId: 'classno', | |||||
callback: function (_data) { | |||||
callback(_data['classname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "寝室类型", name: "RoomType", width: 100, align: "left", | |||||
formatter: function (value, row) { | |||||
if (value) { | |||||
return value + '人寝'; | |||||
} else { | |||||
return ''; | |||||
} | |||||
} | |||||
}, | |||||
{ label: "入住人数", name: "CheckInStu", width: 100, align: "left" }, | |||||
{ | |||||
label: "性别", name: "Sex", width: 100, align: "left", | |||||
formatter: function (value, row) { | |||||
if (value == '0') | |||||
return '女'; | |||||
else if (value == '1') | |||||
return '男'; | |||||
else | |||||
return ''; | |||||
} | |||||
}, | |||||
{ label: "负责人", name: "Functionary", width: 100, align: "left" }, | |||||
{ label: "负责人电话", name: "Phone", width: 100, align: "left" }, | |||||
{ label: "备注", name: "Remark", width: 100, align: "left" }, | |||||
], | |||||
mainId: 'ID', | |||||
isPage: true, | |||||
sidx: 'ApartmentId asc,UnitId asc ,FloorId asc ', | |||||
}); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
param.SqlParameter = " AND t.BuildType ='4' "; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
if (!!selectedParent.ID) { | |||||
//var param = { ParentID: selectedParent.ID }; | |||||
//$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
page.initTree(); | |||||
page.search({ ParentID: selectedParent.ID }); | |||||
} else { | |||||
page.initTree(); | |||||
page.search(); | |||||
} | |||||
}; | |||||
page.init(); | |||||
} |
@@ -21,7 +21,7 @@ | |||||
<div id="RId" isvalid="yes" checkexpession="NotNull"></div> | <div id="RId" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Acc_GoodsDemage"> | |||||
@*<div class="col-xs-6 lr-form-item" data-table="Acc_GoodsDemage"> | |||||
<div class="lr-form-item-title">专业部<font face="宋体">*</font></div> | <div class="lr-form-item-title">专业部<font face="宋体">*</font></div> | ||||
<div id="DeptNo" isvalid="yes" checkexpession="NotNull"></div> | <div id="DeptNo" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | </div> | ||||
@@ -32,7 +32,7 @@ | |||||
<div class="col-xs-6 lr-form-item" data-table="Acc_GoodsDemage"> | <div class="col-xs-6 lr-form-item" data-table="Acc_GoodsDemage"> | ||||
<div class="lr-form-item-title">班级<font face="宋体">*</font></div> | <div class="lr-form-item-title">班级<font face="宋体">*</font></div> | ||||
<div id="ClassNo" isvalid="yes" checkexpession="NotNull"></div> | <div id="ClassNo" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | |||||
</div>*@ | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="Acc_GoodsDemage"> | <div class="col-xs-12 lr-form-item" data-table="Acc_GoodsDemage"> | ||||
<div class="lr-form-item-title">损坏描述<font face="宋体">*</font></div> | <div class="lr-form-item-title">损坏描述<font face="宋体">*</font></div> | ||||
@@ -56,57 +56,57 @@ var bootstrap = function ($, learun) { | |||||
allowSearch: true | allowSearch: true | ||||
}); | }); | ||||
$('#DeptNo').lrselect({ | |||||
allowSearch: true, | |||||
value: "deptno", | |||||
text: "deptname", | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#MajorNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" } | |||||
}); | |||||
} else { | |||||
$('#MajorNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
param: { strWhere: "1=1 AND CheckMark=1" } | |||||
}); | |||||
} | |||||
//$('#DeptNo').lrselect({ | |||||
// allowSearch: true, | |||||
// value: "deptno", | |||||
// text: "deptname", | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', | |||||
// select: function (item) { | |||||
// if (item) { | |||||
// $('#MajorNo').lrselectRefresh({ | |||||
// allowSearch: true, | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
// param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" } | |||||
// }); | |||||
// } else { | |||||
// $('#MajorNo').lrselectRefresh({ | |||||
// allowSearch: true, | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
// param: { strWhere: "1=1 AND CheckMark=1" } | |||||
// }); | |||||
// } | |||||
} | |||||
}); | |||||
$('#MajorNo').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
value: "majorno", | |||||
text: "majorname", | |||||
param: { strWhere: "1=1 AND CheckMark=1" }, | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#ClassNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" } | |||||
}); | |||||
} else { | |||||
$('#ClassNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
param: { strWhere: "1=1 AND CheckMark=1" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#ClassNo').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
param: { strWhere: "1=1 AND CheckMark=1" }, | |||||
value: "classno", | |||||
text: "classname" | |||||
}); | |||||
// } | |||||
//}); | |||||
//$('#MajorNo').lrselect({ | |||||
// allowSearch: true, | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
// value: "majorno", | |||||
// text: "majorname", | |||||
// param: { strWhere: "1=1 AND CheckMark=1" }, | |||||
// select: function (item) { | |||||
// if (item) { | |||||
// $('#ClassNo').lrselectRefresh({ | |||||
// allowSearch: true, | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
// param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" } | |||||
// }); | |||||
// } else { | |||||
// $('#ClassNo').lrselectRefresh({ | |||||
// allowSearch: true, | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
// param: { strWhere: "1=1 AND CheckMark=1" } | |||||
// }); | |||||
// } | |||||
// } | |||||
//}); | |||||
//$('#ClassNo').lrselect({ | |||||
// allowSearch: true, | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
// param: { strWhere: "1=1 AND CheckMark=1" }, | |||||
// value: "classno", | |||||
// text: "classname" | |||||
//}); | |||||
$('#Files').lrUploader(); | $('#Files').lrUploader(); | ||||
}, | }, | ||||
initData: function () { | initData: function () { | ||||
@@ -171,32 +171,32 @@ var bootstrap = function ($, learun) { | |||||
$('#gridtable').jfGrid({ | $('#gridtable').jfGrid({ | ||||
url: top.$.rootUrl + '/LogisticsManagement/Acc_GoodsDemage/GetPageList', | url: top.$.rootUrl + '/LogisticsManagement/Acc_GoodsDemage/GetPageList', | ||||
headData: [ | headData: [ | ||||
{ | |||||
label: "专业部", name: "DeptNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||||
key: value, | |||||
keyId: 'deptno', | |||||
callback: function (_data) { | |||||
callback(_data['deptname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "专业", name: "MajorNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||||
key: value, | |||||
keyId: 'majorno', | |||||
callback: function (_data) { | |||||
callback(_data['majorname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
//{ | |||||
// label: "专业部", name: "DeptNo", width: 100, align: "left", | |||||
// formatterAsync: function (callback, value, row, op, $cell) { | |||||
// learun.clientdata.getAsync('custmerData', { | |||||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||||
// key: value, | |||||
// keyId: 'deptno', | |||||
// callback: function (_data) { | |||||
// callback(_data['deptname']); | |||||
// } | |||||
// }); | |||||
// } | |||||
//}, | |||||
//{ | |||||
// label: "专业", name: "MajorNo", width: 100, align: "left", | |||||
// formatterAsync: function (callback, value, row, op, $cell) { | |||||
// learun.clientdata.getAsync('custmerData', { | |||||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||||
// key: value, | |||||
// keyId: 'majorno', | |||||
// callback: function (_data) { | |||||
// callback(_data['majorname']); | |||||
// } | |||||
// }); | |||||
// } | |||||
//}, | |||||
{ | { | ||||
label: "班级", name: "ClassNo", width: 100, align: "left", | label: "班级", name: "ClassNo", width: 100, align: "left", | ||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
@@ -271,7 +271,7 @@ | |||||
setTimeout(function () { | setTimeout(function () { | ||||
(b.operaSupport && a.browser.opera ? c : e[0].contentWindow).print(); | (b.operaSupport && a.browser.opera ? c : e[0].contentWindow).print(); | ||||
c && c.close() | c && c.close() | ||||
}, 1E3) | |||||
}, 3000) | |||||
} | } | ||||
@@ -1494,7 +1494,9 @@ | |||||
<Content Include="Areas\LogisticsManagement\Views\Accommodation\IndexClassify.js" /> | <Content Include="Areas\LogisticsManagement\Views\Accommodation\IndexClassify.js" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Accommodation\IndexDistribution.js" /> | <Content Include="Areas\LogisticsManagement\Views\Accommodation\IndexDistribution.js" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Acc_DailyAssess\Form.js" /> | <Content Include="Areas\LogisticsManagement\Views\Acc_DailyAssess\Form.js" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Acc_DailyAssess\IndexAll.js" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Acc_DailyAssess\Index.js" /> | <Content Include="Areas\LogisticsManagement\Views\Acc_DailyAssess\Index.js" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Acc_DailyAssess\IndexDorm.js" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Acc_PublicAreaHealth\Form.js" /> | <Content Include="Areas\LogisticsManagement\Views\Acc_PublicAreaHealth\Form.js" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Acc_PublicAreaHealth\Index.js" /> | <Content Include="Areas\LogisticsManagement\Views\Acc_PublicAreaHealth\Index.js" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Acc_StuDayRoutine\Form.js" /> | <Content Include="Areas\LogisticsManagement\Views\Acc_StuDayRoutine\Form.js" /> | ||||
@@ -7890,6 +7892,8 @@ | |||||
<Content Include="Areas\LogisticsManagement\Views\Acc_PublicAreaHealth\Index.cshtml" /> | <Content Include="Areas\LogisticsManagement\Views\Acc_PublicAreaHealth\Index.cshtml" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Acc_DailyAssess\Form.cshtml" /> | <Content Include="Areas\LogisticsManagement\Views\Acc_DailyAssess\Form.cshtml" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Acc_DailyAssess\Index.cshtml" /> | <Content Include="Areas\LogisticsManagement\Views\Acc_DailyAssess\Index.cshtml" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Acc_DailyAssess\IndexDorm.cshtml" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Acc_DailyAssess\IndexAll.cshtml" /> | |||||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | <None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | ||||
<Content Include="Views\Login\Default-beifen.cshtml" /> | <Content Include="Views\Login\Default-beifen.cshtml" /> | ||||
@@ -2,6 +2,7 @@ | |||||
using Learun.Util; | using Learun.Util; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System; | using System; | ||||
using System.Linq; | |||||
using Learun.Application.TwoDevelopment.LogisticsManagement; | using Learun.Application.TwoDevelopment.LogisticsManagement; | ||||
namespace Learun.Application.WebApi | namespace Learun.Application.WebApi | ||||
@@ -16,6 +17,7 @@ namespace Learun.Application.WebApi | |||||
public class Acc_DailyAssessApi : BaseApi | public class Acc_DailyAssessApi : BaseApi | ||||
{ | { | ||||
private Acc_DailyAssessIBLL acc_DailyAssessIBLL = new Acc_DailyAssessBLL(); | private Acc_DailyAssessIBLL acc_DailyAssessIBLL = new Acc_DailyAssessBLL(); | ||||
private AccommodationIBLL accommodationIBLL = new AccommodationBLL(); | |||||
/// <summary> | /// <summary> | ||||
/// 注册接口 | /// 注册接口 | ||||
@@ -27,6 +29,8 @@ namespace Learun.Application.WebApi | |||||
Get["/form"] = GetForm; | Get["/form"] = GetForm; | ||||
Post["/delete"] = DeleteForm; | Post["/delete"] = DeleteForm; | ||||
Post["/save"] = SaveForm; | Post["/save"] = SaveForm; | ||||
Get["/getdormstu"] = GetDormStu; | |||||
} | } | ||||
#region 获取数据 | #region 获取数据 | ||||
@@ -63,6 +67,18 @@ namespace Learun.Application.WebApi | |||||
}; | }; | ||||
return Success(jsonData); | return Success(jsonData); | ||||
} | } | ||||
/// <summary> | |||||
/// 获取页面显示列表分页数据 | |||||
/// <summary> | |||||
/// <param name="_"></param> | |||||
/// <returns></returns> | |||||
public Response GetDormStu(dynamic _) | |||||
{ | |||||
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>(); | |||||
var data = accommodationIBLL.GetDromStu(parameter.keyValue).OrderBy(x => x.Class); | |||||
return Success(data); | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -26,12 +26,17 @@ namespace Learun.Application.OA | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
var user = LoginUserInfo.Get(); | |||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append("SELECT * FROM LR_OA_News t WHERE t.F_TypeId = 2 and F_Status<>'-1' and F_DeleteMark=0"); | strSql.Append("SELECT * FROM LR_OA_News t WHERE t.F_TypeId = 2 and F_Status<>'-1' and F_DeleteMark=0"); | ||||
if (!string.IsNullOrEmpty(keyword)) | if (!string.IsNullOrEmpty(keyword)) | ||||
{ | { | ||||
strSql.Append(" AND F_FullHead like @keyword"); | strSql.Append(" AND F_FullHead like @keyword"); | ||||
} | } | ||||
if (user.Description != "超级管理员") | |||||
{ | |||||
strSql.Append(" AND F_CreateUserName ='" + user.realName + "'"); | |||||
} | |||||
return this.BaseRepository().FindList<NewsEntity>(strSql.ToString(), new { keyword = "%" + keyword + "%" }, pagination); | return this.BaseRepository().FindList<NewsEntity>(strSql.ToString(), new { keyword = "%" + keyword + "%" }, pagination); | ||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
@@ -197,7 +202,7 @@ namespace Learun.Application.OA | |||||
} | } | ||||
} | } | ||||
#endregion | #endregion | ||||
#region 扩展数据 | #region 扩展数据 | ||||
@@ -20,6 +20,12 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
[Column("ID")] | [Column("ID")] | ||||
public string Id { get; set; } | public string Id { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 关联宿舍主键 | |||||
/// </summary> | |||||
[Column("BUILDID")] | |||||
public string BuildId { get; set; } | |||||
/// <summary> | |||||
/// <summary> | |||||
/// 宿舍楼 | /// 宿舍楼 | ||||
/// </summary> | /// </summary> | ||||
[Column("DORMITORY")] | [Column("DORMITORY")] | ||||
@@ -60,6 +66,11 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
[Column("STUNO")] | [Column("STUNO")] | ||||
public string StuNo { get; set; } | public string StuNo { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 学号 | |||||
/// </summary> | |||||
[Column("STUNAME")] | |||||
public string StuName { get; set; } | |||||
/// <summary> | |||||
/// 日期 | /// 日期 | ||||
/// </summary> | /// </summary> | ||||
[Column("DATE")] | [Column("DATE")] | ||||
@@ -5,6 +5,7 @@ using System; | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Data; | using System.Data; | ||||
using System.Text; | using System.Text; | ||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | namespace Learun.Application.TwoDevelopment.LogisticsManagement | ||||
{ | { | ||||
@@ -79,10 +80,15 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
} | } | ||||
if (!queryParam["StuName"].IsEmpty()) | if (!queryParam["StuName"].IsEmpty()) | ||||
{ | { | ||||
dp.Add("StuName", "%"+queryParam["StuName"].ToString()+"%", DbType.String); | |||||
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND s.StuName like @StuName "); | strSql.Append(" AND s.StuName like @StuName "); | ||||
} | } | ||||
return this.BaseRepository("CollegeMIS").FindList<Acc_DailyAssessEntity>(strSql.ToString(),dp, pagination); | |||||
//添加sql条件 | |||||
if (!queryParam["SqlParameter"].IsEmpty()) | |||||
{ | |||||
strSql.Append(queryParam["SqlParameter"].ToString()); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<Acc_DailyAssessEntity>(strSql.ToString(), dp, pagination); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -134,7 +140,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
this.BaseRepository("CollegeMIS").Delete<Acc_DailyAssessEntity>(t=>t.Id == keyValue); | |||||
this.BaseRepository("CollegeMIS").Delete<Acc_DailyAssessEntity>(t => t.Id == keyValue); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -158,6 +164,13 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
var Stulist = this.BaseRepository("CollegeMIS").FindEntity<StuInfoBasicEntity>(x => x.StuNo == entity.StuNo); | |||||
if (Stulist != null) | |||||
{ | |||||
entity.ClassNo = Stulist.ClassNo; | |||||
entity.MajorNo = Stulist.MajorNo; | |||||
entity.DeptNo = Stulist.DeptNo; | |||||
} | |||||
if (!string.IsNullOrEmpty(keyValue)) | if (!string.IsNullOrEmpty(keyValue)) | ||||
{ | { | ||||
entity.Modify(keyValue); | entity.Modify(keyValue); | ||||
@@ -44,6 +44,25 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
} | } | ||||
} | } | ||||
public IEnumerable<Acc_DormitoryBuildEntity> GetDromStu(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return accommodationService.GetDromStu(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public IEnumerable<Acc_DormitoryBuildEntity> GetBedListByRoomId(string RoomId) | public IEnumerable<Acc_DormitoryBuildEntity> GetBedListByRoomId(string RoomId) | ||||
{ | { | ||||
try | try | ||||
@@ -22,6 +22,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
/// <param name="queryJson">查询参数</param> | /// <param name="queryJson">查询参数</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
IEnumerable<Acc_DormitoryBuildEntity> GetPageList(Pagination pagination, string queryJson); | IEnumerable<Acc_DormitoryBuildEntity> GetPageList(Pagination pagination, string queryJson); | ||||
IEnumerable<Acc_DormitoryBuildEntity> GetDromStu(string kevValue); | |||||
IEnumerable<Acc_DormitoryBuildEntity> GetBedListByRoomId(string RoomId); | IEnumerable<Acc_DormitoryBuildEntity> GetBedListByRoomId(string RoomId); | ||||
IEnumerable<Acc_DormitoryBuildEntity> GetAllList(); | IEnumerable<Acc_DormitoryBuildEntity> GetAllList(); | ||||
IEnumerable<Acc_DormitoryBuildEntity> GetClassifyList(Pagination paginationobj,string queryJson); | IEnumerable<Acc_DormitoryBuildEntity> GetClassifyList(Pagination paginationobj,string queryJson); | ||||
@@ -206,6 +206,28 @@ a.name as ApartmentName,b.name as UnitName,c.Name as FloorName | |||||
} | } | ||||
} | } | ||||
public IEnumerable<Acc_DormitoryBuildEntity> GetDromStu(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
string sql = @"select ID,Name,DNo,StudentID,fb.stuNo,fb.stuname,fb.classno,fb.majorno,fb.deptno from Acc_DormitoryBuild zb | |||||
left join StuInfoBasic fb on fb.Stuno = zb.StudentID | |||||
where zb.BuildType = '5' and zb.ParentID = '" + keyValue + "'"; | |||||
return this.BaseRepository("CollegeMIS").FindList<Acc_DormitoryBuildEntity>(sql); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
public IEnumerable<Acc_DormitoryBuildEntity> GetBedListByRoomId(string RoomId) | public IEnumerable<Acc_DormitoryBuildEntity> GetBedListByRoomId(string RoomId) | ||||
{ | { | ||||
try | try | ||||
@@ -361,6 +361,9 @@ export default { | |||||
case 'select': | case 'select': | ||||
if (!val || !dataSource.map(t => t.value).includes(String(val))) { return '' } | if (!val || !dataSource.map(t => t.value).includes(String(val))) { return '' } | ||||
return String(val) | return String(val) | ||||
case 'selectNoMap': | |||||
if (!val) { return '' } | |||||
return String(val) | |||||
case 'checkbox': | case 'checkbox': | ||||
if (!val) { return [] } | if (!val) { return [] } | ||||
@@ -199,13 +199,37 @@ export default { | |||||
OFF(name, func) { | OFF(name, func) { | ||||
uni.$off(name, func) | uni.$off(name, func) | ||||
}, | }, | ||||
// sortArr(array,num=0){ | |||||
// let arr = JSON.parse(JSON.stringify(array)) | |||||
// for(let i = 0;i<arr.length-1-num;i++){ | |||||
// if(Number(arr[i].classno) < Number(arr[i+1].classno)){ | |||||
// let item = JSON.parse(JSON.stringify(arr[i])) | |||||
// let item1 = JSON.parse(JSON.stringify(arr[i+1])) | |||||
// arr[i] = item1 | |||||
// arr[i+1] = item | |||||
// } | |||||
// } | |||||
// if(num < arr.length-1){ | |||||
// return this.sortArr(arr,num+1) | |||||
// }else{ | |||||
// return arr | |||||
// } | |||||
// }, | |||||
// 拉取指定 code 值的数据源数据 | // 拉取指定 code 值的数据源数据 | ||||
async FETCH_DATASOURCE(code) { | async FETCH_DATASOURCE(code) { | ||||
if (!code) { | if (!code) { | ||||
return [] | return [] | ||||
} | } | ||||
return await this.HTTP_GET('learun/adms/datasource/map', {code,ver: ''}) | |||||
let res = await this.HTTP_GET('learun/adms/datasource/map', {code,ver: ''}) | |||||
// if(res.data&&res.data.length){ | |||||
// if(code == "bjsj"){ | |||||
// console.log({data:this.sortArr(res.data),ver:res.ver}) | |||||
// return {data:this.sortArr(res.data),ver:res.ver} | |||||
// } | |||||
// } | |||||
return res | |||||
}, | }, | ||||
// 拉取指定规则编号的表单编码数据 | // 拉取指定规则编号的表单编码数据 | ||||
@@ -98,7 +98,7 @@ export default { | |||||
// 获取树形列表每一项后面 tag 的显示 | // 获取树形列表每一项后面 tag 的显示 | ||||
tagName() { | tagName() { | ||||
return { user: '职员', department: '部门', company: '公司' }[this.item.type] | |||||
return { user: '职员', department: '部门', company: '学校' }[this.item.type] | |||||
}, | }, | ||||
// 获取 tag 的颜色 | // 获取 tag 的颜色 | ||||
@@ -219,7 +219,7 @@ export default { | |||||
// 获取树形列表每一项后面 tag 的显示 | // 获取树形列表每一项后面 tag 的显示 | ||||
tagName() { | tagName() { | ||||
return { user: '职员', department: '部门', company: '公司' }[this.root.type] | |||||
return { user: '职员', department: '部门', company: '学校' }[this.root.type] | |||||
}, | }, | ||||
// 获取 tag 的颜色 | // 获取 tag 的颜色 | ||||
@@ -19,7 +19,7 @@ | |||||
</view> | </view> | ||||
<view> | <view> | ||||
<text class="text-bold">{{ processItem.F_CreateUserName || '「系统」' }}</text> | <text class="text-bold">{{ processItem.F_CreateUserName || '「系统」' }}</text> | ||||
: {{ processItem.F_OperationName }} | |||||
<!-- : {{ processItem.F_OperationName }} --> | |||||
</view> | </view> | ||||
<view v-if="processItem.F_Des"> | <view v-if="processItem.F_Des"> | ||||
<text class="text-bold">审批意见</text> | <text class="text-bold">审批意见</text> | ||||
@@ -236,7 +236,7 @@ export default { | |||||
this.dataSource.LessonNo = result.data.map(t => ({ text: t.lessonname, value: t.lessonno })); | this.dataSource.LessonNo = result.data.map(t => ({ text: t.lessonname, value: t.lessonno })); | ||||
}), | }), | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.TeachClassNo = result.data.map(t => ({ text: t.classname, value: t.classno })); | |||||
this.dataSource.TeachClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })); | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('EmpInfo').then(result => { | this.FETCH_DATASOURCE('EmpInfo').then(result => { | ||||
this.dataSource.EmpNo = result.data.map(t => ({ text: t.empname, value: t.empno })); | this.dataSource.EmpNo = result.data.map(t => ({ text: t.empname, value: t.empno })); | ||||
@@ -254,7 +254,7 @@ export default { | |||||
this.dataSource.NewLessonNo = result.data.map(t => ({ text: t.lessonname, value: t.lessonno })); | this.dataSource.NewLessonNo = result.data.map(t => ({ text: t.lessonname, value: t.lessonno })); | ||||
}), | }), | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.NewTeachClassNo = result.data.map(t => ({ text: t.classname, value: t.classno })); | |||||
this.dataSource.NewTeachClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })); | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('EmpInfo').then(result => { | this.FETCH_DATASOURCE('EmpInfo').then(result => { | ||||
this.dataSource.NewEmpNo = result.data.map(t => ({ text: t.empname, value: t.empno })); | this.dataSource.NewEmpNo = result.data.map(t => ({ text: t.empname, value: t.empno })); | ||||
@@ -222,7 +222,7 @@ export default { | |||||
this.dataSource.MajorNo = result.data.map(t => ({ text: t.majorname, value: t.majorno })) | this.dataSource.MajorNo = result.data.map(t => ({ text: t.majorname, value: t.majorno })) | ||||
}), | }), | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassNo = result.data.map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('DIC_PROVINCE').then(result => { | this.FETCH_DATASOURCE('DIC_PROVINCE').then(result => { | ||||
this.dataSource.EmployerProvince = result.data.map(t => ({ text: t.pname, value: t.pcode })) | this.dataSource.EmployerProvince = result.data.map(t => ({ text: t.pname, value: t.pcode })) | ||||
@@ -149,7 +149,7 @@ export default { | |||||
// 拉取加载列表和数据源 | // 拉取加载列表和数据源 | ||||
await Promise.all([ | await Promise.all([ | ||||
this.FETCH_DATASOURCE('bjsj').then(data => { | this.FETCH_DATASOURCE('bjsj').then(data => { | ||||
this.dataSource.ClassNo = data.data.map(t => ({ | |||||
this.dataSource.ClassNo = data.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ | |||||
text: t.classname, | text: t.classname, | ||||
value: t.classno | value: t.classno | ||||
})); | })); | ||||
@@ -195,7 +195,7 @@ export default { | |||||
// 拉取加载列表和数据源 | // 拉取加载列表和数据源 | ||||
await Promise.all([ | await Promise.all([ | ||||
this.FETCH_DATASOURCE('bjsj').then(data => { | this.FETCH_DATASOURCE('bjsj').then(data => { | ||||
this.dataSource.ClassNo = data.data.map(t => ({ | |||||
this.dataSource.ClassNo = data.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ | |||||
text: t.classname, | text: t.classname, | ||||
value: t.classno | value: t.classno | ||||
})); | })); | ||||
@@ -164,7 +164,7 @@ export default { | |||||
// 拉取表单数据,同时拉取所有来自数据源的选单数据 | // 拉取表单数据,同时拉取所有来自数据源的选单数据 | ||||
await Promise.all([ | await Promise.all([ | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.Thermography.ClassNo = result.data.map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.Thermography.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('BaseUser').then(result => { | this.FETCH_DATASOURCE('BaseUser').then(result => { | ||||
this.dataSource.Thermography.MeasurerID = result.data.map(t => ({ text: t.f_realname, value: t.f_account })) | this.dataSource.Thermography.MeasurerID = result.data.map(t => ({ text: t.f_realname, value: t.f_account })) | ||||
@@ -11,7 +11,7 @@ | |||||
<!-- 单条记录 --> | <!-- 单条记录 --> | ||||
<view class="customlist-item" v-for="item of list" :key="item.Id"> | <view class="customlist-item" v-for="item of list" :key="item.Id"> | ||||
<view class="customlist-item-field"> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">专业部:</text> | <text class="customlist-item-field-title">专业部:</text> | ||||
{{ displayListItem(item, 'DeptNo') }} | {{ displayListItem(item, 'DeptNo') }} | ||||
</view> | </view> | ||||
@@ -22,7 +22,7 @@ | |||||
<view class="customlist-item-field"> | <view class="customlist-item-field"> | ||||
<text class="customlist-item-field-title">班级:</text> | <text class="customlist-item-field-title">班级:</text> | ||||
{{ displayListItem(item, 'ClassNo') }} | {{ displayListItem(item, 'ClassNo') }} | ||||
</view> | |||||
</view> | |||||
<view class="customlist-item-field"> | <view class="customlist-item-field"> | ||||
<text class="customlist-item-field-title">宿舍楼:</text> | <text class="customlist-item-field-title">宿舍楼:</text> | ||||
{{ displayListItem(item, 'Dormitory') }} | {{ displayListItem(item, 'Dormitory') }} | ||||
@@ -94,28 +94,6 @@ | |||||
ref="datefilter" | ref="datefilter" | ||||
class="margin-bottom" | class="margin-bottom" | ||||
/> | /> | ||||
<l-select | |||||
v-model="queryData.DeptNo" | |||||
@change="DeptNoChange" | |||||
:range="dataSource.DeptNo" | |||||
title ="专业部" | |||||
placeholder="按专业部查询" | |||||
/> | |||||
<l-select | |||||
v-model="queryData.MajorNo" | |||||
@change="MajorNoChange" | |||||
:range="dataSource.MajorNo" | |||||
title ="专业" | |||||
placeholder="按专业查询" | |||||
/> | |||||
<l-select | |||||
v-model="queryData.ClassNo" | |||||
@change="searchChange" | |||||
:range="dataSource.ClassNo" | |||||
title ="班级" | |||||
placeholder="按班级查询" | |||||
/> | |||||
<l-select | <l-select | ||||
v-model="queryData.Dormitory" | v-model="queryData.Dormitory" | ||||
@change="DormitoryChange" | @change="DormitoryChange" | ||||
@@ -144,6 +122,28 @@ | |||||
title ="宿舍" | title ="宿舍" | ||||
placeholder="按宿舍查询" | placeholder="按宿舍查询" | ||||
/> | /> | ||||
<l-select | |||||
v-model="queryData.DeptNo" | |||||
@change="DeptNoChange" | |||||
:range="dataSource.DeptNo" | |||||
title ="专业部" | |||||
placeholder="按专业部查询" | |||||
/> | |||||
<l-select | |||||
v-model="queryData.MajorNo" | |||||
@change="MajorNoChange" | |||||
:range="dataSource.MajorNo" | |||||
title ="专业" | |||||
placeholder="按专业查询" | |||||
/> | |||||
<l-select | |||||
v-model="queryData.ClassNo" | |||||
@change="searchChange" | |||||
:range="dataSource.ClassNo" | |||||
title ="班级" | |||||
placeholder="按班级查询" | |||||
/> | |||||
<l-input | <l-input | ||||
v-model="queryData.StuName" | v-model="queryData.StuName" | ||||
@change="searchChange" | @change="searchChange" | ||||
@@ -199,14 +199,13 @@ export default { | |||||
Floor: { type: 'select', dataSource: '1', dataSourceId: 'Acc_FloorData,name,id' }, | Floor: { type: 'select', dataSource: '1', dataSourceId: 'Acc_FloorData,name,id' }, | ||||
RId: { type: 'select', dataSource: '1', dataSourceId: 'Acc_RoomData,name,id' }, | RId: { type: 'select', dataSource: '1', dataSourceId: 'Acc_RoomData,name,id' }, | ||||
StuNo: { type: 'select', dataSource: '1', dataSourceId: 'StuInfoBasic,stuname,stuno' }, | StuNo: { type: 'select', dataSource: '1', dataSourceId: 'StuInfoBasic,stuname,stuno' }, | ||||
Date: { type: 'datetime', dateformat: '0' }, | |||||
Date: { type: 'date', dateformat: '0' }, | |||||
AddScoreHealth: { type: 'text' }, | AddScoreHealth: { type: 'text' }, | ||||
MinusScoreHealth: { type: 'text' }, | MinusScoreHealth: { type: 'text' }, | ||||
AddScore: { type: 'text' }, | AddScore: { type: 'text' }, | ||||
MinusScore: { type: 'text' }, | MinusScore: { type: 'text' }, | ||||
Reason: { type: 'textarea' }, | Reason: { type: 'textarea' }, | ||||
}, | }, | ||||
// 查询条件 | // 查询条件 | ||||
searchData: {}, | searchData: {}, | ||||
defaultQueryData: {}, | defaultQueryData: {}, | ||||
@@ -245,7 +244,11 @@ export default { | |||||
// 列表与分页信息 | // 列表与分页信息 | ||||
page: 1, | page: 1, | ||||
total: 2, | total: 2, | ||||
list: [] | |||||
list: [] , | |||||
FloorAll:[], | |||||
RIdAll:[], | |||||
DeptNoAll:[], | |||||
} | } | ||||
}, | }, | ||||
@@ -270,20 +273,32 @@ export default { | |||||
this.dataSource.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | this.dataSource.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | ||||
}), | }), | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('Acc_DormitoryData').then(result => { | this.FETCH_DATASOURCE('Acc_DormitoryData').then(result => { | ||||
this.dataSource.Dormitory = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | |||||
}), | |||||
this.FETCH_DATASOURCE('Acc_UnitData').then(result => { | |||||
this.dataSource.Unit = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | |||||
}), | |||||
this.FETCH_DATASOURCE('Acc_FloorData').then(result => { | |||||
this.dataSource.Floor = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | |||||
this.dataSource.Dormitory = result.data.sort((a,b)=>{return a.parentid-b.parentid}).sort((a,b)=>{return a.dno - b.dno}).map(t => ({ text: t.name, value: t.id })) | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('Acc_RoomData').then(result => { | |||||
this.dataSource.RId = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | |||||
}), | |||||
// this.FETCH_DATASOURCE('Acc_UnitData').then(result => { | |||||
// this.dataSource.Unit = result.data.sort((a,b)=>{return a.dno - b.dno}).map(t => ({ text: t.name, value: t.id })) | |||||
// }), | |||||
// this.FETCH_DATASOURCE('Acc_FloorData').then(result => { | |||||
// this.dataSource.Floor = result.data.sort((a,b)=>{return a.dno - b.dno}).map(t => ({ text: t.name, value: t.id })) | |||||
// }), | |||||
// this.FETCH_DATASOURCE('Acc_RoomData').then(result => { | |||||
// this.dataSource.RId = result.data.sort((a,b)=>{return a.dno - b.dno}).map(t => ({ text: t.name, value: t.id })) | |||||
// }), | |||||
this.FETCH_DATASOURCE('Acc_UnitData').then(result => { | |||||
this.UnitAll = result.data.sort((a,b)=>{return a.dno - b.dno}).map(t => ({ text: t.name, value: t.id,parentid:t.parentid })) | |||||
this.dataSource.Unit = this.COPY(this.UnitAll) | |||||
}), | |||||
this.FETCH_DATASOURCE('Acc_FloorData').then(result => { | |||||
this.FloorAll = result.data.sort((a,b)=>{return a.dno - b.dno}).map(t => ({ text: t.name, value: t.id,parentid:t.parentid })) | |||||
this.dataSource.Floor = this.COPY(this.FloorAll) | |||||
}), | |||||
this.FETCH_DATASOURCE('Acc_RoomData').then(result => { | |||||
this.RIdAll = result.data.sort((a,b)=>{return a.dno - b.dno}).map(t => ({ text: t.name, value: t.id,parentid:t.parentid })) | |||||
this.dataSource.RId = this.COPY(this.RIdAll ) | |||||
}), | |||||
this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | ||||
this.dataSource.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno })) | this.dataSource.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno })) | ||||
}), | }), | ||||
@@ -298,7 +313,7 @@ export default { | |||||
}, | }, | ||||
// 拉取列表 | // 拉取列表 | ||||
async fetchList() { | |||||
async fetchList(isConcat=true) { | |||||
if (this.page > this.total) { return } | if (this.page > this.total) { return } | ||||
const result = await this.HTTP_GET( | const result = await this.HTTP_GET( | ||||
'/Learun/adms/LogisticsManagement/Acc_DailyAssess/pagelist', | '/Learun/adms/LogisticsManagement/Acc_DailyAssess/pagelist', | ||||
@@ -315,7 +330,7 @@ export default { | |||||
this.total = result.total | this.total = result.total | ||||
this.page = result.page + 1 | this.page = result.page + 1 | ||||
this.list = this.list.concat(result.rows) | |||||
this.list = isConcat?this.list.concat(result.rows):result.rows | |||||
this.tips = `已加载 ${Math.min(result.page, result.total)} / ${result.total} 页,共 ${result.records} 项` | this.tips = `已加载 ${Math.min(result.page, result.total)} / ${result.total} 页,共 ${result.records} 项` | ||||
this.loadState = result.page >= result.total ? '已加载所有项目' : '向下翻以加载更多' | this.loadState = result.page >= result.total ? '已加载所有项目' : '向下翻以加载更多' | ||||
@@ -327,7 +342,7 @@ export default { | |||||
this.total = 2 | this.total = 2 | ||||
this.list = [] | this.list = [] | ||||
await this.fetchList() | |||||
await this.fetchList(false) | |||||
}, | }, | ||||
// 列表下拉 | // 列表下拉 | ||||
@@ -352,13 +367,14 @@ export default { | |||||
Object.assign(result, mapValues(queryObj, t => (Array.isArray(t) ? t.join(',') : t))) | Object.assign(result, mapValues(queryObj, t => (Array.isArray(t) ? t.join(',') : t))) | ||||
this.searchData = result | this.searchData = result | ||||
await this.refreshList() | |||||
await this.refreshList(false) | |||||
}, | }, | ||||
// 点击「清空查询条件」按钮 | // 点击「清空查询条件」按钮 | ||||
reset() { | reset() { | ||||
this.$refs.datefilter.changeDateRange('all') | |||||
// this.$refs.datefilter.changeDateRange('all') | |||||
this.queryData = this.COPY(this.defaultQueryData) | this.queryData = this.COPY(this.defaultQueryData) | ||||
// this.queryJson = {} | |||||
this.searchChange() | this.searchChange() | ||||
}, | }, | ||||
@@ -424,7 +440,7 @@ export default { | |||||
//多条件查询:专业部改变事件 | //多条件查询:专业部改变事件 | ||||
async DeptNoChange(){ | async DeptNoChange(){ | ||||
if (this.queryData.DeptNo != null && this.queryData.DeptNo!=undefined && this.queryData.DeptNo != "") { | |||||
if (this.queryData.DeptNo) { | |||||
this.FETCH_DATASOURCE('CdMajorInfo').then(result => { | this.FETCH_DATASOURCE('CdMajorInfo').then(result => { | ||||
this.dataSource.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).filter(t=>t.deptno===this.queryData.DeptNo).map(t => ({ text: t.majorname, value: t.majorno })) | this.dataSource.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).filter(t=>t.deptno===this.queryData.DeptNo).map(t => ({ text: t.majorname, value: t.majorno })) | ||||
}) | }) | ||||
@@ -439,13 +455,13 @@ export default { | |||||
}, | }, | ||||
//多条件查询:专业改变事件 | //多条件查询:专业改变事件 | ||||
async MajorNoChange(){ | async MajorNoChange(){ | ||||
if (this.queryData.MajorNo != null && this.queryData.MajorNo!=undefined && this.queryData.MajorNo != "") { | |||||
if (this.queryData.MajorNo) { | |||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).filter(t=>t.majorno===this.queryData.MajorNo).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).filter(t=>t.majorno===this.queryData.MajorNo).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
}else{ | }else{ | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
} | } | ||||
this.queryData.ClassNo=''; | this.queryData.ClassNo=''; | ||||
@@ -454,13 +470,15 @@ export default { | |||||
//多条件查询:宿舍楼改变事件 | //多条件查询:宿舍楼改变事件 | ||||
async DormitoryChange(){ | async DormitoryChange(){ | ||||
if (this.queryData.Dormitory != null && this.queryData.Dormitory!=undefined && this.queryData.Dormitory != "") { | if (this.queryData.Dormitory != null && this.queryData.Dormitory!=undefined && this.queryData.Dormitory != "") { | ||||
this.FETCH_DATASOURCE('Acc_UnitData').then(result => { | |||||
this.dataSource.Unit = result.data.sort((a,b)=>{return a.dno-b.dno}).filter(t=>t.parentid===this.queryData.Dormitory).map(t => ({ text: t.name, value: t.id })) | |||||
}) | |||||
// this.FETCH_DATASOURCE('Acc_UnitData').then(result => { | |||||
// this.dataSource.Unit = result.data.sort((a,b)=>{return a.dno-b.dno}).filter(t=>t.parentid===this.queryData.Dormitory).map(t => ({ text: t.name, value: t.id })) | |||||
// }) | |||||
this.dataSource.Unit = this.UnitAll.filter(t=>t.parentid===this.queryData.Dormitory) | |||||
}else{ | }else{ | ||||
this.FETCH_DATASOURCE('Acc_UnitData').then(result => { | |||||
this.dataSource.Unit = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | |||||
}) | |||||
// this.FETCH_DATASOURCE('Acc_UnitData').then(result => { | |||||
// this.dataSource.Unit = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | |||||
// }) | |||||
this.dataSource.Unit = this.UnitAll | |||||
} | } | ||||
this.queryData.Unit=''; | this.queryData.Unit=''; | ||||
this.queryData.Floor=''; | this.queryData.Floor=''; | ||||
@@ -470,13 +488,15 @@ export default { | |||||
//多条件查询:单元改变事件 | //多条件查询:单元改变事件 | ||||
async UnitChange(){ | async UnitChange(){ | ||||
if (this.queryData.Unit != null && this.queryData.Unit!=undefined && this.queryData.Unit != "") { | if (this.queryData.Unit != null && this.queryData.Unit!=undefined && this.queryData.Unit != "") { | ||||
this.FETCH_DATASOURCE('Acc_FloorData').then(result => { | |||||
this.dataSource.Floor = result.data.sort((a,b)=>{return a.dno-b.dno}).filter(t=>t.parentid===this.queryData.Unit).map(t => ({ text: t.name, value: t.id })) | |||||
}) | |||||
// this.FETCH_DATASOURCE('Acc_FloorData').then(result => { | |||||
// this.dataSource.Floor = result.data.sort((a,b)=>{return a.dno-b.dno}).filter(t=>t.parentid===this.queryData.Unit).map(t => ({ text: t.name, value: t.id })) | |||||
// }) | |||||
this.dataSource.Floor = this.FloorAll.filter(t=>t.parentid===this.queryData.Unit) | |||||
}else{ | }else{ | ||||
this.FETCH_DATASOURCE('Acc_FloorData').then(result => { | |||||
this.dataSource.Floor = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | |||||
}) | |||||
// this.FETCH_DATASOURCE('Acc_FloorData').then(result => { | |||||
// this.dataSource.Floor = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | |||||
// }) | |||||
this.dataSource.Floor = this.FloorAll | |||||
} | } | ||||
this.queryData.Floor=''; | this.queryData.Floor=''; | ||||
this.queryData.RId=''; | this.queryData.RId=''; | ||||
@@ -485,13 +505,15 @@ export default { | |||||
//多条件查询:楼层改变事件 | //多条件查询:楼层改变事件 | ||||
async FloorChange(){ | async FloorChange(){ | ||||
if (this.queryData.Floor != null && this.queryData.Floor!=undefined && this.queryData.Floor != "") { | if (this.queryData.Floor != null && this.queryData.Floor!=undefined && this.queryData.Floor != "") { | ||||
this.FETCH_DATASOURCE('Acc_RoomData').then(result => { | |||||
this.dataSource.RId = result.data.sort((a,b)=>{return a.dno-b.dno}).filter(t=>t.parentid===this.queryData.Floor).map(t => ({ text: t.name, value: t.id })) | |||||
}) | |||||
// this.FETCH_DATASOURCE('Acc_RoomData').then(result => { | |||||
// this.dataSource.RId = result.data.sort((a,b)=>{return a.dno-b.dno}).filter(t=>t.parentid===this.queryData.Floor).map(t => ({ text: t.name, value: t.id })) | |||||
// }) | |||||
this.dataSource.RId = this.RIdAll.filter(t=>t.parentid===this.queryData.Floor) | |||||
}else{ | }else{ | ||||
this.FETCH_DATASOURCE('Acc_RoomData').then(result => { | |||||
this.dataSource.RId = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | |||||
}) | |||||
// this.FETCH_DATASOURCE('Acc_RoomData').then(result => { | |||||
// this.dataSource.RId = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | |||||
// }) | |||||
this.dataSource.RId = this.RIdAll | |||||
} | } | ||||
this.queryData.RId=''; | this.queryData.RId=''; | ||||
this.searchChange() | this.searchChange() | ||||
@@ -33,11 +33,12 @@ | |||||
:value="getValue('Acc_DailyAssess.RId')" | :value="getValue('Acc_DailyAssess.RId')" | ||||
:disabled="!edit" | :disabled="!edit" | ||||
:range="dataSource.Acc_DailyAssess.RId" | :range="dataSource.Acc_DailyAssess.RId" | ||||
@change="RIdChange" | |||||
title="宿舍" | title="宿舍" | ||||
required | required | ||||
/> | /> | ||||
<l-select | |||||
<!-- <l-select | |||||
@input="setValue('Acc_DailyAssess.DeptNo', $event)" | @input="setValue('Acc_DailyAssess.DeptNo', $event)" | ||||
:value="getValue('Acc_DailyAssess.DeptNo')" | :value="getValue('Acc_DailyAssess.DeptNo')" | ||||
:disabled="!edit" | :disabled="!edit" | ||||
@@ -63,8 +64,9 @@ | |||||
@change="ClassNoChange" | @change="ClassNoChange" | ||||
title="班级" | title="班级" | ||||
required | required | ||||
/> | |||||
/> --> | |||||
<l-select | <l-select | ||||
v-if="show" | |||||
@input="setValue('Acc_DailyAssess.StuNo', $event)" | @input="setValue('Acc_DailyAssess.StuNo', $event)" | ||||
:value="getValue('Acc_DailyAssess.StuNo')" | :value="getValue('Acc_DailyAssess.StuNo')" | ||||
:disabled="!edit" | :disabled="!edit" | ||||
@@ -112,15 +114,21 @@ | |||||
required | required | ||||
/> | /> | ||||
<!-- 附件上传 --> | <!-- 附件上传 --> | ||||
<l-input | |||||
<!-- <l-input | |||||
@input="setValue('Acc_DailyAssess.Files', $event)" | @input="setValue('Acc_DailyAssess.Files', $event)" | ||||
:value="getValue('Acc_DailyAssess.Files')" | :value="getValue('Acc_DailyAssess.Files')" | ||||
disabled="disabled" | disabled="disabled" | ||||
v-show="false" | v-show="false" | ||||
title="附件值" | title="附件值" | ||||
/> | /> | ||||
<uploadFile :number="5" :folderId="folderId" :value="fileList" :readonly="!edit" :title="fileTitle" :required="false"></uploadFile> | |||||
<l-upload-file :number="5" :folderId="folderId" :value="fileList" :readonly="!edit" :title="fileTitle" :required="false"></l-upload-file> --> | |||||
<l-upload-file | |||||
@input="setValue('Acc_DailyAssess.Files', $event)" | |||||
:value="getValue('Acc_DailyAssess.Files')" | |||||
:readonly="!edit" | |||||
:number="3" | |||||
title="附件上传" | |||||
/> | |||||
</view> | </view> | ||||
@@ -158,13 +166,13 @@ import get from 'lodash/get' | |||||
import set from 'lodash/set' | import set from 'lodash/set' | ||||
import moment from 'moment' | import moment from 'moment' | ||||
import customPageMixins from '@/common/custompage.js' | import customPageMixins from '@/common/custompage.js' | ||||
import uploadFile from '@/components/upload-file2.vue' | |||||
// import uploadFile from '@/components/upload-file2.vue' | |||||
export default { | export default { | ||||
mixins: [customPageMixins], | mixins: [customPageMixins], | ||||
components:{ | |||||
uploadFile, | |||||
}, | |||||
// components:{ | |||||
// uploadFile, | |||||
// }, | |||||
data() { | data() { | ||||
return { | return { | ||||
// 页面相关参数 | // 页面相关参数 | ||||
@@ -172,9 +180,10 @@ export default { | |||||
mode: null, | mode: null, | ||||
edit: null, | edit: null, | ||||
ready: false, | ready: false, | ||||
fileList:[],//附件列表 | |||||
folderId:null,//附件随机文件夹id | |||||
fileTitle:'附件上传',//附件label值 | |||||
// fileList:[],//附件列表 | |||||
// folderId:null,//附件随机文件夹id | |||||
// fileTitle:'附件上传',//附件label值 | |||||
// 表单数据 | // 表单数据 | ||||
current: {}, | current: {}, | ||||
@@ -183,21 +192,21 @@ export default { | |||||
// 表单项数据结构 | // 表单项数据结构 | ||||
scheme: { | scheme: { | ||||
Acc_DailyAssess: { | Acc_DailyAssess: { | ||||
DeptNo: { type: 'select', title: '专业部', dataSource: '1', dataSourceId: 'CdDeptInfo,deptname,deptno', verify: 'NotNull' }, | |||||
MajorNo: { type: 'select', title: '专业', dataSource: '1', dataSourceId: 'CdMajorInfo,majorname,majorno', verify: 'NotNull' }, | |||||
ClassNo: { type: 'select', title: '班级', dataSource: '1', dataSourceId: 'bjsj,classname,classno', verify: 'NotNull' }, | |||||
// DeptNo: { type: 'select', title: '专业部', dataSource: '1', dataSourceId: 'CdDeptInfo,deptname,deptno' }, | |||||
// MajorNo: { type: 'select', title: '专业', dataSource: '1', dataSourceId: 'CdMajorInfo,majorname,majorno' }, | |||||
// ClassNo: { type: 'select', title: '班级', dataSource: '1', dataSourceId: 'bjsj,classname,classno' }, | |||||
Dormitory: { type: 'select', title: '宿舍楼', dataSource: '1', dataSourceId: 'Acc_DormitoryData,name,id', verify: 'NotNull' }, | Dormitory: { type: 'select', title: '宿舍楼', dataSource: '1', dataSourceId: 'Acc_DormitoryData,name,id', verify: 'NotNull' }, | ||||
Unit: { type: 'select', title: '单元', dataSource: '1', dataSourceId: 'Acc_UnitData,name,id', verify: 'NotNull' }, | |||||
Floor: { type: 'select', title: '楼层', dataSource: '1', dataSourceId: 'Acc_FloorData,name,id' , verify: 'NotNull' }, | |||||
RId: { type: 'select', title: '宿舍', dataSource: '1', dataSourceId: 'Acc_RoomData,name,id' , verify: 'NotNull'}, | |||||
StuNo: { type: 'select', title: '学生', dataSource: '1', dataSourceId: 'StuInfoBasic,stuname,stuno', verify: 'NotNull' }, | |||||
Date: { type: 'datetime', title: '日期', dateformat: '0' , verify: 'NotNull'}, | |||||
Unit: { type: 'selectNoMap', title: '单元', dataSource: '1', dataSourceId: 'Acc_UnitData,name,id', verify: 'NotNull' }, | |||||
Floor: { type: 'selectNoMap', title: '楼层', dataSource: '1', dataSourceId: 'Acc_FloorData,name,id' , verify: 'NotNull' }, | |||||
RId: { type: 'selectNoMap', title: '宿舍', dataSource: '1', dataSourceId: 'Acc_RoomData,name,id' , verify: 'NotNull'}, | |||||
StuNo: { type: 'selectNoMap', title: '学生', dataSource: '1', dataSourceId: 'StuInfoBasic,stuname,stuno', verify: 'NotNull' }, | |||||
Date: { type: 'date', title: '日期', dateformat: '0' , verify: 'NotNull'}, | |||||
AddScoreHealth: { type: 'text', title: '卫生奖分' }, | AddScoreHealth: { type: 'text', title: '卫生奖分' }, | ||||
MinusScoreHealth: { type: 'text', title: '卫生扣分' }, | MinusScoreHealth: { type: 'text', title: '卫生扣分' }, | ||||
AddScore: { type: 'text', title: '纪律奖分' }, | AddScore: { type: 'text', title: '纪律奖分' }, | ||||
MinusScore: { type: 'text', title: '纪律扣分' }, | MinusScore: { type: 'text', title: '纪律扣分' }, | ||||
Reason: { type: 'textarea', title: '奖扣分原因' , verify: 'NotNull'}, | Reason: { type: 'textarea', title: '奖扣分原因' , verify: 'NotNull'}, | ||||
Files: { type: "text", title: "附件上传" }, | |||||
Files: { type: "upload", title: "附件上传" }, | |||||
}, | }, | ||||
}, | }, | ||||
@@ -217,7 +226,12 @@ export default { | |||||
} , | } , | ||||
StuNoAll:[], | |||||
show:true, | |||||
// StuNoAll:[], | |||||
FloorAll:[], | |||||
RIdAll:[], | |||||
DeptNoAll:[], | |||||
} | } | ||||
}, | }, | ||||
@@ -228,7 +242,7 @@ export default { | |||||
methods: { | methods: { | ||||
// 页面初始化 | // 页面初始化 | ||||
async init(type, id) { | async init(type, id) { | ||||
this.folderId=this.GUID(); | |||||
// this.folderId=this.GUID(); | |||||
// console.log('附件随机文件夹id:'+this.folderId); | // console.log('附件随机文件夹id:'+this.folderId); | ||||
this.LOADING('加载数据中...') | this.LOADING('加载数据中...') | ||||
@@ -239,37 +253,40 @@ export default { | |||||
// 拉取表单数据,同时拉取所有来自数据源的选单数据 | // 拉取表单数据,同时拉取所有来自数据源的选单数据 | ||||
await Promise.all([ | await Promise.all([ | ||||
this.FETCH_DATASOURCE('CdDeptInfo').then(result => { | |||||
this.dataSource.Acc_DailyAssess.DeptNo = result.data.sort((a,b)=>{return a.deptsort-b.deptsort}).map(t => ({ text: t.deptname, value: t.deptno })) | |||||
}), | |||||
this.FETCH_DATASOURCE('CdMajorInfo').then(result => { | |||||
this.dataSource.Acc_DailyAssess.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | |||||
}), | |||||
this.FETCH_DATASOURCE('bjsj').then(result => { | |||||
this.dataSource.Acc_DailyAssess.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
// this.FETCH_DATASOURCE('CdDeptInfo').then(result => { | |||||
// this.DeptNoAll = result.data.sort((a,b)=>{return a.deptsort-b.deptsort}).map(t => ({ text: t.deptname, value: t.deptno,parentid:t.parentid,id:t.deptid })) | |||||
// this.dataSource.Acc_DailyAssess.DeptNo = result.data.sort((a,b)=>{return a.deptsort-b.deptsort}).map(t => ({ text: t.deptname, value: t.deptno })) | |||||
// }), | |||||
this.FETCH_DATASOURCE('CdMajorInfo').then(result => { | |||||
this.dataSource.Acc_DailyAssess.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | |||||
}), | |||||
this.FETCH_DATASOURCE('bjsj').then(result => { | |||||
this.dataSource.Acc_DailyAssess.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('Acc_DormitoryData').then(result => { | |||||
this.dataSource.Acc_DailyAssess.Dormitory = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | |||||
this.FETCH_DATASOURCE('Acc_DormitoryData').then(result => { | |||||
this.dataSource.Acc_DailyAssess.Dormitory = result.data.sort((a,b)=>{return a.parentid - b.parentid}).sort((a,b)=>{return a.dno - b.dno}).map(t => ({ text: t.name, value: t.id })) | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('Acc_UnitData').then(result => { | |||||
this.dataSource.Acc_DailyAssess.Unit = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | |||||
this.FETCH_DATASOURCE('Acc_UnitData').then(result => { | |||||
this.UnitAll = result.data.sort((a,b)=>{return a.dno - b.dno}).map(t => ({ text: t.name, value: t.id,parentid:t.parentid })) | |||||
// this.dataSource.Acc_DailyAssess.Unit = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('Acc_FloorData').then(result => { | |||||
this.dataSource.Acc_DailyAssess.Floor = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | |||||
this.FETCH_DATASOURCE('Acc_FloorData').then(result => { | |||||
this.FloorAll = result.data.sort((a,b)=>{return a.dno - b.dno}).map(t => ({ text: t.name, value: t.id,parentid:t.parentid })) | |||||
// this.dataSource.Acc_DailyAssess.Floor = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('Acc_RoomData').then(result => { | |||||
this.dataSource.Acc_DailyAssess.RId = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | |||||
}), | |||||
this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | |||||
this.dataSource.Acc_DailyAssess.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno,classno:t.classno })) | |||||
this.StuNoAll = JSON.parse(JSON.stringify(this.dataSource.Acc_DailyAssess.StuNo)) | |||||
this.FETCH_DATASOURCE('Acc_RoomData').then(result => { | |||||
this.RIdAll = result.data.sort((a,b)=>{return a.dno - b.dno}).map(t => ({ text: t.name, value: t.id,parentid:t.parentid })) | |||||
// this.dataSource.Acc_DailyAssess.RId = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | |||||
}), | }), | ||||
// this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | |||||
// this.dataSource.Acc_DailyAssess.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno,classno:t.classno })) | |||||
// this.StuNoAll = JSON.parse(JSON.stringify(this.dataSource.Acc_DailyAssess.StuNo)) | |||||
// }), | |||||
() => {} | () => {} | ||||
]) | ]) | ||||
await this.fetchForm() | await this.fetchForm() | ||||
this.ready = true | this.ready = true | ||||
this.HIDE_LOADING() | this.HIDE_LOADING() | ||||
}, | }, | ||||
@@ -283,19 +300,25 @@ export default { | |||||
const result = await this.HTTP_GET('learun/adms/LogisticsManagement/Acc_DailyAssess/form', this.id) | const result = await this.HTTP_GET('learun/adms/LogisticsManagement/Acc_DailyAssess/form', this.id) | ||||
this.origin = await this.formatFormData(result) | this.origin = await this.formatFormData(result) | ||||
} | } | ||||
this.current = this.COPY(this.origin) | |||||
this.current = this.COPY(this.origin) | |||||
this.DormitoryChange(false) | |||||
this.UnitChange(false) | |||||
this.FloorChange(false) | |||||
this.RIdChange(false) | |||||
//加载附件值数据 | |||||
// console.log('附件值赋值前:'+this.getValue('Acc_DailyAssess.Files')); | |||||
if (this.getValue('Acc_DailyAssess.Files') == ""||this.getValue('Acc_DailyAssess.Files') == undefined ||this.getValue('Acc_DailyAssess.Files') == null) { | |||||
this.setValue('Acc_DailyAssess.Files',this.folderId); | |||||
// console.log('附件值赋值后:'+this.getValue('Acc_DailyAssess.Files')); | |||||
}else{ | |||||
this.folderId=this.getValue('Acc_DailyAssess.Files'); | |||||
// console.log('文件夹id赋值后:'+this.folderId); | |||||
//请求‘获取附件列表’接口 | |||||
this.fileList = await this.FETCH_FILEList(this.getValue('Acc_DailyAssess.Files')); | |||||
} | |||||
// //加载附件值数据 | |||||
// // console.log('附件值赋值前:'+this.getValue('Acc_DailyAssess.Files')); | |||||
// if (this.getValue('Acc_DailyAssess.Files') == ""||this.getValue('Acc_DailyAssess.Files') == undefined ||this.getValue('Acc_DailyAssess.Files') == null) { | |||||
// this.setValue('Acc_DailyAssess.Files',this.folderId); | |||||
// // console.log('附件值赋值后:'+this.getValue('Acc_DailyAssess.Files')); | |||||
// }else{ | |||||
// this.folderId=this.getValue('Acc_DailyAssess.Files'); | |||||
// // console.log('文件夹id赋值后:'+this.folderId); | |||||
// //请求‘获取附件列表’接口 | |||||
// this.fileList = await this.FETCH_FILEList(this.getValue('Acc_DailyAssess.Files')); | |||||
// } | |||||
// console.log('origin:'+JSON.stringify(this.origin) ) | // console.log('origin:'+JSON.stringify(this.origin) ) | ||||
// console.log('current:'+JSON.stringify(this.current)) | // console.log('current:'+JSON.stringify(this.current)) | ||||
@@ -326,9 +349,9 @@ export default { | |||||
this.LOADING('正在提交...') | this.LOADING('正在提交...') | ||||
const postData = await this.getPostData(this.id) | |||||
console.log('页面提交数据:'+JSON.stringify(postData)); | |||||
let postData = await this.getPostData(this.id) | |||||
postData.strEntity = JSON.stringify({...JSON.parse(postData.strEntity),keyValue:JSON.parse(postData.strEntity).RId}) | |||||
console.log('页面提交数据:',postData,JSON.parse(postData.strEntity)); | |||||
this.HTTP_POST('learun/adms/LogisticsManagement/Acc_DailyAssess/save', postData, '表单提交保存失败').then(success => { | this.HTTP_POST('learun/adms/LogisticsManagement/Acc_DailyAssess/save', postData, '表单提交保存失败').then(success => { | ||||
this.HIDE_LOADING() | this.HIDE_LOADING() | ||||
if (!success) { | if (!success) { | ||||
@@ -373,94 +396,138 @@ export default { | |||||
set(this.current, path, val) | set(this.current, path, val) | ||||
}, | }, | ||||
//多条件查询:宿舍楼改变事件 | |||||
async DormitoryChange(){ | |||||
if (this.getValue('Acc_DailyAssess.Dormitory') != null && this.getValue('Acc_DailyAssess.Dormitory') !=undefined && this.getValue('Acc_DailyAssess.Dormitory') != "") { | |||||
this.FETCH_DATASOURCE('Acc_UnitData').then(result => { | |||||
this.dataSource.Acc_DailyAssess.Unit = result.data.sort((a,b)=>{return a.dno-b.dno}).filter(t=>t.parentid===this.getValue('Acc_DailyAssess.Dormitory') ).map(t => ({ text: t.name, value: t.id })) | |||||
}) | |||||
//楼栋改变事件 | |||||
async DormitoryChange(reset=true){ | |||||
// if (this.getValue('Acc_DailyAssess.Dormitory') != null && this.getValue('Acc_DailyAssess.Dormitory') !=undefined && this.getValue('Acc_DailyAssess.Dormitory') != "") { | |||||
// this.FETCH_DATASOURCE('Acc_UnitData').then(result => { | |||||
// this.dataSource.Acc_DailyAssess.Unit = result.data.sort((a,b)=>{return a.dno-b.dno}).filter(t=>t.parentid===this.getValue('Acc_DailyAssess.Dormitory') ).map(t => ({ text: t.name, value: t.id })) | |||||
// }) | |||||
// }else{ | |||||
// this.FETCH_DATASOURCE('Acc_UnitData').then(result => { | |||||
// this.dataSource.Acc_DailyAssess.Unit = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | |||||
// }) | |||||
// } | |||||
if (this.getValue('Acc_DailyAssess.Dormitory')){ | |||||
this.dataSource.Acc_DailyAssess.Unit = this.UnitAll.filter(t=>t.parentid == this.getValue('Acc_DailyAssess.Dormitory')) | |||||
}else{ | }else{ | ||||
this.FETCH_DATASOURCE('Acc_UnitData').then(result => { | |||||
this.dataSource.Acc_DailyAssess.Unit = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | |||||
}) | |||||
this.dataSource.Acc_DailyAssess.Unit = [] | |||||
} | } | ||||
console.log(this.getValue('Acc_DailyAssess.Dormitory'),this.getValue('Acc_DailyAssess.Unit'),this.dataSource.Acc_DailyAssess.Unit) | |||||
if(!reset)return | |||||
this.setValue('Acc_DailyAssess.Unit',''); | this.setValue('Acc_DailyAssess.Unit',''); | ||||
this.setValue('Acc_DailyAssess.Floor',''); | this.setValue('Acc_DailyAssess.Floor',''); | ||||
this.setValue('Acc_DailyAssess.RId',''); | this.setValue('Acc_DailyAssess.RId',''); | ||||
},//多条件查询:单元改变事件 | },//多条件查询:单元改变事件 | ||||
async UnitChange(){ | |||||
if (this.getValue('Acc_DailyAssess.Unit') != null && this.getValue('Acc_DailyAssess.Unit')!=undefined && this.getValue('Acc_DailyAssess.Unit')!= "") { | |||||
this.FETCH_DATASOURCE('Acc_FloorData').then(result => { | |||||
this.dataSource.Acc_DailyAssess.Floor = result.data.sort((a,b)=>{return a.dno-b.dno}).filter(t=>t.parentid===this.getValue('Acc_DailyAssess.Unit')).map(t => ({ text: t.name, value: t.id })) | |||||
}) | |||||
// 单元改变事件 | |||||
async UnitChange(reset=true){ | |||||
// if (this.getValue('Acc_DailyAssess.Unit') != null && this.getValue('Acc_DailyAssess.Unit')!=undefined && this.getValue('Acc_DailyAssess.Unit')!= "") { | |||||
// this.FETCH_DATASOURCE('Acc_FloorData').then(result => { | |||||
// this.dataSource.Acc_DailyAssess.Floor = result.data.sort((a,b)=>{return a.dno-b.dno}).filter(t=>t.parentid===this.getValue('Acc_DailyAssess.Unit')).map(t => ({ text: t.name, value: t.id })) | |||||
// }) | |||||
// }else{ | |||||
// this.FETCH_DATASOURCE('Acc_FloorData').then(result => { | |||||
// this.dataSource.Acc_DailyAssess.Floor = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | |||||
// }) | |||||
// } | |||||
if (this.getValue('Acc_DailyAssess.Unit')){ | |||||
this.dataSource.Acc_DailyAssess.Floor = this.FloorAll.filter(t=>t.parentid == this.getValue('Acc_DailyAssess.Unit')) | |||||
}else{ | }else{ | ||||
this.FETCH_DATASOURCE('Acc_FloorData').then(result => { | |||||
this.dataSource.Acc_DailyAssess.Floor = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | |||||
}) | |||||
this.dataSource.Acc_DailyAssess.Floor = [] | |||||
} | } | ||||
if(!reset)return | |||||
this.setValue('Acc_DailyAssess.Floor',''); | this.setValue('Acc_DailyAssess.Floor',''); | ||||
this.setValue('Acc_DailyAssess.RId',''); | this.setValue('Acc_DailyAssess.RId',''); | ||||
}, | }, | ||||
//多条件查询:楼层改变事件 | |||||
async FloorChange(){ | |||||
if (this.getValue('Acc_DailyAssess.Floor') != null && this.getValue('Acc_DailyAssess.Floor')!=undefined && this.getValue('Acc_DailyAssess.Floor') != "") { | |||||
this.FETCH_DATASOURCE('Acc_RoomData').then(result => { | |||||
this.dataSource.Acc_DailyAssess.RId = result.data.sort((a,b)=>{return a.dno-b.dno}).filter(t=>t.parentid===this.getValue('Acc_DailyAssess.Floor')).map(t => ({ text: t.name, value: t.id })) | |||||
}) | |||||
//楼层改变事件 | |||||
async FloorChange(reset=true){ | |||||
// if (this.getValue('Acc_DailyAssess.Floor') != null && this.getValue('Acc_DailyAssess.Floor')!=undefined && this.getValue('Acc_DailyAssess.Floor') != "") { | |||||
// this.FETCH_DATASOURCE('Acc_RoomData').then(result => { | |||||
// this.dataSource.Acc_DailyAssess.RId = result.data.sort((a,b)=>{return a.dno-b.dno}).filter(t=>t.parentid===this.getValue('Acc_DailyAssess.Floor')).map(t => ({ text: t.name, value: t.id })) | |||||
// }) | |||||
// }else{ | |||||
// this.FETCH_DATASOURCE('Acc_RoomData').then(result => { | |||||
// this.dataSource.Acc_DailyAssess.RId = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | |||||
// }) | |||||
// } | |||||
if (this.getValue('Acc_DailyAssess.Floor')){ | |||||
this.dataSource.Acc_DailyAssess.RId = this.RIdAll.filter(t=>t.parentid == this.getValue('Acc_DailyAssess.Floor')) | |||||
}else{ | }else{ | ||||
this.FETCH_DATASOURCE('Acc_RoomData').then(result => { | |||||
this.dataSource.Acc_DailyAssess.RId = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | |||||
}) | |||||
this.dataSource.Acc_DailyAssess.RId = [] | |||||
} | } | ||||
if(!reset)return | |||||
this.setValue('Acc_DailyAssess.RId',''); | this.setValue('Acc_DailyAssess.RId',''); | ||||
}, | }, | ||||
//多条件查询:专业部改变事件 | |||||
async DeptNoChange(){ | |||||
if (this.getValue('Acc_DailyAssess.DeptNo') != null && this.getValue('Acc_DailyAssess.DeptNo')!=undefined && this.getValue('Acc_DailyAssess.DeptNo') != "") { | |||||
this.FETCH_DATASOURCE('CdMajorInfo').then(result => { | |||||
this.dataSource.Acc_DailyAssess.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).filter(t=>t.deptno===this.getValue('Acc_DailyAssess.DeptNo')).map(t => ({ text: t.majorname, value: t.majorno })) | |||||
// 宿舍改变事件 | |||||
async RIdChange(reset=true){ | |||||
// if (this.getValue('Acc_DailyAssess.RId')){ | |||||
// console.log(this.DeptNoAll,this.getValue('Acc_DailyAssess.RId')) | |||||
// this.dataSource.Acc_DailyAssess.DeptNo = this.DeptNoAll.filter(t=>t.parentid == this.getValue('Acc_DailyAssess.RId')) | |||||
// }else{ | |||||
// this.dataSource.Acc_DailyAssess.DeptNo = [] | |||||
// } | |||||
// this.setValue('Acc_DailyAssess.DeptNo',''); | |||||
if(this.getValue('Acc_DailyAssess.RId')){ | |||||
await this.HTTP_GET('/Learun/adms/LogisticsManagement/Acc_DailyAssess/getdormstu',{keyValue:this.getValue('Acc_DailyAssess.RId')}).then(success=>{ | |||||
let data = success||[] | |||||
this.dataSource.Acc_DailyAssess.StuNo = data.map(t=>{return{value:t.StudentID,text:t.StuName||''}}) | |||||
}) | }) | ||||
}else{ | }else{ | ||||
this.FETCH_DATASOURCE('CdMajorInfo').then(result => { | |||||
this.dataSource.Acc_DailyAssess.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | |||||
}) | |||||
this.dataSource.Acc_DailyAssess.StuNo = [] | |||||
} | } | ||||
this.setValue('Acc_DailyAssess.MajorNo',''); | |||||
this.setValue('Acc_DailyAssess.ClassNo',''); | |||||
this.setValue('Acc_DailyAssess.StuNo',''); | |||||
}, | |||||
//多条件查询:专业改变事件 | |||||
async MajorNoChange(){ | |||||
if (this.getValue('Acc_DailyAssess.MajorNo') != null && this.getValue('Acc_DailyAssess.MajorNo')!=undefined && this.getValue('Acc_DailyAssess.MajorNo') != "") { | |||||
this.FETCH_DATASOURCE('bjsj').then(result => { | |||||
this.dataSource.Acc_DailyAssess.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).filter(t=>t.majorno===this.getValue('Acc_DailyAssess.MajorNo')).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | |||||
}else{ | |||||
this.FETCH_DATASOURCE('bjsj').then(result => { | |||||
this.dataSource.Acc_DailyAssess.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
if(!reset){ | |||||
this.show = false | |||||
setTimeout(()=>{ | |||||
this.show = true | |||||
}) | }) | ||||
return | |||||
} | } | ||||
this.setValue('Acc_DailyAssess.ClassNo',''); | |||||
this.setValue('Acc_DailyAssess.StuNo',''); | this.setValue('Acc_DailyAssess.StuNo',''); | ||||
}, | }, | ||||
//多条件查询:班级改变事件 | |||||
async ClassNoChange(){ | |||||
if (!this.getValue('Acc_DailyAssess.ClassNo')) { | |||||
// this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | |||||
// this.dataSource.Acc_DailyAssess.StuNo = result.data.filter(t=>t.classno===this.getValue('Acc_DailyAssess.ClassNo')).map(t => ({ text: t.stuname, value: t.stuno })) | |||||
// }) | |||||
this.dataSource.Acc_DailyAssess.StuNo = this.StuNoAll | |||||
// //多条件查询:专业部改变事件 | |||||
// async DeptNoChange(){ | |||||
// if (this.getValue('Acc_DailyAssess.DeptNo') != null && this.getValue('Acc_DailyAssess.DeptNo')!=undefined && this.getValue('Acc_DailyAssess.DeptNo') != "") { | |||||
// this.FETCH_DATASOURCE('CdMajorInfo').then(result => { | |||||
// this.dataSource.Acc_DailyAssess.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).filter(t=>t.deptno===this.getValue('Acc_DailyAssess.DeptNo')).map(t => ({ text: t.majorname, value: t.majorno })) | |||||
// }) | |||||
// }else{ | |||||
// this.FETCH_DATASOURCE('CdMajorInfo').then(result => { | |||||
// this.dataSource.Acc_DailyAssess.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | |||||
// }) | |||||
// } | |||||
// this.setValue('Acc_DailyAssess.MajorNo',''); | |||||
// this.setValue('Acc_DailyAssess.ClassNo',''); | |||||
// this.setValue('Acc_DailyAssess.StuNo',''); | |||||
// }, | |||||
// //多条件查询:专业改变事件 | |||||
// async MajorNoChange(){ | |||||
// if (this.getValue('Acc_DailyAssess.MajorNo') != null && this.getValue('Acc_DailyAssess.MajorNo')!=undefined && this.getValue('Acc_DailyAssess.MajorNo') != "") { | |||||
// this.FETCH_DATASOURCE('bjsj').then(result => { | |||||
// this.dataSource.Acc_DailyAssess.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).filter(t=>t.majorno===this.getValue('Acc_DailyAssess.MajorNo')).map(t => ({ text: t.classname, value: t.classno })) | |||||
// }) | |||||
// }else{ | |||||
// this.FETCH_DATASOURCE('bjsj').then(result => { | |||||
// this.dataSource.Acc_DailyAssess.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
// }) | |||||
// } | |||||
// this.setValue('Acc_DailyAssess.ClassNo',''); | |||||
// this.setValue('Acc_DailyAssess.StuNo',''); | |||||
// }, | |||||
// //多条件查询:班级改变事件 | |||||
// async ClassNoChange(){ | |||||
// if (!this.getValue('Acc_DailyAssess.ClassNo')) { | |||||
// // this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | |||||
// // this.dataSource.Acc_DailyAssess.StuNo = result.data.filter(t=>t.classno===this.getValue('Acc_DailyAssess.ClassNo')).map(t => ({ text: t.stuname, value: t.stuno })) | |||||
// // }) | |||||
// this.dataSource.Acc_DailyAssess.StuNo = this.StuNoAll | |||||
}else{ | |||||
// this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | |||||
// this.dataSource.Acc_DailyAssess.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno })) | |||||
// }) | |||||
this.dataSource.Acc_DailyAssess.StuNo = this.StuNoAll.filter(t=>t.classno == this.getValue('Acc_DailyAssess.ClassNo')) | |||||
} | |||||
this.setValue('Acc_DailyAssess.StuNo',''); | |||||
}, | |||||
// }else{ | |||||
// // this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | |||||
// // this.dataSource.Acc_DailyAssess.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno })) | |||||
// // }) | |||||
// this.dataSource.Acc_DailyAssess.StuNo = this.StuNoAll.filter(t=>t.classno == this.getValue('Acc_DailyAssess.ClassNo')) | |||||
// } | |||||
// this.setValue('Acc_DailyAssess.StuNo',''); | |||||
// }, | |||||
} | } | ||||
} | } | ||||
</script> | </script> |
@@ -217,7 +217,7 @@ export default { | |||||
this.dataSource.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | this.dataSource.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | ||||
}), | }), | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('Acc_DormitoryData').then(result => { | this.FETCH_DATASOURCE('Acc_DormitoryData').then(result => { | ||||
this.dataSource.Dormitory = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | this.dataSource.Dormitory = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | ||||
@@ -388,11 +388,11 @@ export default { | |||||
async MajorNoChange(){ | async MajorNoChange(){ | ||||
if (this.queryData.MajorNo != null && this.queryData.MajorNo!=undefined && this.queryData.MajorNo != "") { | if (this.queryData.MajorNo != null && this.queryData.MajorNo!=undefined && this.queryData.MajorNo != "") { | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).filter(t=>t.majorno===this.queryData.MajorNo).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).filter(t=>t.majorno===this.queryData.MajorNo).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
}else{ | }else{ | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
} | } | ||||
this.queryData.ClassNo=''; | this.queryData.ClassNo=''; | ||||
@@ -197,7 +197,7 @@ export default { | |||||
this.dataSource.Acc_GoodsDemage.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | this.dataSource.Acc_GoodsDemage.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | ||||
}), | }), | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.Acc_GoodsDemage.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.Acc_GoodsDemage.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('Acc_DormitoryData').then(result => { | this.FETCH_DATASOURCE('Acc_DormitoryData').then(result => { | ||||
this.dataSource.Acc_GoodsDemage.Dormitory = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | this.dataSource.Acc_GoodsDemage.Dormitory = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | ||||
@@ -379,11 +379,11 @@ export default { | |||||
async MajorNoChange(){ | async MajorNoChange(){ | ||||
if (this.getValue('Acc_GoodsDemage.MajorNo') != null && this.getValue('Acc_GoodsDemage.MajorNo')!=undefined && this.getValue('Acc_GoodsDemage.MajorNo') != "") { | if (this.getValue('Acc_GoodsDemage.MajorNo') != null && this.getValue('Acc_GoodsDemage.MajorNo')!=undefined && this.getValue('Acc_GoodsDemage.MajorNo') != "") { | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.Acc_GoodsDemage.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).filter(t=>t.majorno===this.getValue('Acc_GoodsDemage.MajorNo')).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.Acc_GoodsDemage.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).filter(t=>t.majorno===this.getValue('Acc_GoodsDemage.MajorNo')).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
}else{ | }else{ | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.Acc_GoodsDemage.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.Acc_GoodsDemage.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
} | } | ||||
this.setValue('Acc_GoodsDemage.ClassNo',''); | this.setValue('Acc_GoodsDemage.ClassNo',''); | ||||
@@ -205,7 +205,7 @@ export default { | |||||
this.dataSource.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | this.dataSource.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | ||||
}), | }), | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | ||||
this.dataSource.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno })) | this.dataSource.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno })) | ||||
@@ -364,11 +364,11 @@ export default { | |||||
async MajorNoChange(){ | async MajorNoChange(){ | ||||
if (this.queryData.MajorNo != null && this.queryData.MajorNo!=undefined && this.queryData.MajorNo != "") { | if (this.queryData.MajorNo != null && this.queryData.MajorNo!=undefined && this.queryData.MajorNo != "") { | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).filter(t=>t.majorno===this.queryData.MajorNo).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).filter(t=>t.majorno===this.queryData.MajorNo).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
}else{ | }else{ | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
} | } | ||||
this.queryData.ClassNo=''; | this.queryData.ClassNo=''; | ||||
@@ -188,7 +188,7 @@ export default { | |||||
this.dataSource.Acc_PublicAreaHealth.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | this.dataSource.Acc_PublicAreaHealth.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | ||||
}), | }), | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.Acc_PublicAreaHealth.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.Acc_PublicAreaHealth.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | ||||
this.dataSource.Acc_PublicAreaHealth.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno,classno:t.classno })) | this.dataSource.Acc_PublicAreaHealth.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno,classno:t.classno })) | ||||
@@ -323,11 +323,11 @@ export default { | |||||
async MajorNoChange(){ | async MajorNoChange(){ | ||||
if (this.getValue('Acc_PublicAreaHealth.MajorNo') != null && this.getValue('Acc_PublicAreaHealth.MajorNo')!=undefined && this.getValue('Acc_PublicAreaHealth.MajorNo') != "") { | if (this.getValue('Acc_PublicAreaHealth.MajorNo') != null && this.getValue('Acc_PublicAreaHealth.MajorNo')!=undefined && this.getValue('Acc_PublicAreaHealth.MajorNo') != "") { | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.Acc_PublicAreaHealth.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).filter(t=>t.majorno===this.getValue('Acc_PublicAreaHealth.MajorNo')).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.Acc_PublicAreaHealth.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).filter(t=>t.majorno===this.getValue('Acc_PublicAreaHealth.MajorNo')).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
}else{ | }else{ | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.Acc_PublicAreaHealth.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.Acc_PublicAreaHealth.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
} | } | ||||
this.setValue('Acc_PublicAreaHealth.ClassNo',''); | this.setValue('Acc_PublicAreaHealth.ClassNo',''); | ||||
@@ -205,7 +205,7 @@ export default { | |||||
this.dataSource.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | this.dataSource.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | ||||
}), | }), | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | ||||
this.dataSource.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno })) | this.dataSource.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno })) | ||||
@@ -364,11 +364,11 @@ export default { | |||||
async MajorNoChange(){ | async MajorNoChange(){ | ||||
if (this.queryData.MajorNo != null && this.queryData.MajorNo!=undefined && this.queryData.MajorNo != "") { | if (this.queryData.MajorNo != null && this.queryData.MajorNo!=undefined && this.queryData.MajorNo != "") { | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).filter(t=>t.majorno===this.queryData.MajorNo).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).filter(t=>t.majorno===this.queryData.MajorNo).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
}else{ | }else{ | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
} | } | ||||
this.queryData.ClassNo=''; | this.queryData.ClassNo=''; | ||||
@@ -188,7 +188,7 @@ export default { | |||||
this.dataSource.Acc_StuDayRoutine.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | this.dataSource.Acc_StuDayRoutine.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | ||||
}), | }), | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.Acc_StuDayRoutine.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.Acc_StuDayRoutine.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | ||||
this.dataSource.Acc_StuDayRoutine.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno,classno:t.classno })) | this.dataSource.Acc_StuDayRoutine.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno,classno:t.classno })) | ||||
@@ -323,11 +323,11 @@ export default { | |||||
async MajorNoChange(){ | async MajorNoChange(){ | ||||
if (this.getValue('Acc_StuDayRoutine.MajorNo') != null && this.getValue('Acc_StuDayRoutine.MajorNo')!=undefined && this.getValue('Acc_StuDayRoutine.MajorNo') != "") { | if (this.getValue('Acc_StuDayRoutine.MajorNo') != null && this.getValue('Acc_StuDayRoutine.MajorNo')!=undefined && this.getValue('Acc_StuDayRoutine.MajorNo') != "") { | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.Acc_StuDayRoutine.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).filter(t=>t.majorno===this.getValue('Acc_StuDayRoutine.MajorNo')).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.Acc_StuDayRoutine.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).filter(t=>t.majorno===this.getValue('Acc_StuDayRoutine.MajorNo')).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
}else{ | }else{ | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.Acc_StuDayRoutine.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.Acc_StuDayRoutine.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
} | } | ||||
this.setValue('Acc_StuDayRoutine.ClassNo',''); | this.setValue('Acc_StuDayRoutine.ClassNo',''); | ||||
@@ -290,7 +290,7 @@ export default { | |||||
this.dataSource.ListenClassRecord.MajorNo = result.data.map(t => ({ text: t.majorname, value: t.majorno })) | this.dataSource.ListenClassRecord.MajorNo = result.data.map(t => ({ text: t.majorname, value: t.majorno })) | ||||
}), | }), | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ListenClassRecord.ClassNo = result.data.map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ListenClassRecord.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}), | }), | ||||
@@ -153,7 +153,7 @@ export default { | |||||
// 拉取加载列表和数据源 | // 拉取加载列表和数据源 | ||||
await Promise.all([ | await Promise.all([ | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassNo = result.data.map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}), | }), | ||||
@@ -121,7 +121,7 @@ export default { | |||||
// 拉取表单数据,同时拉取所有来自数据源的选单数据 | // 拉取表单数据,同时拉取所有来自数据源的选单数据 | ||||
await Promise.all([ | await Promise.all([ | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassWork.ClassNo = result.data.map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassWork.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}), | }), | ||||
@@ -36,7 +36,7 @@ export default { | |||||
type: null, | type: null, | ||||
contactList: [], | contactList: [], | ||||
searchText: '', | searchText: '', | ||||
placeholder: '搜索公司名/部门名/职员姓名', | |||||
placeholder: '搜索学校名/部门名/职员姓名', | |||||
root: { type: 'company', id: '0' }, | root: { type: 'company', id: '0' }, | ||||
items:[], | items:[], | ||||
ids:'', | ids:'', | ||||
@@ -72,8 +72,8 @@ export default { | |||||
} | } | ||||
this.placeholder = { | this.placeholder = { | ||||
user: '搜索职员姓名', | user: '搜索职员姓名', | ||||
department: '搜索公司名/部门名', | |||||
company: '搜索公司名/部门名/职员姓名' | |||||
department: '搜索学校名/部门名', | |||||
company: '搜索学校名/部门名/职员姓名' | |||||
}[type] | }[type] | ||||
if (rootId && rootId !== 'undefined' && rootId !== 'null') { | if (rootId && rootId !== 'undefined' && rootId !== 'null') { | ||||
@@ -81,7 +81,7 @@ export default { | |||||
} | } | ||||
this.type = type || 'user' | this.type = type || 'user' | ||||
const selectType = { user: '职员', department: '部门', company: '公司' }[type] | |||||
const selectType = { user: '职员', department: '部门', company: '学校' }[type] | |||||
this.SET_TITLE(`请选择${selectType}`) | this.SET_TITLE(`请选择${selectType}`) | ||||
}, | }, | ||||
@@ -19,7 +19,7 @@ export default { | |||||
type: null, | type: null, | ||||
contactList: [], | contactList: [], | ||||
searchText: '', | searchText: '', | ||||
placeholder: '搜索公司名/部门名/职员姓名', | |||||
placeholder: '搜索学校名/部门名/职员姓名', | |||||
root: { type: 'company', id: '0' } | root: { type: 'company', id: '0' } | ||||
} | } | ||||
}, | }, | ||||
@@ -41,8 +41,8 @@ export default { | |||||
async init(type, rootId, rootType) { | async init(type, rootId, rootType) { | ||||
this.placeholder = { | this.placeholder = { | ||||
user: '搜索职员姓名', | user: '搜索职员姓名', | ||||
department: '搜索公司名/部门名', | |||||
company: '搜索公司名/部门名/职员姓名' | |||||
department: '搜索学校名/部门名', | |||||
company: '搜索学校名/部门名/职员姓名' | |||||
}[type] | }[type] | ||||
if (rootId && rootId !== 'undefined' && rootId !== 'null') { | if (rootId && rootId !== 'undefined' && rootId !== 'null') { | ||||
@@ -50,7 +50,7 @@ export default { | |||||
} | } | ||||
this.type = type || 'user' | this.type = type || 'user' | ||||
const selectType = { user: '职员', department: '部门', company: '公司' }[type] | |||||
const selectType = { user: '职员', department: '部门', company: '学校' }[type] | |||||
this.SET_TITLE(`请选择一个${selectType}`) | this.SET_TITLE(`请选择一个${selectType}`) | ||||
}, | }, | ||||
@@ -1,7 +1,7 @@ | |||||
<template> | <template> | ||||
<view id="contact" class="page"> | <view id="contact" class="page"> | ||||
<!-- 顶部搜索栏 --> | <!-- 顶部搜索栏 --> | ||||
<l-banner v-model="searchText" placeholder="搜索公司名/部门名/职员姓名" type="search" noSearchButton fixed fill /> | |||||
<l-banner v-model="searchText" placeholder="搜索学校名/部门名/职员姓名" type="search" noSearchButton fixed fill /> | |||||
<!-- 树形列表 --> | <!-- 树形列表 --> | ||||
<l-organize-tree v-if="ready && !searchText" @userClick="userClick" /> | <l-organize-tree v-if="ready && !searchText" @userClick="userClick" /> | ||||
@@ -130,7 +130,7 @@ export default { | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('bjsj').then(data => { | this.FETCH_DATASOURCE('bjsj').then(data => { | ||||
// console.log(data) | // console.log(data) | ||||
this.dataSource.ClassNo = data.data.map(t => ({ | |||||
this.dataSource.ClassNo = data.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ | |||||
text: t.classname, | text: t.classname, | ||||
value: t.classno | value: t.classno | ||||
})); | })); | ||||