edit.html 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <extend name="Public:base" />
  2. <block name="content">
  3. <link rel="stylesheet" href="__CSS__/transport.css" />
  4. <div class="page-header">
  5. <h1>
  6. {$breadcrumb2}
  7. <small>
  8. <i class="icon-double-angle-right"></i>
  9. {$crumbs}
  10. </small>
  11. </h1>
  12. </div>
  13. <div class="row">
  14. <div class="col-xs-12">
  15. <div id="append_parent"></div>
  16. <div class="ncsc-form-default">
  17. <form method="post" id="tpl_form" name="tpl_form" action='{:U("Transport/save")}'>
  18. <input type="hidden" name="transport_id" value="{$output['transport'].id|default=''}" />
  19. <input type="hidden" name="form_submit" value="ok" />
  20. <?php $unit=get_weight_name(C('WEIGHT_ID')); ?>
  21. <dl>
  22. <dt>
  23. <label for="J_TemplateTitle" class="label-like">模版名称</label>
  24. </dt>
  25. <dd>
  26. <input type="text" class="text" id="title" autocomplete="off" value="{$output['transport'].title|default=''}" name="title">
  27. <p class="J_Message" style="display:none" error_type="title"><i class="icon-exclamation-sign"></i>必须填写模板名称</p>
  28. </dd>
  29. </dl>
  30. <dl>
  31. <dt>运送方式</dt>
  32. <dd>除指定地区外,其余地区的运费采用"默认运费"</dd>
  33. </dl>
  34. <!-----------------------POST begin--------------------------------------->
  35. <dl>
  36. <dt></dt>
  37. <dd class="trans-line">
  38. </dd>
  39. </dl>
  40. <div class="bottom">
  41. <label class="submit-border"><input type="submit" id="submit_tpl" class="submit" value="保存" /></label>
  42. </div>
  43. </form>
  44. <div class="ks-ext-mask" style="position: fixed; left: 0px; top: 0px; width: 100%; height: 100%; z-index: 999; display:none"></div>
  45. <div id="dialog_areas" class="dialog-areas" style="display:none">
  46. <div class="ks-contentbox">
  47. <div class="title">选择区域<a class="ks-ext-close" href="javascript:void(0)">X</a></div>
  48. <form method="post">
  49. <ul id="J_CityList">
  50. <include file="Transport:transport_area"/>
  51. </ul>
  52. <div class="bottom"> <a href="javascript:void(0);" class="J_Submit ncsc-btn ncsc-btn-green">确定</a> <a href="javascript:void(0);" class="J_Cancel ncsc-btn">取消</a> </div>
  53. </form>
  54. </div>
  55. </div>
  56. <div id="dialog_batch" class="dialog-batch" style="z-index: 9999; display:none">
  57. <div class="ks-contentbox">
  58. <div class="title">批量操作<a class="ks-ext-close" href="javascript:void(0)">X</a></div>
  59. <form method="post">
  60. <div class="batch">默认运费:
  61. <input class="w30 mr5 text" type="text" maxlength="4" autocomplete="off" data-field="start" value="1" name="express_start">
  62. <?php echo $unit; ?>内
  63. <input class="w60 text" type="text" maxlength="6" autocomplete="off" value="0.00" name="express_postage" data-field="postage"><em class="add-on"> <i class="icon-renminbi"></i> </em>,每增加
  64. <input class="w30 mr5 text" type="text" maxlength="4" autocomplete="off" value="1" data-field="plus" name="express_plus">
  65. <?php echo $unit; ?>,增加运费
  66. <input class="w60 text" type="text" maxlength="6" autocomplete="off" value="0.00" data-field="postageplus" name="express_postageplus"><em class="add-on"> <i class="icon-renminbi"></i> </em></div>
  67. <div class="J_DefaultMessage"></div>
  68. <div class="bottom"> <a href="javascript:void(0);" class="J_SubmitPL ncsc-btn ncsc-btn-green">确认</a> <a href="javascript:void(0);" class="J_Cancel ncsc-btn">取消</a> </div>
  69. </form>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. </block>
  76. <block name="javascript">
  77. <script src="__JS__/dialog/dialog.js" id="dialog_js" charset="utf-8"></script>
  78. <link rel="stylesheet" href="__JS__/dialog/dialog.css" />
  79. <js href="__JS__/transport.js" />
  80. <script>
  81. var unit ='<?php echo $unit; ?>';
  82. $(function(){
  83. $('.trans-line').append(TransTpl.replace(/TRANSTYPE/g,'kd'));
  84. $('.tbl-except').append(RuleHead);
  85. <?php if (isset($output['extend'])&&is_array($output['extend'])){?>
  86. <?php foreach ($output['extend'] as $value){?>
  87. <?php if ($value['is_default']==1){?>
  88. var cur_tr = $('.tbl-except').prev();
  89. $(cur_tr).find('input[data-field="start"]').val('<?php echo $value['snum'];?>');
  90. $(cur_tr).find('input[data-field="postage"]').val('<?php echo $value['sprice'];?>');
  91. $(cur_tr).find('input[data-field="plus"]').val('<?php echo $value['xnum'];?>');
  92. $(cur_tr).find('input[data-field="postageplus"]').val('<?php echo $value['xprice'];?>');
  93. <?php }else{?>
  94. StartNum +=1;
  95. cell = RuleCell.replace(/CurNum/g,StartNum);
  96. cell = cell.replace(/TRANSTYPE/g,'kd');
  97. $('.tbl-except').find('table').append(cell);
  98. $('.tbl-attach').find('.J_ToggleBatch').css('display','').html('批量操作');
  99. var cur_tr = $('.tbl-except').find('table').find('tr:last');
  100. $(cur_tr).find('.area-group>p').html('<?php echo $value['area_name'];?>');
  101. $(cur_tr).find('input[type="hidden"]').val('<?php echo trim($value['area_id'],',');?>|||<?php echo $value['area_name'];?>');
  102. $(cur_tr).find('input[data-field="start"]').val('<?php echo $value['snum'];?>');
  103. $(cur_tr).find('input[data-field="postage"]').val('<?php echo $value['sprice'];?>');
  104. $(cur_tr).find('input[data-field="plus"]').val('<?php echo $value['xnum'];?>');
  105. $(cur_tr).find('input[data-field="postageplus"]').val('<?php echo $value['xprice'];?>');
  106. <?php }?>
  107. <?php }?>
  108. <?php }?>
  109. });
  110. </script>
  111. </block>