Workordertodone.vue 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437
  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="Workorderdetails(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="Workorderdetails(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="Workorderdetails(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. Workorderdetails(e){
  160. // console.log('111111111111111111',e)
  161. uni.navigateTo({
  162. url: `/pages/index/Workordertodone/Workorderdetails/Workorderdetails?id=${e.id}`
  163. });
  164. },
  165. sectionChange(index) {
  166. this.current = index;
  167. if (index == 0) {
  168. this.cdshow = 0;
  169. this.indexList=[];
  170. this.dataForm.page = 1;
  171. this.dataForm.status = 1;
  172. this.getpaisongdata();
  173. } else if(index == 1) {
  174. this.cdshow = 1;
  175. this.indexList=[];
  176. this.dataForm.page = 1;
  177. this.dataForm.status = 2;
  178. this.getpaisongdata();
  179. } else if(index == 2) {
  180. this.cdshow = 2;
  181. this.indexList=[];
  182. this.dataForm.page = 1;
  183. this.dataForm.status = 3;
  184. this.getpaisongdata();
  185. }
  186. },
  187. scrolltolower() {
  188. if(this.pd){
  189. this.getpaisongdata();
  190. }else{
  191. return
  192. }
  193. },
  194. // dict_filter(val, list) {
  195. // if (isEmpty(val)) {
  196. // return {};
  197. // }
  198. // return this[list].find((item) => item.dictValue == val);
  199. // },
  200. getpaisongdata(){
  201. this.$api.get('/repairorder/page', this.dataForm)
  202. .then(res => {
  203. this.totalnumber=res.data.data.total;
  204. if (res.data.data.list.length != 0) {
  205. this.indexList.push(...res.data.data.list);
  206. this.dataForm.page = this.dataForm.page + 1;
  207. this.pd=true;
  208. this.jfnodata=false;
  209. } else {
  210. uni.showToast({
  211. title:'暂无更多数据了',
  212. icon: 'none',
  213. duration: 1500
  214. })
  215. this.pd=false;
  216. //this.jfnodata=true
  217. }
  218. })
  219. },
  220. }
  221. }
  222. </script>
  223. <style lang="scss">
  224. .nodata{
  225. text-align: center;
  226. padding-top: 400rpx;
  227. }
  228. .paisong{
  229. display: flex;
  230. flex-direction: column;
  231. justify-content:center;
  232. height:170rpx;
  233. background-color: #fff;
  234. margin: 30rpx;
  235. border-radius: 9rpx;
  236. position: relative;
  237. h3 {
  238. height: 70rpx;
  239. line-height: 70rpx;
  240. padding-left: 30rpx;
  241. }
  242. }
  243. .companylist {
  244. margin: 20rpx 30rpx;
  245. background: #fff;
  246. height: 280rpx;
  247. border-radius: 10px;
  248. position: relative;
  249. h3 {
  250. height: 70rpx;
  251. line-height: 70rpx;
  252. padding-left: 30rpx;
  253. }
  254. }
  255. .settled1 {
  256. background-color: #ED3A25;
  257. width: 100rpx;
  258. height: 40rpx;
  259. text-align: center;
  260. line-height: 40rpx;
  261. color: #fff;
  262. font-size: 14rpx;
  263. position: absolute;
  264. top: 0px;
  265. right: 0px;
  266. border-top-right-radius: 10rpx;
  267. border-bottom-left-radius: 10rpx;
  268. }
  269. .settled2 {
  270. background-color: #FF9C27;
  271. width: 100rpx;
  272. height: 40rpx;
  273. text-align: center;
  274. line-height: 40rpx;
  275. color: #fff;
  276. font-size: 14rpx;
  277. position: absolute;
  278. top: 0px;
  279. right: 0px;
  280. border-top-right-radius: 10rpx;
  281. border-bottom-left-radius: 10rpx;
  282. }
  283. .settled3 {
  284. background-color: #30D3A2;
  285. width: 100rpx;
  286. height: 40rpx;
  287. text-align: center;
  288. line-height: 40rpx;
  289. color: #fff;
  290. font-size: 14rpx;
  291. position: absolute;
  292. top: 0px;
  293. right: 0px;
  294. border-top-right-radius: 10rpx;
  295. border-bottom-left-radius: 10rpx;
  296. }
  297. .Currentamount {
  298. padding-left: 30rpx;
  299. height: 50rpx;
  300. line-height: 50rpx;
  301. color: #BCB3A7;
  302. span {
  303. color: #FA5555;
  304. padding-left: 9rpx;
  305. }
  306. }
  307. .Currentamount1 {
  308. padding-left: 30rpx;
  309. height: 40rpx;
  310. line-height: 40rpx;
  311. color: #BCB3A7;
  312. span {
  313. color: #FA5555;
  314. padding-left: 9rpx;
  315. }
  316. }
  317. .records1{
  318. background-color: #FA5555;
  319. width: 100rpx;
  320. height: 40rpx;
  321. text-align: center;
  322. line-height: 40rpx;
  323. color: #fff;
  324. font-size: 14rpx;
  325. position: absolute;
  326. top: 0px;
  327. right: 0px;
  328. border-top-right-radius: 10rpx;
  329. border-bottom-left-radius: 10rpx;
  330. }
  331. .records{
  332. display: flex;
  333. flex-direction: column;
  334. // justify-content: center;
  335. position: relative;
  336. width: 690rpx;
  337. height: 210rpx;
  338. background: #fff;
  339. margin: 0 auto;
  340. border-radius: 9rpx;
  341. }
  342. .onerecord{
  343. width: 750rpx;
  344. height: 90rpx;
  345. line-height: 90rpx;
  346. padding-left: 30rpx;
  347. color: #999;
  348. span{
  349. color: red;
  350. }
  351. }
  352. .topbilledit {
  353. display: flex;
  354. justify-content: center;
  355. align-items: center;
  356. background: #fff;
  357. height: 60rpx;
  358. }
  359. .changetime2 {
  360. padding-left: 10rpx;
  361. }
  362. .subsection {
  363. padding: 30rpx;
  364. background: #fff;
  365. }
  366. .topname {
  367. height: 44px;
  368. width: 750rpx;
  369. display: flex;
  370. align-items: center;
  371. }
  372. .topname1 {
  373. width: 50rpx;
  374. padding-left: 10rpx;
  375. }
  376. .topname2 {
  377. width: 700rpx;
  378. text-align: center;
  379. font-weight: bold;
  380. }
  381. </style>