123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- {Template header}
- <body>
- <div class="warp">
- <ul class="setting">
- <li class="length"><em>文档:</em>
- <input value="" name="wdurl" type="hidden">
- <font class="scwd">点击上传文档</font>
- <font class="wdxz"></font>
- </li>
- <li>
- <em>标题:</em>
- <input value="" name="title" type="text" class='must'>
- </li>
- <li>
- <em>配图类型:</em>
- <select name="type" id="type" class="select class">
- <option value="0">未选择</option>
- <option value="1">编号款配图</option>
- <option value="2">颜色配图</option>
- <option value="3">曲度配图</option>
- <option value="5">化纤编号款</option>
- <option value="6">化纤颜色</option>
- <option value="4">其他配图</option>
- </select>
- </li>
- <li>
- <em>色号:</em>
- <input type="text" name="color" value="" />
- </li>
- <li>
- <em>曲度:</em>
- <input type="text" name="lowe" value="" />
- </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">未选择</option>
- <option value="1">在售款</option>
- <option value="2">已停售</option>
- </select>
- </li>
- <li class="length scimg">
- <span class="upimg"></span>
- <font>+</font>
- </li>
- <li class="length remark">
- <em>情况备注:</em>
- <textarea name="content" style="height:75px;"></textarea>
- </li>
- <li class="length">
- <em>工艺流程:</em>
- <textarea name="craft_process" style="height:75px;"></textarea>
- </li>
- <div style="clear:both;"></div>
- </ul>
- <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/add/";
- 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 span").append('<img src="' + obj.filename + '" title="点击图片删除">');
- }
- else if (/^(.3gp|.rmvb|.flv|.wmv|.avi|.mkv|.mp4|.mp3|.wav)$/.test(obj.lx))
- {
- $(".scimg span").append('<video src="' + obj.filename + '" controls="controls"></video>');
- }
- }
- 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 img", function() {
- $(this).remove();
- });
- $(document).on("click", ".scimg .upimg video", function() {
- $(this).remove();
- });
- </script>
- <script type="text/javascript" src="{$theme}js/ajaxupload.3.5.js"></script>
- {Template footer}
|