From efad4f05e52c89f3b42774e313144abd039370e4 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期五, 10 二月 2023 11:26:06 +0800
Subject: [PATCH] 考勤怎么加带薪假的计算

---
 zhengcaioa/zhengcaioa/Views/CooperVisit/Edit.cshtml |   68 +++++++++++++++++++++++-----------
 1 files changed, 46 insertions(+), 22 deletions(-)

diff --git a/zhengcaioa/zhengcaioa/Views/CooperVisit/Edit.cshtml b/zhengcaioa/zhengcaioa/Views/CooperVisit/Edit.cshtml
index 97790be..b0baa39 100644
--- a/zhengcaioa/zhengcaioa/Views/CooperVisit/Edit.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/CooperVisit/Edit.cshtml
@@ -11,7 +11,7 @@
     List<SysCodeDtl> yx = ViewData["yx"] as List<SysCodeDtl>; //鎴愪氦鎰忓悜
     List<SysCodeDtl> jy = ViewData["jy"] as List<SysCodeDtl>; //璺熻釜寤鸿
 
-
+    List<PageEntity> ActionInfo2 = ViewData["ActionInfo2"] as List<PageEntity>;
 }
 @{
     Layout = null;
@@ -111,27 +111,36 @@
 
                                     <label class="text-right col-sm-1 col-md-1 control-label">鍚堜綔瀹㈡埛<i class="red">*</i></label>
                                     <div class="col-sm-2 col-md-2">
-                                        <select id="Viscustomer" class="form-control" name="Viscustomer" data-placeholder="閫夋嫨 搴忓垪 ..." style="font-weight:normal;">
-                                            <option value="" hassubinfo="true">璇烽�夋嫨</option>
-                                            @foreach (var item in customer)
-                                            {
-                                                @if (!item.Id.Equals(Model.Viscustomer))
+                                        @if (customer.Count > 0)
+                                        {
+                                            <select id="Viscustomer" class="form-control" name="Viscustomer" data-placeholder="閫夋嫨 搴忓垪 ..." style="font-weight:normal;">
+                                                <option value="" hassubinfo="true">璇烽�夋嫨</option>
+                                                @foreach (var item in customer)
                                                 {
-                                                    <option value="@item.Id" hassubinfo="true">
-                                                        @item.Name
-                                                    </option>
+                                                    @if (!item.Id.Equals(Model.Viscustomer))
+                                                    {
+                                                        <option value="@item.Id" hassubinfo="true">
+                                                            @item.Name
+                                                        </option>
+                                                    }
+                                                    else
+                                                    {
+                                                        <option value="@item.Id" hassubinfo="true" selected="selected">
+                                                            @item.Name
+                                                        </option>
+                                                    }
+
                                                 }
-                                                else
-                                                {
-                                                    <option value="@item.Id" hassubinfo="true" selected="selected">
-                                                        @item.Name
-                                                    </option>
                                                 }
 
-                                            }
-                                            }
+                                            </select>
+                                        }
+                                        else
+                                        {
+                                            @Model.ViscustomerName
+                                            <input type="hidden" id="Viscustomer" name="Viscustomer" value="@Model.Viscustomer" />
+                                        }
 
-                                        </select>
                                         <input type="hidden" id="Id" name="Id" value="@Model.Id" />
                                     </div>
                                 </div>
@@ -314,11 +323,11 @@
         <div class="wrapper wrapper-content" style="margin-top:0px"></div>
         <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 Delete" href="javascript:void(0)" onclick="delPosition();" style="margin-left:4px; border-radius:4px;display:none;">
                     <i class="glyphicon glyphicon-remove"></i>&nbsp;&nbsp;<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>&nbsp;&nbsp;<span class="bold">鎻愪氦</span>
                 </a>
             </div>
@@ -346,7 +355,10 @@
         };
 
         laydate({ elem: "#Vistime", format: 'YYYY/MM/DD', istime: true, event: "focus" });
-        $("#Viscustomer").chosen();
+        if ( @customer.Count > 0)
+            {
+  $("#Viscustomer").chosen();
+            }
         var id = '@Model.Id';
         var bUpload = false;
         var bAdd = false; // 鏂板鎿嶄綔
@@ -443,7 +455,7 @@
                 return;
             }
 
-           
+
             //var data = { id: $("#Id").val(), StartTime:$("#StartTime").val(), Sheng: $("#Sheng").val(), job_level: $("#Job_level").val().toString(), ExistsAttachment: fileId != "" }
             $.ajax({
                 type: "POST",
@@ -452,7 +464,7 @@
                 global: false,
                 data: $('form').serializeArray(),
                 success: function (data) {
-                  
+
 
 
                         if (data.Result) {
@@ -496,6 +508,18 @@
             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