orderprocesslist.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  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. <!-- <u-gap height="75px"></u-gap> -->
  10. <view class="container">
  11. <uSection title="工单信息" titleFontSize="0.8rem" type="line">
  12. <view style="width: 100%;padding-left: 10px;padding-right: 10px;">
  13. <view style="display: flex;flex-direction: row;align-items: center;">
  14. <view style="font-size: 0.7rem;">报单时间:</view>
  15. <view style="margin-left: 5px;font-size: 0.7rem;">{{orderInfo.createTime}}</view>
  16. </view>
  17. <view style="margin-top: 5px;display: flex;flex-direction: row;align-items: center;">
  18. <view style="font-size: 0.7rem;">工单说明:</view>
  19. <view style="margin-left: 5px;font-size: 0.7rem;">{{orderInfo.orderDesc}}</view>
  20. </view>
  21. <view style="margin-top: 10px;padding-left: 0px;padding-right: 0px;">
  22. <button style="background-color: lightblue;" type="default"
  23. @click="toOrderProcessReport()">开始填报</button>
  24. </view>
  25. </view>
  26. </uSection>
  27. <uSection title="工单填报记录" titleFontSize="0.8rem" type="line">
  28. <uList>
  29. <uni-list-item v-for="item in list" :key="item.id" showArrow="right" clickable
  30. @click="toOrderProcessDetail(item.id)">
  31. <!-- 自定义 body -->
  32. <template v-slot:body>
  33. <view style="width: 100%;display: flex;flex-direction: column;">
  34. <view
  35. style="width: 100%;display: flex;flex-direction: row;align-items: center;">
  36. <uIcons class="input-uni-icon" type="info" size="18" color="coral" />
  37. <text style="margin-left: 5px;font-size: 0.8rem;">{{item.processDesc}}
  38. </text>
  39. </view>
  40. <view style="margin-top: 4px;display: flex;flex-direction: row;align-items: center;">
  41. <view style="font-size: 0.7rem;color: olivedrab;">{{item.orderStatusName}}</view>
  42. <view style="margin-left:10px;font-size: 0.7rem;color:black;">{{item.createTime}}
  43. </view>
  44. </view>
  45. </view>
  46. </template>
  47. </uni-list-item>
  48. </uList>
  49. <uGroup>
  50. <view class="uni-pagination-box">
  51. <uni-pagination show-icon :page-size="pageSize" :current="pageCurrent" :total="total"
  52. @change="change" />
  53. </view>
  54. </uGroup>
  55. </uSection>
  56. </view>
  57. <u-gap height="70"></u-gap>
  58. </view>
  59. </template>
  60. <script>
  61. import uNavBar from '@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue'
  62. import uDataPicker from '@/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue'
  63. import uGroup from '@/uni_modules/uni-group/uni-group.vue'
  64. import uSection from '@/uni_modules/uni-section/uni-section.vue'
  65. import uPagination from '@/uni_modules/uni-pagination/components/uni-pagination/uni-pagination.vue'
  66. import uBreadcrumb from '@/uni_modules/uni-breadcrumb/components/uni-breadcrumb/uni-breadcrumb.vue'
  67. import uList from '@/uni_modules/uni-list/components/uni-list/uni-list.vue'
  68. import uListItem from '@/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue'
  69. import uIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
  70. import http from '@/http/api.js';
  71. export default {
  72. components: {
  73. uNavBar,
  74. uList,
  75. uListItem,
  76. uIcons,
  77. uGroup,
  78. uSection,
  79. },
  80. onLoad(option) {
  81. console.log(option.id);
  82. this.orderId = option.id;
  83. //this.baseURL = process.env.NODE_ENV === 'development' ? devUrl : prodUrl;
  84. },
  85. data() {
  86. return {
  87. orderId: 0,
  88. orderInfo: {
  89. 'id': 0,
  90. 'updateTime': '',
  91. 'orderDesc': ''
  92. },
  93. list: [],
  94. title: '工单填报管理',
  95. desc: '',
  96. pageSize: 10,
  97. // 当前页
  98. pageCurrent: 1,
  99. // 数据总量
  100. total: 0,
  101. }
  102. },
  103. computed: {
  104. getIcon() {
  105. return path => {
  106. return 'https://cdn.uviewui.com/uview/example/' + path + '.png';
  107. }
  108. },
  109. },
  110. onShow() {
  111. // uni.setNavigationBarTitle({
  112. // title: "工单处理管理"
  113. // });
  114. this.getOrderInfo();
  115. this.getOrderProcessList();
  116. },
  117. created() {
  118. },
  119. methods: {
  120. toBack() {
  121. uni.navigateBack({
  122. delta: 1
  123. })
  124. },
  125. // 分页触发
  126. change(e) {
  127. //this.$refs.table.clearSelection()
  128. this.selectedIndexs.length = 0
  129. this.pageCurrent = e.current;
  130. this.getOrderList()
  131. },
  132. getOrderInfo() {
  133. var that = this;
  134. var postData = {};
  135. postData['id'] = this.orderId;
  136. http.request({
  137. url: '/galaxy-test/rtu/check/order/detail',
  138. method: 'GET',
  139. data: postData
  140. }).then(res => {
  141. console.log(res)
  142. if (res.data != null) {
  143. that.orderInfo = res.data;
  144. }
  145. }).catch(err => {
  146. console.log(err)
  147. })
  148. },
  149. getOrderProcessList() {
  150. const current = this.pageCurrent;
  151. const size = this.pageSize;
  152. const isSubmit = '0';
  153. var that = this;
  154. var postData = {};
  155. postData['id'] = this.orderId;
  156. http.request({
  157. url: '/galaxy-test/rtu/check/order/process/page',
  158. method: 'GET',
  159. data: postData,
  160. params: {
  161. current,
  162. size,
  163. isSubmit
  164. }
  165. }).then(res => {
  166. if (res.data.records != null) {
  167. that.list = res.data.records;
  168. }
  169. this.total = res.data.total;
  170. }).catch(err => {
  171. console.log(err)
  172. })
  173. },
  174. toOrderProcessReport() {
  175. var url = '/pages/check-order/orderprocessreport?orderId=' + this.orderId;
  176. uni.navigateTo({
  177. url: url
  178. })
  179. },
  180. toOrderProcessDetail(id) {
  181. console.log("opne record ", id)
  182. var url = '/pages/check-order/orderprocessreportdetail?processId=' + id;
  183. uni.navigateTo({
  184. url: url
  185. })
  186. },
  187. }
  188. }
  189. </script>
  190. <style>
  191. /* page {
  192. background-color: rgb(240, 242, 244);
  193. } */
  194. </style>
  195. <style lang="scss" scoped>
  196. .container {
  197. padding: 0 0 150rpx;
  198. }
  199. .u-cell-icon {
  200. width: 36rpx;
  201. height: 36rpx;
  202. margin-right: 8rpx;
  203. }
  204. .slot-box {
  205. /* #ifndef APP-NVUE */
  206. display: flex;
  207. /* #endif */
  208. flex-direction: row;
  209. align-items: center;
  210. }
  211. .slot-image {
  212. /* #ifndef APP-NVUE */
  213. display: block;
  214. /* #endif */
  215. margin-right: 10px;
  216. width: 30px;
  217. height: 30px;
  218. }
  219. .slot-text {
  220. flex: 1;
  221. font-size: 14px;
  222. color: #4cd964;
  223. margin-right: 10px;
  224. }
  225. .content-box {
  226. flex: 1;
  227. /* #ifdef APP-NVUE */
  228. justify-content: center;
  229. /* #endif */
  230. height: 100%;
  231. line-height: 44px;
  232. padding: 0 15px;
  233. position: relative;
  234. background-color: #fff;
  235. border-bottom-color: #f5f5f5;
  236. border-bottom-width: 1px;
  237. border-bottom-style: solid;
  238. }
  239. .content-text {
  240. font-size: 15px;
  241. }
  242. .example-body {
  243. /* #ifndef APP-NVUE */
  244. display: flex;
  245. /* #endif */
  246. flex-direction: row;
  247. justify-content: center;
  248. padding: 10px 0;
  249. background-color: #fff;
  250. }
  251. .button {
  252. border-color: #e5e5e5;
  253. border-style: solid;
  254. border-width: 1px;
  255. padding: 4px 8px;
  256. border-radius: 4px;
  257. }
  258. .button-text {
  259. font-size: 15px;
  260. }
  261. .slot-button {
  262. /* #ifndef APP-NVUE */
  263. display: flex;
  264. height: 100%;
  265. /* #endif */
  266. flex: 1;
  267. flex-direction: row;
  268. justify-content: center;
  269. align-items: center;
  270. padding: 0 20px;
  271. background-color: #ff5a5f;
  272. }
  273. .slot-button-text {
  274. color: #ffffff;
  275. font-size: 14px;
  276. }
  277. </style>