Workordertodone.vue 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. <template>
  2. <view class="">
  3. <view class="subsection">
  4. <u-subsection :list="list" fontSize="30rpx" :current="current" @change="sectionChange"></u-subsection>
  5. </view>
  6. <!-- 待指派 -->
  7. <view class="" v-show="cdshow==0">
  8. <view style="padding:20rpx 0 0 30rpx">
  9. 共有 <span style="color: red">{{totalnumber}}</span>条记录
  10. </view>
  11. <view class="u-listdata" >
  12. <u-list @scrolltolower="scrolltolower" :pagingEnabled='true'>
  13. <u-list-item v-for="(item, index) in indexList" :key="index">
  14. <view class="paisong" @click="Workorderdetails1(item)">
  15. <h3>{{item.repairPosition}}</h3>
  16. <view class="Currentamount1" v-if='item.repairType==1'>
  17. 报修类型: 水
  18. </view>
  19. <view class="Currentamount1" v-if='item.repairType==2'>
  20. 报修类型: 电
  21. </view>
  22. <view class="Currentamount1" v-if='item.repairType==3'>
  23. 报修类型: 其他
  24. </view>
  25. <view class="Currentamount1">
  26. 报修时间: {{item.createDate}}
  27. </view>
  28. </view>
  29. </u-list-item>
  30. </u-list>
  31. </view>
  32. </view>
  33. <!-- 已派送(待维修) -->
  34. <view class="" v-show="cdshow==1">
  35. <!-- 列表 -->
  36. <view class="u-listdata" >
  37. <view style="padding:20rpx 0 0 30rpx">
  38. 共有 <span style="color: red">{{totalnumber}}</span>条记录
  39. </view>
  40. <u-list @scrolltolower="scrolltolower" :pagingEnabled='true'>
  41. <u-list-item v-for="(item, index) in indexList" :key="index">
  42. <view class="paisong" @click="Workorderdetails2(item)">
  43. <view class="settled1" v-if="item.urgency==1">
  44. 非常紧急
  45. </view>
  46. <view class="settled2" v-if="item.urgency==2">
  47. 紧急
  48. </view>
  49. <view class="settled3" v-if="item.urgency==3">
  50. 普通
  51. </view>
  52. <h3>{{item.repairPosition}}</h3>
  53. <view class="Currentamount1" v-if='item.repairType==1'>
  54. 报修类型: 水
  55. </view>
  56. <view class="Currentamount1" v-if='item.repairType==2'>
  57. 报修类型: 电
  58. </view>
  59. <view class="Currentamount1" v-if='item.repairType==3'>
  60. 报修类型: 其他
  61. </view>
  62. <view class="Currentamount1">
  63. 派送时间:{{ item.updateDate }}
  64. </view>
  65. </view>
  66. </u-list-item>
  67. </u-list>
  68. </view>
  69. </view>
  70. <!--已维修 -->
  71. <view class="" v-show="cdshow==2">
  72. <!-- 列表 -->
  73. <view class="u-listdata" >
  74. <view style="padding:20rpx 0 0 30rpx">
  75. 共有 <span style="color: red">{{totalnumber}}</span>条记录
  76. </view>
  77. <u-list @scrolltolower="scrolltolower" :pagingEnabled='true'>
  78. <u-list-item v-for="(item, index) in indexList" :key="index">
  79. <view class="paisong" @click="Workorderdetails3(item)">
  80. <view class="settled1" v-if="item.urgency==1">
  81. 非常紧急
  82. </view>
  83. <view class="settled2" v-if="item.urgency==2">
  84. 紧急
  85. </view>
  86. <view class="settled3" v-if="item.urgency==3">
  87. 普通
  88. </view>
  89. <h3>{{item.repairPosition}}</h3>
  90. <view class="Currentamount1" v-if='item.repairType==1'>
  91. 报修类型: 水
  92. </view>
  93. <view class="Currentamount1" v-if='item.repairType==2'>
  94. 报修类型: 电
  95. </view>
  96. <view class="Currentamount1" v-if='item.repairType==3'>
  97. 报修类型: 其他
  98. </view>
  99. <view class="Currentamount1">
  100. 维修完成时间:{{ item.repairFinishTime }}
  101. </view>
  102. </view>
  103. </u-list-item>
  104. </u-list>
  105. </view>
  106. </view>
  107. </view>
  108. </template>
  109. <script>
  110. // import { isEmpty, getDictDataList } from "@/utils/index";
  111. export default {
  112. name:'Workordertodone',
  113. data() {
  114. return {
  115. totalnumber:0,
  116. jfnodata:false,
  117. showtype: false,
  118. cdshow: 0,
  119. fatherparameter: {},
  120. expensedata:'全部',
  121. list: ['待指派', '已指派(待维修)','已维修' ],
  122. current: 0,
  123. dataForm: {
  124. status: "1",
  125. page: 1,
  126. limit: 10,
  127. },
  128. indexList: [],
  129. payStatusList: [],
  130. nodata:true,
  131. pd:true,
  132. columnstype: [],
  133. repairTypeList:[],
  134. UrgencyTypelist:[],
  135. }
  136. },
  137. //监听页面加载,其参数为上个页面传递的数据,参数类型为 Object(用于页面传参
  138. onLoad: function(options) { //option为object类型,会序列化上个页面传递的参数
  139. this.getRepairTypeList();
  140. this.getpaisongdata();
  141. },
  142. //监听页面初次渲染完成。注意如果渲染速度快,会在页面进入动画完成前触发
  143. onReady() {},
  144. //监听页面隐藏
  145. onHide() {},
  146. //监听窗口尺寸变化
  147. onResize() {},
  148. //监听页面卸载
  149. onUnload() {},
  150. //监听用户下拉动作,一般用于下拉刷新
  151. onPullDownRefresh() {},
  152. methods: {
  153. getRepairTypeList() {
  154. // console.log('9999', getDictDataList("UrgencyType"))
  155. // this.UrgencyTypelist=getDictDataList("UrgencyType");
  156. // console.log('888', getDictDataList("RepairType"))
  157. // this.repairTypeList = getDictDataList("RepairType");
  158. },
  159. Workorderdetails1(e){
  160. // console.log('111111111111111111',e)
  161. uni.navigateTo({
  162. url: `/pages/index/Workordertodone/Workorderdetails/Workorderdetails?id=${e.id}`
  163. });
  164. },
  165. Workorderdetails2(e){
  166. // console.log('111111111111111111',e)
  167. uni.navigateTo({
  168. url: `/pages/index/Workordertodone/Toberepaired/Toberepaired?id=${e.id}`
  169. });
  170. },
  171. Workorderdetails3(e){
  172. // console.log('111111111111111111',e)
  173. uni.navigateTo({
  174. url: `/pages/index/Workordertodone/hasrepaired/hasrepaired?id=${e.id}`
  175. });
  176. },
  177. sectionChange(index) {
  178. this.current = index;
  179. if (index == 0) {
  180. this.cdshow = 0;
  181. this.indexList=[];
  182. this.dataForm.page = 1;
  183. this.dataForm.status = 1;
  184. this.getpaisongdata();
  185. } else if(index == 1) {
  186. this.cdshow = 1;
  187. this.indexList=[];
  188. this.dataForm.page = 1;
  189. this.dataForm.status = 2;
  190. this.getpaisongdata();
  191. } else if(index == 2) {
  192. this.cdshow = 2;
  193. this.indexList=[];
  194. this.dataForm.page = 1;
  195. this.dataForm.status = 3;
  196. this.getpaisongdata();
  197. }
  198. },
  199. scrolltolower() {
  200. if(this.pd){
  201. this.getpaisongdata();
  202. }else{
  203. return
  204. }
  205. },
  206. // dict_filter(val, list) {
  207. // if (isEmpty(val)) {
  208. // return {};
  209. // }
  210. // return this[list].find((item) => item.dictValue == val);
  211. // },
  212. getpaisongdata(){
  213. this.$api.get('/repairorder/page', this.dataForm)
  214. .then(res => {
  215. this.totalnumber=res.data.data.total;
  216. if (res.data.data.list.length != 0) {
  217. this.indexList.push(...res.data.data.list);
  218. this.dataForm.page = this.dataForm.page + 1;
  219. this.pd=true;
  220. this.jfnodata=false;
  221. } else {
  222. uni.showToast({
  223. title:'暂无更多数据了',
  224. icon: 'none',
  225. duration: 1500
  226. })
  227. this.pd=false;
  228. //this.jfnodata=true
  229. }
  230. })
  231. },
  232. }
  233. }
  234. </script>
  235. <style lang="scss">
  236. .nodata{
  237. text-align: center;
  238. padding-top: 400rpx;
  239. }
  240. .paisong{
  241. display: flex;
  242. flex-direction: column;
  243. justify-content:center;
  244. height:170rpx;
  245. background-color: #fff;
  246. margin: 30rpx;
  247. border-radius: 9rpx;
  248. position: relative;
  249. h3 {
  250. height: 70rpx;
  251. line-height: 70rpx;
  252. padding-left: 30rpx;
  253. }
  254. }
  255. .companylist {
  256. margin: 20rpx 30rpx;
  257. background: #fff;
  258. height: 280rpx;
  259. border-radius: 10px;
  260. position: relative;
  261. h3 {
  262. height: 70rpx;
  263. line-height: 70rpx;
  264. padding-left: 30rpx;
  265. }
  266. }
  267. .settled1 {
  268. background-color: #ED3A25;
  269. width: 100rpx;
  270. height: 40rpx;
  271. text-align: center;
  272. line-height: 40rpx;
  273. color: #fff;
  274. font-size: 14rpx;
  275. position: absolute;
  276. top: 0px;
  277. right: 0px;
  278. border-top-right-radius: 10rpx;
  279. border-bottom-left-radius: 10rpx;
  280. }
  281. .settled2 {
  282. background-color: #FF9C27;
  283. width: 100rpx;
  284. height: 40rpx;
  285. text-align: center;
  286. line-height: 40rpx;
  287. color: #fff;
  288. font-size: 14rpx;
  289. position: absolute;
  290. top: 0px;
  291. right: 0px;
  292. border-top-right-radius: 10rpx;
  293. border-bottom-left-radius: 10rpx;
  294. }
  295. .settled3 {
  296. background-color: #30D3A2;
  297. width: 100rpx;
  298. height: 40rpx;
  299. text-align: center;
  300. line-height: 40rpx;
  301. color: #fff;
  302. font-size: 14rpx;
  303. position: absolute;
  304. top: 0px;
  305. right: 0px;
  306. border-top-right-radius: 10rpx;
  307. border-bottom-left-radius: 10rpx;
  308. }
  309. .Currentamount {
  310. padding-left: 30rpx;
  311. height: 50rpx;
  312. line-height: 50rpx;
  313. color: #BCB3A7;
  314. span {
  315. color: #FA5555;
  316. padding-left: 9rpx;
  317. }
  318. }
  319. .Currentamount1 {
  320. padding-left: 30rpx;
  321. height: 40rpx;
  322. line-height: 40rpx;
  323. color: #BCB3A7;
  324. span {
  325. color: #FA5555;
  326. padding-left: 9rpx;
  327. }
  328. }
  329. .records1{
  330. background-color: #FA5555;
  331. width: 100rpx;
  332. height: 40rpx;
  333. text-align: center;
  334. line-height: 40rpx;
  335. color: #fff;
  336. font-size: 14rpx;
  337. position: absolute;
  338. top: 0px;
  339. right: 0px;
  340. border-top-right-radius: 10rpx;
  341. border-bottom-left-radius: 10rpx;
  342. }
  343. .records{
  344. display: flex;
  345. flex-direction: column;
  346. // justify-content: center;
  347. position: relative;
  348. width: 690rpx;
  349. height: 210rpx;
  350. background: #fff;
  351. margin: 0 auto;
  352. border-radius: 9rpx;
  353. }
  354. .onerecord{
  355. width: 750rpx;
  356. height: 90rpx;
  357. line-height: 90rpx;
  358. padding-left: 30rpx;
  359. color: #999;
  360. span{
  361. color: red;
  362. }
  363. }
  364. .topbilledit {
  365. display: flex;
  366. justify-content: center;
  367. align-items: center;
  368. background: #fff;
  369. height: 60rpx;
  370. }
  371. .changetime2 {
  372. padding-left: 10rpx;
  373. }
  374. .subsection {
  375. padding: 30rpx;
  376. background: #fff;
  377. }
  378. .topname {
  379. height: 44px;
  380. width: 750rpx;
  381. display: flex;
  382. align-items: center;
  383. }
  384. .topname1 {
  385. width: 50rpx;
  386. padding-left: 10rpx;
  387. }
  388. .topname2 {
  389. width: 700rpx;
  390. text-align: center;
  391. font-weight: bold;
  392. }
  393. </style>