add.html 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. {extend name="default/base/base_seller" /}
  2. {block name="seller_main"}
  3. <div class="dssc-form-default">
  4. <form method="post" id="tpl_form" name="tpl_form" action="{:url('Sellertransport/save')}">
  5. <input type="hidden" name="transport_id" value="{present name='transport'}{$transport.transport_id}{/present}" />
  6. <input type="hidden" name="type" value="{$Request.param.type}">
  7. <dl>
  8. <dt>
  9. <label class="label-like">{$Think.lang.transport_tpl_name}{$Think.lang.ds_colon}</label>
  10. </dt>
  11. <dd>
  12. <input type="text" class="text" id="title" autocomplete="off" value="{present name='transport'}{$transport.transport_title}{/present}" name="title">
  13. <p class="J_Message" style="display:none" error_type="title">
  14. <i class="iconfont">&#xe64c;</i>{$Think.lang.transport_tpl_name_note}</p>
  15. </dd>
  16. </dl>
  17. <dl>
  18. <dt>
  19. <label class="label-like">{$Think.lang.transport_is_limited}{$Think.lang.ds_colon}</label>
  20. </dt>
  21. <dd>
  22. <input type="radio" name="transport_is_limited" value="0" {if !isset($transport) || (!$transport.transport_is_limited)}checked{/if}/>
  23. <label>{$Think.lang.ds_no}</label>
  24. <input type="radio" name="transport_is_limited" value="1" {if isset($transport) && $transport.transport_is_limited}checked{/if}/>
  25. <label>{$Think.lang.ds_yes}</label>
  26. <p class="hint">{$Think.lang.transport_is_limited_note}</p>
  27. </dd>
  28. </dl>
  29. <dl>
  30. <dt>
  31. <label class="label-like">{$Think.lang.transport_type}{$Think.lang.ds_colon}</label>
  32. </dt>
  33. <dd>
  34. <input type="radio" name="transport_type" value="0" {if !isset($transport) || (!$transport.transport_type)}checked{/if} onclick="change_lang()"/>
  35. <label>{$Think.lang.transport_type_list[0]}</label>
  36. <input type="radio" name="transport_type" value="1" {if isset($transport) && $transport.transport_type}checked{/if} onclick="change_lang()"/>
  37. <label>{$Think.lang.transport_type_list[1]}</label>
  38. <p class="hint">{$Think.lang.transport_type_note}</p>
  39. </dd>
  40. </dl>
  41. <dl>
  42. <dt>{$Think.lang.detailed_setting}:</dt>
  43. <dd class="trans-line">
  44. </dd>
  45. </dl>
  46. <div class="bottom">
  47. <input type="submit" id="submit_tpl" class="submit" value="{$Think.lang.transport_tpl_save}" />
  48. </div>
  49. </form>
  50. <div class="ks-ext-mask" style="position: fixed; left: 0px; top: 0px; width: 100%; height: 100%; z-index: 999; display:none"></div>
  51. <div id="dialog_areas" class="dialog-areas" style="display:none">
  52. <div class="ks-contentbox">
  53. <div class="title">
  54. {$Think.lang.transport_tpl_select_area}
  55. <a class="ks-ext-close" href="javascript:void(0)">X</a>
  56. </div>
  57. <form method="post">
  58. <ul id="J_CityList">
  59. {include file="default/seller/sellertransport/area" /}
  60. </ul>
  61. <div class="bottom">
  62. <a href="javascript:void(0);" class="J_Submit dssc-btn dssc-btn-green">{$Think.lang.transport_tpl_ok}</a>
  63. <a href="javascript:void(0);" class="J_Cancel dssc-btn">{$Think.lang.transport_tpl_cancel}</a>
  64. </div>
  65. </form>
  66. </div>
  67. </div>
  68. <div id="dialog_batch" class="dialog-batch" style="z-index: 9999; display:none">
  69. <div class="ks-contentbox">
  70. <div class="title">{$Think.lang.transport_tpl_pl_op}
  71. <a class="ks-ext-close" href="javascript:void(0)">X</a>
  72. </div>
  73. <form method="post">
  74. <div class="batch">{$Think.lang.transport_note_1}{$Think.lang.ds_colon}
  75. <input class="w30 mr5 text" type="text" maxlength="4" autocomplete="off" data-field="start" value="1" name="express_start">
  76. {$Think.lang.transport_note_2}
  77. <input class="w60 text" type="text" maxlength="6" autocomplete="off" value="0.00" name="express_postage" data-field="postage">
  78. <em class="add-on"> <i class="iconfont">&#xe65c;</i> </em>{$Think.lang.transport_note_3}
  79. <input class="w30 mr5 text" type="text" maxlength="4" autocomplete="off" value="1" data-field="plus" name="express_plus">
  80. {$Think.lang.transport_note_4}
  81. <input class="w60 text" type="text" maxlength="6" autocomplete="off" value="0.00" data-field="postageplus" name="express_postageplus">
  82. <em class="add-on"> <i class="iconfont">&#xe65c;</i> </em>
  83. </div>
  84. <div class="J_DefaultMessage"></div>
  85. <div class="bottom"> <a href="javascript:void(0);" class="J_SubmitPL dssc-btn dssc-btn-green">{$Think.lang.transport_tpl_ok}</a>
  86. <a href="javascript:void(0);" class="J_Cancel dssc-btn">{$Think.lang.transport_tpl_cancel}</a>
  87. </div>
  88. </form>
  89. </div>
  90. </div>
  91. </div>
  92. <script src="{$Think.HOME_SITE_ROOT}/js/transport.js"></script>
  93. <script>
  94. $(function(){
  95. $('.trans-line').append(TransTpl.replace(/TRANSTYPE/g,'kd'));
  96. $('.tbl-except').append(RuleHead);
  97. {notempty name='extend'}
  98. {foreach name="extend" item="value" }
  99. {if $value.transportext_is_default==1}
  100. var cur_tr = $('.tbl-except').prev();
  101. $(cur_tr).find('input[data-field="start"]').val('{$value.transportext_snum}');
  102. $(cur_tr).find('input[data-field="postage"]').val('{$value.transportext_sprice}');
  103. $(cur_tr).find('input[data-field="plus"]').val('{$value.transportext_xnum}');
  104. $(cur_tr).find('input[data-field="postageplus"]').val('{$value.transportext_xprice}');
  105. {else/}
  106. StartNum +=1;
  107. cell = RuleCell.replace(/CurNum/g,StartNum);
  108. cell = cell.replace(/TRANSTYPE/g,'kd');
  109. $('.tbl-except').find('table').append(cell);
  110. $('.tbl-attach').find('.J_ToggleBatch').css('display','').html('{$Think.lang.transport_tpl_pl_op}');
  111. var cur_tr = $('.tbl-except').find('table').find('tr:last');
  112. $(cur_tr).find('.area-group>p').html('{$value.transportext_area_name}');
  113. $(cur_tr).find('input[type="hidden"]').val("{:trim($value['transportext_area_id'],',')}|||{$value.transportext_area_name}");
  114. $(cur_tr).find('input[data-field="start"]').val('{$value.transportext_snum}');
  115. $(cur_tr).find('input[data-field="postage"]').val('{$value.transportext_sprice}');
  116. $(cur_tr).find('input[data-field="plus"]').val('{$value.transportext_xnum}');
  117. $(cur_tr).find('input[data-field="postageplus"]').val('{$value.transportext_xprice}');
  118. {/if}
  119. {/foreach}
  120. {/notempty}
  121. {if isset($transport) && $transport.transport_is_limited==1}
  122. $(".J_DefaultSet").hide()
  123. {/if}
  124. $('input[name="transport_is_limited"]').click(function(){
  125. if($(this).val()=='1'){
  126. $(".J_DefaultSet").hide()
  127. }else{
  128. $(".J_DefaultSet").show()
  129. }
  130. })
  131. change_lang()
  132. });
  133. function change_lang(){
  134. if($('*[name=transport_type]:checked').val()=='1'){
  135. $('.title_1').text("{$Think.lang.transport_first_step_zhong}")
  136. $('.title_2').text("{$Think.lang.transport_second_step_zhong}")
  137. $('.content_1').text("{$Think.lang.transport_zhong}")
  138. }else{
  139. $('.title_1').text("{$Think.lang.transport_first_step_jian}")
  140. $('.title_2').text("{$Think.lang.transport_second_step_jian}")
  141. $('.content_1').text("{$Think.lang.transport_jian}")
  142. }
  143. }
  144. </script>
  145. {/block}