notice_edit.html 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. {Template header}
  2. <body>
  3. <div class="warp">
  4. <div class="title winnone">消息配置 - 修改</div>
  5. <ul class="setting-UMeditor">
  6. <div class="datalist">
  7. <li class="length">
  8. <em>模板名称:</em>
  9. <input class="must" value="{$notice['title']}" name="title" type="text" >
  10. </li>
  11. <li>
  12. <em>是否启用:</em>
  13. <select name="state" class="select class">
  14. <option value="1" {if $notice['state'] == 1}selected="selected"{/if}>启用</option>
  15. <option value="2" {if $notice['state'] == 2}selected="selected"{/if}>不启用</option>
  16. </select>
  17. </li>
  18. <li>
  19. <em>店铺:</em>
  20. <select name="shop" class="select class">
  21. {loop usershop() as $val}
  22. <option value="{$val['id']}" {if $notice['shop'] == $val['id']}selected="selected"{/if}>{$val['shopname']}</option>
  23. {/loop}
  24. </select>
  25. </li>
  26. <li class="typeemail">
  27. <em>发送方式:</em>
  28. <select name="message" class="select class">
  29. <option value="1" {if $notice['message'] == 1}selected="selected"{/if}>发送邮件</option>
  30. <option value="2" {if $notice['message'] == 2}selected="selected"{/if}>AE站内信</option>
  31. <option value="3" {if $notice['message'] == 3}selected="selected"{/if}>TT会话</option>
  32. </select>
  33. </li>
  34. <div class="pttabemail">
  35. <li class="e1 none">
  36. <em>Email:</em>
  37. <select name="email" class="select class">
  38. {loop $email as $val}
  39. <option value="{$val['id']}" {if $notice['email'] == $val['id']}selected="selected"{/if}>{$val['smtp_user']}</option>
  40. {/loop}
  41. </select>
  42. </li>
  43. </div>
  44. <li class="type">
  45. <em>模板类型:</em>
  46. <select name="type" class="select class">
  47. <option value="1" {if $notice['type'] == 1}selected="selected"{/if}>自动发送</option>
  48. <option value="2" {if $notice['type'] == 2}selected="selected"{/if}>物流追踪</option>
  49. <option value="3" {if $notice['type'] == 3}selected="selected"{/if}>营销</option>
  50. <option value="4" {if $notice['type'] == 4}selected="selected"{/if}>运单号通知</option>
  51. </select>
  52. </li>
  53. </div>
  54. <div class="pttab">
  55. <li class="a1 post">
  56. <em>订单状态:</em>
  57. <select name="ordertatus" class="select class">
  58. {loop typeclass(29,$arg) as $val}
  59. <option value="{$val['id']}" {if $notice['ordertatus'] == $val['id']}selected="selected"{/if}>{if $arg==2}{$val['spare']}{else}{$val['title']}{/if}</option>
  60. {/loop}
  61. </select>
  62. </li>
  63. <li class="a2 none">
  64. <em>物流状态:</em>
  65. <select name="logisticstatus" class="select class">
  66. <option value="2" {if $notice['logisticstatus'] == 2}selected="selected"{/if}>已取件</option>
  67. <option value="3" {if $notice['logisticstatus'] == 3}selected="selected"{/if}>在途中</option>
  68. <option value="4" {if $notice['logisticstatus'] == 4 || $notice['logisticstatus'] == 5}selected="selected"{/if}>即将派送</option>
  69. <!--<option value="5" {if $notice['logisticstatus'] == 5}selected="selected"{/if}>派送中</option>-->
  70. <option value="6" {if $notice['logisticstatus'] == 6}selected="selected"{/if}>已签收</option>
  71. <option value="1" {if $notice['logisticstatus'] == 1}selected="selected"{/if}>派送异常</option>
  72. </select>
  73. </li>
  74. <li class="a3 none">
  75. <em>发送间隔:</em>
  76. <input class="must" value="{$notice['repeattime']}" name="repeattime" type="text" >(天)
  77. </li>
  78. {if $arg > 1}
  79. <li class="a1 post">
  80. <em>替换前内容:</em>
  81. <input value="{$notice['thq']}" name="thq" type="text" >
  82. </li>
  83. <li class="a1 post">
  84. <em>替换后内容:</em>
  85. <input value="{$notice['thh']}" name="thh" type="text" >
  86. </li>
  87. <li class="a1 post">
  88. <em>模板对应类型:</em>
  89. <select name="tab" class="select class">
  90. <option value="0" {if $notice['tab'] == 0}selected="selected"{/if}>常规</option>
  91. <option value="1" {if $notice['tab'] == 1}selected="selected"{/if}>金额大于400美元并且无卖家保障</option>
  92. <option value="4" {if $notice['tab'] == 4}selected="selected"{/if}>Item是1,但Quantity大于等于2并且Bill Address不等于Ship Address</option>
  93. <option value="2" {if $notice['tab'] == 2}selected="selected"{/if}>Item是1,但Quantity大于等于2</option>
  94. <option value="3" {if $notice['tab'] == 3}selected="selected"{/if}>Bill Address不等于Ship Address</option>
  95. </select>
  96. </li>
  97. {/if}
  98. <li class="a4 none">
  99. <em>服务类型:</em>
  100. <div class="checkbox">
  101. <!-- <span><label><input name="checkboxrows" type="checkbox" value=""><font>全选</font></label></span>-->
  102. <span class="ckrows"><label><input name="express" type="checkbox" value="1" {if stripos($notice['express'],',1,') !== false}checked{/if}><font>其它快递</font></label></span>
  103. <span class="ckrows"><label><input name="express" id="usps" type="checkbox" value="2" {if stripos($notice['express'],',2,') !== false}checked{/if}><font>USPS</font></label></span>
  104. </div>
  105. </li>
  106. <li class="a4b1 none">
  107. <em>服务类型:</em>
  108. <div class="checkbox">
  109. <!-- <span><label><input name="checkboxrows" type="checkbox" value=""><font>全选</font></label></span>-->
  110. <span class="ckrows"><label><input name="js" type="checkbox" value="0" {if stripos($notice['js'],',0,') !== false}checked{/if}><font>FIRST CLASS</font></label></span>
  111. <span class="ckrows"><label><input name="js" type="checkbox" value="1" {if stripos($notice['js'],',1,') !== false}checked{/if}><font>PRIORITY</font></label></span>
  112. <span class="ckrows"><label><input name="js" type="checkbox" value="2" {if stripos($notice['js'],',2,') !== false}checked{/if}><font>EXPRESS</font></label></span>
  113. </div>
  114. </li>
  115. </div>
  116. <em class="datalist">
  117. <li>
  118. <em>执行时间范围:</em>
  119. <input id="ktime" class="must" value="{date('Y-m-d',$notice['ktime'])}" name="ktime" type="text" style="width:25%;">
  120. <i class="time fa fa-calendar fa-lg"></i> &nbsp;&nbsp; 至 &nbsp;<input id="jtime" class="must" value="{date('Y-m-d',$notice['jtime'])}" name="jtime" type="text" style="width:25%;"><i class="time fa fa-calendar fa-lg"></i>
  121. </li>
  122. <li class="length words">
  123. <em style="height:160px;">特定标识符:</em>
  124. <span><font>$userName</font> - 客户姓名</span>
  125. <span><font>$firstName</font> - 客户名</span>
  126. <span><font>$orderid</font> - 订单号</span>
  127. <span><font>$trackingNumber</font> - 运单号</span>
  128. <span><font>$expressCompany</font> - 快递公司</span>
  129. <span><font>$expressWebsite</font> - 快递官网</span>
  130. <span><font>$contactPerson</font> - 收件人</span>
  131. <span><font>$mobileNo</font> - 收件人电话</span>
  132. <span><font>$zip</font> - 收件人邮编</span>
  133. <span><font>$country</font> - 收件人国家</span>
  134. <span><font>$province</font> - 收件人州</span>
  135. <span><font>$city</font> - 收件人城市</span>
  136. <span><font>$recipientAddress</font> - 收件人地址</span>
  137. {if $arg > 1}
  138. <span><font>$Sname</font> - Ship Name</span>
  139. <span><font>$Bname</font> - Bill Name</span>
  140. <span><font>$ShipAddress</font> - Ship Address</span>
  141. <span><font>$BillAddress</font> - Bill Address</span>
  142. <span><font>$Quantity</font> - Quantity</span>
  143. <span><font>$parameter</font> - 商品属性</span>
  144. <span><font>$productTitle</font> - 产品标题</span>
  145. {/if}
  146. <span><font>$productInfo</font> - 产品信息</span>
  147. <span><font>$ProductName</font> - 商品名称</span>
  148. <span><font>$ProductSKU</font> - 产品SKU</span>
  149. <span><font>$DeliveryTime</font> - 预计送达时间</span>
  150. </li>
  151. {if $arg > 1}
  152. <li class="length">
  153. <em>邮件标题:</em>
  154. <input value="{$notice['emailtitle']}" name="emailtitle" type="text" placeholder="部分设置不需要则留空">
  155. </li>
  156. {/if}
  157. <textarea name="content" class="none"></textarea>
  158. </em>
  159. <div style="clear:both;"></div>
  160. </ul>
  161. {load_editor('content','-50px','300px',$notice['content']);}
  162. <input id="hide" type="text" style='opacity: 0'>
  163. <div class="hidden"><input type="hidden" name="id" value="{$notice['id']}" /></div>
  164. <div class="button"><font class="produtdata">提 交</font> <font class="fh">关 闭</font></div>
  165. </div>
  166. <script>
  167. $(document).ready(function() {
  168. var index1 = $("select[name=type]").find("option:selected").val();
  169. var index2 = $("select[name=message]").find("option:selected").val();
  170. $(".pttab li").hide(); $(".pttab li").removeClass("post");
  171. $(".pttabemail li").hide(); $(".pttabemail li").removeClass("post");
  172. $(".a"+index1).show();$(".a"+index1).addClass("post");
  173. $(".e"+index2).show();$(".e"+index2).addClass("post");
  174. if($("#usps").prop("checked"))
  175. {
  176. $(".a4b1").show();
  177. $(".a4b1").addClass("post");
  178. }
  179. else
  180. {
  181. $(".a4b1").hide();
  182. $(".a4b1").removeClass("post");
  183. }
  184. });
  185. $(".a4 input").bind("click", function() {
  186. if($("#usps").prop("checked"))
  187. {
  188. $(".a4b1").show();
  189. $(".a4b1").addClass("post");
  190. }
  191. else
  192. {
  193. $(".a4b1").hide();
  194. $(".a4b1").removeClass("post");
  195. }
  196. })
  197. $(".typeemail select").change(function(){
  198. var index = $(this).find("option:selected").val();
  199. $(".pttabemail li").hide(); $(".pttabemail li").removeClass("post");
  200. $(".e"+index).show();$(".e"+index).addClass("post");
  201. $("select[name=carried]").find("option").first().prop("selected", true);
  202. });
  203. $('.words font').click(function(){
  204. $("#hide").val($(this).html());//这里可以获取动态数据赋值给$("#hide").val()
  205. $("#hide").select();
  206. try {var state = document.execCommand("copy");}
  207. catch(err){var state = false;}
  208. if(state){
  209. layx.msg('复制成功!',{dialogIcon:'success'});
  210. }
  211. })
  212. var addedit="/notice/edit/";$(function () { $("#ktime").calendar(); $("#jtime").calendar();$("#marketing").calendar();});</script>
  213. <script type="text/javascript" src="{$theme}js/time.js"></script>
  214. {Template footer}