diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Form.cshtml index 5710497ad..f3986c0d2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Form.cshtml @@ -6,7 +6,7 @@
使用管理人*
- +
部门*
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Form.js index 630f77bcb..bfdee24d8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Form.js @@ -47,7 +47,7 @@ var bootstrap = function ($, learun) { select: function (item) { ////赋值 $("#Name").val(item.f_realname); - $("#No").val(item.f_encode); + $("#JZGNo").val(item.f_encode); $("#Department").lrselectSet(item.f_departmentid); } }); @@ -60,11 +60,16 @@ var bootstrap = function ($, learun) { $('#' + id ).jfGridSet('refreshdata', data[id]); } else { + //console.log(data[id]) + //if (id == 'OfficeEquipment' && data[id]) { + // data[id].Name = "任山"; + //} + //$('[data-table="' + id + '"]').lrSetFormData(data[id]); $('[data-table="' + id + '"]').lrSetFormData(data[id]); } } }); - } + } } }; // 保存数据 @@ -72,10 +77,9 @@ var bootstrap = function ($, learun) { if (!$('body').lrValidform()) { return false; } - var postData = {}; - var strEntity = $('body').lrGetFormData(); - strEntity.Name = strEntity.No; - postData.strEntity = JSON.stringify(strEntity); + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/OfficeEquipment/SaveForm?keyValue=' + keyValue, postData, function (res) { // 保存成功后才回调 if (!!callBack) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.js index 3dea279e8..78ecc6a55 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.js @@ -16,7 +16,7 @@ var bootstrap = function ($, learun) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 220, 400); - $('#Name').lrDataSourceSelect({ code: 'TeacherInfo',value: 'f_encode',text: 'f_realname' }); + $('#Name').lrDataSourceSelect({ code: 'TeacherInfo', value: 'f_realname',text: 'f_realname' }); $('#Department').lrDataSourceSelect({ code: 'classdata',value: 'id',text: 'name' }); $('#Status').lrDataItemSelect({ code: 'AssState' }); $('#Types').lrDataItemSelect({ code: 'AssType' }); @@ -100,7 +100,7 @@ var bootstrap = function ($, learun) { url: top.$.rootUrl + '/EducationalAdministration/OfficeEquipment/GetPageList', headData: [ { - label: "使用管理人", name: "Name", width: 100, align: "left", + label: "使用管理人", name: "JZGNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo', diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/IndexMy.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/IndexMy.js index b7eceedae..6f2b44559 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/IndexMy.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/IndexMy.js @@ -16,7 +16,7 @@ var bootstrap = function ($, learun) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 220, 400); - $('#Name').lrDataSourceSelect({ code: 'TeacherInfo', value: 'f_encode', text: 'f_realname' }); + $('#Name').lrDataSourceSelect({ code: 'TeacherInfo', value: 'f_realname', text: 'f_realname' }); $('#Department').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' }); $('#Status').lrDataItemSelect({ code: 'AssState' }); $('#Types').lrDataItemSelect({ code: 'AssType' }); @@ -100,7 +100,7 @@ var bootstrap = function ($, learun) { url: top.$.rootUrl + '/EducationalAdministration/OfficeEquipment/GetPageList', headData: [ { - label: "使用管理人", name: "Name", width: 100, align: "left", + label: "使用管理人", name: "JZGNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo', diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OfficeEquipment/OfficeEquipmentEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OfficeEquipment/OfficeEquipmentEntity.cs index 8047ad897..54618e610 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OfficeEquipment/OfficeEquipmentEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OfficeEquipment/OfficeEquipmentEntity.cs @@ -35,6 +35,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("NAME")] public string Name { get; set; } /// + /// 姓名 + /// + [Column("JZGNO")] + public string JZGNo { get; set; } + /// /// 所属部门 /// [Column("DEPARTMENT")] diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/OfficeEquipment/list.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/OfficeEquipment/list.vue index 5efb2bb54..b2f91f4e9 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/OfficeEquipment/list.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/OfficeEquipment/list.vue @@ -12,30 +12,60 @@ - 姓名: - {{ displayListItem(item, 'Name') }} + 使用管理人: + {{ displayListItem(item, 'JZGNo') }} - 处室部门: + 部门: {{ displayListItem(item, 'Department') }} - 设备编号: + 资产编号: {{ displayListItem(item, 'Code') }} - 设备名称: + 资产名称: {{ displayListItem(item, 'DeviceName') }} - + - 配置描述: - {{ displayListItem(item, 'Description') }} + 资产类别: + {{ displayListItem(item, 'Types') }} - + + + 品牌: + {{ displayListItem(item, 'Brand') }} + + + + 型号: + {{ displayListItem(item, 'Model') }} + + + + 参数: + {{ displayListItem(item, 'Argument') }} + + + + 单位: + {{ displayListItem(item, 'Unit') }} + + + + 数量: + {{ displayListItem(item, 'Nuantity') }} + + + + 使用状态: + {{ displayListItem(item, 'Status') }} + + 备注: {{ displayListItem(item, 'Remark') }} @@ -75,16 +105,16 @@ - - + - - + + + + + + 重置查询条件 @@ -127,7 +157,7 @@ return { // 数据项的数据类型、结构 scheme: { - Name: { + JZGNo: { type: 'select' }, Department: { @@ -139,12 +169,30 @@ DeviceName: { type: 'text' }, - Description: { + Remark: { type: 'text' }, - Remark: { + Types: { + type: 'select',dataSource: '1', dataSourceId: 'AssType' + }, + Brand: { + type: 'text' + }, + Model: { + type: 'text' + }, + Argument: { + type: 'text' + }, + Unit: { + type: 'select',dataSource: '1', dataSourceId: 'sldw', + }, + Nuantity: { type: 'text' - } + }, + Status: { + type: 'select',dataSource: '1', dataSourceId: 'AssState' + }, }, // 查询条件 @@ -154,12 +202,24 @@ // 时间查询参数 dateRange: null, - // 数据源 + // 数据源 dataSource: { - Name: [], - Department: [] + JZGNo: [], + Department: [], + Types: Object.values(this.GET_GLOBAL('dataDictionary').AssType).map(t => ({ + value: t.value, + text: t.text + })), + Status: Object.values(this.GET_GLOBAL('dataDictionary').AssState).map(t => ({ + value: t.value, + text: t.text + })), + Unit: Object.values(this.GET_GLOBAL('dataDictionary').sldw).map(t => ({ + value: t.value, + text: t.text + })), + }, - // 页面相关参数 ready: false, tips: '加载中...', @@ -187,7 +247,7 @@ // 拉取加载列表和数据源 await Promise.all([ this.FETCH_DATASOURCE('teacheruserdata').then(result => { - this.dataSource.Name = result.data.map(t => ({ + this.dataSource.JZGNo = result.data.map(t => ({ text: t.f_realname, value: t.f_encode, f_encode: t.f_encode, @@ -234,7 +294,6 @@ this.total = result.total this.page = result.page + 1 this.list = isConcat ? this.list.concat(result.rows) : result.rows; - this.tips = `已加载 ${Math.min(result.page, result.total)} / ${result.total} 页,共 ${result.records} 项` this.loadState = result.page >= result.total ? '已加载所有项目' : '向下翻以加载更多' }, @@ -264,21 +323,21 @@ result.StartTime = this.dateRange.start result.EndTime = this.dateRange.end } - + // 将其他查询项添加到查询 JSON 中 const queryObj = pickBy(this.queryData, t => (Array.isArray(t) ? t.length > 0 : t)) Object.assign(result, mapValues(queryObj, t => (Array.isArray(t) ? t.join(',') : t))) this.searchData = result - - + + // 姓名格式化 - if(this.searchData.Name_){ - let arr = this.dataSource.Name + if (this.searchData.Name_) { + let arr = this.dataSource.JZGNo let obj = arr.find(e => e.f_userid == this.queryData.Name_) - this.searchData.Name = obj ? obj.f_encode : '' + this.searchData.JZGNo = obj ? obj.text : '' } - + await this.refreshList(false) }, diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/OfficeEquipment/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/OfficeEquipment/single.vue index 1d2d85c93..454082936 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/OfficeEquipment/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/OfficeEquipment/single.vue @@ -4,18 +4,32 @@ + :value="getValue('OfficeEquipment.Name')" type="user" title="使用管理人" required :readonly="!edit" /> + :value="getValue('OfficeEquipment.Department')" type="department" title="部门" required + :readonly="!edit" /> - - + :value="getValue('OfficeEquipment.DeviceName')" :disabled="!edit" title="资产名称" required /> + + + + + + + + @@ -72,7 +86,7 @@ OfficeEquipment: { Name: { type: 'select', - title: '姓名', + title: '使用管理人', verify: "NotNull" }, Department: { @@ -82,22 +96,48 @@ }, Code: { type: 'text', - title: '设备编号', + title: '资产编号', verify: "NotNull" }, DeviceName: { type: 'text', - title: '设备名称', + title: '资产名称', + verify: "NotNull" + }, + Types: { + type: 'select', + title: '资产类别', verify: "NotNull" }, - Description: { + Brand: { + type: 'text', + title: '品牌', + }, + Model: { + type: 'text', + title: '型号', + }, + Argument: { type: 'text', - title: '配置描述', + title: '参数', + }, + Unit: { + type: 'select', + title: '单位', + verify: "NotNull" + }, + Nuantity: { + type: 'text', + title: '数量', verify: "NotNull" }, Remark: { type: 'text', title: '备注' + }, + Status: { + type: 'select', + title: '使用状态', } }, }, @@ -162,7 +202,7 @@ const result = await this.HTTP_GET('/Learun/adms/EducationalAdministration/officeEquipment/form', this.id) this.origin = await this.formatFormData(result) - + let arr = this.dataSource.OfficeEquipment.Name let obj = arr.find(e => e.f_encode == this.origin.OfficeEquipment.Name) this.origin.OfficeEquipment.Name = obj ? obj.f_userid : this.origin.OfficeEquipment.Name