123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- {include file="public/header" /}
- <div class="page">
- <form id="user_form" method="post">
- <div class="ds-default-table">
- <table>
- <tbody>
- <tr class="noborder">
- <td class="required w120">{$Think.lang.admin_storemoney_membername}</td>
- <td class="vatop rowform">
- <input type="hidden" name="store_id" id="store_id" value="{$store_info.store_id|default='0'}"/>
- <input id="seller_name" name="seller_name" value="{$store_info.seller_name|default=''}" class="input-txt" type="text" onchange="javascript:checkseller();">
- <span class="err"></span>
- <p class="notic"></p>
- </td>
- </tr>
- <tr class="noborder" id="tr_memberinfo">
- <td colspan="2" class="required" id="td_memberinfo">
- {notempty name="store_info"}
- {$store_info.seller_name}{$Think.lang.admin_storemoney_storemoney_info_1}{$store_info.store_avaliable_money}{$Think.lang.admin_storemoney_storemoney_info_2}{$store_info.store_freeze_money}
- {/notempty}
- </td>
- </tr>
- <tr>
- <td class="required w120">{$Think.lang.admin_storemoney_artificial_operatetype}</td>
- <td class="vatop rowform">
- <select id="operatetype" name="operatetype">
- <option value="1">{$Think.lang.admin_storemoney_artificial_operatetype_add}</option>
- <option value="2">{$Think.lang.admin_storemoney_artificial_operatetype_reduce}</option>
- <option value="3">{$Think.lang.admin_storemoney_artificial_operatetype_freeze}</option>
- <option value="4">{$Think.lang.admin_storemoney_artificial_operatetype_unfreeze}</option>
- </select>
- </td>
- </tr>
- <tr>
- <td class="required w120">{$Think.lang.admin_storemoney_price}</td>
- <td class="vatop rowform"><input type="text" class="form-control" name="amount" id="amount" value="" /></td>
- </tr>
- <tr>
- <td class="required w120">{$Think.lang.admin_storemoney_remark}</td>
- <td class="vatop rowform"><textarea name="lg_desc" ></textarea></td>
- </tr>
- </tbody>
- <tfoot>
- <tr class="tfoot">
- <td colspan="15"><input class="btn" type="submit" value="{$Think.lang.ds_submit}"/></td>
- </tr>
- </tfoot>
- </table>
- </div>
- </form>
- </div>
- <script>
- function checkseller() {
- var membername = $.trim($("#seller_name").val());
- if (membername == '') {
- $("#store_id").val('0');
- layer.alert('{$Think.lang.admin_storemoney_artificial_membernamenull_error}');
- return false;
- }
- var url = ADMINSITEURL + '/Storemoney/checkseller.html';
- $.post(url, {'name': membername}, function(data) {
- if (data.id)
- {
- $("#tr_memberinfo").show();
- var msg = " " + data.name + "{$Think.lang.admin_storemoney_storemoney_info_1}" + data.store_avaliable_money + "{$Think.lang.admin_storemoney_storemoney_info_2}" + data.store_freeze_money;
- $("#seller_name").val(data.name);
- $("#store_id").val(data.id);
- $("#td_memberinfo").text(msg);
- }
- else
- {
- $("#seller_name").val('');
- $("#store_id").val('0');
- layer.alert("{$Think.lang.admin_storemoney_userrecord_error}");
- }
- }, 'json');
- }
- </script>
- <script type="text/javascript">
- $(function(){
- $('#user_form').validate({
- errorPlacement: function(error, element) {
- error.appendTo(element.parent().parent().find('td:last'));
- },
- rules: {
- amount :{
- required: true,
- digits:true,
- min:0,
- },
- store_id:{
- required: true,
- }
-
-
- },
- messages: {
- amount :{
- required: '{$Think.lang.admin_storemoney_artificial_pricenull_error}',
- digits: '{$Think.lang.admin_storemoney_artificial_pricedigits_error}',
- min: '{$Think.lang.admin_storemoney_artificial_pricemin_error}'
- },
- }
- });
-
- });
-
-
- </script>
- </body>
|