From 72e4a4d81cb1b9776ffb7287e0c5ed67592eda8b Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期一, 11 十二月 2023 15:20:28 +0800
Subject: [PATCH] 试用期工资计算
---
zhengcaioa/zhengcaioa/Views/Liaotian/Edit.cshtml | 239 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 225 insertions(+), 14 deletions(-)
diff --git a/zhengcaioa/zhengcaioa/Views/Liaotian/Edit.cshtml b/zhengcaioa/zhengcaioa/Views/Liaotian/Edit.cshtml
index ade81d5..136207f 100644
--- a/zhengcaioa/zhengcaioa/Views/Liaotian/Edit.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/Liaotian/Edit.cshtml
@@ -1,10 +1,25 @@
锘緻model DTO.LiaotianDTO
+@using DTO;
@{
Layout = null;
List<SysCodeDtl> problemtype = ViewData["problemtype"] as List<SysCodeDtl>; //闂绫诲瀷
List<SysCodeDtl> questiontype = ViewData["questiontype"] as List<SysCodeDtl>; //闂绫诲瀷
List<DTO.PageEntity> pageEntities = ViewData["pageEntities"] as List<DTO.PageEntity>; //闂绫诲瀷
+ var shenhesto = pageEntities.Where(x => x.PageName == "瀹℃牳").FirstOrDefault();
+ string shenhe = "";
+ if (shenhesto != null)
+ {
+ shenhe = shenhesto.PageName;
+ }
+ var tijiaobingshenhesto = pageEntities.Where(x => x.PageName == "鎻愪氦骞跺鏍�").FirstOrDefault();
+ string tijiaobingshenhe = "";
+ if (tijiaobingshenhesto != null)
+ {
+ tijiaobingshenhe = tijiaobingshenhesto.PageName;
+ }
+ List<PageEntity> ActionInfo2 = ViewData["ActionInfo2"] as List<PageEntity>;
+
}
<!DOCTYPE html>
<html>
@@ -90,7 +105,7 @@
<a class="collapse-link" onclick="collapseBox(this);"><i class="fa fa-chevron-up" title="鎶樺彔/灞曞紑鏄庣粏"></i></a>
</div>*@
</div>
- <div id="div_content" class="ibox-content" style="background-color:white;">
+ <div id="div_content" class="ibox-content" style="background-color:white;overflow-y:auto;">
<div class="row">
<div class="clearfix layer-area" style="padding-bottom:15px;">
<label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">闂绫诲瀷<i class="red">*</i></label>
@@ -145,21 +160,59 @@
</div>
+ <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">
+ 鏄惁鍑轰功
+ </label>
+ <div class="col-sm-2 col-md-2" grouptype="Vdata">
+ @if ("A" == Model.ChushuStatus)
+ {
+ <input type="checkbox" class="form-control" id="ChushuStatusName" checked="checked" name="ChushuStatusName" value="A" />
+ }
+ else
+ {
+ <input type="checkbox" class="form-control" id="ChushuStatusName" name="ChushuStatusName" value="A" />
+ }
+ <input type="hidden" id="ChushuStatus" name="ChushuStatus" value="" />
+
+ </div>
+
+ @*<label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">
+ 鏀惰棌
+ </label>
+ <div class="col-sm-2 col-md-2" grouptype="Vdata">
+ @if ("A" == Model.ShouCangStatus)
+ {
+ <input type="checkbox" class="form-control" id="ShouCangStatusName" checked="checked" name="ShouCangStatusName" value="A" />
+ }
+ else
+ {
+ <input type="checkbox" class="form-control" id="ShouCangStatusName" name="ShouCangStatusName" value="A" />
+ }
+ <input type="hidden" id="ShouCangStatus" name="ShouCangStatus" value="" />
+
+ </div>*@
+
</div>
<div class="clearfix layer-area" style="padding-bottom:15px;">
<label class="text-right col-sm-1 col-md-1 control-label">闂<i class="red">*</i></label>
- <div class="col-sm-11 col-md-11"><input id="Question" class="form-control" label="闂" name="Question" labtype="txt" addvisible="true" editvisible="true" reg="" maxlength="450" ismust="true" type="text" value="@Model.Question"></div>
+ <div class="col-sm-11 col-md-11">
+ @*<input id="Question" class="form-control" label="闂" name="Question" labtype="txt" addvisible="true" editvisible="true" reg="" maxlength="450" ismust="true" type="text" value="@Model.Question">*@
+ <textarea class="form-control bt" id="Question" name="Question" title="绛旀" isempty="" maxlength="450" length="long" style="resize:none;overflow-y:hidden; min-height:60px;" onpropertychange="this.style.height=this.scrollHeight + 'px'" oninput="this.style.height=this.scrollHeight + 'px'">@Model.Question</textarea>
+
+ </div>
+
+
</div>
<div class="clearfix layer-area" style="padding-bottom:15px;">
<label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">绛旀<i class="red">*</i></label>
<div class="col-sm-11 col-md-11">
- <textarea class="form-control bt" id="Anwser" name="Anwser" title="绛旀" isempty="" maxlength="4000" style=" height:200px" length="long">@Model.Anwser</textarea>
+ <textarea class="form-control bt" id="Anwser" name="Anwser" title="绛旀" isempty="" maxlength="4000" length="long" style="resize:none;overflow-y:hidden; min-height:60px;" onpropertychange="this.style.height=this.scrollHeight + 'px'" oninput="this.style.height=this.scrollHeight + 'px'">@Model.Anwser</textarea>
</div>
</div>
<div class="clearfix layer-area" style="padding-bottom:15px;">
<label class="text-right col-sm-1 col-md-1 control-label">閫傜敤娉曟潯</label>
- <div class="col-sm-11 col-md-11"> <textarea class="form-control bt" id="Shiyongfatiao" name="Shiyongfatiao" title="绛旀" isempty="" maxlength="450" style=" height:60px" length="long">@Model.Shiyongfatiao</textarea> </div>
+ <div class="col-sm-11 col-md-11"> <textarea class="form-control bt" id="Shiyongfatiao" name="Shiyongfatiao" title="绛旀" isempty="" maxlength="450" length="long" style="resize:none;overflow-y:hidden; min-height:60px;" onpropertychange="this.style.height=this.scrollHeight + 'px'" oninput="this.style.height=this.scrollHeight + 'px'">@Model.Shiyongfatiao</textarea> </div>
</div>
</div>
@@ -172,10 +225,14 @@
<div class="ibox-content" id="top" style="z-index:100; position:fixed; height:50px; width:100%;bottom:0; text-align: right; padding-top:8px ">
<div class="" style="float:right;" data-bootstro-width="500px" data-bootstro-content="鍔熻兘鎸夐挳锛氣�滀繚瀛樷�濓紝鈥滃垹闄も��">
- <a class="btn btn-success" href="javascript:void(0)" onclick="delPosition();" style="margin-left:4px; border-radius:4px;">
+ <a class="btn btn-success" id="tijiaobingshenhebtn" href="javascript:void(0)" onclick="tijiaobingshenhePosition();" style="margin-left:4px; border-radius:4px;">
+ <i class="glyphicon glyphicon-ok"></i> <span class="bold">鎻愪氦骞跺鏍�</span>
+ </a>
+
+ <a class="btn btn-success Delete" href="javascript:void(0)" onclick="delPosition();" style="margin-left:4px; border-radius:4px;display:none;">
<i class="glyphicon glyphicon-remove"></i> <span class="bold">鍒犻櫎</span>
</a>
- <a class="btn btn-success" href="javascript:void(0)" onclick="savePosition();" style="margin-left:4px; border-radius:4px;">
+ <a class="btn btn-success Update" href="javascript:void(0)" onclick="savePosition();" style="margin-left: 4px; border-radius: 4px; display: none;">
<i class="glyphicon glyphicon-ok"></i> <span class="bold">鎻愪氦</span>
</a>
@@ -188,19 +245,39 @@
</form>
<script type="text/javascript">
+ var Question = document.getElementById("Question");
+
+ Question.style.height = Question.scrollHeight + 'px';
+
+ var Anwser = document.getElementById("Anwser");
+
+ Anwser.style.height = Anwser.scrollHeight + 'px';
+
+ var Shiyongfatiao = document.getElementById("Shiyongfatiao");
+
+ Shiyongfatiao.style.height = Shiyongfatiao.scrollHeight + 'px';
+
var hh = document.body.clientHeight - $('.ibox-title').height() - $("#top").height()*2 - 95;
$("#div_content").height(hh);
var id = '@Model.Id';
- var pageEntities = @pageEntities.Count;
+ var shenhe = '@shenhe';
+ var tijiaobingshenhe = '@tijiaobingshenhe';
var Clientid = '@Model.Clientid';
if (id == null || id == '') {
$("#shenhebtn").hide();
- } else if (pageEntities <= 0 || Clientid == "A") {
+ } else if (shenhe == "" || Clientid == "A") {
$("#shenhebtn").hide();
} else {
$("#shenhebtn").show();
}
+
+ if (tijiaobingshenhe == "") {
+ $("#tijiaobingshenhebtn").hide();
+ } else {
+ $("#tijiaobingshenhebtn").show();
+ }
+
toastr.options = {
"closeButton": true,
"debug": false,
@@ -215,7 +292,11 @@
"hideEasing": "linear",
"showMethod": "fadeIn",
"hideMethod": "fadeOut"
- };
+ };
+
+
+
+
var delPosition = function () {
if (id == null || id=='') {
toastr.warning("璇峰厛淇濆瓨");
@@ -316,13 +397,22 @@
return;
}
+ if ($("#ChushuStatusName").is(':checked')) {
+ $("#ChushuStatus").val("A");
+ } else {
+ $("#ChushuStatus").val("D");
+ }
+
+
+
+
imgLoad = parent.layer.load(2, { shade: [0.2, '#fff'] });
$.ajax({
type: "POST",
url: "/Liaotian/Save",
dataType: "json",
global: false,
- data: { Id: id, Question: $("#Question").val(), Anwser: $("#Anwser").val(), Questiontype: $("#Questiontype").val(), Problemtype: $("#Problemtype").val(), Shiyongfatiao: $("#Shiyongfatiao").val()},
+ data: { Id: id, Question: $("#Question").val(), Anwser: $("#Anwser").val(), Questiontype: $("#Questiontype").val(), Problemtype: $("#Problemtype").val(), Shiyongfatiao: $("#Shiyongfatiao").val(), ChushuStatus: $("#ChushuStatus").val()},
success: function (data) {
@@ -349,7 +439,108 @@
parent.layer.msg('淇濆瓨澶辫触', { icon: 5 });
}
});
- }
+ }
+
+
+
+ // 淇濆瓨宀椾綅淇℃伅
+ var tijiaobingshenhePosition = function () {
+ if (Verify.isNull($("#Questiontype").val())) {
+ toastr.warning("闂绫诲埆涓嶈兘涓虹┖");
+ return;
+ }
+ if (Verify.isNull($("#Problemtype").val())) {
+ toastr.warning("棰樼洰绫诲埆涓嶈兘涓虹┖");
+ return;
+ }
+ if (Verify.isNull($("#Question").val())) {
+ toastr.warning("闂涓嶈兘涓虹┖");
+ return;
+ }
+
+ if (Verify.isNull($("#Anwser").val())) {
+ toastr.warning("绛旀涓嶈兘涓虹┖");
+ return;
+ }
+
+ if ($("#ChushuStatusName").is(':checked')) {
+ $("#ChushuStatus").val("A");
+ } else {
+ $("#ChushuStatus").val("D");
+ }
+
+
+ imgLoad = parent.layer.load(2, { shade: [0.2, '#fff'] });
+ $.ajax({
+ type: "POST",
+ url: "/Liaotian/Tijiaobingshenhe",
+ dataType: "json",
+ global: false,
+ data: { Id: id, Question: $("#Question").val(), Anwser: $("#Anwser").val(), Questiontype: $("#Questiontype").val(), Problemtype: $("#Problemtype").val(), Shiyongfatiao: $("#Shiyongfatiao").val(), ChushuStatus: $("#ChushuStatus").val() },
+ success: function (data) {
+
+
+ if (data.Result) {
+ // parent._afterSave(true);
+ parent.layer.msg('淇濆瓨鎴愬姛', { icon: 6 });
+ _pageAutoClose();//鑷姩鍏抽棴椤甸潰鏂规硶
+ }
+ else {
+ if ($.isNumber(imgLoad)) {
+ parent.layer.close(imgLoad);
+ }
+ // toastr.error("");
+ parent.layer.msg(data.Message, { icon: 5 });
+ }
+
+ },
+ error: function () {
+ if ($.isNumber(imgLoad)) {
+ parent.layer.close(imgLoad);
+ }
+ //toastr.error("淇濆瓨澶辫触");
+
+ parent.layer.msg('淇濆瓨澶辫触', { icon: 5 });
+ }
+ });
+ }
+
+
+
+ $("#ShouCangStatusName").change(function () {
+
+ if ($("#ShouCangStatusName").is(':checked')) {
+ $("#ShouCangStatus").val("A");
+ } else {
+ $("#ShouCangStatus").val("D");
+ }
+
+
+ $.ajax({
+ type: "POST",
+ url: "/Liaotian/ShouCang",
+ dataType: "json",
+ global: false,
+ data:{ Id: id, Question: $("#Question").val(), Anwser: $("#Anwser").val(), Questiontype: $("#Questiontype").val(), Problemtype: $("#Problemtype").val(), Shiyongfatiao: $("#Shiyongfatiao").val(), ChushuStatus: $("#ChushuStatus").val(), ShouCangStatus: $("#ShouCangStatus").val() },
+ success: function (data) {
+
+ if (data.Result) {
+ // parent._afterSave(true);
+ parent.layer.msg('鎿嶄綔鎴愬姛', { icon: 6 });
+
+ }
+ else {
+
+ parent.layer.msg(data.Message, { icon: 5 });
+ }
+ },
+ error: function () {
+
+
+ parent.layer.msg('澶辫触', { icon: 5 });
+ }
+ });
+ });
$("#Questiontype").change(function () {
@@ -362,15 +553,18 @@
global: false,
data: "",
success: function (data) {
-
+
var quxian = $("#Problemtype");
quxian.find('option').remove();
var aaa = '<option value="" hassubinfo="true">璇烽�夋嫨</option>';
quxian.append(aaa);
if (data.length > 0) {
for (var i = 0; i < data.length; i++) {
-
var o = '<option value="' + data[i].CodeSn + '" hassubinfo="true">' + data[i].Comments + '</option>';
+ if (i == 0) {
+ o = '<option value="' + data[i].CodeSn + '" hassubinfo="true" selected="selected" >' + data[i].Comments + '</option>';
+ }
+
quxian.append(o);
}
}
@@ -383,6 +577,12 @@
});
});
+
+ if (id == null || id == '') {
+ $('#Questiontype option:eq(1)').attr('selected', 'selected');
+ $('#Questiontype').trigger('change');
+ }
+
function _pageAutoClose() {
parent.window._reloadPageData();
var index = parent.layer.getFrameIndex(window.name);
@@ -390,7 +590,18 @@
parent.layer.closeAll('loading');
parent.layer.close(index);
return false;
- }
+ }
+ var ActionInfo22 = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ActionInfo2))';
+
+
+
+ $(function () {
+ var data = JSON.parse(ActionInfo22);
+ for (var o in data) {
+ $("." + data[o].PageShortcut).show();
+
+ }
+ });
</script>
</body>
</html>
\ No newline at end of file
--
Gitblit v1.9.1