| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230 |
- {% extends 'admin/a_admindefault.html' %}
- {% block mycss%}
- <script src="//cdn.ckeditor.com/4.4.6/full/ckeditor.js"></script>
- <script type="text/javascript" src="/static/js/jquery-1.7.2.min.js"></script>
- <script type="text/javascript">
- //选择图片
- $(function(){
- $("#file_proimg").change(function(){
- //alert($(this).val());
- $("#txt_RTImage").val($(this).val());
- var objUrl=getObjectURL(this.files[0]);
- //console.log("objUrl="+objUrl);
- if(objUrl){
- $("#img_proimg").attr("src",objUrl);
- $("#file_proimg").attr("src",objUrl);
- }
- })
- //建立一個可存取到該file的url
- function getObjectURL(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 ;
- }
- })
- </script>
- {% endblock %}
- {% block middle %}
- <div class="content">
- <div class="page-inner">
- <div class="page-header">
- <h4 class="page-title">
- {% if status=='add' %}
- 添加专利信息
- {% elif status=='edit' %}
- 编辑专利信息
- {% endif %}</h4>
- </div>
- <div class="row">
- <div class="col-md-12">
- {% with messages = get_flashed_messages() %}
- {% if messages %}
- {% for message in messages %}
- <p>{{ message }}</p>
- {% endfor %}
- {% endif %}
- {% endwith %}
- <form action="/editpatentinfo.do" method="post" enctype="multipart/form-data">
- <div class="modal-body">
- <input type="hidden" name="lbl_status" value="{{ status }}"/>
- <input type="hidden" name="lbl_PatentID" {% if status=='edit' %} value="{{patentinfo[0]}}"
- {%endif%}/>
- <div class="row">
- <div class="col-sm-6">
- <div class="form-group form-group-default">
- <label>
- 所属课题</label>
- {% if status=='add' %}
- <select name="txt_RTID" class="form-control">
- {% for row in researchtopic %}
- <option value="{{row[0]}}">{{row[2]}}</option>
- {% endfor %}
- </select>
- {% elif status=='edit' %}
- <select name="txt_RTID" class="form-control">
- {% for row in researchtopic %}
- <option value="{{row[0]}}" {% if patentinfo[1]== row[0] %} selected {% else%}
- {%endif%}>{{row[2]}}
- </option>
- {% endfor %}
- </select>
- {% endif %}
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group form-group-default">
- <label>
- 专利名称: </label>
- <input name="txt_PatentName" type="text" class="form-control" placeholder="填写专利名称" {% if
- status=='edit' %} value="{{patentinfo[2]}}" {%endif%}>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group form-group-default">
- <label>专利类型</label>
- <input name="txt_PatentType" type="radio" value="1" checked {% if status=='edit' %} {%
- if patentinfo[8]==1 %} checked {%endif %} {%endif %}>发明专利
- <input name="txt_PatentType" type="radio" value="2" {% if status=='edit' %} {% if
- patentinfo[8]==2 %} checked {%endif %} {%endif %}>实用新型专利
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group form-group-default">
- <label>申请进度:</label>
- <select id="txt_PatentStatus" name="txt_PatentStatus" class="form-control">
- <option value="1" {% if status=='edit' %} {% if patentinfo[13]==1 %} selected {%
- else %} {% endif%} {% endif%}>进入实审
- </option>
- <option value="2" {% if status=='edit' %} {% if patentinfo[13]==2 %} selected {%
- else %} {% endif%} {% endif%}>已公开
- </option>
- </select>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group form-group-default">
- <label>
- 申请号: </label>
- <input name="txt_AppNo" type="text" class="form-control" placeholder="填写申请号" {%
- if status=='edit' %} value="{{patentinfo[3]}}" {%endif%}>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group form-group-default">
- <label>
- 公开号: </label>
- <input name="txt_PubNo" type="text" class="form-control" placeholder="填写公开号"
- {% if status=='edit' %} value="{{patentinfo[4]}}" {%endif%}>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group form-group-default">
- <label>
- 申请日期: </label>
- <input name="txt_AppDate" type="text" class="form-control"
- placeholder="请填写申请日期,格式为YYYY-MM-DD" {% if status=='edit' %}
- value="{{patentinfo[9]}}" {%endif%}>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group form-group-default">
- <label>
- 公开日期: </label>
- <input name="txt_PubDate" type="text" class="form-control" placeholder="请填写公开日期,格式为YYYY-MM-DD"
- {% if status=='edit' %} value="{{patentinfo[10]}}" {%endif%}>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group form-group-default">
- <label>
- 发明人: </label>
- <input name="txt_Patentee" type="text" class="form-control"
- placeholder="请填写发明人" {% if status=='edit' %} value="{{patentinfo[11]}}"
- {%endif%}>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group form-group-default">
- <label>
- 作者列表: </label>
- <input name="txt_Authors" type="text" class="form-control" placeholder="填写作者列表,用英文逗号隔开"
- {% if status=='edit' %} value="{{patentinfo[12]}}" {%endif%}>
- </div>
- </div>
- <div class="col-sm-12">
- <div class="form-group form-group-default">
- <label>
- 摘要: </label>
- <textarea name="txt_PatentAbstract" rows="5" cols="20" style="width: 100%">{% if status=='edit' %} {{patentinfo[5]}} {%endif%}</textarea>
- </div>
- </div>
- <div class="col-sm-12">
- <div class="form-group form-group-default">
- <label>
- 专利封面图片: </label>
- <input id="file_proimg" name="file_proimg" type="file" size="30"/>
- <input id="txt_PatentImage" name="txt_PatentImage" type="text" class="form-control" placeholder="请上传专利图片"
- {% if status =='add' %} value="" {% else %} value="{{patentinfo[6]}}" {% endif %}/>
- <img id="img_proimg" name="img_proimg" style="height:100px; width:200px" {% if status =='add' %} src="" {% else %} src="/{{patentinfo[6]}}"{% endif %}/>
- </div>
- </div>
- <div class="col-sm-12">
- <div class="form-group form-group-default">
- <label>
- 专利内容: </label>
- <textarea name="txt_PatentConent" id="txt_PConent" class="ckeditor" rows="10" cols="80">
- {% if status=='edit' %} {{patentinfo[7]}} {%endif%}
- </textarea>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group form-group-default">
- <label>显示状态:</label>
- <select id="txt_PStatus" name="txt_PStatus" class="form-control">
- <option value="1" {% if status=='edit' %} {% if patentinfo[14]==1 %} selected {%
- else %} {% endif%} {% endif%}>显示
- </option>
- <option value="0" {% if status=='edit' %} {% if patentinfo[14]==0 %} selected {%
- else %} {% endif%} {% endif%}>不显示
- </option>
- </select>
- </div>
- </div>
- </div>
- </div>
- <div class="modal-footer no-bd">
- <button type="submit" class="btn btn-primary">
- 保存
- </button>
- <a href="/patentinfomanage">
- <button type="button" class="btn btn-danger" data-dismiss="modal">
- 返回
- </button>
- </a>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- </div>
- {% endblock %}
|