From 8f7fd017ffa14e6b3e2ec0a984e9370d88cb7c09 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期四, 03 四月 2025 08:58:17 +0800
Subject: [PATCH] 修改送货日期
---
CY_ECommercePlatform/CY.WebForm/Pages/business/Waixiefukuanshenqing.aspx | 91 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 91 insertions(+), 0 deletions(-)
diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/business/Waixiefukuanshenqing.aspx b/CY_ECommercePlatform/CY.WebForm/Pages/business/Waixiefukuanshenqing.aspx
index 8b6c694..a2dc2c7 100644
--- a/CY_ECommercePlatform/CY.WebForm/Pages/business/Waixiefukuanshenqing.aspx
+++ b/CY_ECommercePlatform/CY.WebForm/Pages/business/Waixiefukuanshenqing.aspx
@@ -42,6 +42,31 @@
<td class="ali03">璁㈠崟閲戦锛�</td>
<td> <span id="ordernjine" runat="server" ></span></td>
</tr>
+ <tr>
+ <td class="ali03 w100px">
+ 瀹℃壒璇佹槑锛�
+ </td>
+ <td>
+ <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>
+ <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>
<tr>
<td colspan="2"></td>
</tr>
@@ -154,5 +179,71 @@
alert('璇疯緭鍏ユ湁鏁堢殑姝h礋閲戦锛屼緥濡� 45.67');
}
}
+
+
+
+ //鏌ョ湅
+ 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>
</html>
--
Gitblit v1.9.1