| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <!-- <link href="__CDN__/assets/libs/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"> -->
- <script src="__CDN__/assets/libs/jquery/dist/jquery.min.js"></script>
- <script src="__CDN__/assets/libs/bootstrap/dist/js/bootstrap.min.js"></script>
- <table class="table table-striped">
- <thead>
- <tr>
- <th>{:__('订单ID')}</th>
- <th>{:__('订单号')}</th>
- <th>{:__('商品')}</th>
- <th>{:__('图片')}</th>
- <th>{:__('状态')}</th>
- </tr>
- </thead>
- <tbody>
- {volist name="row" id="vo" }
- <tr>
- <td>{$vo.id}</td>
- <td>{$vo.order_no}</td>
- <td>{$vo.zh_name|htmlentities}</td>
- <td><img src="{$vo.thum|htmlentities}" width="100px" height="80px"></td>
- <td>
- {switch name="vo.status"}
- {case value="0"}
- <span class="label label-success">{$vo.status_txt}</span>
- {/case}
- {case value="1"}
- <span class="label label-success">{$vo.status_txt}</span>
- {/case}
- {case value="2"}
- <span class="label label-success">{$vo.status_txt}</span>
- {/case}
- {case value="3"}
- <span class="label label-success">{$vo.status_txt}</span>
- {/case}
- {case value="4"}
- <span class="label label-danger">{$vo.status_txt}</span>
- {/case}
- {case value="5"}
- <span class="label label-default">{$vo.status_txt}</span>
- {/case}
- {case value="6"}
- <span class="label label-success">{$vo.status_txt}</span>
- {eq name="userpledge_status" value="0"}
- <a href="javascript:;" class="btn btn-xs btn-danger cancelStorage" data-id="{$vo.id}">{:__('Cancel storage')}</a>
- {/eq}
-
- {/case}
- {default /}
- {/switch}
- </td>
- </tr>
- {/volist}
- </tbody>
- </table>
- <div class="hide layer-footer">
- <label class="control-label col-xs-12 col-sm-2"></label>
- <div class="col-xs-12 col-sm-8">
- <button type="reset" class="btn btn-primary btn-embossed btn-close"
- onclick="Layer.closeAll();">{:__('Close')}</button>
- </div>
- </div>
- <script>
- $(function () {
- $(".cancelStorage").click(function () {
- var id = $(this).data('id');
- $.ajax({
- url: "user/Userpledge/cancelStorage",
- type: "POST",
- data: { id: id },
- dataType: "json",
- success: function(response) {
- if(response==1){
- window.location.reload(); // 刷新父页面
- }
- },
- error: function(xhr, status, error) {
- console.error("请求失败", error);
- },
- complete: function() {
- console.log("请求完成(无论成功/失败)");
- }
- });
- })
- })
- </script>
|