adjust.html 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. {include file="public/header" /}
  2. <div class="page">
  3. <form id="user_form" method="post">
  4. <div class="ds-default-table">
  5. <table>
  6. <tbody>
  7. <tr class="noborder">
  8. <td class="required w120">{$Think.lang.admin_storedeposit_membername}</td>
  9. <td class="vatop rowform">
  10. <input type="hidden" name="store_id" id="store_id" value="{$store_info.store_id|default='0'}"/>
  11. <input id="seller_name" name="seller_name" value="{$store_info.seller_name|default=''}" class="input-txt" type="text" onchange="javascript:checkseller();">
  12. <span class="err"></span>
  13. <p class="notic"></p>
  14. </td>
  15. </tr>
  16. <tr class="noborder" id="tr_memberinfo">
  17. <td colspan="2" class="required" id="td_memberinfo">
  18. {notempty name="store_info"}
  19. {$store_info.seller_name}{$Think.lang.admin_storedeposit_storedeposit_info_1}{$store_info.store_avaliable_deposit}
  20. {/notempty}
  21. </td>
  22. </tr>
  23. <tr>
  24. <td class="required w120">{$Think.lang.admin_storedeposit_artificial_operatetype}</td>
  25. <td class="vatop rowform">
  26. <select id="operatetype" name="operatetype">
  27. <option value="1">{$Think.lang.admin_storedeposit_artificial_operatetype_add}</option>
  28. <option value="2">{$Think.lang.admin_storedeposit_artificial_operatetype_reduce}</option>
  29. </select>
  30. </td>
  31. </tr>
  32. <tr>
  33. <td class="required w120">{$Think.lang.admin_storedeposit_price}</td>
  34. <td class="vatop rowform"><input type="text" class="form-control" name="amount" id="amount" value="" /></td>
  35. </tr>
  36. <tr>
  37. <td class="required w120">{$Think.lang.admin_storedeposit_remark}</td>
  38. <td class="vatop rowform"><textarea name="lg_desc" ></textarea></td>
  39. </tr>
  40. </tbody>
  41. <tfoot>
  42. <tr class="tfoot">
  43. <td colspan="15"><input class="btn" type="submit" value="{$Think.lang.ds_submit}"/></td>
  44. </tr>
  45. </tfoot>
  46. </table>
  47. </div>
  48. </form>
  49. </div>
  50. <script>
  51. function checkseller() {
  52. var membername = $.trim($("#seller_name").val());
  53. if (membername == '') {
  54. $("#store_id").val('0');
  55. layer.alert('{$Think.lang.admin_storedeposit_artificial_membernamenull_error}');
  56. return false;
  57. }
  58. var url = ADMINSITEURL + '/Storedeposit/checkseller.html';
  59. $.post(url, {'name': membername}, function(data) {
  60. if (data.id)
  61. {
  62. $("#tr_memberinfo").show();
  63. var msg = " " + data.name + "{$Think.lang.admin_storedeposit_storedeposit_info_1}" + data.store_avaliable_deposit;
  64. $("#seller_name").val(data.name);
  65. $("#store_id").val(data.id);
  66. $("#td_memberinfo").text(msg);
  67. }
  68. else
  69. {
  70. $("#seller_name").val('');
  71. $("#store_id").val('0');
  72. layer.alert("{$Think.lang.admin_storedeposit_userrecord_error}");
  73. }
  74. }, 'json');
  75. }
  76. </script>
  77. <script type="text/javascript">
  78. $(function(){
  79. $('#user_form').validate({
  80. errorPlacement: function(error, element) {
  81. error.appendTo(element.parent().parent().find('td:last'));
  82. },
  83. rules: {
  84. amount :{
  85. required: true,
  86. digits:true,
  87. min:0,
  88. },
  89. store_id:{
  90. required: true,
  91. }
  92. },
  93. messages: {
  94. amount :{
  95. required: '{$Think.lang.admin_storedeposit_artificial_pricenull_error}',
  96. digits: '{$Think.lang.admin_storedeposit_artificial_pricedigits_error}',
  97. min: '{$Think.lang.admin_storedeposit_artificial_pricemin_error}'
  98. },
  99. }
  100. });
  101. });
  102. </script>
  103. </body>