| | |
| | | |
| | | <tr> |
| | | <td class="ali03">收款单位:</td> |
| | | <td> <select keepdefaultstyle='true' id='selSuppliers' runat="server" datatextfield='Name' datavaluefield='Keyid' onchange='custormerChange(this)' class='Sreq' sign="" selinputhtml="True" style=" width:183px;" > |
| | | </select></td> |
| | | <td> <%--<select keepdefaultstyle='true' id='selSuppliers' runat="server" datatextfield='Name' datavaluefield='Keyid' onchange='custormerChange(this)' class='Sreq' sign="" selinputhtml="True" style=" width:183px;" > |
| | | </select>--%> |
| | | <input id='txtSupplierName' runat="server" maxlength='50' placeholder="请输入收款单位" style="width:200px;" readonly="readonly" /> |
| | | <input type="hidden" id='selSuppliersss' runat="server" /> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="ali03">金额:</td> |
| | | <td> <input id='txtZengjianmoney' runat="server" maxlength='18' onblur="validateAmount(event)" placeholder="请输入金额" /></td> |
| | | <td> <input id='txtZengjianmoney' runat="server" maxlength='18' onblur="validateAmount(event)" placeholder="请输入金额" readonly="readonly" /></td> |
| | | </tr> |
| | | <tr> |
| | | <td class="ali03">户名:</td> |
| | | <td> <input id='txtHuming' runat="server" maxlength='50' placeholder="请输入户名" style="width:200px;" /></td> |
| | | </tr> |
| | | <tr> |
| | | <td class="ali03">开户行:</td> |
| | | <td> <input id='txtBank' runat="server" maxlength='50' placeholder="请输入开户行" /></td> |
| | | <td> <input id='txtBank' runat="server" maxlength='50' placeholder="请输入开户行" style="width:200px;" /></td> |
| | | </tr> |
| | | <tr> |
| | | <td class="ali03">账号:</td> |
| | | <td> <input id='txtAccountID' runat="server" maxlength='50' placeholder="请输入账号" /></td> |
| | | <td> <input id='txtAccountID' runat="server" maxlength='50' placeholder="请输入账号" style="width:200px;" /></td> |
| | | </tr> |
| | | <tr> |
| | | <td class="ali03">订单:</td> |
| | | <td> <span id="ordernos" runat="server" ></span></td> |
| | | </tr> |
| | | <tr style="display:none;"> |
| | | <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> |
| | |
| | | if (jobj != '-2') { |
| | | document.getElementById('txtBank').value = jobj.Bank; |
| | | document.getElementById('txtAccountID').value = jobj.AccountID; |
| | | if (jobj.Huming == "") { |
| | | document.getElementById('txtHuming').value = jobj.Name; |
| | | } else { |
| | | document.getElementById('txtHuming').value = jobj.Huming; |
| | | } |
| | | |
| | | } else { |
| | | document.getElementById('txtBank').value = ""; |
| | | document.getElementById('txtAccountID').value = ""; |
| | | document.getElementById('txtHuming').value = ""; |
| | | } |
| | | |
| | | |
| | |
| | | alert('请输入有效的正负金额,例如 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> |