orderprocessrecord.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. <template>
  2. <view class="wrap">
  3. <uni-nav-bar dark :fixed="true" backgroundColor="#3F9EFF" statusBar="false" left-icon="left" left-text="返回"
  4. @clickLeft="toBack">
  5. <view style="width: 100%;display: flex;flex-direction: row;justify-content: center;align-items: center;">
  6. <text style="color: white;font-size: 1rem;">{{title}}</text>
  7. </view>
  8. </uni-nav-bar>
  9. <view class="container">
  10. <uList>
  11. <uni-list-item v-for="item in list" :key="item.id" showArrow="right" clickable
  12. @click="toOrderProcessDetail(item.id)">
  13. <template v-slot:body>
  14. <view style="width: 100%;display: flex;flex-direction: column;">
  15. <view style="width: 100%;display: flex;flex-direction: row;align-items: center;">
  16. <uIcons class="input-uni-icon" type="info" size="18" color="coral" />
  17. <text style="margin-left: 5px;font-size: 0.8rem;">{{item.processDesc}}
  18. </text>
  19. </view>
  20. <view style="margin-top: 4px;display: flex;flex-direction: row;align-items: center;">
  21. <view style="font-size: 0.7rem;color: olivedrab;">{{item.orderStatusName}}</view>
  22. <view style="margin-left:10px;font-size: 0.7rem;color:black;">{{item.createTime}}
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. </uni-list-item>
  28. </uList>
  29. <uGroup>
  30. <view class="uni-pagination-box">
  31. <uni-pagination show-icon :page-size="pageSize" :current="pageCurrent" :total="total"
  32. @change="change" />
  33. </view>
  34. </uGroup>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. import uNavBar from '@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue'
  40. import uDataPicker from '@/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue'
  41. import uGroup from '@/uni_modules/uni-group/uni-group.vue'
  42. import uSection from '@/uni_modules/uni-section/uni-section.vue'
  43. import uPagination from '@/uni_modules/uni-pagination/components/uni-pagination/uni-pagination.vue'
  44. import uBreadcrumb from '@/uni_modules/uni-breadcrumb/components/uni-breadcrumb/uni-breadcrumb.vue'
  45. import uList from '@/uni_modules/uni-list/components/uni-list/uni-list.vue'
  46. import uListItem from '@/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue'
  47. import uIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
  48. import http from '@/http/api.js';
  49. export default {
  50. components: {
  51. uNavBar,
  52. uList,
  53. uListItem,
  54. uIcons,
  55. uGroup,
  56. uSection,
  57. },
  58. onLoad(option) {
  59. console.log(option.id);
  60. this.orderId = option.id;
  61. },
  62. data() {
  63. return {
  64. orderId: 0,
  65. list: [],
  66. title: '工单填报记录',
  67. desc: '',
  68. pageSize: 10,
  69. // 当前页
  70. pageCurrent: 1,
  71. // 数据总量
  72. total: 0,
  73. }
  74. },
  75. computed: {
  76. getIcon() {
  77. return path => {
  78. return 'https://cdn.uviewui.com/uview/example/' + path + '.png';
  79. }
  80. },
  81. },
  82. onShow() {
  83. this.getOrderProcessList();
  84. },
  85. methods: {
  86. toBack() {
  87. uni.navigateBack({
  88. delta: 1
  89. })
  90. },
  91. // 分页触发
  92. change(e) {
  93. //this.$refs.table.clearSelection()
  94. this.selectedIndexs.length = 0
  95. this.pageCurrent = e.current;
  96. this.getOrderProcessList()
  97. },
  98. getOrderProcessList() {
  99. const current = this.pageCurrent;
  100. const size = this.pageSize;
  101. const isSubmit = '0';
  102. var that = this;
  103. var postData = {};
  104. postData['id'] = this.orderId;
  105. http.request({
  106. url: '/galaxy-test/rtu/check/order/process/page',
  107. method: 'GET',
  108. data: postData,
  109. params: {
  110. current,
  111. size,
  112. isSubmit
  113. }
  114. }).then(res => {
  115. if (res.data.records != null) {
  116. that.list = res.data.records;
  117. }
  118. this.total = res.data.total;
  119. }).catch(err => {
  120. console.log(err)
  121. })
  122. },
  123. toOrderProcessDetail(id) {
  124. console.log("opne record ", id)
  125. var url = '/pages/check-order/orderprocessreportdetail?processId=' + id;
  126. uni.navigateTo({
  127. url: url
  128. })
  129. },
  130. }
  131. }
  132. </script>
  133. <style>
  134. </style>
  135. <style lang="scss" scoped>
  136. .container {
  137. padding: 0 0 150rpx;
  138. }
  139. .u-cell-icon {
  140. width: 36rpx;
  141. height: 36rpx;
  142. margin-right: 8rpx;
  143. }
  144. .slot-box {
  145. /* #ifndef APP-NVUE */
  146. display: flex;
  147. /* #endif */
  148. flex-direction: row;
  149. align-items: center;
  150. }
  151. .slot-image {
  152. /* #ifndef APP-NVUE */
  153. display: block;
  154. /* #endif */
  155. margin-right: 10px;
  156. width: 30px;
  157. height: 30px;
  158. }
  159. .slot-text {
  160. flex: 1;
  161. font-size: 14px;
  162. color: #4cd964;
  163. margin-right: 10px;
  164. }
  165. .content-box {
  166. flex: 1;
  167. /* #ifdef APP-NVUE */
  168. justify-content: center;
  169. /* #endif */
  170. height: 100%;
  171. line-height: 44px;
  172. padding: 0 15px;
  173. position: relative;
  174. background-color: #fff;
  175. border-bottom-color: #f5f5f5;
  176. border-bottom-width: 1px;
  177. border-bottom-style: solid;
  178. }
  179. .content-text {
  180. font-size: 15px;
  181. }
  182. .example-body {
  183. /* #ifndef APP-NVUE */
  184. display: flex;
  185. /* #endif */
  186. flex-direction: row;
  187. justify-content: center;
  188. padding: 10px 0;
  189. background-color: #fff;
  190. }
  191. .button {
  192. border-color: #e5e5e5;
  193. border-style: solid;
  194. border-width: 1px;
  195. padding: 4px 8px;
  196. border-radius: 4px;
  197. }
  198. .button-text {
  199. font-size: 15px;
  200. }
  201. .slot-button {
  202. /* #ifndef APP-NVUE */
  203. display: flex;
  204. height: 100%;
  205. /* #endif */
  206. flex: 1;
  207. flex-direction: row;
  208. justify-content: center;
  209. align-items: center;
  210. padding: 0 20px;
  211. background-color: #ff5a5f;
  212. }
  213. .slot-button-text {
  214. color: #ffffff;
  215. font-size: 14px;
  216. }
  217. </style>