瀏覽代碼

Merge branch '黑龙江艺术高中职' of http://123.57.209.16:3000/bjquanjiang/DigitalScholl into 黑龙江艺术高中职

黑艺新账号
yxq 1 年之前
父節點
當前提交
a9dc371eb0
共有 3 個文件被更改,包括 35 次插入27 次删除
  1. +15
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ADR_RestrictionController.cs
  2. +15
    -12
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/FormDay.cshtml
  3. +5
    -10
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/FormDay.js

+ 15
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ADR_RestrictionController.cs 查看文件

@@ -1,8 +1,10 @@
using Learun.Util;
using System;
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.PersonnelManagement;
using System.Web.Mvc;
using System.Collections.Generic;
using System.Linq;

namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
{
@@ -89,10 +91,10 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
[AjaxOnly]
public ActionResult GetFormDayData(string keyValue)
{
var ADR_RestrictionData = aDR_RestrictionIBLL.GetADR_RestrictionDay(keyValue);
var ADR_RestrictionData = aDR_RestrictionIBLL.GetADR_RestrictionDay(keyValue).Select(m=>m.WorkDay.ToString("yyyy-MM-dd"));
var jsonData = new
{
ADR_RestrictionDay = ADR_RestrictionData,
ADR_RestrictionDay = string.Join(",",ADR_RestrictionData)
};
return Success(jsonData);
}
@@ -148,8 +150,16 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
[AjaxOnly]
public ActionResult SaveFormDay(string keyValue, string strEntity)
{
List<ADR_RestrictionDayEntity> entity = strEntity.ToObject<List<ADR_RestrictionDayEntity>>();
aDR_RestrictionIBLL.SaveFormDay(keyValue, entity);
List<string> entity = strEntity.ToObject<List<string>>();
List<ADR_RestrictionDayEntity> listday=new List<ADR_RestrictionDayEntity>();
foreach (var item in entity)
{
var ADR_RestrictionDayEntity = new ADR_RestrictionDayEntity();
ADR_RestrictionDayEntity.RId = keyValue;
ADR_RestrictionDayEntity.WorkDay =Convert.ToDateTime(item);
listday.Add(ADR_RestrictionDayEntity);
}
aDR_RestrictionIBLL.SaveFormDay(keyValue, listday);
if (string.IsNullOrEmpty(keyValue))
{
}


+ 15
- 12
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/FormDay.cshtml 查看文件

@@ -16,16 +16,15 @@
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="ADR_RestrictionDay">
<div class="lr-form-item-title">上班日期<font face="宋体">*</font></div>
<input id="WorkDay" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="ADR_RestrictionDay">
<input id="WorkDay" type="text" style="display: none;"/>

<script src="~/Content/vue/vue.js"></script>
<!-- 引入样式 -->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<!-- 引入组件库 -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<div id="app">
<el-calendar v-model="calendarValue" style="width:100%;height: auto;">
<el-calendar v-model="calendarValue" style="width: 100%; height: auto;">
<template slot="dateCell" slot-scope="{data}">
<div class="caleendarItem" v-on:click="chooseDay(data)" :class="{isSelect:isSelect(data.day)}">
{{ data.day.split('-').slice(2).join('-') }}
@@ -34,24 +33,28 @@
</el-calendar>
</div>
<script>
</script>
<style>
.el-calendar-table .el-calendar-day{
height:42px;
padding:0px;
.el-calendar-table .el-calendar-day {
height: 42px;
padding: 0px;
}

.el-calendar-table td.is-selected {
background-color: unset;
}

.el-backtop, .el-calendar-table td.is-today {
color: #333;
}
.caleendarItem{
width:100%;
height:100%;
padding:8px

.caleendarItem {
width: 100%;
height: 100%;
padding: 8px
}

.caleendarItem.isSelect {
background: #ECF5FF;
color: #5FADFF


+ 5
- 10
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/FormDay.js 查看文件

@@ -20,15 +20,8 @@ var bootstrap = function ($, learun) {
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/ADR_Restriction/GetFormDayData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
initCalendar()
$('#WorkDay').val(data.ADR_RestrictionDay);
initCalendar();
});
}
// 初始化日历
@@ -70,8 +63,10 @@ var bootstrap = function ($, learun) {
if (!$('body').lrValidform()) {
return false;
}
var workdays = $('#WorkDay').val().split(',');
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
keyValue: keyValue,
strEntity: JSON.stringify(workdays)
};
$.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/ADR_Restriction/SaveFormDay', postData, function (res) {
// 保存成功后才回调


Loading…
取消
儲存