Myorder.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  1. <template>
  2. <view class="billall">
  3. <view class="topbill">
  4. <view class="topbilledit" @click="typechange">
  5. <view class="changetime1">
  6. {{mytype}}
  7. </view>
  8. <view class="changetime2">
  9. <u-icon name="arrow-down-fill" color="#666666" size="20"></u-icon>
  10. </view>
  11. </view>
  12. </view>
  13. <view class="u-listdata">
  14. <view style="padding:10rpx 0 0 30rpx">
  15. 共有 <span style="color: red">{{totalnumber}}</span>条记录
  16. </view>
  17. <u-list @scrolltolower="scrolltolower" :pagingEnabled='true'>
  18. <u-list-item v-for="(item, index) in indexList" :key="index">
  19. <view class="companylist" @click="seedetail(item)">
  20. <view class="outstanding" v-if='item.status==0'>
  21. 待支付
  22. </view>
  23. <view class="settled" v-if='item.status==1'>
  24. 已支付
  25. </view>
  26. <view class="guanbi" v-if="item.status=='-1'">
  27. 已关闭
  28. </view>
  29. <view class="Currentamount" style="margin-top: 20rpx;">
  30. 支付金额: <span>¥{{item.payAmount}}</span>
  31. </view>
  32. <view class="Currentamount">
  33. 支付时间: {{item.payAt}}
  34. </view>
  35. <view class="Currentamount">
  36. 下单时间: {{item.createDate}}
  37. </view>
  38. <!-- <view class="Currentamount">
  39. 交易类型: {{item.tradeType}}
  40. </view> -->
  41. <view class="Currentamount">
  42. 交易类型: 微信支付
  43. </view>
  44. </view>
  45. </u-list-item>
  46. </u-list>
  47. </view>
  48. <u-picker :show="showtype" :itemHeight="80" :columns="columnstype" keyName="label" @confirm="confirmtype" @cancel='canceltype'>
  49. </u-picker>
  50. </view>
  51. </template>
  52. <script>
  53. //import { isEmpty, getDictDataList } from "@/utils/index";
  54. export default {
  55. components: {
  56. },
  57. data() {
  58. return {
  59. totalnumber: 0,
  60. setyesno: true,
  61. indexList: [],
  62. dataList: [],
  63. dataForm: {
  64. order: "",
  65. orderField: "",
  66. status: "",
  67. page: 1,
  68. limit: 10,
  69. },
  70. pd: true,
  71. showtype: false,
  72. showdct: false,
  73. mytitle: '',
  74. alldata: [],
  75. showfloor: false,
  76. loading: false,
  77. columns: [],
  78. columnData: [],
  79. myday: '',
  80. mytype: '全部',
  81. showPicker: false,
  82. //myday: currentDate,
  83. columnstype: [
  84. [{
  85. label: '全部',
  86. id: ''
  87. }, {
  88. label: '已关闭',
  89. id: '-1'
  90. },
  91. {
  92. label: '待支付',
  93. id: '0'
  94. },
  95. {
  96. label: '已支付',
  97. id: '1'
  98. },
  99. ]
  100. ],
  101. }
  102. },
  103. //监听页面加载,其参数为上个页面传递的数据,参数类型为 Object(用于页面传参
  104. onLoad() {
  105. this.getalldata();
  106. // this.loadmore();
  107. },
  108. //监听页面初次渲染完成。注意如果渲染速度快,会在页面进入动画完成前触发
  109. onReady() {
  110. // 微信小程序需要用此写法
  111. },
  112. //监听页面隐藏
  113. onHide() {},
  114. //监听窗口尺寸变化
  115. onResize() {},
  116. //监听页面卸载
  117. onUnload() {},
  118. //监听用户下拉动作,一般用于下拉刷新
  119. onPullDownRefresh() {},
  120. methods: {
  121. seedetail(e) {
  122. uni.navigateTo({
  123. url: `/pages/my/Myorder/Orderdetails/Orderdetails?companyOrgId=${e.id}`
  124. });
  125. },
  126. scrolltolower() {
  127. if (this.pd) {
  128. this.getalldata();
  129. } else {
  130. return
  131. }
  132. },
  133. getalldata() {
  134. this.$api.get('/order/page', this.dataForm)
  135. .then(res => {
  136. console.log('111111111111111111', res.data.data)
  137. this.totalnumber = res.data.data.total;
  138. if (res.data.data.list.length != 0) {
  139. this.indexList.push(...res.data.data.list);
  140. this.dataForm.page = this.dataForm.page + 1;
  141. this.pd = true;
  142. } else {
  143. uni.showToast({
  144. title: '暂无更多数据了',
  145. icon: 'none',
  146. duration: 1500
  147. })
  148. this.pd = false;
  149. }
  150. })
  151. },
  152. canceltype() {
  153. this.showtype = false;
  154. },
  155. confirmtype(e) {
  156. console.log('111111111111111111', e.value[0])
  157. this.showtype = false;
  158. this.mytype = e.value[0].label;
  159. this.dataForm.status = e.value[0].id;
  160. this.indexList = [];
  161. this.dataForm.page = 1;
  162. this.getalldata();
  163. },
  164. typechange() {
  165. this.showtype = true;
  166. },
  167. }
  168. }
  169. </script>
  170. <style lang="scss">
  171. .Currentamount {
  172. padding-left: 30rpx;
  173. height: 50rpx;
  174. line-height: 50rpx;
  175. color: #BCB3A7;
  176. span {
  177. color: #FA5555;
  178. padding-left: 9rpx;
  179. }
  180. }
  181. .Callfee {
  182. width: 100rpx;
  183. height: 45rpx;
  184. text-align: center;
  185. line-height: 45rpx;
  186. color: #5C8FFF;
  187. border: 1px solid #5C8FFF;
  188. font-size: 22rpx;
  189. position: absolute;
  190. bottom: 10rpx;
  191. right: 10px;
  192. font-weight: bold;
  193. }
  194. .companylist {
  195. margin: 20rpx 30rpx;
  196. background: #fff;
  197. height: 230rpx;
  198. border-radius: 10px;
  199. position: relative;
  200. h3 {
  201. height: 70rpx;
  202. line-height: 70rpx;
  203. padding-left: 30rpx;
  204. }
  205. }
  206. .settled {
  207. background-color: #09C700;
  208. width: 100rpx;
  209. height: 40rpx;
  210. text-align: center;
  211. line-height: 40rpx;
  212. color: #fff;
  213. font-size: 14rpx;
  214. position: absolute;
  215. top: 0px;
  216. right: 0px;
  217. border-top-right-radius: 10rpx;
  218. border-bottom-left-radius: 10rpx;
  219. }
  220. .outstanding {
  221. background-color: #30D3A2;
  222. width: 100rpx;
  223. height: 40rpx;
  224. text-align: center;
  225. line-height: 40rpx;
  226. color: #fff;
  227. font-size: 14rpx;
  228. position: absolute;
  229. top: 0px;
  230. right: 0px;
  231. border-top-right-radius: 10rpx;
  232. border-bottom-left-radius: 10rpx;
  233. }
  234. .guanbi {
  235. background-color: red;
  236. width: 100rpx;
  237. height: 40rpx;
  238. text-align: center;
  239. line-height: 40rpx;
  240. color: #fff;
  241. font-size: 14rpx;
  242. position: absolute;
  243. top: 0px;
  244. right: 0px;
  245. border-top-right-radius: 10rpx;
  246. border-bottom-left-radius: 10rpx;
  247. }
  248. .billall {}
  249. .topbill {
  250. display: flex;
  251. justify-content: center;
  252. align-items: center;
  253. height: 100rpx;
  254. background-color: #e6e6e6;
  255. }
  256. .topbilledit {
  257. display: flex;
  258. justify-content: space-around;
  259. align-items: center;
  260. }
  261. .changetime1 {
  262. padding-right: 10rpx;
  263. }
  264. </style>