123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- {Template header}
- <body>
- <div class="warp">
- <ul class="setting">
- <li class="length"><em>文档:</em>
- <input value="{$color['wdurl']}" name="wdurl" type="hidden">
- <font class="scwd">点击上传文档</font>
- <font class="wdxz">
- {if $color['wdurl'] != ''}<a href="{$color['wdurl']}" style="color:#F33"><i class="fa fa-file-text"></i> 下载文档</a> <font class='delwd'>X</font>
- {/if}
- </font>
- </li>
- <li>
- <em>标题:</em>
- <input type="text" name="title" value="{$color['title']}" class='must' />
- </li>
- <li>
- <em>配图类型:</em>
- <select name="type" id="type" class="select class">
- <option value="0" {if $color['type'] == 0}selected="selected"{/if}>未选择</option>
- <option value="1" {if $color['type'] == 1}selected="selected"{/if}>编号款配图</option>
- <option value="2" {if $color['type'] == 2}selected="selected"{/if}>颜色配图</option>
- <option value="3" {if $color['type'] == 3}selected="selected"{/if}>曲度配图</option>
- <option value="5" {if $color['type'] == 5}selected="selected"{/if}>化纤编号款</option>
- <option value="6" {if $color['type'] == 6}selected="selected"{/if}>化纤颜色</option>
- <option value="4" {if $color['type'] == 4}selected="selected"{/if}>其他配图</option>
- </select>
- </li>
- <li>
- <em>色号:</em>
- <input type="text" name="color" value="{$color['color']}" />
- </li>
- <li>
- <em>曲度:</em>
- <input type="text" name="lowe" value="{$color['lowe']}"/>
- </li>
- <li>
- <em>开发人:</em>
- <input type="text" name="developer" value="{$color['developer']}" />
- </li>
- <li>
- <em>是否在售:</em>
- <select name="state" id="state" class="select class">
- <option value="0" {if $color['state'] == 0}selected="selected"{/if}>未选择</option>
- <option value="1" {if $color['state'] == 1}selected="selected"{/if}>在售款</option>
- <option value="2" {if $color['state'] == 2}selected="selected"{/if}>已停售</option>
- </select>
- </li>
- <li class="length scimg">
- <span class="upimg">{$color['img']}</span>
- <font>+</font>
- </li>
- <li class="length remark">
- <em>情况备注:</em>
- <textarea name="content" style="height:75px;">{$color['content']}</textarea>
- </li>
- <li class="length">
- <em>工艺流程:</em>
- <textarea name="craft_process" style="height:75px;">{$color['craft_process']}</textarea>
- </li>
- <div style="clear:both;"></div>
- </ul>
- <input type="hidden" name="id" value="{$color['id']}" />
- <div class="button"><font class="datasave">提 交</font> <font class="fh">关 闭</font></div>
- </div>
- <div style="display:none;">
- <input id="upload-file" name="files" accept="image/xls,image/xlsx" type="file">
- </div>
- <script>var addedit="/color/edit/";
- var scwd = "/fullorderexcel/scwd";
- $(document).ready(function() {
- var button = $(".scimg font"), interval;
- var fileType = "pic", fileNum = "one";
- new AjaxUpload(button, {
- action: "/img/",
- name: "userfile",
- onSubmit: function(file, ext) {
- if (fileType == "pic") {
- if (ext && /^(jpg|png|jpeg|gif)$/.test(ext)) {
- this.setData({
- info: "文件类型为图片"
- });
- }
- else if (ext && /^(3gp|rmvb|flv|wmv|avi|mkv|mp4|mp3|wav)$/.test(ext)) {
- this.setData({
- info: "文件类型为视频"
- });
- } else {
- alert("提示:您上传的是非图片或视频类型!");
- return false;
- }
- }
- $(".scimg font").hide();
- $(".loadimg").show();
- layx.load('loadId','上传中');
- if (fileNum == "one") {
- this.disable();
- }
- },
- onComplete: function(file, response) {
- eval("var obj=" + response);
- layx.destroy('loadId');
- if (obj.ok)
- {
- if (/^(.jpg|.png|.jpeg|.gif)$/.test(obj.lx))
- {
- $(".scimg .upimg").append('<span class="deldata"><a href="'+ obj.filename +'" target="_blank"><img src="{site_url("img/thumb")}?src='+ obj.filename +'&w=500&h=500"></a><em style="width:30px;height:30px;line-height:30px;text-align: center;display: inline-block;position: absolute;top: 0px;right: 20px;z-index: 10;background-color: #FFF;cursor: pointer;" title="点击删除">X</em></span>');
- }
- else if (/^(.3gp|.rmvb|.flv|.wmv|.avi|.mkv|.mp4|.mp3|.wav)$/.test(obj.lx))
- {
- $(".scimg .upimg").append('<span class="deldata"><video src="'+ obj.filename +'" controls="controls"></video><em style=”width:30px;height:30px;line-height:30px;text-align: center;display: inline-block;position: absolute;top: 0px;right: 20px;z-index: 10;background-color: #FFF;cursor: pointer;" title="点击删除">X</em></span>');
- }
- }
- else
- {
- $(".ts p").html(obj.msg);
- $(".ts").fadeIn();
- setTimeout('$(".ts").fadeOut()', 800);
- }
- $(".loadimg").hide();
- $(".scimg font").show();
- window.clearInterval(interval);
- this.enable();
- }
- });
- });
- $(document).on("click", ".scimg .upimg .deldata em", function() {
- $(this).parent(".deldata").remove();
- });
- $(document).on("click", ".scimg .upimg .deldata em", function() {
- $(this).parent(".deldata").remove();
- });
- </script>
- <script type="text/javascript" src="{$theme}js/ajaxupload.3.5.js"></script>
- {Template footer}
|