rtucheckorderlist.vue 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  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. <uni-list>
  11. <uni-list-item v-for="item in list" :key="item.id">
  12. <template v-slot:body>
  13. <view style="min-height: 110px;width: 100%;display: flex;flex-direction: column;">
  14. <view style="display: flex;flex-direction: row;align-items: center;">
  15. <image class="order-title-image" style="box-shadow:0 0 2px 2px lightblue"
  16. src="/static/images/logo_app.png" mode="widthFix">
  17. </image>
  18. <text style="margin-left: 5px;font-size: 1rem;font-weight: bold;">{{item.rtuName}}</text>
  19. <text style="margin-left: 5px;font-size: 0.9rem;">[{{item.rtuCode}}]</text>
  20. </view>
  21. <view v-if="item.orderClose == 1"
  22. style="display: flex;flex-direction: row;align-items: center; min-height: 30px;">
  23. <uIcons class="input-uni-icon" type="checkbox" size="18" color="skyblue" />
  24. <view style="margin-left:5px;font-size: 0.8rem;">关闭时间:</view>
  25. <view style="margin-left:5px;font-size: 0.8rem;color:gray;">{{item.updateTime}}
  26. </view>
  27. </view>
  28. <view v-else-if="item.orderConfirm == 1"
  29. style="display: flex;flex-direction: row;align-items: center; min-height: 30px;">
  30. <view style="width: 35%;display: flex;flex-direction: row;align-items: center;">
  31. <uIcons class="input-uni-icon" type="auth" size="18" color="skyblue" />
  32. <view style="margin-left: 5px;font-size: 0.8rem;color: gray;">
  33. {{item.processorName}}
  34. </view>
  35. </view>
  36. <view style="font-size: 0.8rem;">接单时间:</view>
  37. <view style="margin-left:5px;font-size: 0.8rem;color:gray;">
  38. {{item.orderConfirmTime}}
  39. </view>
  40. </view>
  41. <view v-else
  42. style="display: flex;flex-direction: row;align-items: center; min-height: 30px;">
  43. <uIcons class="input-uni-icon" type="notification" size="18" color="skyblue" />
  44. <view style="margin-left:5px;font-size: 0.8rem;">报单时间:</view>
  45. <view style="margin-left:5px;font-size: 0.8rem;color:gray;">{{item.createTime}}
  46. </view>
  47. </view>
  48. <view v-if="item.orderClose == 0"
  49. style="display:flex;flex-direction:row;align-items: center;">
  50. <image class="slot-image" src="/static/images/icon_warning.png" mode="widthFix">
  51. </image>
  52. <text style="font-size:0.8rem;padding-left: 10rpx;">{{item.orderDesc}}</text>
  53. </view>
  54. <view style="margin-top:4px;display: flex;flex-direction: row;justify-content: flex-end;">
  55. <view v-if="item.orderClose == 1"
  56. style="display:flex;flex-direction: row;justify-content: center;width: 90px;height:28px;margin-right: 10px;border-radius:7px;background-color:lightgreen"
  57. @click="toDetailPage(item.id)">
  58. <view style="display:flex;flex-direction: column;justify-content: center;">
  59. <uIcons class="input-uni-icon" type="info" size="18" color="gray" />
  60. </view>
  61. <view
  62. style="display:flex;flex-direction: column;justify-content: center;padding-left:5px;">
  63. <text style="color:black;font-size:0.7rem">查看详情</text>
  64. </view>
  65. </view>
  66. <view v-else-if="item.orderConfirm == 1"
  67. style="display:flex;flex-direction: row;justify-content: center;width: 90px;height:28px;margin-right: 10px;border-radius:7px;background-color:lightblue"
  68. @click="toOrderReport(item.id)">
  69. <view style="display:flex;flex-direction: column;justify-content: center;">
  70. <uIcons class="input-uni-icon" type="compose" size="18" color="gray" />
  71. </view>
  72. <view
  73. style="display:flex;flex-direction: column;justify-content: center;padding-left:5px;">
  74. <text style="color:black;font-size:0.7rem">工单填报</text>
  75. </view>
  76. </view>
  77. <view v-else
  78. style="display:flex;flex-direction: row;justify-content: center;width: 90px;height:28px;margin-right: 10px;border-radius:7px;background-color:lightpink"
  79. @click="toOrderConfirm(item.id)">
  80. <view style="display:flex;flex-direction: column;justify-content: center;">
  81. <uIcons class="input-uni-icon" type="location" size="18" color="gray" />
  82. </view>
  83. <view
  84. style="display:flex;flex-direction: column;justify-content: center;padding-left:5px;">
  85. <text style="color:black;font-size:0.7rem">接单确认</text>
  86. </view>
  87. </view>
  88. </view>
  89. </view>
  90. </template>
  91. </uni-list-item>
  92. </uni-list>
  93. <uGroup>
  94. <view class="uni-pagination-box">
  95. <uPagination show-icon :page-size="pageSize" :current="pageCurrent" :total="total"
  96. @change="change" />
  97. </view>
  98. </uGroup>
  99. </view>
  100. <u-gap height="70"></u-gap>
  101. </view>
  102. </template>
  103. <script>
  104. import uNavBar from '@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue'
  105. import uDataPicker from '@/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue'
  106. import uGroup from '@/uni_modules/uni-group/uni-group.vue'
  107. import uSection from '@/uni_modules/uni-section/uni-section.vue'
  108. import uPagination from '@/uni_modules/uni-pagination/components/uni-pagination/uni-pagination.vue'
  109. import uBreadcrumb from '@/uni_modules/uni-breadcrumb/components/uni-breadcrumb/uni-breadcrumb.vue'
  110. import uList from '@/uni_modules/uni-list/components/uni-list/uni-list.vue'
  111. import uListItem from '@/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue'
  112. import uIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
  113. import http from '@/http/api.js';
  114. export default {
  115. components: {
  116. uNavBar,
  117. uList,
  118. uListItem,
  119. uIcons,
  120. uGroup,
  121. uPagination,
  122. uBreadcrumb
  123. },
  124. onLoad(option) {
  125. this.rtuCode = option.rtuCode;
  126. this.getOrderList();
  127. },
  128. data() {
  129. return {
  130. rtuCode: '',
  131. list: [],
  132. title: '测站工单',
  133. desc: '',
  134. pageSize: 10,
  135. // 当前页
  136. pageCurrent: 1,
  137. // 数据总量
  138. total: 0,
  139. }
  140. },
  141. computed: {
  142. getIcon() {
  143. return path => {
  144. return 'https://cdn.uviewui.com/uview/example/' + path + '.png';
  145. }
  146. },
  147. },
  148. onShow() {
  149. },
  150. methods: {
  151. toBack() {
  152. uni.navigateBack({
  153. delta: 1
  154. })
  155. },
  156. // 分页触发
  157. change(e) {
  158. this.pageCurrent = e.current;
  159. this.getOrderList()
  160. },
  161. getOrderList() {
  162. const current = this.pageCurrent;
  163. const size = this.pageSize;
  164. const isSubmit = '0';
  165. let postData = {};
  166. postData['rtuCode'] = this.rtuCode;
  167. var that = this;
  168. http.request({
  169. url: '/galaxy-test/rtu/check/order/page',
  170. method: 'GET',
  171. params: {
  172. current,
  173. size,
  174. isSubmit
  175. },
  176. data: postData,
  177. }).then(res => {
  178. if (res.data.records != null) {
  179. that.list = res.data.records;
  180. }
  181. this.total = res.data.total;
  182. }).catch(err => {
  183. console.log(err)
  184. })
  185. },
  186. toDetailPage(id) {
  187. var url = '/pages/check-order/orderprocessrecord?id=' + id;
  188. uni.navigateTo({
  189. url: url
  190. })
  191. },
  192. toOrderReport(id) {
  193. var url = '/pages/check-order/orderprocesslist?id=' + id;
  194. uni.navigateTo({
  195. url: url
  196. })
  197. },
  198. toOrderConfirm(id) {
  199. var that = this;
  200. uni.showModal({
  201. content: '确定进行接单确认操作?',
  202. showCancel: true,
  203. success(res) {
  204. if (res.confirm) {
  205. var postData2 = {};
  206. postData2['id'] = id;
  207. http.request({
  208. url: '/galaxy-test/rtu/check/order/confirm',
  209. method: 'POST',
  210. data: postData2
  211. }).then(res => {
  212. console.log(res)
  213. if (res.success) {
  214. uni.showModal({
  215. content: '接单已成功,是否立即填报?',
  216. showCancel: true,
  217. success(res) {
  218. if (res.confirm) {
  219. var url =
  220. '/pages/check-order/orderprocesslist?id=' + id;
  221. uni.navigateTo({
  222. url: url
  223. })
  224. }
  225. }
  226. });
  227. }
  228. }).catch(err => {
  229. console.log(err)
  230. })
  231. }
  232. }
  233. });
  234. },
  235. }
  236. }
  237. </script>
  238. <style>
  239. /* page {
  240. background-color: rgb(240, 242, 244);
  241. } */
  242. </style>
  243. <style lang="scss" scoped>
  244. .container {
  245. padding: 0 0 150rpx;
  246. }
  247. .u-cell-icon {
  248. width: 36rpx;
  249. height: 36rpx;
  250. margin-right: 8rpx;
  251. }
  252. .slot-box {
  253. /* #ifndef APP-NVUE */
  254. display: flex;
  255. /* #endif */
  256. flex-direction: row;
  257. align-items: center;
  258. }
  259. .slot-image {
  260. /* #ifndef APP-NVUE */
  261. display: block;
  262. /* #endif */
  263. //margin-right: 10px;
  264. width: 20px;
  265. height: 20px;
  266. }
  267. .order-title-image {
  268. /* #ifndef APP-NVUE */
  269. display: block;
  270. /* #endif */
  271. // margin-right: 10px;
  272. width: 20px;
  273. height: 20px;
  274. border-radius: 50%;
  275. }
  276. .slot-text {
  277. flex: 1;
  278. font-size: 14px;
  279. color: #4cd964;
  280. margin-right: 10px;
  281. }
  282. .content-box {
  283. flex: 1;
  284. /* #ifdef APP-NVUE */
  285. justify-content: center;
  286. /* #endif */
  287. height: 100%;
  288. line-height: 44px;
  289. padding: 0 15px;
  290. position: relative;
  291. background-color: #fff;
  292. border-bottom-color: #f5f5f5;
  293. border-bottom-width: 1px;
  294. border-bottom-style: solid;
  295. }
  296. .content-text {
  297. font-size: 15px;
  298. }
  299. .example-body {
  300. /* #ifndef APP-NVUE */
  301. display: flex;
  302. /* #endif */
  303. flex-direction: row;
  304. justify-content: center;
  305. padding: 10px 0;
  306. background-color: #fff;
  307. }
  308. .button {
  309. border-color: #e5e5e5;
  310. border-style: solid;
  311. border-width: 1px;
  312. padding: 4px 8px;
  313. border-radius: 4px;
  314. }
  315. .button-text {
  316. font-size: 15px;
  317. }
  318. .slot-button {
  319. /* #ifndef APP-NVUE */
  320. display: flex;
  321. height: 100%;
  322. /* #endif */
  323. flex: 1;
  324. flex-direction: row;
  325. justify-content: center;
  326. align-items: center;
  327. padding: 0 20px;
  328. background-color: #ff5a5f;
  329. }
  330. .slot-button-text {
  331. color: #ffffff;
  332. font-size: 14px;
  333. }
  334. </style>