人人商城

notice.html 68KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124
  1. {template '_header'}
  2. <style>
  3. .select2 {width: 100%;}
  4. {if !empty($opensms)}
  5. .w200 {width:250px;}
  6. {else}
  7. .w200 {width: 550px;}
  8. {/if}
  9. .w60 {width: 70px; text-align: right;}
  10. .form-horizontal .form-group {margin-left: 0; margin-right: 0;}
  11. .table > thead > tr > th {border:none;}
  12. .is_advanced {display: table-block;}
  13. #openids_selector .input-group {width: 100%;}
  14. #openids2_selector .input-group {width: 100%;}
  15. #openids3_selector .input-group {width: 100%;}
  16. .is_sms {display: {if !empty($opensms)}table-block{else}none{/if};}
  17. </style>
  18. <div class="page-heading">
  19. <h2>消息提醒设置</h2>
  20. </div>
  21. <div class="alert alert-info">
  22. <h3>注意:</h3>
  23. <p>请将公众平台模板消息所在行业选择为:<b> IT科技/互联网|电子商务 其他|其他</b>,所选行业不一致将会导致模板消息不可用。</p>
  24. <p>点击模板消息后方的开关按钮<img src="../addons/ewei_shopv2/static/images/on-off.png" />即可<b>开启模板消息</b>,无需进行额外设置。</p>
  25. <p>如需进行消息推送<b>个性化消息</b>,<a href="{php echo webUrl('sysset/tmessage')}" title="模板消息库">点击进入自定义消息库</a>{if $opensms},<a href="{php echo webUrl('sysset/sms')}" title="短信消息库">点击进入短信消息库</a>{/if}</p>
  26. </div>
  27. <form action="" method="post" class="form-horizontal form-validate" enctype="multipart/form-data" >
  28. <table class="table table-responsive">
  29. <thead>
  30. <th>卖家通知</th>
  31. <th class="w200">模板消息</th>
  32. <th class="w60"></th>
  33. <th class="w200 is_sms">短信模板</th>
  34. <th class="w60 is_sms"></th>
  35. </thead>
  36. <tbody>
  37. <tr>
  38. <td>订单付款通知</td>
  39. <td>
  40. <select class="select2 is_advanced" name="data[saler_pay_template]">
  41. <option value=''>[默认]订单付款通知</option>
  42. {loop $template_group['saler_pay'] $template_val}
  43. <option value="{$template_val['id']}" {if $data['saler_pay_template'] == $template_val['id'] }selected{/if}>{$template_val['title']}</option>
  44. {/loop}
  45. </select>
  46. </td>
  47. <td style="text-align: right;" class="is_advanced">
  48. <label class="notice-default">
  49. <input type="hidden" name="data[saler_pay_close_advanced]" value="{php echo intval($data['saler_pay_close_advanced'])}" />
  50. <input class="js-switch small checkone" data-type="tpl-advanced" data-tag="saler_pay" type="checkbox" value="{php echo intval($data['saler_pay_close_advanced'])}" {if empty($data['saler_pay_close_advanced'])}checked{/if}/>
  51. </label>
  52. <label style="display: none;">
  53. <img src="../addons/ewei_shopv2/static/images/loading.gif" width="20" alt=""/>
  54. </label>
  55. </td>
  56. <td class="is_sms">
  57. <select class="select2" name="data[saler_pay_sms]">
  58. <option value=''>从短信消息库中选择</option>
  59. {loop $template_sms $template_val}
  60. <option value="{$template_val['id']}" {if $data['saler_pay_sms'] == $template_val['id'] }selected{/if}>{$template_val['name']}</option>
  61. {/loop}
  62. </select>
  63. </td>
  64. <td style="text-align: right;" class="is_sms">
  65. <input type="hidden" name="data[saler_pay_close_sms]" value="{php echo intval($data['saler_pay_close_sms'])}" />
  66. <input class="js-switch small checkone" data-type="sms" type="checkbox" value="{php echo intval($data['saler_pay_close_sms'])}" {if empty($data['saler_pay_close_sms'])}checked{/if}/>
  67. </td>
  68. </tr>
  69. <tr>
  70. <td style="vertical-align: top;">选择通知人-<br/>订单付款通知</td>
  71. <td colspan="{if !empty($opensms)}4{else}2{/if}" class="colstd">
  72. {php echo tpl_selector('openids',array('key'=>'openid','text'=>'nickname', 'thumb'=>'avatar','multi'=>1,'placeholder'=>'昵称/姓名/手机号','buttontext'=>'选择通知人', 'items'=>$salers,'url'=>webUrl('member/query') ))}
  73. <span class='help-block'>订单生成后以模板消息的方式商家通知,可以指定多个人,如果不填写则不通知</span>
  74. </td>
  75. <td class="is_default is_sms"></td>
  76. </tr>
  77. <tr>
  78. <td style="vertical-align: top;">填写通知人-<br/>订单付款短信</td>
  79. <td colspan="{if !empty($opensms)}4{else}2{/if}" class="colstd">
  80. <textarea class="form-control" name="data[mobile]" style="resize: none; padding: 6px;" rows="3">{$data['mobile']}</textarea>
  81. <span class='help-block'>订单生成后以短信的方式商家通知,如果不填写则不通知(11位手机号,多个请以英文逗号隔开)</span>
  82. </td>
  83. <td class="is_default is_sms"></td>
  84. </tr>
  85. <tr>
  86. <td>订单收货通知</td>
  87. <td>
  88. <select class="select2 is_advanced" name="data[saler_finish_template]">
  89. <option value=''>[默认]订单收货通知</option>
  90. {loop $template_group['saler_finish'] $template_val}
  91. <option value="{$template_val['id']}" {if $data['saler_finish_template'] == $template_val['id'] }selected{/if}>{$template_val['title']}</option>
  92. {/loop}
  93. </select>
  94. </td>
  95. <td style="text-align: right;" class="is_advanced">
  96. <label class="notice-default">
  97. <input type="hidden" name="data[saler_finish_close_advanced]" value="{php echo intval($data['saler_finish_close_advanced'])}" />
  98. <input class="js-switch small checkone" data-type="tpl-advanced" data-tag="saler_finish" type="checkbox" value="{php echo intval($data['saler_finish_close_advanced'])}" {if empty($data['saler_finish_close_advanced'])}checked{/if}/>
  99. </label>
  100. <label style="display: none;">
  101. <img src="../addons/ewei_shopv2/static/images/loading.gif" width="20" alt=""/>
  102. </label>
  103. </td>
  104. <td class="is_sms">
  105. <select class="select2" name="data[saler_finish_sms]">
  106. <option value=''>从短信消息库中选择</option>
  107. {loop $template_sms $template_val}
  108. <option value="{$template_val['id']}" {if $data['saler_finish_sms'] == $template_val['id'] }selected{/if}>{$template_val['name']}</option>
  109. {/loop}
  110. </select>
  111. </td>
  112. <td style="text-align: right;" class="is_sms">
  113. <input type="hidden" name="data[saler_finish_close_sms]" value="{php echo intval($data['saler_finish_close_sms'])}" />
  114. <input class="js-switch small checkone" data-type="sms" type="checkbox" value="{php echo intval($data['saler_finish_close_sms'])}" {if empty($data['saler_finish_close_sms'])}checked{/if}/>
  115. </td>
  116. </tr>
  117. <tr>
  118. <td style="vertical-align: top;">选择通知人-<br/>订单收货通知</td>
  119. <td colspan="{if !empty($opensms)}4{else}2{/if}" class="colstd">
  120. {php echo tpl_selector('openids2',array('key'=>'openid','text'=>'nickname', 'thumb'=>'avatar','multi'=>1,'placeholder'=>'昵称/姓名/手机号','buttontext'=>'选择通知人', 'items'=>$salers2,'url'=>webUrl('member/query') ))}
  121. <span class='help-block'>订单生成后以模板消息的方式商家通知,可以指定多个人,如果不填写则不通知</span>
  122. </td>
  123. <td class="is_default is_sms"></td>
  124. </tr>
  125. <tr>
  126. <td style="vertical-align: top;">填写通知人-<br/>订单收货短信</td>
  127. <td colspan="{if !empty($opensms)}4{else}2{/if}" class="colstd">
  128. <textarea class="form-control" name="data[mobile2]" style="resize: none; padding: 6px;" rows="3">{$data['mobile2']}</textarea>
  129. <span class='help-block'>订单生成后以短信的方式商家通知,如果不填写则不通知(11位手机号,多个请以英文逗号隔开)</span>
  130. </td>
  131. <td class="is_default is_sms"></td>
  132. </tr>
  133. <tr>
  134. <td>库存预警通知</td>
  135. <td>
  136. <select class="select2 is_advanced" name="data[saler_stockwarn_template]">
  137. <option value=''>[默认]库存预警通知</option>
  138. {loop $template_group['saler_stockwarn'] $template_val}
  139. <option value="{$template_val['id']}" {if $data['saler_stockwarn_template'] == $template_val['id'] }selected{/if}>{$template_val['title']}</option>
  140. {/loop}
  141. </select>
  142. </td>
  143. <td style="text-align: right;" class="is_advanced">
  144. <label class="notice-default">
  145. <input type="hidden" name="data[saler_stockwarn_close_advanced]" value="{php echo intval($data['saler_stockwarn_close_advanced'])}" />
  146. <input class="js-switch small checkone" data-type="tpl-advanced" data-tag="saler_stockwarn" type="checkbox" value="{php echo intval($data['saler_stockwarn_close_advanced'])}" {if empty($data['saler_stockwarn_close_advanced'])}checked{/if}/>
  147. </label>
  148. <label style="display: none;">
  149. <img src="../addons/ewei_shopv2/static/images/loading.gif" width="20" alt=""/>
  150. </label>
  151. </td>
  152. <td class="is_sms">
  153. <select class="select2" name="data[saler_stockwarn_sms]">
  154. <option value=''>从短信消息库中选择</option>
  155. {loop $template_sms $template_val}
  156. <option value="{$template_val['id']}" {if $data['saler_stockwarn_sms'] == $template_val['id'] }selected{/if}>{$template_val['name']}</option>
  157. {/loop}
  158. </select>
  159. </td>
  160. <td style="text-align: right;" class="is_sms">
  161. <input type="hidden" name="data[saler_stockwarn_close_sms]" value="{php echo intval($data['saler_stockwarn_close_sms'])}" />
  162. <input class="js-switch small checkone" data-type="sms" type="checkbox" value="{php echo intval($data['saler_stockwarn_close_sms'])}" {if empty($data['saler_stockwarn_close_sms'])}checked{/if}/>
  163. </td>
  164. </tr>
  165. <tr>
  166. <td style="vertical-align: top;">选择通知人-<br/>订单收货通知</td>
  167. <td colspan="{if !empty($opensms)}4{else}2{/if}" class="colstd">
  168. {php echo tpl_selector('openids3',array('key'=>'openid','text'=>'nickname', 'thumb'=>'avatar','multi'=>1,'placeholder'=>'昵称/姓名/手机号','buttontext'=>'选择通知人', 'items'=>$salers3,'url'=>webUrl('member/query') ))}
  169. <span class='help-block'>订单生成后以模板消息的方式商家通知,可以指定多个人,如果不填写则不通知</span>
  170. </td>
  171. <td class="is_default is_sms"></td>
  172. </tr>
  173. <tr>
  174. <td style="vertical-align: top;">填写通知人-<br/>订单收货短信</td>
  175. <td colspan="{if !empty($opensms)}4{else}2{/if}" class="colstd">
  176. <textarea class="form-control" name="data[mobile3]" style="resize: none; padding: 6px;" rows="3">{$data['mobile3']}</textarea>
  177. <span class='help-block'>订单生成后以短信的方式商家通知,如果不填写则不通知(11位手机号,多个请以英文逗号隔开)</span>
  178. </td>
  179. <td class="is_default is_sms"></td>
  180. </tr>
  181. <tr>
  182. <td>商品付款通知</td>
  183. <td>
  184. <select class="select2 is_advanced" name="data[saler_goodpay_template]">
  185. <option value=''>[默认]商品付款通知</option>
  186. {loop $template_group['saler_goodpay'] $template_val}
  187. <option value="{$template_val['id']}" {if $data['saler_goodpay_template'] == $template_val['id'] }selected{/if}>{$template_val['title']}</option>
  188. {/loop}
  189. </select>
  190. </td>
  191. <td style="text-align: right;" class="is_advanced">
  192. <label class="notice-default">
  193. <input type="hidden" name="data[saler_goodpay_close_advanced]" value="{php echo intval($data['saler_goodpay_close_advanced'])}" />
  194. <input class="js-switch small checkone" data-type="tpl-advanced" data-tag="saler_goodpay" type="checkbox" value="{php echo intval($data['saler_goodpay_close_advanced'])}" {if empty($data['saler_goodpay_close_advanced'])}checked{/if}/>
  195. </label>
  196. <label style="display: none;">
  197. <img src="../addons/ewei_shopv2/static/images/loading.gif" width="20" alt=""/>
  198. </label>
  199. </td>
  200. <td class="is_sms">
  201. <select class="select2" name="data[saler_goodpay_sms]">
  202. <option value=''>从短信消息库中选择</option>
  203. {loop $template_sms $template_val}
  204. <option value="{$template_val['id']}" {if $data['saler_goodpay_sms'] == $template_val['id'] }selected{/if}>{$template_val['name']}</option>
  205. {/loop}
  206. </select>
  207. </td>
  208. <td style="text-align: right;" class="is_sms">
  209. <input type="hidden" name="data[saler_goodpay_close_sms]" value="{php echo intval($data['saler_goodpay_close_sms'])}" />
  210. <input class="js-switch small checkone" data-type="sms" type="checkbox" value="{php echo intval($data['saler_goodpay_close_sms'])}" {if empty($data['saler_goodpay_close_sms'])}checked{/if}/>
  211. </td>
  212. </tr>
  213. </tbody>
  214. </table>
  215. <div class="form-group splitter"></div>
  216. <table class="table table-responsive">
  217. <thead>
  218. <th>买家通知 - 订单通知</th>
  219. <th class="w200">模板消息</th>
  220. <th class="w60 is_advanced"><!--<input class="js-switch small checkall" data-type="tpl-advanced" type="checkbox" />--></th>
  221. <th class="w200 is_sms">短信模板</th>
  222. <th class="w60 is_sms"><input class="js-switch small checkall" data-type="sms" type="checkbox" /></th>
  223. </thead>
  224. <tbody>
  225. <tr>
  226. <td>自提订单提交成功通知</td>
  227. <td>
  228. <select class="select2 is_advanced" name="data[carrier_template]">
  229. <option value=''>[默认]自提订单提交成功通知</option>
  230. {loop $template_group['carrier'] $template_val}
  231. <option value="{$template_val['id']}" {if $data['carrier_template'] == $template_val['id'] }selected{/if}>{$template_val['title']}</option>
  232. {/loop}
  233. </select>
  234. </td>
  235. <td style="text-align: right;" class="is_advanced">
  236. <label class="notice-default">
  237. <input type="hidden" name="data[carrier_close_advanced]" value="{php echo intval($data['carrier_close_advanced'])}" />
  238. <input class="js-switch small checkone" data-type="tpl-advanced" data-tag="carrier" type="checkbox" value="{php echo intval($data['carrier_close_advanced'])}" {if empty($data['carrier_close_advanced'])}checked{/if}/>
  239. </label>
  240. <label style="display: none;">
  241. <img src="../addons/ewei_shopv2/static/images/loading.gif" width="20" alt=""/>
  242. </label>
  243. </td>
  244. <td class="is_sms">
  245. <select class="select2" name="data[carrier_sms]">
  246. <option value=''>从短信消息库中选择</option>
  247. {loop $template_sms $template_val}
  248. <option value="{$template_val['id']}" {if $data['carrier_sms'] == $template_val['id'] }selected{/if}>{$template_val['name']}</option>
  249. {/loop}
  250. </select>
  251. </td>
  252. <td style="text-align: right;" class="is_sms">
  253. <input type="hidden" name="data[carrier_close_sms]" value="{php echo intval($data['carrier_close_sms'])}" />
  254. <input class="js-switch small checkone" data-type="sms" type="checkbox" value="{php echo intval($data['carrier_close_sms'])}" {if empty($data['carrier_close_sms'])}checked{/if}/>
  255. </td>
  256. </tr>
  257. <tr>
  258. <td>订单取消通知</td>
  259. <td>
  260. <select class="select2 is_advanced" name="data[cancel_template]">
  261. <option value=''>[默认]订单取消通知</option>
  262. {loop $template_group['cancel'] $template_val}
  263. <option value="{$template_val['id']}" {if $data['cancel_template'] == $template_val['id'] }selected{/if}>{$template_val['title']}</option>
  264. {/loop}
  265. </select>
  266. </td>
  267. <td style="text-align: right;" class="is_advanced">
  268. <label class="notice-default">
  269. <input type="hidden" name="data[cancel_close_advanced]" value="{php echo intval($data['cancel_close_advanced'])}" />
  270. <input class="js-switch small checkone" data-type="tpl-advanced" data-tag="cancel" type="checkbox" value="{php echo intval($data['cancel_close_advanced'])}" {if empty($data['cancel_close_advanced'])}checked{/if}/>
  271. </label>
  272. <label style="display: none;">
  273. <img src="../addons/ewei_shopv2/static/images/loading.gif" width="20" alt=""/>
  274. </label>
  275. </td>
  276. <td class="is_sms">
  277. <select class="select2" name="data[cancel_sms]">
  278. <option value=''>从短信消息库中选择</option>
  279. {loop $template_sms $template_val}
  280. <option value="{$template_val['id']}" {if $data['cancel_sms'] == $template_val['id'] }selected{/if}>{$template_val['name']}</option>
  281. {/loop}
  282. </select>
  283. </td>
  284. <td style="text-align: right;" class="is_sms">
  285. <input type="hidden" name="data[cancel_close_sms]" value="{php echo intval($data['cancel_close_sms'])}" />
  286. <input class="js-switch small checkone" data-type="sms" type="checkbox" value="{php echo intval($data['cancel_close_sms'])}" {if empty($data['cancel_close_sms'])}checked{/if}/>
  287. </td>
  288. </tr>
  289. <tr>
  290. <td>订单即将取消通知</td>
  291. <td>
  292. <select class="select2 is_advanced" name="data[willcancel_template]">
  293. <option value=''>[默认]订单即将取消通知</option>
  294. {loop $template_group['willcancel'] $template_val}
  295. <option value="{$template_val['id']}" {if $data['willcancel_template'] == $template_val['id'] }selected{/if}>{$template_val['title']}</option>
  296. {/loop}
  297. </select>
  298. </td>
  299. <td style="text-align: right;" class="is_advanced">
  300. <label class="notice-default">
  301. <input type="hidden" name="data[willcancel_close_advanced]" value="{php echo intval($data['willcancel_close_advanced'])}" />
  302. <input class="js-switch small checkone" data-type="tpl-advanced" data-tag="willcancel" type="checkbox" value="{php echo intval($data['willcancel_close_advanced'])}" {if empty($data['willcancel_close_advanced'])}checked{/if}/>
  303. </label>
  304. <label style="display: none;">
  305. <img src="../addons/ewei_shopv2/static/images/loading.gif" width="20" alt=""/>
  306. </label>
  307. </td>
  308. <td class="is_sms">
  309. <select class="select2" name="data[willcancel_sms]">
  310. <option value=''>从短信消息库中选择</option>
  311. {loop $template_sms $template_val}
  312. <option value="{$template_val['id']}" {if $data['willcancel_sms'] == $template_val['id'] }selected{/if}>{$template_val['name']}</option>
  313. {/loop}
  314. </select>
  315. </td>
  316. <td style="text-align: right;" class="is_sms">
  317. <input type="hidden" name="data[willcancel_close_sms]" value="{php echo intval($data['willcancel_close_sms'])}" />
  318. <input class="js-switch small checkone" data-type="sms" type="checkbox" value="{php echo intval($data['willcancel_close_sms'])}" {if empty($data['willcancel_close_sms'])}checked{/if}/>
  319. </td>
  320. </tr>
  321. <tr>
  322. <td>订单支付成功通知</td>
  323. <td>
  324. <select class="select2 is_advanced" name="data[pay_template]">
  325. <option value=''>[默认]订单支付成功通知</option>
  326. {loop $template_group['pay'] $template_val}
  327. <option value="{$template_val['id']}" {if $data['pay_template'] == $template_val['id'] }selected{/if}>{$template_val['title']}</option>
  328. {/loop}
  329. </select>
  330. </td>
  331. <td style="text-align: right;" class="is_advanced">
  332. <label class="notice-default">
  333. <input type="hidden" name="data[pay_close_advanced]" value="{php echo intval($data['pay_close_advanced'])}" />
  334. <input class="js-switch small checkone" data-type="tpl-advanced" data-tag="pay" type="checkbox" value="{php echo intval($data['pay_close_advanced'])}" {if empty($data['pay_close_advanced'])}checked{/if}/>
  335. </label>
  336. <label style="display: none;">
  337. <img src="../addons/ewei_shopv2/static/images/loading.gif" width="20" alt=""/>
  338. </label>
  339. </td>
  340. <td class="is_sms">
  341. <select class="select2" name="data[pay_sms]">
  342. <option value=''>从短信消息库中选择</option>
  343. {loop $template_sms $template_val}
  344. <option value="{$template_val['id']}" {if $data['pay_sms'] == $template_val['id'] }selected{/if}>{$template_val['name']}</option>
  345. {/loop}
  346. </select>
  347. </td>
  348. <td style="text-align: right;" class="is_sms">
  349. <input type="hidden" name="data[pay_close_sms]" value="{php echo intval($data['pay_close_sms'])}" />
  350. <input class="js-switch small checkone" data-type="sms" type="checkbox" value="{php echo intval($data['pay_close_sms'])}" {if empty($data['pay_close_sms'])}checked{/if}/>
  351. </td>
  352. </tr>
  353. <tr>
  354. <td>订单发货通知</td>
  355. <td>
  356. <select class="select2 is_advanced" name="data[send_template]">
  357. <option value=''>[默认]订单发货通知</option>
  358. {loop $template_group['send'] $template_val}
  359. <option value="{$template_val['id']}" {if $data['send_template'] == $template_val['id'] }selected{/if}>{$template_val['title']}</option>
  360. {/loop}
  361. </select>
  362. </td>
  363. <td style="text-align: right;" class="is_advanced">
  364. <label class="notice-default">
  365. <input type="hidden" name="data[send_close_advanced]" value="{php echo intval($data['send_close_advanced'])}" />
  366. <input class="js-switch small checkone" data-type="tpl-advanced" data-tag="send" type="checkbox" value="{php echo intval($data['send_close_advanced'])}" {if empty($data['send_close_advanced'])}checked{/if}/>
  367. </label>
  368. <label style="display: none;">
  369. <img src="../addons/ewei_shopv2/static/images/loading.gif" width="20" alt=""/>
  370. </label>
  371. </td>
  372. <td class="is_sms">
  373. <select class="select2" name="data[send_sms]">
  374. <option value=''>从短信消息库中选择</option>
  375. {loop $template_sms $template_val}
  376. <option value="{$template_val['id']}" {if $data['send_sms'] == $template_val['id'] }selected{/if}>{$template_val['name']}</option>
  377. {/loop}
  378. </select>
  379. </td>
  380. <td style="text-align: right;" class="is_sms">
  381. <input type="hidden" name="data[send_close_sms]" value="{php echo intval($data['send_close_sms'])}" />
  382. <input class="js-switch small checkone" data-type="sms" type="checkbox" value="{php echo intval($data['send_close_sms'])}" {if empty($data['send_close_sms'])}checked{/if}/>
  383. </td>
  384. </tr>
  385. <tr>
  386. <td>自动发货通知<br>(虚拟物品及卡密)</td>
  387. <td>
  388. <select class="select2 is_advanced" name="data[virtualsend_template]">
  389. <option value=''>[默认]自动发货通知</option>
  390. {loop $template_group['virtualsend'] $template_val}
  391. <option value="{$template_val['id']}" {if $data['virtualsend_template'] == $template_val['id'] }selected{/if}>{$template_val['title']}</option>
  392. {/loop}
  393. </select>
  394. </td>
  395. <td style="text-align: right;" class="is_advanced">
  396. <label class="notice-default">
  397. <input type="hidden" name="data[virtualsend_close_advanced]" value="{php echo intval($data['virtualsend_close_advanced'])}" />
  398. <input class="js-switch small checkone" data-type="tpl-advanced" data-tag="virtualsend" type="checkbox" value="{php echo intval($data['virtualsend_close_advanced'])}" {if empty($data['virtualsend_close_advanced'])}checked{/if}/>
  399. </label>
  400. <label style="display: none;">
  401. <img src="../addons/ewei_shopv2/static/images/loading.gif" width="20" alt=""/>
  402. </label>
  403. </td>
  404. <td class="is_sms">
  405. <select class="select2" name="data[virtualsend_sms]">
  406. <option value=''>从短信消息库中选择</option>
  407. {loop $template_sms $template_val}
  408. <option value="{$template_val['id']}" {if $data['virtualsend_sms'] == $template_val['id'] }selected{/if}>{$template_val['name']}</option>
  409. {/loop}
  410. </select>
  411. </td>
  412. <td style="text-align: right;" class="is_sms">
  413. <input type="hidden" name="data[virtualsend_close_sms]" value="{php echo intval($data['virtualsend_close_sms'])}" />
  414. <input class="js-switch small checkone" data-type="sms" type="checkbox" value="{php echo intval($data['virtualsend_close_sms'])}" {if empty($data['virtualsend_close_sms'])}checked{/if}/>
  415. </td>
  416. </tr>
  417. <tr>
  418. <td>订单状态更新<br>(修改收货地址)(修改价格)</td>
  419. <td>
  420. <select class="select2 is_advanced" name="data[orderstatus_template]">
  421. <option value=''>[默认]订单状态更新</option>
  422. {loop $template_group['orderstatus'] $template_val}
  423. <option value="{$template_val['id']}" {if $data['orderstatus_template'] == $template_val['id'] }selected{/if}>{$template_val['title']}</option>
  424. {/loop}
  425. </select>
  426. </td>
  427. <td style="text-align: right;" class="is_advanced">
  428. <label class="notice-default">
  429. <input type="hidden" name="data[orderstatus_close_advanced]" value="{php echo intval($data['orderstatus_close_advanced'])}" />
  430. <input class="js-switch small checkone" data-type="tpl-advanced" data-tag="orderstatus" type="checkbox" value="{php echo intval($data['orderstatus_close_advanced'])}" {if empty($data['orderstatus_close_advanced'])}checked{/if}/>
  431. </label>
  432. <label style="display: none;">
  433. <img src="../addons/ewei_shopv2/static/images/loading.gif" width="20" alt=""/>
  434. </label>
  435. </td>
  436. <td class="is_sms">
  437. <select class="select2" name="data[orderstatus_sms]">
  438. <option value=''>从短信消息库中选择</option>
  439. {loop $template_sms $template_val}
  440. <option value="{$template_val['id']}" {if $data['orderstatus_sms'] == $template_val['id'] }selected{/if}>{$template_val['name']}</option>
  441. {/loop}
  442. </select>
  443. </td>
  444. <td style="text-align: right;" class="is_sms">
  445. <input type="hidden" name="data[orderstatus_close_sms]" value="{php echo intval($data['orderstatus_close_sms'])}" />
  446. <input class="js-switch small checkone" data-type="sms" type="checkbox" value="{php echo intval($data['orderstatus_close_sms'])}" {if empty($data['orderstatus_close_sms'])}checked{/if}/>
  447. </td>
  448. </tr>
  449. </tbody>
  450. </table>
  451. <div class="form-group splitter"></div>
  452. <table class="table table-responsive">
  453. <thead>
  454. <th>买家通知 - 退款通知</th>
  455. <th class="w200">模板消息</th>
  456. <th class="w60 is_advanced"><!--<input class="js-switch small checkall" data-type="tpl-advanced" type="checkbox" />--></th>
  457. <th class="w200 is_sms">短信模板</th>
  458. <th class="w60 is_sms"><input class="js-switch small checkall" data-type="sms" type="checkbox" /></th>
  459. </thead>
  460. <tbody>
  461. <tr>
  462. <td>退款成功通知</td>
  463. <td>
  464. <select class="select2 is_advanced" name="data[refund1_template]">
  465. <option value=''>[默认]退款成功通知</option>
  466. {loop $template_group['refund1'] $template_val}
  467. <option value="{$template_val['id']}" {if $data['refund1_template'] == $template_val['id'] }selected{/if}>{$template_val['title']}</option>
  468. {/loop}
  469. </select>
  470. </td>
  471. <td style="text-align: right;" class="is_advanced">
  472. <label class="notice-default">
  473. <input type="hidden" name="data[refund1_close_advanced]" value="{php echo intval($data['refund1_close_advanced'])}" />
  474. <input class="js-switch small checkone" data-type="tpl-advanced" data-tag="refund1" type="checkbox" value="{php echo intval($data['refund1_close_advanced'])}" {if empty($data['refund1_close_advanced'])}checked{/if}/>
  475. </label>
  476. <label style="display: none;">
  477. <img src="../addons/ewei_shopv2/static/images/loading.gif" width="20" alt=""/>
  478. </label>
  479. </td>
  480. <td class="is_sms">
  481. <select class="select2" name="data[refund1_sms]">
  482. <option value=''>从短信消息库中选择</option>
  483. {loop $template_sms $template_val}
  484. <option value="{$template_val['id']}" {if $data['refund1_sms'] == $template_val['id'] }selected{/if}>{$template_val['name']}</option>
  485. {/loop}
  486. </select>
  487. </td>
  488. <td style="text-align: right;" class="is_sms">
  489. <input type="hidden" name="data[refund1_close_sms]" value="{php echo intval($data['refund1_close_sms'])}" />
  490. <input class="js-switch small checkone" data-type="sms" type="checkbox" value="{php echo intval($data['refund1_close_sms'])}" {if empty($data['refund1_close_sms'])}checked{/if}/>
  491. </td>
  492. </tr>
  493. <tr>
  494. <td>换货成功通知</td>
  495. <td>
  496. <select class="select2 is_advanced" name="data[refund3_template]">
  497. <option value=''>[默认]换货成功通知</option>
  498. {loop $template_group['refund3'] $template_val}
  499. <option value="{$template_val['id']}" {if $data['refund3_template'] == $template_val['id'] }selected{/if}>{$template_val['title']}</option>
  500. {/loop}
  501. </select>
  502. </td>
  503. <td style="text-align: right;" class="is_advanced">
  504. <label class="notice-default">
  505. <input type="hidden" name="data[refund3_close_advanced]" value="{php echo intval($data['refund3_close_advanced'])}" />
  506. <input class="js-switch small checkone" data-type="tpl-advanced" data-tag="refund3" type="checkbox" value="{php echo intval($data['refund3_close_advanced'])}" {if empty($data['refund3_close_advanced'])}checked{/if}/>
  507. </label>
  508. <label style="display: none;">
  509. <img src="../addons/ewei_shopv2/static/images/loading.gif" width="20" alt=""/>
  510. </label>
  511. </td>
  512. <td class="is_sms">
  513. <select class="select2" name="data[refund3_sms]">
  514. <option value=''>从短信消息库中选择</option>
  515. {loop $template_sms $template_val}
  516. <option value="{$template_val['id']}" {if $data['refund3_sms'] == $template_val['id'] }selected{/if}>{$template_val['name']}</option>
  517. {/loop}
  518. </select>
  519. </td>
  520. <td style="text-align: right;" class="is_sms">
  521. <input type="hidden" name="data[refund3_close_sms]" value="{php echo intval($data['refund3_close_sms'])}" />
  522. <input class="js-switch small checkone" data-type="sms" type="checkbox" value="{php echo intval($data['refund3_close_sms'])}" {if empty($data['refund3_close_sms'])}checked{/if}/>
  523. </td>
  524. </tr>
  525. <tr>
  526. <td>换货发货通知</td>
  527. <td>
  528. <select class="select2 is_advanced" name="data[refund4_template]">
  529. <option value=''>[默认]换货发货通知</option>
  530. {loop $template_group['refund4'] $template_val}
  531. <option value="{$template_val['id']}" {if $data['refund4_template'] == $template_val['id'] }selected{/if}>{$template_val['title']}</option>
  532. {/loop}
  533. </select>
  534. </td>
  535. <td style="text-align: right;" class="is_advanced">
  536. <label class="notice-default">
  537. <input type="hidden" name="data[refund4_close_advanced]" value="{php echo intval($data['refund4_close_advanced'])}" />
  538. <input class="js-switch small checkone" data-type="tpl-advanced" data-tag="refund4" type="checkbox" value="{php echo intval($data['refund4_close_advanced'])}" {if empty($data['refund4_close_advanced'])}checked{/if}/>
  539. </label>
  540. <label style="display: none;">
  541. <img src="../addons/ewei_shopv2/static/images/loading.gif" width="20" alt=""/>
  542. </label>
  543. </td>
  544. <td class="is_sms">
  545. <select class="select2" name="data[refund4_sms]">
  546. <option value=''>从短信消息库中选择</option>
  547. {loop $template_sms $template_val}
  548. <option value="{$template_val['id']}" {if $data['refund4_sms'] == $template_val['id'] }selected{/if}>{$template_val['name']}</option>
  549. {/loop}
  550. </select>
  551. </td>
  552. <td style="text-align: right;" class="is_sms">
  553. <input type="hidden" name="data[refund4_close_sms]" value="{php echo intval($data['refund4_close_sms'])}" />
  554. <input class="js-switch small checkone" data-type="sms" type="checkbox" value="{php echo intval($data['refund4_close_sms'])}" {if empty($data['refund4_close_sms'])}checked{/if}/>
  555. </td>
  556. </tr>
  557. <tr>
  558. <td>退款申请驳回通知</td>
  559. <td>
  560. <select class="select2 is_advanced" name="data[refund2_template]">
  561. <option value=''>[默认]退款申请驳回通知</option>
  562. {loop $template_group['refund2'] $template_val}
  563. <option value="{$template_val['id']}" {if $data['refund2_template'] == $template_val['id'] }selected{/if}>{$template_val['title']}</option>
  564. {/loop}
  565. </select>
  566. </td>
  567. <td style="text-align: right;" class="is_advanced">
  568. <label class="notice-default">
  569. <input type="hidden" name="data[refund2_close_advanced]" value="{php echo intval($data['refund2_close_advanced'])}" />
  570. <input class="js-switch small checkone" data-type="tpl-advanced" data-tag="refund2" type="checkbox" value="{php echo intval($data['refund2_close_advanced'])}" {if empty($data['refund2_close_advanced'])}checked{/if}/>
  571. </label>
  572. <label style="display: none;">
  573. <img src="../addons/ewei_shopv2/static/images/loading.gif" width="20" alt=""/>
  574. </label>
  575. </td>
  576. <td class="is_sms">
  577. <select class="select2" name="data[refund2_sms]">
  578. <option value=''>从短信消息库中选择</option>
  579. {loop $template_sms $template_val}
  580. <option value="{$template_val['id']}" {if $data['refund2_sms'] == $template_val['id'] }selected{/if}>{$template_val['name']}</option>
  581. {/loop}
  582. </select>
  583. </td>
  584. <td style="text-align: right;" class="is_sms">
  585. <input type="hidden" name="data[refund2_close_sms]" value="{php echo intval($data['refund2_close_sms'])}" />
  586. <input class="js-switch small checkone" data-type="sms" type="checkbox" value="{php echo intval($data['refund2_close_sms'])}" {if empty($data['refund2_close_sms'])}checked{/if}/>
  587. </td>
  588. </tr>
  589. </tbody>
  590. </table>
  591. <div class="form-group splitter"></div>
  592. <table class="table table-responsive">
  593. <thead>
  594. <th>买家通知 - 支付通知</th>
  595. <th class="w200">模板消息</th>
  596. <th class="w60 is_advanced"><!--<input class="js-switch small checkall" data-type="tpl-advanced" type="checkbox" />--></th>
  597. <th class="w200 is_sms">短信模板</th>
  598. <th class="w60 is_sms"><input class="js-switch small checkall" data-type="sms" type="checkbox" /></th>
  599. </thead>
  600. <tbody>
  601. <tr>
  602. <td>充值成功通知</td>
  603. <td>
  604. <select class="select2 is_advanced" name="data[recharge_ok_template]">
  605. <option value=''>[默认]充值成功通知</option>
  606. {loop $template_group['recharge_ok'] $template_val}
  607. <option value="{$template_val['id']}" {if $data['recharge_ok_template'] == $template_val['id'] }selected{/if}>{$template_val['title']}</option>
  608. {/loop}
  609. </select>
  610. </td>
  611. <td style="text-align: right;" class="is_advanced">
  612. <label class="notice-default">
  613. <input type="hidden" name="data[recharge_ok_close_advanced]" value="{php echo intval($data['recharge_ok_close_advanced'])}" />
  614. <input class="js-switch small checkone" data-type="tpl-advanced" data-tag="recharge_ok" type="checkbox" value="{php echo intval($data['recharge_ok_close_advanced'])}" {if empty($data['recharge_ok_close_advanced'])}checked{/if}/>
  615. </label>
  616. <label style="display: none;">
  617. <img src="../addons/ewei_shopv2/static/images/loading.gif" width="20" alt=""/>
  618. </label>
  619. </td>
  620. <td class="is_sms">
  621. <select class="select2" name="data[recharge_ok_sms]">
  622. <option value=''>从短信消息库中选择</option>
  623. {loop $template_sms $template_val}
  624. <option value="{$template_val['id']}" {if $data['recharge_ok_sms'] == $template_val['id'] }selected{/if}>{$template_val['name']}</option>
  625. {/loop}
  626. </select>
  627. </td>
  628. <td style="text-align: right;" class="is_sms">
  629. <input type="hidden" name="data[recharge_ok_close_sms]" value="{php echo intval($data['recharge_ok_close_sms'])}" />
  630. <input class="js-switch small checkone" data-type="sms" type="checkbox" value="{php echo intval($data['recharge_ok_close_sms'])}" {if empty($data['recharge_ok_close_sms'])}checked{/if}/>
  631. </td>
  632. </tr>
  633. <tr>
  634. <td>提现成功通知</td>
  635. <td>
  636. <select class="select2 is_advanced" name="data[withdraw_ok_template]">
  637. <option value=''>[默认]提现成功通知</option>
  638. {loop $template_group['withdraw_ok'] $template_val}
  639. <option value="{$template_val['id']}" {if $data['withdraw_ok_template'] == $template_val['id'] }selected{/if}>{$template_val['title']}</option>
  640. {/loop}
  641. </select>
  642. </td>
  643. <td style="text-align: right;" class="is_advanced">
  644. <label class="notice-default">
  645. <input type="hidden" name="data[withdraw_ok_close_advanced]" value="{php echo intval($data['withdraw_ok_close_advanced'])}" />
  646. <input class="js-switch small checkone" data-type="tpl-advanced" data-tag="withdraw_ok" type="checkbox" value="{php echo intval($data['withdraw_ok_close_advanced'])}" {if empty($data['withdraw_ok_close_advanced'])}checked{/if}/>
  647. </label>
  648. <label style="display: none;">
  649. <img src="../addons/ewei_shopv2/static/images/loading.gif" width="20" alt=""/>
  650. </label>
  651. </td>
  652. <td class="is_sms">
  653. <select class="select2" name="data[withdraw_ok_sms]">
  654. <option value=''>从短信消息库中选择</option>
  655. {loop $template_sms $template_val}
  656. <option value="{$template_val['id']}" {if $data['withdraw_ok_sms'] == $template_val['id'] }selected{/if}>{$template_val['name']}</option>
  657. {/loop}
  658. </select>
  659. </td>
  660. <td style="text-align: right;" class="is_sms">
  661. <input type="hidden" name="data[withdraw_ok_close_sms]" value="{php echo intval($data['withdraw_ok_close_sms'])}" />
  662. <input class="js-switch small checkone" data-type="sms" type="checkbox" value="{php echo intval($data['withdraw_ok_close_sms'])}" {if empty($data['withdraw_ok_close_sms'])}checked{/if}/>
  663. </td>
  664. </tr>
  665. <tr>
  666. <td>充值成功通知(后台管理员手动)</td>
  667. <td>
  668. <select class="select2 is_advanced" name="data[backrecharge_ok_template]">
  669. <option value=''>[默认]充值成功通知</option>
  670. {loop $template_group['backrecharge_ok'] $template_val}
  671. <option value="{$template_val['id']}" {if $data['backrecharge_ok_template'] == $template_val['id'] }selected{/if}>{$template_val['title']}</option>
  672. {/loop}
  673. </select>
  674. </td>
  675. <td style="text-align: right;" class="is_advanced">
  676. <label class="notice-default">
  677. <input type="hidden" name="data[backrecharge_ok_close_advanced]" value="{php echo intval($data['backrecharge_ok_close_advanced'])}" />
  678. <input class="js-switch small checkone" data-type="tpl-advanced" data-tag="backrecharge_ok" type="checkbox" value="{php echo intval($data['backrecharge_ok_close_advanced'])}" {if empty($data['backrecharge_ok_close_advanced'])}checked{/if}/>
  679. </label>
  680. <label style="display: none;">
  681. <img src="../addons/ewei_shopv2/static/images/loading.gif" width="20" alt=""/>
  682. </label>
  683. </td>
  684. <td class="is_sms">
  685. <select class="select2" name="data[backrecharge_ok_sms]">
  686. <option value=''>从短信消息库中选择</option>
  687. {loop $template_sms $template_val}
  688. <option value="{$template_val['id']}" {if $data['backrecharge_ok_sms'] == $template_val['id'] }selected{/if}>{$template_val['name']}</option>
  689. {/loop}
  690. </select>
  691. </td>
  692. <td style="text-align: right;" class="is_sms">
  693. <input type="hidden" name="data[backrecharge_ok_close_sms]" value="{php echo intval($data['backrecharge_ok_close_sms'])}" />
  694. <input class="js-switch small checkone" data-type="sms" type="checkbox" value="{php echo intval($data['backrecharge_ok_close_sms'])}" {if empty($data['backrecharge_ok_close_sms'])}checked{/if}/>
  695. </td>
  696. </tr>
  697. <tr>
  698. <td>积分变动提醒</td>
  699. <td>
  700. <select class="select2 is_advanced" name="data[backpoint_ok_template]">
  701. <option value=''>[默认]积分变动提醒</option>
  702. {loop $template_group['backpoint_ok'] $template_val}
  703. <option value="{$template_val['id']}" {if $data['backpoint_ok_template'] == $template_val['id'] }selected{/if}>{$template_val['title']}</option>
  704. {/loop}
  705. </select>
  706. </td>
  707. <td style="text-align: right;" class="is_advanced">
  708. <label class="notice-default">
  709. <input type="hidden" name="data[backpoint_ok_close_advanced]" value="{php echo intval($data['backpoint_ok_close_advanced'])}" />
  710. <input class="js-switch small checkone" data-type="tpl-advanced" data-tag="backpoint_ok" type="checkbox" value="{php echo intval($data['backpoint_ok_close_advanced'])}" {if empty($data['backpoint_ok_close_advanced'])}checked{/if}/>
  711. </label>
  712. <label style="display: none;">
  713. <img src="../addons/ewei_shopv2/static/images/loading.gif" width="20" alt=""/>
  714. </label>
  715. </td>
  716. <td class="is_sms">
  717. <select class="select2" name="data[backpoint_ok_sms]">
  718. <option value=''>从短信消息库中选择</option>
  719. {loop $template_sms $template_val}
  720. <option value="{$template_val['id']}" {if $data['backpoint_ok_sms'] == $template_val['id'] }selected{/if}>{$template_val['name']}</option>
  721. {/loop}
  722. </select>
  723. </td>
  724. <td style="text-align: right;" class="is_sms">
  725. <input type="hidden" name="data[backpoint_ok_close_sms]" value="{php echo intval($data['backpoint_ok_close_sms'])}" />
  726. <input class="js-switch small checkone" data-type="sms" type="checkbox" value="{php echo intval($data['backpoint_ok_close_sms'])}" {if empty($data['backpoint_ok_close_sms'])}checked{/if}/>
  727. </td>
  728. </tr>
  729. </tbody>
  730. </table>
  731. <div class="form-group splitter"></div>
  732. <table class="table table-responsive">
  733. <thead>
  734. <th>买家通知 - 会员通知</th>
  735. <th class="w200">模板消息</th>
  736. <th class="w60 is_advanced"><!--<input class="js-switch small checkall" data-type="tpl-advanced" type="checkbox" />--></th>
  737. <th class="w200 is_sms">短信模板</th>
  738. <th class="w60 is_sms"><input class="js-switch small checkall" data-type="sms" type="checkbox" /></th>
  739. </thead>
  740. <tbody>
  741. <tr>
  742. <td>会员升级通知<br>(业务处理通知)</td>
  743. <td>
  744. <select class="select2 is_advanced" name="data[upgrade_template]">
  745. <option value=''>[默认]会员升级通知</option>
  746. {loop $template_group['upgrade'] $template_val}
  747. <option value="{$template_val['id']}" {if $data['upgrade_template'] == $template_val['id'] }selected{/if}>{$template_val['title']}</option>
  748. {/loop}
  749. </select>
  750. </td>
  751. <td style="text-align: right;" class="is_advanced">
  752. <label class="notice-default">
  753. <input type="hidden" name="data[upgrade_close_advanced]" value="{php echo intval($data['upgrade_close_advanced'])}" />
  754. <input class="js-switch small checkone" data-type="tpl-advanced" data-tag="upgrade" type="checkbox" value="{php echo intval($data['upgrade_close_advanced'])}" {if empty($data['upgrade_close_advanced'])}checked{/if}/>
  755. </label>
  756. <label style="display: none;">
  757. <img src="../addons/ewei_shopv2/static/images/loading.gif" width="20" alt=""/>
  758. </label>
  759. </td>
  760. <td class="is_sms">
  761. <select class="select2" name="data[upgrade_sms]">
  762. <option value=''>从短信消息库中选择</option>
  763. {loop $template_sms $template_val}
  764. <option value="{$template_val['id']}" {if $data['upgrade_sms'] == $template_val['id'] }selected{/if}>{$template_val['name']}</option>
  765. {/loop}
  766. </select>
  767. </td>
  768. <td style="text-align: right;" class="is_sms">
  769. <input type="hidden" name="data[upgrade_close_sms]" value="{php echo intval($data['upgrade_close_sms'])}" />
  770. <input class="js-switch small checkone" data-type="sms" type="checkbox" value="{php echo intval($data['upgrade_close_sms'])}" {if empty($data['upgrade_close_sms'])}checked{/if}/>
  771. </td>
  772. </tr>
  773. </tbody>
  774. </table>
  775. <table class="table table-responsive">
  776. <thead>
  777. <th>o2o - 门店店员通知</th>
  778. <th class="w200">模板消息</th>
  779. <th class="w60 is_advanced"><!--<input class="js-switch small checkall" data-type="tpl-advanced" type="checkbox" />--></th>
  780. <th class="w200 is_sms">短信模板</th>
  781. <th class="w60 is_sms"><input class="js-switch small checkall" data-type="sms" type="checkbox" /></th>
  782. </thead>
  783. <tbody>
  784. <tr>
  785. <td>记次时商品核销通知</td>
  786. <td>
  787. <select class="select2 is_advanced" name="data[o2o_sverify_template]">
  788. <option value=''>[默认]记次时商品核销通知</option>
  789. {loop $template_group['o2o_sverify'] $template_val}
  790. <option value="{$template_val['id']}" {if $data['o2o_sverify_template'] == $template_val['id'] }selected{/if}>{$template_val['title']}</option>
  791. {/loop}
  792. </select>
  793. </td>
  794. <td style="text-align: right;" class="is_advanced">
  795. <label class="notice-default">
  796. <input type="hidden" name="data[o2o_sverify_close_advanced]" value="{php echo intval($data['o2o_sverify_close_advanced'])}" />
  797. <input class="js-switch small checkone" data-type="tpl-advanced" data-tag="o2o_sverify" type="checkbox" value="{php echo intval($data['o2o_sverify_close_advanced'])}" {if empty($data['o2o_sverify_close_advanced'])}checked{/if}/>
  798. </label>
  799. <label style="display: none;">
  800. <img src="../addons/ewei_shopv2/static/images/loading.gif" width="20" alt=""/>
  801. </label>
  802. </td>
  803. <td class="is_sms">
  804. <select class="select2" name="data[o2o_sverify_sms]">
  805. <option value=''>从短信消息库中选择</option>
  806. {loop $template_sms $template_val}
  807. <option value="{$template_val['id']}" {if $data['o2o_sverify_sms'] == $template_val['id'] }selected{/if}>{$template_val['name']}</option>
  808. {/loop}
  809. </select>
  810. </td>
  811. <td style="text-align: right;" class="is_sms">
  812. <input type="hidden" name="data[o2o_sverify_close_sms]" value="{php echo intval($data['o2o_sverify_close_sms'])}" />
  813. <input class="js-switch small checkone" data-type="sms" type="checkbox" value="{php echo intval($data['o2o_sverify_close_sms'])}" {if empty($data['o2o_sverify_close_sms'])}checked{/if}/>
  814. </td>
  815. </tr>
  816. {if p('newstore')}
  817. <tr>
  818. <td>商品预约通知</td>
  819. <td>
  820. <select class="select2 is_advanced" name="data[o2o_snorder_template]">
  821. <option value=''>[默认]商品预约通知</option>
  822. {loop $template_group['o2o_snorder'] $template_val}
  823. <option value="{$template_val['id']}" {if $data['o2o_snorder_template'] == $template_val['id'] }selected{/if}>{$template_val['title']}</option>
  824. {/loop}
  825. </select>
  826. </td>
  827. <td style="text-align: right;" class="is_advanced">
  828. <label class="notice-default">
  829. <input type="hidden" name="data[o2o_snorder_close_advanced]" value="{php echo intval($data['o2o_snorder_close_advanced'])}" />
  830. <input class="js-switch small checkone" data-type="tpl-advanced" data-tag="o2o_snorder" type="checkbox" value="{php echo intval($data['o2o_snorder_close_advanced'])}" {if empty($data['o2o_snorder_close_advanced'])}checked{/if}/>
  831. </label>
  832. <label style="display: none;">
  833. <img src="../addons/ewei_shopv2/static/images/loading.gif" width="20" alt=""/>
  834. </label>
  835. </td>
  836. <td class="is_sms">
  837. <select class="select2" name="data[o2o_snorder_sms]">
  838. <option value=''>从短信消息库中选择</option>
  839. {loop $template_sms $template_val}
  840. <option value="{$template_val['id']}" {if $data['o2o_snorder_sms'] == $template_val['id'] }selected{/if}>{$template_val['name']}</option>
  841. {/loop}
  842. </select>
  843. </td>
  844. <td style="text-align: right;" class="is_sms">
  845. <input type="hidden" name="data[o2o_snorder_close_sms]" value="{php echo intval($data['o2o_snorder_close_sms'])}" />
  846. <input class="js-switch small checkone" data-type="sms" type="checkbox" value="{php echo intval($data['o2o_snorder_close_sms'])}" {if empty($data['o2o_snorder_close_sms'])}checked{/if}/>
  847. </td>
  848. </tr>
  849. {/if}
  850. </tbody>
  851. </table>
  852. <table class="table table-responsive">
  853. <thead>
  854. <th>o2o - 买家通知</th>
  855. <th class="w200">模板消息</th>
  856. <th class="w60 is_advanced"><!--<input class="js-switch small checkall" data-type="tpl-advanced" type="checkbox" />--></th>
  857. <th class="w200 is_sms">短信模板</th>
  858. <th class="w60 is_sms"><input class="js-switch small checkall" data-type="sms" type="checkbox" /></th>
  859. </thead>
  860. <tbody>
  861. <tr>
  862. <td>记次时商品核销通知</td>
  863. <td>
  864. <select class="select2 is_advanced" name="data[o2o_bverify_template]">
  865. <option value=''>[默认]记次时商品核销通知</option>
  866. {loop $template_group['o2o_bverify'] $template_val}
  867. <option value="{$template_val['id']}" {if $data['o2o_bverify_template'] == $template_val['id'] }selected{/if}>{$template_val['title']}</option>
  868. {/loop}
  869. </select>
  870. </td>
  871. <td style="text-align: right;" class="is_advanced">
  872. <label class="notice-default">
  873. <input type="hidden" name="data[o2o_bverify_close_advanced]" value="{php echo intval($data['o2o_bverify_close_advanced'])}" />
  874. <input class="js-switch small checkone" data-type="tpl-advanced" data-tag="o2o_bverify" type="checkbox" value="{php echo intval($data['o2o_bverify_close_advanced'])}" {if empty($data['o2o_bverify_close_advanced'])}checked{/if}/>
  875. </label>
  876. <label style="display: none;">
  877. <img src="../addons/ewei_shopv2/static/images/loading.gif" width="20" alt=""/>
  878. </label>
  879. </td>
  880. <td class="is_sms">
  881. <select class="select2" name="data[o2o_bverify_sms]">
  882. <option value=''>从短信消息库中选择</option>
  883. {loop $template_sms $template_val}
  884. <option value="{$template_val['id']}" {if $data['o2o_bverify_sms'] == $template_val['id'] }selected{/if}>{$template_val['name']}</option>
  885. {/loop}
  886. </select>
  887. </td>
  888. <td style="text-align: right;" class="is_sms">
  889. <input type="hidden" name="data[o2o_bverify_close_sms]" value="{php echo intval($data['o2o_bverify_close_sms'])}" />
  890. <input class="js-switch small checkone" data-type="sms" type="checkbox" value="{php echo intval($data['o2o_bverify_close_sms'])}" {if empty($data['o2o_bverify_close_sms'])}checked{/if}/>
  891. </td>
  892. </tr>
  893. {if p('newstore')}
  894. <tr>
  895. <td>商品预约成功通知</td>
  896. <td>
  897. <select class="select2 is_advanced" name="data[o2o_bnorder_template]">
  898. <option value=''>[默认]商品预约成功通知</option>
  899. {loop $template_group['o2o_bnorder'] $template_val}
  900. <option value="{$template_val['id']}" {if $data['o2o_bnorder_template'] == $template_val['id'] }selected{/if}>{$template_val['title']}</option>
  901. {/loop}
  902. </select>
  903. </td>
  904. <td style="text-align: right;" class="is_advanced">
  905. <label class="notice-default">
  906. <input type="hidden" name="data[o2o_bnorder_close_advanced]" value="{php echo intval($data['o2o_bnorder_close_advanced'])}" />
  907. <input class="js-switch small checkone" data-type="tpl-advanced" data-tag="o2o_bnorder" type="checkbox" value="{php echo intval($data['o2o_bnorder_close_advanced'])}" {if empty($data['o2o_bnorder_close_advanced'])}checked{/if}/>
  908. </label>
  909. <label style="display: none;">
  910. <img src="../addons/ewei_shopv2/static/images/loading.gif" width="20" alt=""/>
  911. </label>
  912. </td>
  913. <td class="is_sms">
  914. <select class="select2" name="data[o2o_bnorder_sms]">
  915. <option value=''>从短信消息库中选择</option>
  916. {loop $template_sms $template_val}
  917. <option value="{$template_val['id']}" {if $data['o2o_bnorder_sms'] == $template_val['id'] }selected{/if}>{$template_val['name']}</option>
  918. {/loop}
  919. </select>
  920. </td>
  921. <td style="text-align: right;" class="is_sms">
  922. <input type="hidden" name="data[o2o_bnorder_close_sms]" value="{php echo intval($data['o2o_bnorder_close_sms'])}" />
  923. <input class="js-switch small checkone" data-type="sms" type="checkbox" value="{php echo intval($data['o2o_bnorder_close_sms'])}" {if empty($data['o2o_bnorder_close_sms'])}checked{/if}/>
  924. </td>
  925. </tr>
  926. {/if}
  927. </tbody>
  928. </table>
  929. <div class="form-group splitter"></div>
  930. <div class="form-group">
  931. <div class="col-sm-12 col-xs-12" style="text-align: right;">
  932. {ifp 'sysset.notice.edit'}
  933. <input type="submit" value="提交" class="btn btn-primary" />
  934. {/if}
  935. </div>
  936. </div>
  937. </form>
  938. <script>
  939. $(function () {
  940. var sms = {if !empty($opensms)}true{else}false{/if};
  941. $(".is_advanced").show();
  942. $(".w60").css('width', '70px');
  943. if (sms){
  944. $(".w200").css('width', '250px');
  945. }else{
  946. $(".w200").css('width', '550px');
  947. $(".colstd").attr('colspan',2);
  948. }
  949. $(".js-switch").not(".checkhi").click(function () {
  950. var next = $(this).next();
  951. if(next.hasClass('checked')){
  952. $(this).val("1").prev().val("0");
  953. }else{
  954. $(this).val("0").prev().val("1");
  955. }
  956. });
  957. $(".checkhi").click(function () {
  958. var trueval = $(this).prev().data('true');
  959. var falseval = $(this).prev().data('false');
  960. var next = $(this).next();
  961. if(next.hasClass('checked')){
  962. $(this).val("1").prev().val(trueval);
  963. }else{
  964. $(this).val("0").prev().val(falseval);
  965. }
  966. });
  967. $(".checkall").click(function () {
  968. var type = $(this).data('type');
  969. var val = $(this).val();
  970. if(val==0){
  971. $(this).closest(".table").find(".checkone[data-type='"+type+"']").attr("checked","false").val("1").next().removeClass("checked").prev().prev().val("1");
  972. }else{
  973. $(this).closest(".table").find(".checkone[data-type='"+type+"']").attr("checked","true").val("0").next().addClass("checked").prev().prev().val("0");
  974. }
  975. });
  976. //开启通知
  977. $(".checkone").click(function () {
  978. var _this =$(this);
  979. var type = _this.data('type');
  980. var val = _this.val();
  981. var tag = _this.data('tag');
  982. var stop = _this.data('stop');
  983. if(stop==1)
  984. {
  985. return;
  986. }
  987. //判断是否开启模板通知
  988. if(tag != '' && val==1&&type=='tpl-advanced') {
  989. $(this).data('stop', 1);
  990. $(this).parent().hide().next().show();
  991. var data = {
  992. 'tag': tag,
  993. checked:val
  994. };
  995. //申请微信模板,并将模板ID更新至数据库.
  996. $.ajax({
  997. url: "{php echo webUrl('sysset/settemplateid')}",
  998. type:'get',
  999. dataType:'json',
  1000. timeout : 3000, //超时时间设置,单位毫秒
  1001. data:data,
  1002. success:function(ret){
  1003. var _this = $(".checkone[data-tag='"+ret.result.tag+"']");
  1004. if (ret.result.status == '0') {
  1005. this.value=0;
  1006. _this.prev().val(1);
  1007. _this.next().removeClass('checked');
  1008. console.log(ret.result.messages);
  1009. alert(ret.result.messages);
  1010. }
  1011. $(_this).data('stop', 0);
  1012. $(_this).parent().show().next().hide();
  1013. },
  1014. error: function(XMLHttpRequest, textStatus, errorThrown) {
  1015. $(".table").each(function () {
  1016. var _this = $(this);
  1017. _this.find(".checkone[data-type='tpl-advanced']").each(function () {
  1018. $(this).data('stop', 0);
  1019. $(this).parent().show().next().hide();
  1020. });
  1021. });
  1022. }
  1023. });
  1024. }
  1025. var type = $(this).data('type');
  1026. var val = $(this).val();
  1027. if(val==0){
  1028. $(this).attr("checked","false").val("1").next().removeClass("checked");
  1029. $(this).closest(".table").find(".checkall[data-type='"+type+"']").val("1").attr("checked","false").next().removeClass("checked");
  1030. }else{
  1031. $(this).attr("checked","true").val("0").next().addClass("checked");
  1032. var all = true;
  1033. $(this).closest(".table").find(".checkone[data-type='"+type+"']").each(function () {
  1034. var val = $(this).val();
  1035. if(val!='on' && val==1){
  1036. all = false;
  1037. return;
  1038. }
  1039. });
  1040. if(all){
  1041. $(this).closest(".table").find(".checkall[data-type='"+type+"']").val("0").attr("checked","true").next().addClass("checked");
  1042. }
  1043. }
  1044. });
  1045. $(".table").each(function () {
  1046. var _this = $(this);
  1047. var all_tpl_normal = true;
  1048. var all_tpl_advanced = true;
  1049. var all_sms = true;
  1050. _this.find(".checkone[data-type='tpl-advanced']").each(function () {
  1051. var val = $(this).val();
  1052. if(val!='on' && val==1){
  1053. all_tpl_advanced = false;
  1054. return;
  1055. }
  1056. });
  1057. _this.find(".checkone[data-type='sms']").each(function () {
  1058. var val = $(this).val();
  1059. if(val!='on' && val==1){
  1060. all_sms = false;
  1061. return;
  1062. }
  1063. });
  1064. if(all_tpl_normal){
  1065. _this.find(".checkall[data-type='tpl-normal']").val("0").attr("checked","true").next().addClass("checked");
  1066. }
  1067. if(all_tpl_advanced){
  1068. _this.find(".checkall[data-type='tpl-advanced']").val("0").attr("checked","true").next().addClass("checked");
  1069. }
  1070. if(all_sms){
  1071. _this.find(".checkall[data-type='sms']").val("0").attr("checked","true").next().addClass("checked");
  1072. }
  1073. });
  1074. })
  1075. </script>
  1076. {template '_footer'}