peopleOrders.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. <template>
  2. <view>
  3. <view class="tab" style="height: 180px;">
  4. <u-tabs :list="tab" @click="click" :lineHeight="5"></u-tabs>
  5. <view style="display: flex;margin-top: 10px;">
  6. <u--input placeholder="输入名字" border="surround" v-model="param.buyUserName"
  7. @clear="param.buyUserName='';getData()" clearable>
  8. </u--input>
  9. <view class="reset_btn" @click="getData">搜索</view>
  10. </view>
  11. <view style="border-radius: 10px;padding: 10px 20px;">
  12. <view style="margin-top: 10px;">
  13. <u-row customStyle="margin-bottom: 10px">
  14. <u-col span="6">
  15. <view>商品 {{settle.goodsName}}</view>
  16. </u-col>
  17. <u-col span="6">
  18. <view class="demo-layout bg-purple">车牌号 {{settle.veNo}}</view>
  19. </u-col>
  20. </u-row>
  21. <u-row customStyle="margin-bottom: 10px">
  22. <u-col span="4">
  23. <view>重量 {{settle.sumGrossWt}}</view>
  24. </u-col>
  25. <u-col span="8">
  26. <view class="demo-layout bg-purple">申报时间 {{settle.declTime.substr(0,16)}}</view>
  27. </u-col>
  28. </u-row>
  29. </view>
  30. </view>
  31. </view>
  32. <view class="goodsList" >
  33. <view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
  34. <view class="title">{{ item.buyUserName }}
  35. <view class="state" v-if="item.peopleConfirmStatus == 0&&item.upStatus==1&&item.resaleStatus==0">
  36. <text class="icon">&#xe830;</text>
  37. <text>未确认</text>
  38. </view>
  39. <view class="state" v-if="item.peopleConfirmStatus == 1&&item.upStatus==1&&item.resaleStatus==0">
  40. <text class="icon" style="color: #13ce66">&#xe830;</text>
  41. <text>已确认未上架</text>
  42. </view>
  43. <view class="state" v-if="item.peopleConfirmStatus == 1&&item.upStatus==2&&item.resaleStatus==0">
  44. <text class="icon" style="color: #13ce66">&#xe830;</text>
  45. <text>已上架未转售</text>
  46. </view>
  47. <view class="state" v-if="item.resaleStatus == 1">
  48. <text class="icon" style="color: #13ce66">&#xe830;</text>
  49. <text>已转售</text>
  50. </view>
  51. </view>
  52. <view class="con">
  53. <view class="desc omit">
  54. <text>重量 {{ item.totalWeight }} | 数量 {{item.buyQty}} </text>
  55. </view>
  56. <view class="desc omit">
  57. <text>申报额度 ¥{{ item.buyAmount }}</text>
  58. </view>
  59. <view class="price" v-if="item.upPrice">上架 ¥{{ item.upPrice }}</view>
  60. </view>
  61. <view class="op">
  62. <template>
  63. <a :href="'tel:'+item.phone" class="an down_btn">拨打电话</a>
  64. </template>
  65. </view>
  66. </view>
  67. <view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
  68. <u-empty v-if="!loadMore && list.length == 0"></u-empty>
  69. </view>
  70. </view>
  71. </template>
  72. <script>
  73. export default {
  74. data() {
  75. return {
  76. tab: [{
  77. name: '全部',
  78. peopleConfirmStatus: '', //边民确认状态
  79. upStatus: '', //订单完成状态
  80. resaleStatus: '' //订单转售状态
  81. },
  82. {
  83. name: '未确认',
  84. peopleConfirmStatus: 0,
  85. upStatus: 1,
  86. resaleStatus: 0
  87. },
  88. {
  89. name: '未上架',
  90. peopleConfirmStatus: 1,
  91. upStatus: 1,
  92. resaleStatus: 0
  93. },
  94. {
  95. name: '已上架',
  96. peopleConfirmStatus: 1,
  97. upStatus: 2,
  98. resaleStatus: 0
  99. },
  100. {
  101. name: '已转售',
  102. peopleConfirmStatus: 1,
  103. upStatus: 2,
  104. resaleStatus: 1
  105. }
  106. ],
  107. param: {
  108. pageNo: 1,
  109. pageSize: 10,
  110. buyUserName: '',
  111. saleMainId: ''
  112. },
  113. settle: {},
  114. user: this.getUser(),
  115. list: [],
  116. loadMore: false,
  117. };
  118. },
  119. onLoad(e) {
  120. if (e.mainId) {
  121. this.param.saleMainId = e.mainId;
  122. this.settle = e;
  123. this.getData();
  124. }
  125. },
  126. methods: {
  127. makePhoneCall(item) {
  128. uni.makePhoneCall({
  129. phoneNumber: item.phone
  130. });
  131. },
  132. getData() {
  133. this.http.request({
  134. url: '/level-one-server/app/TbOrder/getListBySaleMainId',
  135. loading: 'false',
  136. data: this.param,
  137. success: res => {
  138. this.loadMore = parseInt(res.data.pageCount) > this.param.pageNo;
  139. if (res.data.data) {
  140. this.list.push(...res.data.data);
  141. }
  142. if (this.param.pageNo == 1 &&res.data.data&& res.data.data.length==0) {
  143. this.list = []
  144. }
  145. }
  146. });
  147. },
  148. // 点击tab切换
  149. click(e) {
  150. this.param.peopleConfirmStatus = e.peopleConfirmStatus;
  151. this.param.upStatus = e.upStatus;
  152. this.param.resaleStatus = e.resaleStatus;
  153. this.refresh();
  154. },
  155. detail(item) {
  156. uni.navigateTo({
  157. url: '/pages/market/one/leader/detail?id=' + item.id
  158. });
  159. },
  160. // 刷新数据
  161. refresh() {
  162. this.loadMore = true;
  163. this.param.pageNo = 1;
  164. this.list = [];
  165. this.getData();
  166. },
  167. },
  168. //下拉刷新
  169. onPullDownRefresh() {
  170. this.param.pageNo = 1;
  171. this.param.buyUserName = '';
  172. setTimeout(() => {
  173. this.getData();
  174. uni.stopPullDownRefresh();
  175. }, 1000);
  176. },
  177. //上拉加载
  178. onReachBottom() {
  179. if (this.loadMore) {
  180. this.param.pageNo++;
  181. this.getData();
  182. }
  183. }
  184. };
  185. </script>
  186. <style lang="scss">
  187. page {
  188. background-color: $pg;
  189. }
  190. .state {
  191. margin-right: -70px;
  192. }
  193. .tab {
  194. .reset_btn {
  195. line-height: 35px;
  196. padding: 0 15px;
  197. border: 1px solid #e2e2e2;
  198. border-radius: 8px;
  199. margin-left: 10px;
  200. background: #e2e2e2
  201. }
  202. }
  203. .goodsList {
  204. .item {
  205. .con {
  206. width: 60%;
  207. .desc {
  208. uni-text {
  209. padding-right: 5px;
  210. }
  211. }
  212. }
  213. }
  214. }
  215. .down_btn {
  216. color: #f0f4f7;
  217. width: 66px;
  218. background-color: #3c9cff;
  219. text-align: center;
  220. border-radius: 10px;
  221. font-size: 13px;
  222. padding: 2px 4px;
  223. text-decoration: none;
  224. }
  225. .call_phone {
  226. position: relative;
  227. right: 20px;
  228. top: 5px;
  229. display: flex;
  230. }
  231. </style>