| | |
| | | if ($(this).val() == "15") { |
| | | |
| | | $(".trShoukuandanwei").css("display", "table-row"); |
| | | |
| | | $(".shangchanfujian").show(); |
| | | } else { |
| | | |
| | | $(".trShoukuandanwei").css("display", "none"); |
| | | |
| | | $(".shangchanfujian").hide(); |
| | | } |
| | | |
| | | |
| | |
| | | if ($("#selPlanDataType").val() == "15") { |
| | | |
| | | $(".trShoukuandanwei").css("display", "table-row"); |
| | | $(".shangchanfujian").show(); |
| | | } else { |
| | | |
| | | $(".trShoukuandanwei").css("display", "none"); |
| | | $(".shangchanfujian").hide(); |
| | | } |
| | | |
| | | SelectAddSearch(); |
| | |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | //查看 |
| | | 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: 'https://yocaisim.51zhengcai.com/api/UpFile/UpdateFile', // 替换为你的服务器端点 |
| | | 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('上传失败'); |
| | | } |
| | | |
| | | |
| | | }, |
| | | 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> |
| | |
| | | <textarea id="txtPlanRemark" runat="server" style="width: 390px; height: 50px;" ></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="提交" /> |