人人商城

orders.html 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. {template 'header'}
  2. <div id="js-store-orders" ng-controller="storeOrdersCtrl" ng-cloak>
  3. <ul class="we7-page-tab">
  4. <li {if $_GPC['type'] == ''}class="active"{/if}><a href="{php echo $this->createWebUrl('orders', array('direct' => 1))}">全部订单</a></li>
  5. <li {if $_GPC['type'] == STORE_ORDER_PLACE}class="active"{/if}><a href="{php echo $this->createWebUrl('orders', array('direct' => 1, 'type' => STORE_ORDER_PLACE))}">待支付</a></li>
  6. <li {if $_GPC['type'] == STORE_ORDER_FINISH}class="active"{/if}><a href="{php echo $this->createWebUrl('orders', array('direct' => 1, 'type' => STORE_ORDER_FINISH))}">已完成</a></li>
  7. </ul>
  8. <form action="{php echo $this->createWebUrl('orders', array('direct' => 1))}" class="form-inline we7-margin-bottom" method="post">
  9. <div class="input-group form-group" style="width: 400px;">
  10. <input type="text" name="orderid" value="" class="form-control" placeholder="请输入订单号">
  11. <span class="input-group-btn"><button class="btn btn-default"><i class="fa fa-search"></i></button></span>
  12. </div>
  13. </form>
  14. <table class="table we7-table">
  15. <col width="105px"/>
  16. <col width="155px"/>
  17. <col width="150px"/>
  18. <col width="150px"/>
  19. <col width="150px"/>
  20. <col width="120px"/>
  21. <col />
  22. <tr>
  23. <th></th>
  24. <th>商品名称/类型</th>
  25. <th>购买用户</th>
  26. <th class="text-center">应付价格</th>
  27. <th>交易类型</th>
  28. <th>实付价格</th>
  29. <th class="text-right">操作</th>
  30. </tr>
  31. </table>
  32. <table class="table we7-table vertical-middle" ng-repeat="order in orderList">
  33. <col width="105px"/>
  34. <col width="155px"/>
  35. <col width="150px"/>
  36. <col width="150px"/>
  37. <col width="150px"/>
  38. <col width="150px"/>
  39. <col width="120px"/>
  40. <col />
  41. <tr>
  42. <th colspan="7" class="color-gray bg-light-gray">
  43. <span class="we7-margin-right">创建时间:<span ng-bind="order.createtime"></span></span>
  44. <span class="we7-margin-right" >订单号:<span ng-bind="order.orderid"></span></span>
  45. <a class="color-default" ng-href="{{ './index.php?c=site&a=entry&do=goodsBuyer&m=store&operate=goods_info&direct=1&goods=' + order.goodsid}}">商品详情</a>
  46. </th>
  47. <th class="text-right bg-light-gray" ng-if="order.type == 1"><a ng-href="{{links.delOrder}}&id={{order.id}}" class="color-gray"><span class="wi wi-delete2"></span>删除</a></th>
  48. <th ng-if="order.type != 1"></th>
  49. </tr>
  50. <tr>
  51. <td ng-if="order.goods_info.type == 1 || order.goods_info.type == 4"><img ng-src="{{order.goods_info.module_info.logo}}" alt="" class="icon" width="60" height="60"/></td>
  52. <td ng-if="order.goods_info.type == 2 || order.goods_info.type == 3 || order.goods_info.type == 5"><div class="icon icon-api"><span class="wi wi-appjurisdiction"></span></div></td>
  53. <td ng-if="order.goods_info.type == 9">
  54. <div class="icon icon-api"><span class="wi wi-userjurisdiction"></span></div>
  55. </td>
  56. <td ng-if="order.goods_info.type == 6 || order.goods_info.type == 7 || order.goods_info.type == 8"><div class="icon icon-api"><span class="wi wi-api"></span></div></td>
  57. <td>
  58. <div class="name" ng-bind="order.goods_info.title"></div>
  59. <span ng-if="order.goods_info.user_group_name" ng-bind="order.goods_info.user_group_name"></span>
  60. </td>
  61. <td ng-bind="order.buyer"></td>
  62. <td ng-bind="order.account.name"></td>
  63. <td class="text-center">
  64. <div>¥<span ng-bind="order.amount"></span></div>
  65. </td>
  66. <td ng-if="order.type == 1" class="color-red">待付款</td>
  67. <td ng-if="order.type == 3" class="color-green">交易成功</td>
  68. <td>¥<span ng-bind="order.amount"></span></td>
  69. <td class="text-right">
  70. <span ng-if="role == 'buyer' && order.type == 1" class="btn btn-primary"><a ng-href="./index.php?c=site&a=entry&m=store&do=goodsbuyer&operate=pay_order&orderid={{order.id}}&direct=1">付款</a></span>
  71. <span ng-if="role == 'seller' && order.type == 1" class="btn btn-primary" ng-click="showChangePriceModal(order.id)">改价</span>
  72. </td>
  73. </tr>
  74. </table>
  75. <div class="pull-right">
  76. {$pager}
  77. </div>
  78. <div class="modal fade" id="change-price" tabindex="-1" role="dialog" aria-hidden="true">
  79. <div class="we7-modal-dialog modal-dialog we7-form">
  80. <div class="modal-content">
  81. <div class="modal-header">
  82. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  83. <div class="modal-title">修改价格</div>
  84. </div>
  85. <div class="modal-body">
  86. <div class="form-group">
  87. <input type="number" ng-model="newPrice.price" class="form-control" placeholder="请填写价格" />
  88. <span class="help-block"></span>
  89. </div>
  90. </div>
  91. <div class="modal-footer">
  92. <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="changePrice()">确定</button>
  93. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. <script>
  100. angular.module('storeApp').value('config', {
  101. 'role': {php echo json_encode($role)},
  102. 'orderList': {php echo !empty($order_list) ? json_encode($order_list) : 'null'},
  103. 'links': {
  104. 'changePrice': "{php echo $this->createWebUrl('orders', array('operate' => 'change_price', 'direct' => 1))}",
  105. 'delOrder': "{php echo $this->createWebUrl('orders', array('operate' => 'delete', 'direct' => 1))}",
  106. },
  107. });
  108. angular.bootstrap($('#js-store-orders'), ['storeApp']);
  109. </script>
  110. {template 'common/footer'}