12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <%@ taglib prefix="s" uri="/struts-tags" %>
- <form id="addConstructionForm" method="post" enctype="multipart/form-data">
- <div class="easyui-tabs" id="tabs">
- <div title="合同信息" id="htxx_update">
- <table class="mytable" style="width: 100%;">
- <tr>
- <th colspan="4">
- <a href="javascript:changeRenovationContract('add');" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true">选择合同</a>
- </th>
- </tr>
- <tr>
- <th width="15%">合同编号</th>
- <td width="35%">
- <span id="number_add"></span>
- </td>
- <th width="15%">合同名称</th>
- <td width="35%">
- <span id="name_add"></span>
- <input type="hidden" name="construction.renovationContract.id" id="renovationContractId_add">
- </td>
- </tr>
- <tr>
- <th>装修单位</th>
- <td colspan="3">
- <span id="companyName_add"></span>
- </td>
- </tr>
- <tr>
- <th>施工时间</th>
- <td colspan="3">
- <input class="easyui-datebox" id="contractDate_add" name="construction.constructionDate">
- </td>
- </tr>
- <tr>
- <th>施工内容</th>
- <td colspan="3">
- <textarea rows="4" cols="" style="width: 100%" name="construction.content" id="content_id"></textarea>
- </td>
- </tr>
- </table>
- </div>
- <div title="图片上传" id="htwj_add">
- <table class="mytable" style="width: 100%;">
- <tr>
- <th width="20%">材料进出图片</th>
- <td width="80%">
- <span id="materialFile_add_file">
- <input type="button" value="上传" onclick="materialFile_add.click()">
- <input type="file" multiple name="materialFile" id="materialFile_add" class="easyui-validatebox" style="float:left;width:0px">
- </span>
- </td>
- </tr>
- </table>
- </div>
- </div>
- </form>
- <script type="text/javascript">
- var getObjectURL = function (file) {
- var url = null;
- if (window.createObjectURL != undefined) {
- url = window.createObjectURL(file);
- } else if (window.URL != undefined) {
- url = window.URL.createObjectURL(file);
- } else if (window.webkitURL != undefined) {
- url = window.webkitURL.createObjectURL(file);
- }
- return url;
- }
- //本地预览故障照片
- $(function () {
- $("#materialFile_add").change(function(){
- $("#materialFile_add_file").children('div').remove();
- for(var i=0;i<this.files.length;i++){
- var $image = $("<div style='width: 120px;height: 80px;float:left;'><a href='" + getObjectURL(this.files[i]) + "' rel='lightbox[materialFile_add]'><img src='" + getObjectURL(this.files[i]) + "' width='120' height='80'/></a></div>");
- $("#materialFile_add_file").append ($image);
- }
- })
- });
- var removeImg1=function(id){
- $("#img" + id).parent().remove();
-
- }
- </script>
|