From 0dd76c2492f1afbe335b50a8ffb76e4af94271df Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期五, 10 十月 2025 15:16:51 +0800
Subject: [PATCH] 新增设备 人员增加模糊查询 完成 日期默认当天 完成
---
CY_ECommercePlatform/CY.WebForm/Pages/work/MyRequestAdd.aspx | 122 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 120 insertions(+), 2 deletions(-)
diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/work/MyRequestAdd.aspx b/CY_ECommercePlatform/CY.WebForm/Pages/work/MyRequestAdd.aspx
index 540502c..c5d732b 100644
--- a/CY_ECommercePlatform/CY.WebForm/Pages/work/MyRequestAdd.aspx
+++ b/CY_ECommercePlatform/CY.WebForm/Pages/work/MyRequestAdd.aspx
@@ -19,9 +19,13 @@
if ($(this).val() == "15") {
$(".trShoukuandanwei").css("display", "table-row");
+
+ $(".shangchanfujian").show();
} else {
$(".trShoukuandanwei").css("display", "none");
+
+ $(".shangchanfujian").hide();
}
@@ -37,9 +41,11 @@
if ($("#selPlanDataType").val() == "15") {
$(".trShoukuandanwei").css("display", "table-row");
+ $(".shangchanfujian").show();
} else {
$(".trShoukuandanwei").css("display", "none");
+ $(".shangchanfujian").hide();
}
SelectAddSearch();
@@ -93,6 +99,74 @@
});
});
}
+
+
+
+
+ //鏌ョ湅
+ function checkSelFile() {
+
+ var oFile = document.getElementById('file1');
+ if (oFile.value == "") {
+ alertMsg('娌℃湁閫夋嫨鏂囦欢');
+ return;
+
+ }
+
+
+
+ var formData = new FormData();
+ formData.append('file', oFile.files[0]); // this.files[0]鏄枃浠跺璞�
+
+
+ $.ajax({
+ url: '/Pages/business/FileUploadHandler.ashx', // 鏇挎崲涓轰綘鐨勬湇鍔″櫒绔偣
+ type: 'POST',
+ data: formData,
+ contentType: false,
+ processData: false,
+ async: false, // 璁剧疆涓哄悓姝�
+ success: function (response) {
+ console.log('File uploaded successfully:', response);
+ if (response.code == 1) {
+
+ $(".AddTab").last().after($(".AddTab").last().clone(true));
+ $(".AddTab").last().show();
+ $("input[name='HideKeyidFapiao']").last().val("");
+ $("input[name='HideAttachmentFapiao']").last().val(response.data);
+ $('a[name="HrefAttachmentFapiao"]').last().attr("href", response.data);
+ $('a[name="HrefAttachmentFapiao"]').last().html('<img src="' + response.data + '" width="20" height="20" />');
+ alertMsg('涓婁紶鎴愬姛');
+ } else {
+ alertMsg(response.message);
+ }
+
+
+ },
+ error: function (xhr, status, error) {
+ console.error('File upload failed:', status, error);
+ alertMsg('涓婁紶澶辫触');
+ }
+ });
+
+
+
+
+
+
+
+
+ }
+
+
+
+
+ function deletefujian(obj) {
+ if (confirm("鏄惁鍒犻櫎閫変腑鏁版嵁锛�")) {
+ $(obj).parent().parent().remove()
+ }
+ }
+
</script>
</head>
<body>
@@ -157,7 +231,7 @@
璇风ず鍐呭锛�
</td>
<td colspan="3">
- <textarea id="txtPlanContent" runat="server" style="width: 390px; height: 50px;" class="req" msg="璇疯緭鍏ヨ绀哄唴瀹�"></textarea>
+ <textarea id="txtPlanContent" runat="server" style="width: 390px; height: 50px;" class="req" msg="璇疯緭鍏ヨ绀哄唴瀹�" MaxLength="200" ></textarea>
</td>
</tr>
<tr>
@@ -165,9 +239,53 @@
澶囨敞锛�
</td>
<td colspan="3">
- <textarea id="txtPlanRemark" runat="server" style="width: 390px; height: 50px;" ></textarea>
+ <textarea id="txtPlanRemark" runat="server" style="width: 390px; height: 50px;" MaxLength="100" ></textarea>
</td>
</tr>
+ <tr class="shangchanfujian">
+ <td class="ali03 w100px">
+ 瀹℃壒璇佹槑锛�
+ </td>
+ <td colspan="3">
+ <input type="file" id="file1" name="__hetongFile" keepdefaultstyle="true" runat="server" text="璇烽�夋嫨鏂囦欢" />
+ <input type="button" value="涓婁紶鍥剧墖" onclick="checkSelFile();" />
+ </td>
+
+ </tr>
+ <tr class="AddTab" style="display:none;" >
+ <td class="ali03 w100px">
+
+ </td>
+ <td colspan="3">
+ <input type="hidden" name="HideKeyidFapiao" value="0" />
+ <input type="hidden" name="HideAttachmentFapiao" value="" />
+ <a title="鏌ョ湅鍥剧墖" name="HrefAttachmentFapiao" target="view_window" href="0">
+ 鍥剧墖
+ </a>
+ <a name="shanchuAttachmentFapiao" href="#" onclick="deletefujian(this);" >
+ X
+ </a>
+ </td>
+ </tr>
+ <asp:Repeater ID="RepClientList" runat="server">
+ <ItemTemplate>
+ <tr class="AddTab shangchanfujian" >
+ <td class="ali03 w100px">
+
+ </td>
+ <td colspan="3">
+ <input type="hidden" name="HideKeyidFapiao" value="<%#Eval("Keyid")%>" />
+ <input type="hidden" name="HideAttachmentFapiao" value="<%#Eval("PlanAttachment")%>" />
+ <a title="鏌ョ湅鍥剧墖" name="HrefAttachmentFapiao" target="view_window" href="<%#Eval("PlanAttachment")%>">
+ <img src="<%#Eval("PlanAttachment")%>" width="20" height="20" />
+ </a>
+ <a name="shanchuAttachmentFapiao" href="#" onclick="deletefujian(this);" >
+ X
+ </a>
+ </td>
+ </tr>
+ </ItemTemplate>
+ </asp:Repeater>
<tr>
<td colspan="4" style="text-align: center;">
<asp:Button ID="btn_submit" runat="server" OnClick="btn_submit_form" Text="鎻愪氦" />
--
Gitblit v1.9.1