123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307 |
- {Template header}
- <body>
- <div class="warp">
- <div class="title" style="height:auto;line-height:28px;padding:15px 0;color:#000"><a href="http://www.aliexpress.com/item/{$commodity['productid']}.html" target="_blank">{$commodity['title']}</a></div>
- <ul class="setting" style="min-width:100%;width:100%;padding:20px 0;">
- <div class="datalist">
- <li class="length">
- <em>所属类目:</em>
- <div class="checkbox">
- {loop typeclass(16) as $val}
- {if $val['id'] != 132}
- <span class="ckrows"><label><input name="category" type="checkbox" value="{$val['id']}" {if stripos($commodity['category'],','.$val['id'].',') !== false}checked{/if}><font>{$val['title']}</font></label></span>
- {/loop}
- {/if}
- </div>
- </li>
- </div>
- <div style="clear:both;"></div>
- </ul>
- <div class="control">
- <a href="javascript:void(0);" class="cdedit">批量修改</a>
- </div>
- <div class="packing">
- <table class="datatitle data" border="0" style="border-collapse:collapse;">
- <tr>
- <td><label onClick="swapCheck()"><input name="checkbox" type="checkbox" class="regular-checkbox"></label></td>
- <td>SKU</td>
- <td>SKU名称</td>
- <td>SKU产品</td>
- <td>操作</td>
- </tr>
- </table>
- <table class="datatext data" border="0" style="border-collapse:collapse;">
- {loop $sku as $val}
- <tr class="{$val['id']}" data-list="{$val['id']}">
- <td><input name="check" type="checkbox" value="{$val['id']}"></td>
- <td>{$val['code']}</td>
- <td>{$val['codeid']}</td>
- <td>{$val['fpdata']}</td>
- <td><span class="commoditysku" data-h="/commodity/skuedit/{$val['id']}" data-t="SKU - 编辑">编 辑</span></td>
- </tr>
- {/loop}
- </table>
- </div>
- <div class="cdread">
- <div class="exp">
- <div class="expwp">
- <ul class="setting">
- <div class="datalist">
- <li class="cike2">
- <em>类 目:</em>
- <select name="category" class="select">
- </select>
- </li>
- <li>
- <em>等 级:</em>
- <select name="grade" class="select">
- <option value="80">9A</option>
- {loop typeclass(13) as $val}
- {if $val['id'] != 80}
- <option value="{$val['id']}">{$val['title']}</option>
- {/if}
- {/loop}
- </select>
- </li>
- <li>
- <em>头发颜色:</em>
- <select name="color" class="select">
- <option value="a">未选择</option>
- <option value="57">Natural Black</option>
- {loop typeclassyc(8) as $val} <!-- 这个是不显示部分颜色 -->
- {if $val['id'] != 57}
- <option value="{$val['id']}">{$val['title']}</option>
- {/if}
- {/loop}
- </select>
- </li>
- <li>
- <em>曲 度:</em>
- <select name="lowe" class="select">
- {loop typeclassyc(15) as $val} <!-- 这个是不显示部分曲度 -->
- <option value="{$val['id']}">{$val['title']}</option>
- {/loop}
- </select>
- </li>
- </div>
- <div class="pttab">
- <select class="none select"><option></option></select>
- <li class="127 none cikeb">
- <em>类 型:</em>
- <select name="type" class="select">
- {loop typeclass(27) as $val}
- <option value="{$val['id']}">{$val['title']}</option>
- {/loop}
- </select>
- </li>
- <li class="127 none">
- <em>头路设计:</em>
- <select name="headroad" class="select">
- <option value="c">未选择</option>
- {loop typeclass(12) as $val}
- <option value="{$val['id']}">{$val['title']}</option>
- {/loop}
- </select>
- </li>
- <li class="127 none">
- <em>密 度:</em>
- <select name="density" class="select">
- <option value="b">未选择</option>
- <option value="71">150%</option>
- {loop typeclass(10) as $val}
- {if $val['id']!=71}
- <option value="{$val['id']}">{$val['title']}</option>
- {/if}
- {/loop}
- </select>
- </li>
- <li class="127 a1 none">
- <em>蕾丝尺寸:</em>
- <select name="lacesize" class="select">
- {loop typeclassyc(25) as $val} <!-- 这个是不显示部分尺寸 -->
- <option value="{$val['id']}">{$val['title']}</option>
- {/loop}
- </select>
- </li>
- <li class="a2 none">
- <em>蕾丝尺寸:</em>
- <select name="lacesize" class="select">
- {loop typeclassyc(26) as $val}
- <option value="{$val['id']}">{$val['title']}</option>
- {/loop}
- </select>
- </li>
- <li class="a3 none">
- <em>蕾丝尺寸:</em>
- <select name="lacesize" class="select">
- <option value="186">4" x 4"</option>
- <option value="191">13" x 4"</option>
- </select>
- </li>
- <li class="128 none">
- <em>头套种类:</em>
- <select name="lacetype" class="select">
- <option value="146">13*4 Lace Front wigs</option>
- {loop typeclassyc(18) as $val}
- {if $val['id']!=146}
- <option value="{$val['id']}">{$val['title']}</option>
- {/if}
- {/loop}
- </select>
- </li>
- <li class="128 none">
- <em>发帽大小:</em>
- <select name="haircap" class="select">
- <option value="30">Medium</option>
- {loop typeclass(6) as $val}
- {if $val['id']!=30}
- <option value="{$val['id']}">{$val['title']}</option>
- {/if}
- {/loop}
- </select>
- </li>
- <li class="128 none">
- <em>密 度:</em>
- <select name="density" class="select">
- <option value="b">未选择</option>
- <option value="72">180%</option>
- {loop typeclass(10) as $val}
- {if $val['id']!=72}
- <option value="{$val['id']}">{$val['title']}</option>
- {/if}
- {/loop}
- </select>
- </li>
- <li class="127 128 none">
- <em>蕾丝颜色:</em>
- <select name="lacecolor" class="select">
- {loop typeclassyc(9) as $val}
- <option value="{$val['id']}">{$val['title']}</option>
- {/loop}
- </select>
- </li>
- <li class="130 none">
- <em>重 量:</em>
- <select name="weight" class="select">
- {loop typeclass(7) as $val}
- <option value="{$val['id']}">{$val['title']}</option>
- {/loop}
- </select>
- </li>
- </div>
- <div style="clear:both;"></div>
- </ul>
- <div class="sonbut"><font class="cdtj">提 交</font> <font class="datasavegb">关 闭</font></div>
- </div>
- </div></div>
- <div class="hidden">
- <input type="hidden" name="id" value="{$commodity['id']}" />
- </div>
- <div class="button"><font class="produtdata">提 交</font> <font class="fh">关 闭</font></div>
- </div>
- <script>
- $(".commoditysku").click(function() {
- $("input[name='t']",window.parent.document).val($(this).data("t"));
- $("input[name='h']",window.parent.document).val($(this).data("h"));
- $(".commodityread",window.parent.document).click();
- });
- var addedit="/commodity/edit/";var fh="/commodity";
- $(document).ready(function() { custom(); });
- function custom() {
- var num = $('.packing .datatitle tr').children().length;
- $('.data tr td').css("width","20%");
- $(".data tr").each(function() {
- $(this).find('td:eq(0)').css("width","2%");
- $(this).find('td:eq(3)').css("width","48%");
- $(this).find('td:eq(4)').css("width","10%");
- });}
- function oMainFn(id,e){
- $("."+id+" td:eq(3)").html(e);
- }
- $(".sonbut .datasavegb").click(function() {
- $(".cdread").hide()});
- $(".cike2 select").change(function(){
- var index = $(this).find("option:selected").val();
- $(".pttab li").hide(); $(".pttab li").removeClass("post");
- $("."+index).show();$("."+index).addClass("post");
- $('.pttab select option:eq(0)').prop('selected','selected');
- if(index == 127)
- {
- $(".pttab .a1").show();$(".pttab .a2").hide();
- }
- });
- //提交时tr增加data信息
- $(".exp").on('click',".cdtj",function() {
- var f = "";var e = "";var o = "";var d = "";
- $(".exp .datalist .select").each(function() {
- if($(this).children("option:selected").val() != 0 || $(this).children("option:selected").val() != '')
- {
- f = f + $(this).children("option:selected").val() + "-";
- e = e + $(this).children("option:selected").text() + " ";
- }
- });
- $(".exp .post .select").each(function() {
- if($(this).children("option:selected").val() != 0 || $(this).children("option:selected").val() != '')
- {
- f = f + $(this).children("option:selected").val() + "-";
- e = e + $(this).children("option:selected").text() + " ";
- }
- });
- $(".datatext input[name='check']:checked").each(function() {
- d = d + $(this).val()+",";
- });
- if($("select[name='category']").val() == "")
- {
- $(".ts p").text($(".datalist .checkbox").prevAll("em").text()+"为必填项");
- $(".ts").show();
- setTimeout('$(".ts").fadeOut()', 600);
- return false;
- }
- else
- {
- layx.load('loadId','处理中');
- $.ajax({
- url: "/commodity/batchedit/",
- data: "data="+f+"&id="+d,
- type: "POST",
- dataType: "json",
- success: function(a) {
- layx.destroy('loadId');
- if (a && a.success) {
- for (i = 0; i < a.rows.length; i++) {
- $(".datatext ." + a.rows[i]["id"] + " td:eq(3)").html(a.rows[i]["title"]);
- };
- }
- else
- {
- $(".ts p").text("操作失败,请重试");
- $(".ts").show();
- setTimeout('$(".ts").fadeOut()', 800);
- }
- }
- });
- $(".cdread").hide()
- }
- });
- </script>
- {Template footer}
|