detailed.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. <template>
  2. <view class="page">
  3. <view class="search-container">
  4. <view class="input-con">
  5. <view class="input">
  6. <image src="/static/images/search.png" mode=""></image>
  7. <input
  8. v-model="keyword"
  9. @confirm="searchList"
  10. confirm-type="search"
  11. class="f28_302"
  12. type="text"
  13. placeholder="输入工单编号或者用户名称进行搜索"
  14. />
  15. </view>
  16. </view>
  17. </view>
  18. <view class="list-container">
  19. <view class="item" v-for="(item, index) in dataList" :key="index" @tap.stop="toDetail(item.id)">
  20. <view class="main">
  21. <view class="row">
  22. <text class="label number">工单单号</text>
  23. <text class="value number">{{ item.dispatchOrderNo }}</text>
  24. </view>
  25. <view class="row">
  26. <text class="label">预约时间</text>
  27. <text class="value">{{ item.reportDate }}</text>
  28. </view>
  29. <view class="row">
  30. <text class="label">完工时间</text>
  31. <text class="value">{{ item.repairDate }}</text>
  32. </view>
  33. <view class="row">
  34. <text class="label">用户姓名</text>
  35. <text class="value">{{ item.userName }}</text>
  36. </view>
  37. <view class="row">
  38. <text class="label">总费用</text>
  39. <text class="value">{{ item.totalFee }}</text>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. <view v-if="dataList.length <= 0" class="no-text">
  45. <image src="/static/images/no-data.png"></image>
  46. <view class="texts">暂无数据</view>
  47. </view>
  48. </view>
  49. </template>
  50. <script>
  51. export default {
  52. data() {
  53. return {
  54. salaryNo: null,
  55. summaryBatchNo: null,
  56. type: null,
  57. keyword: '',
  58. dataList: []
  59. }
  60. },
  61. // 下拉刷新
  62. onPullDownRefresh() {
  63. this.getList()
  64. },
  65. onLoad({ salaryNo, summaryBatchNo, type }) {
  66. this.salaryNo = salaryNo
  67. this.summaryBatchNo = summaryBatchNo
  68. this.type = type
  69. // const { websit_number, number } = this.$store.state.userInfo.websit_worker
  70. // this.websitNumber = websit_number
  71. // this.workerNumber = number
  72. this.getList()
  73. },
  74. methods: {
  75. // 获取列表
  76. getList() {
  77. let url = ''
  78. let params = {}
  79. if (this.type == 1) {
  80. url = '/daily/mywallet/repair/detail'
  81. params = {
  82. // workerNumber: this.workerNumber,
  83. salaryNo: this.salaryNo || '',
  84. summaryBatchNo: this.summaryBatchNo || '',
  85. q: this.keyword
  86. }
  87. } else if (this.type == 2) {
  88. url = '/daily/mywallet/repair/month/detail'
  89. params = {
  90. // workerNumber: this.workerNumber,
  91. salaryNo: this.salaryNo || '',
  92. summaryBatchNo: this.summaryBatchNo || '',
  93. q: this.keyword
  94. }
  95. } else {
  96. url = '/daily/mywallet/not/issue/list'
  97. params = {
  98. // workerNumber: this.workerNumber,
  99. salaryNo: this.salaryNo || '',
  100. summaryBatchNo: this.summaryBatchNo || '',
  101. q: this.keyword,
  102. install: false
  103. }
  104. }
  105. this.$axios({
  106. url,
  107. method: 'get',
  108. params,
  109. isLoading: 1
  110. })
  111. .then(res => {
  112. this.dataList = res.data
  113. })
  114. .finally(() => {
  115. uni.stopPullDownRefresh()
  116. })
  117. },
  118. searchList() {
  119. this.getList()
  120. },
  121. toDetail(id) {
  122. uni.navigateTo({
  123. url:
  124. '/packageMine/pages/repairSettle/detail?salaryNo=' +
  125. (this.salaryNo || '') +
  126. '&summaryBatchNo=' +
  127. (this.summaryBatchNo || '') +
  128. '&id=' +
  129. id +
  130. '&type=' +
  131. this.type
  132. })
  133. }
  134. }
  135. }
  136. </script>
  137. <style lang="scss" scoped>
  138. .page {
  139. }
  140. .search-container {
  141. background-color: #ffffff;
  142. width: 100%;
  143. border-bottom: 2rpx solid #e5e5e5;
  144. padding: 0 30rpx;
  145. .input-con {
  146. @include flex_ac;
  147. height: 88rpx;
  148. width: 100%;
  149. .input {
  150. @include flex_ac;
  151. flex: 1;
  152. padding: 0 24rpx;
  153. height: 64rpx;
  154. background: #f7f7f7;
  155. border-radius: 32rpx;
  156. input {
  157. flex: 1;
  158. }
  159. image {
  160. width: 28rpx;
  161. height: 28rpx;
  162. margin-right: 16rpx;
  163. }
  164. }
  165. }
  166. }
  167. .list-container {
  168. padding: 30rpx 30rpx 0;
  169. .item {
  170. margin-bottom: 20rpx;
  171. &:last-child {
  172. margin-bottom: 0;
  173. }
  174. .date {
  175. font-size: 30rpx;
  176. color: #666666;
  177. margin-bottom: 10rpx;
  178. }
  179. .main {
  180. color: #666666;
  181. background: #ffffff;
  182. padding: 15rpx 30rpx;
  183. border-radius: 20rpx;
  184. .row {
  185. display: flex;
  186. align-items: center;
  187. justify-content: space-between;
  188. height: 60rpx;
  189. .label {
  190. font-size: 28rpx;
  191. color: #666666;
  192. }
  193. .value {
  194. font-size: 28rpx;
  195. color: #333333;
  196. &.orange {
  197. color: #e95505;
  198. }
  199. }
  200. .number {
  201. color: #333333;
  202. }
  203. }
  204. }
  205. }
  206. }
  207. .no-text {
  208. height: 100%;
  209. width: 100%;
  210. margin-top: 50rpx;
  211. text-align: center;
  212. image {
  213. width: 450rpx;
  214. height: 250rpx;
  215. margin-bottom: 40rpx;
  216. }
  217. .texts {
  218. color: #cccccc;
  219. font-size: 28rpx;
  220. }
  221. }
  222. </style>