From 7e016c602298bdac6a8782200ad607dc0484e3f7 Mon Sep 17 00:00:00 2001 From: edy Date: Wed, 23 Jun 2021 11:55:54 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=91=A8=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/FillinFrom/Form.js | 50 ++++++++++++++++--- 1 file changed, 44 insertions(+), 6 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Form.js index fba462712..896991833 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Form.js @@ -15,17 +15,55 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { - $('#FillingTime').lrDataItemSelect({ code: 'CycleTime' }); - $('#FillingCycle').lrDataItemSelect({ code: 'ThisCycle' }); - $('#FillingDept').lrDataSourceSelect({ code: 'classdata',value: 'id',text: 'name' }); - $('#FillingPeople').lrDataSourceSelect({ code: 'teacheruserdata',value: 'f_userid',text: 'f_realname' }); + $('#FillingDept').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' }); + $('#FillingPeople').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_userid', text: 'f_realname' }); + $('#FillingCycle').lrDataItemSelect({ + code: 'ThisCycle', + select: function (item) { + var Cycles = $("#FillingCycle").lrselectGet(); + if (Cycles != null && Cycles != "" && Cycles != undefined && Cycles == 2) { + $('#FillingTime').lrDataItemSelect({ code: 'CycleTime' }); + } + } + }); + + //$('#FillingTime').lrDataItemSelect({ code: 'CycleTime' }); + + //$('#City').lrselect({ + // url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_CITY', + // param: { strWhere: " cparent= 650000 " }, + // value: 'ccode', + // text: 'cname', + // maxHeight: 200, + // select: function (item) { + // var Citys = $("#City").lrselectGet(); + // if (Citys != null && Citys != "" && Citys != undefined) { + // $('#Area').lrselectRefresh({ + // url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA', + // param: { strWhere: " 1=1 and aparent in (" + Citys + ")" }, + // value: "acode", + // text: "aname", + // maxHeight: 200 + // }); + // } else { + // $('#Area').lrselectRefresh({ + // url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA', + // param: { strWhere: " 1=1 and aparent ='' " }, + // value: "acode", + // text: "aname", + // maxHeight: 200 + // }); + // } + // } + //}) + //$("#Area").lrselect(); }, initData: function () { if (!!keyValue) { $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/FillinFrom/GetFormData?keyValue=' + keyValue, function (data) { for (var id in data) { if (!!data[id].length && data[id].length > 0) { - $('#' + id ).jfGridSet('refreshdata', data[id]); + $('#' + id).jfGridSet('refreshdata', data[id]); } else { $('[data-table="' + id + '"]').lrSetFormData(data[id]); @@ -33,7 +71,7 @@ var bootstrap = function ($, learun) { } }); } - $('#State').val('0'); + $('#State').val('0'); } }; // 保存数据