admincheckorderlist.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467
  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. <uSection title="查询" type="line" style="padding-left: 10px;padding-right: 10px;">
  11. <uni-data-picker placeholder="请选择机构" popup-title="请选择所在地区" :localdata="projectTree"
  12. v-model="selectedTreeNode" @change="onchange" @nodeclick="onnodeclick" @popupopened="onpopupopened"
  13. @popupclosed="onpopupclosed">
  14. </uni-data-picker>
  15. </uSection>
  16. <view>
  17. <uni-search-bar placeholder="请录入测站编码或测站名称" @confirm="search" :focus="false" v-model="searchVal"
  18. @blur="blur" @focus="focus" @input="input" @cancel="cancel" @clear="clear">
  19. </uni-search-bar>
  20. </view>
  21. <uSection title="">
  22. <uni-list>
  23. <uni-list-item v-for="item in list" :key="item.id">
  24. <template v-slot:body>
  25. <view style="min-height: 110px;width: 100%;display: flex;flex-direction: column;">
  26. <view style="display: flex;flex-direction: row;align-items: center;">
  27. <image class="order-title-image" style="box-shadow:0 0 2px 2px lightblue"
  28. src="/static/images/logo_app.png" mode="widthFix">
  29. </image>
  30. <text style="margin-left: 5px;font-size: 1rem;font-weight: bold;">{{item.rtuName}}</text>
  31. <text style="margin-left: 5px;font-size: 0.9rem;">[{{item.rtuCode}}]</text>
  32. </view>
  33. <view v-if="item.orderClose == 1" style="display: flex;flex-direction: row;align-items: center; ">
  34. <uIcons class="input-uni-icon" type="loop" size="18" color="skyblue" />
  35. <view style="margin-left:5px;font-size: 0.8rem;">工单状态:</view>
  36. <view style="margin-left:5px;font-size: 0.8rem;color: coral;">已关闭</view>
  37. </view>
  38. <view v-else-if="item.orderConfirm == 1" style="display: flex;flex-direction: row;align-items: center; ">
  39. <uIcons class="input-uni-icon" type="loop" size="18" color="skyblue" />
  40. <view style="margin-left:5px;font-size: 0.8rem;">工单状态:</view>
  41. <view style="margin-left:5px;font-size: 0.8rem;color: coral;">处理中</view>
  42. </view>
  43. <view v-else style="display: flex;flex-direction: row;align-items: center; ">
  44. <uIcons class="input-uni-icon" type="loop" size="18" color="skyblue" />
  45. <view style="margin-left:5px;font-size: 0.8rem;">工单状态:</view>
  46. <view style="margin-left:5px;font-size: 0.8rem;color: coral;">等待接单</view>
  47. </view>
  48. <view style="display: flex;flex-direction: row;align-items: center; min-height: 30px;">
  49. <uIcons class="input-uni-icon" type="notification" size="18" color="skyblue" />
  50. <view style="margin-left:5px;font-size: 0.8rem;">报单时间:</view>
  51. <view style="margin-left:5px;font-size: 0.8rem;color:gray;">{{item.createTime}}
  52. </view>
  53. </view>
  54. <view v-if="item.orderConfirm == 1"
  55. style="display: flex;flex-direction: row;align-items: center; min-height: 30px;">
  56. <view style="width: 35%;display: flex;flex-direction: row;align-items: center;">
  57. <uIcons class="input-uni-icon" type="auth" size="18" color="skyblue" />
  58. <view style="margin-left: 5px;font-size: 0.8rem;color: gray;">
  59. {{item.processorName}}
  60. </view>
  61. </view>
  62. <view style="font-size: 0.8rem;">接单时间:</view>
  63. <view style="margin-left:5px;font-size: 0.8rem;color:gray;">
  64. {{item.orderConfirmTime}}
  65. </view>
  66. </view>
  67. <view v-if="item.orderClose == 1"
  68. style="display: flex;flex-direction: row;align-items: center; min-height: 30px;">
  69. <uIcons class="input-uni-icon" type="checkbox" size="18" color="skyblue" />
  70. <view style="margin-left:5px;font-size: 0.8rem;">关闭时间:</view>
  71. <view style="margin-left:5px;font-size: 0.8rem;color:gray;">{{item.updateTime}}
  72. </view>
  73. </view>
  74. <!-- <view v-if="item.orderClose == 0"
  75. style="display:flex;flex-direction:row;align-items: center;">
  76. <image class="slot-image" src="/static/images/icon_warning.png" mode="widthFix">
  77. </image>
  78. <text style="font-size:0.8rem;padding-left: 10rpx;">{{item.orderDesc}}</text>
  79. </view> -->
  80. <view
  81. style="margin-top:4px;display: flex;flex-direction: row;justify-content: flex-end;">
  82. <view v-if="item.orderClose == 1 || item.orderConfirm == 1"
  83. style="display:flex;flex-direction: row;justify-content: center;width: 90px;height:28px;margin-right: 10px;border-radius:7px;background-color:lightgreen"
  84. @click="toDetailPage(item.id)">
  85. <view style="display:flex;flex-direction: column;justify-content: center;">
  86. <uIcons class="input-uni-icon" type="info" size="18" color="gray" />
  87. </view>
  88. <view
  89. style="display:flex;flex-direction: column;justify-content: center;padding-left:5px;">
  90. <text style="color:black;font-size:0.7rem">查看详情</text>
  91. </view>
  92. </view>
  93. <!-- <view v-else-if="item.orderConfirm == 1"
  94. style="display:flex;flex-direction: row;justify-content: center;width: 90px;height:28px;margin-right: 10px;border-radius:7px;background-color:lightblue"
  95. @click="toOrderReport(item.id)">
  96. <view style="display:flex;flex-direction: column;justify-content: center;">
  97. <uIcons class="input-uni-icon" type="compose" size="18" color="gray" />
  98. </view>
  99. <view
  100. style="display:flex;flex-direction: column;justify-content: center;padding-left:5px;">
  101. <text style="color:black;font-size:0.7rem">工单填报</text>
  102. </view>
  103. </view> -->
  104. <!-- <view v-else
  105. style="display:flex;flex-direction: row;justify-content: center;width: 90px;height:28px;margin-right: 10px;border-radius:7px;background-color:lightpink"
  106. @click="toOrderConfirm(item.id)">
  107. <view style="display:flex;flex-direction: column;justify-content: center;">
  108. <uIcons class="input-uni-icon" type="location" size="18" color="gray" />
  109. </view>
  110. <view
  111. style="display:flex;flex-direction: column;justify-content: center;padding-left:5px;">
  112. <text style="color:black;font-size:0.7rem">接单确认</text>
  113. </view>
  114. </view> -->
  115. </view>
  116. </view>
  117. </template>
  118. </uni-list-item>
  119. </uni-list>
  120. </uSection>
  121. <uGroup>
  122. <view class="uni-pagination-box">
  123. <uPagination show-icon :page-size="pageSize" :current="pageCurrent" :total="total"
  124. @change="change" />
  125. </view>
  126. </uGroup>
  127. </view>
  128. </view>
  129. </template>
  130. <script>
  131. import uNavBar from '@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue'
  132. import uDataPicker from '@/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue'
  133. import uGroup from '@/uni_modules/uni-group/uni-group.vue'
  134. import uSection from '@/uni_modules/uni-section/uni-section.vue'
  135. import uPagination from '@/uni_modules/uni-pagination/components/uni-pagination/uni-pagination.vue'
  136. import uBreadcrumb from '@/uni_modules/uni-breadcrumb/components/uni-breadcrumb/uni-breadcrumb.vue'
  137. import uList from '@/uni_modules/uni-list/components/uni-list/uni-list.vue'
  138. import uListItem from '@/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue'
  139. import uIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
  140. import http from '@/http/api.js';
  141. export default {
  142. components: {
  143. uNavBar,
  144. uList,
  145. uListItem,
  146. uIcons,
  147. uGroup,
  148. uPagination,
  149. uBreadcrumb,
  150. uSection,
  151. uDataPicker
  152. },
  153. onLoad(option) {
  154. this.getProjectTree();
  155. },
  156. data() {
  157. return {
  158. list: [],
  159. title: '工单查询',
  160. desc: '',
  161. pageSize: 10,
  162. // 当前页
  163. pageCurrent: 1,
  164. // 数据总量
  165. total: 0,
  166. orgId: '',
  167. projectId: '',
  168. projectTree: [],
  169. selectedTreeNode: '',
  170. searchVal: '',
  171. }
  172. },
  173. computed: {
  174. getIcon() {
  175. return path => {
  176. return 'https://cdn.uviewui.com/uview/example/' + path + '.png';
  177. }
  178. },
  179. },
  180. onShow() {
  181. },
  182. methods: {
  183. toBack() {
  184. uni.navigateBack({
  185. delta: 1
  186. })
  187. },
  188. // 分页触发
  189. change(e) {
  190. //this.$refs.table.clearSelection()
  191. //this.selectedIndexs.length = 0
  192. this.pageCurrent = e.current;
  193. this.getOrderList()
  194. },
  195. onnodeclick(node) {
  196. if (node.projectId != null) {
  197. this.orgId = node.orgId;
  198. this.projectId = node.projectId;
  199. this.searchVal = '';
  200. this.pageCurrent = 1;
  201. this.getOrderList();
  202. }
  203. },
  204. onpopupopened(e) {
  205. },
  206. onpopupclosed(e) {
  207. },
  208. onchange(e) {
  209. },
  210. search(res) {
  211. this.getOrderList();
  212. },
  213. input(res) {
  214. },
  215. clear(res) {
  216. this.searchVal = '';
  217. this.getOrderList();
  218. },
  219. blur(res) {},
  220. focus(e) {},
  221. cancel(res) {
  222. this.searchVal = '';
  223. this.getOrderList();
  224. },
  225. onBackPress() {
  226. // #ifdef APP-PLUS
  227. plus.key.hideSoftKeybord();
  228. // #endif
  229. },
  230. getProjectTree() {
  231. var that = this;
  232. http.request({
  233. url: '/galaxy-test/rtu/manage/tree',
  234. method: 'GET',
  235. }).then(res => {
  236. console.log(res)
  237. if (res.data != null) {
  238. that.projectTree = res.data;
  239. that.selectedTreeNode = that.projectTree[0].value;
  240. that.orgId = that.projectTree[0].orgId;
  241. that.projectId = that.projectTree[0].projectId;
  242. that.getOrderList();
  243. }
  244. }).catch(err => {
  245. console.log(err)
  246. })
  247. },
  248. getOrderList() {
  249. const current = this.pageCurrent;
  250. const size = this.pageSize;
  251. const isSubmit = '0';
  252. var postData = {};
  253. postData['rtuCode'] = this.searchVal;
  254. postData['rtuName'] = this.searchVal;
  255. postData['orgId'] = this.orgId;
  256. postData['projectId'] = this.projectId;
  257. var that = this;
  258. http.request({
  259. url: '/galaxy-test/rtu/check/order/page',
  260. method: 'GET',
  261. params: {
  262. current,
  263. size,
  264. isSubmit
  265. },
  266. data: postData,
  267. }).then(res => {
  268. if (res.data.records != null) {
  269. that.list = res.data.records;
  270. }
  271. this.total = res.data.total;
  272. }).catch(err => {
  273. console.log(err)
  274. })
  275. },
  276. toDetailPage(id) {
  277. var url = '/pages/check-order/orderprocessrecord?id=' + id;
  278. uni.navigateTo({
  279. url: url
  280. })
  281. },
  282. toOrderReport(id) {
  283. var url = '/pages/check-order/orderprocesslist?id=' + id;
  284. uni.navigateTo({
  285. url: url
  286. })
  287. },
  288. toOrderConfirm(id) {
  289. var that = this;
  290. uni.showModal({
  291. content: '确定进行接单确认操作?',
  292. showCancel: true,
  293. success(res) {
  294. if (res.confirm) {
  295. var postData2 = {};
  296. postData2['id'] = id;
  297. http.request({
  298. url: '/galaxy-test/rtu/check/order/confirm',
  299. method: 'POST',
  300. data: postData2
  301. }).then(res => {
  302. console.log(res)
  303. if (res.success) {
  304. uni.showModal({
  305. content: '接单已成功,是否立即填报?',
  306. showCancel: true,
  307. success(res) {
  308. if (res.confirm) {
  309. var url =
  310. '/pages/check-order/orderprocesslist?id=' + id;
  311. uni.navigateTo({
  312. url: url
  313. })
  314. }
  315. }
  316. });
  317. }
  318. }).catch(err => {
  319. console.log(err)
  320. })
  321. }
  322. }
  323. });
  324. },
  325. toLocation(item) {
  326. let lat = item.lat;
  327. let lng = item.lng;
  328. let name = item.rtuName;
  329. let add = item.locationDesc;
  330. uni.openLocation({
  331. latitude: Number(lat),
  332. longitude: Number(lng),
  333. name: name,
  334. address: "",
  335. success() {}
  336. })
  337. },
  338. }
  339. }
  340. </script>
  341. <style>
  342. </style>
  343. <style lang="scss" scoped>
  344. .container {
  345. padding: 0 0 100rpx;
  346. }
  347. .u-cell-icon {
  348. width: 36rpx;
  349. height: 36rpx;
  350. margin-right: 8rpx;
  351. }
  352. .slot-box {
  353. /* #ifndef APP-NVUE */
  354. display: flex;
  355. /* #endif */
  356. flex-direction: row;
  357. align-items: center;
  358. }
  359. .slot-image {
  360. /* #ifndef APP-NVUE */
  361. display: block;
  362. /* #endif */
  363. //margin-right: 10px;
  364. width: 20px;
  365. height: 20px;
  366. }
  367. .order-title-image {
  368. /* #ifndef APP-NVUE */
  369. display: block;
  370. /* #endif */
  371. // margin-right: 10px;
  372. width: 20px;
  373. height: 20px;
  374. border-radius: 50%;
  375. }
  376. .slot-text {
  377. flex: 1;
  378. font-size: 14px;
  379. color: #4cd964;
  380. margin-right: 10px;
  381. }
  382. .content-box {
  383. flex: 1;
  384. /* #ifdef APP-NVUE */
  385. justify-content: center;
  386. /* #endif */
  387. height: 100%;
  388. line-height: 44px;
  389. padding: 0 15px;
  390. position: relative;
  391. background-color: #fff;
  392. border-bottom-color: #f5f5f5;
  393. border-bottom-width: 1px;
  394. border-bottom-style: solid;
  395. }
  396. .content-text {
  397. font-size: 15px;
  398. }
  399. .example-body {
  400. /* #ifndef APP-NVUE */
  401. display: flex;
  402. /* #endif */
  403. flex-direction: row;
  404. justify-content: center;
  405. padding: 10px 0;
  406. background-color: #fff;
  407. }
  408. .button {
  409. border-color: #e5e5e5;
  410. border-style: solid;
  411. border-width: 1px;
  412. padding: 4px 8px;
  413. border-radius: 4px;
  414. }
  415. .button-text {
  416. font-size: 15px;
  417. }
  418. .slot-button {
  419. /* #ifndef APP-NVUE */
  420. display: flex;
  421. height: 100%;
  422. /* #endif */
  423. flex: 1;
  424. flex-direction: row;
  425. justify-content: center;
  426. align-items: center;
  427. padding: 0 20px;
  428. background-color: #ff5a5f;
  429. }
  430. .slot-button-text {
  431. color: #ffffff;
  432. font-size: 14px;
  433. }
  434. </style>