Workordertodone.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433
  1. <template>
  2. <view class="">
  3. <view class="subsection">
  4. <u-subsection :list="list" :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. data() {
  113. return {
  114. totalnumber:0,
  115. jfnodata:false,
  116. showtype: false,
  117. cdshow: 0,
  118. fatherparameter: {},
  119. expensedata:'全部',
  120. list: ['待派送', '已派送(待维修)','已维修' ],
  121. current: 0,
  122. dataForm: {
  123. status: "1",
  124. page: 1,
  125. limit: 10,
  126. },
  127. indexList: [],
  128. payStatusList: [],
  129. nodata:true,
  130. pd:true,
  131. columnstype: [],
  132. repairTypeList:[],
  133. UrgencyTypelist:[],
  134. }
  135. },
  136. //监听页面加载,其参数为上个页面传递的数据,参数类型为 Object(用于页面传参
  137. onLoad: function(options) { //option为object类型,会序列化上个页面传递的参数
  138. this.getRepairTypeList();
  139. this.getpaisongdata();
  140. },
  141. //监听页面初次渲染完成。注意如果渲染速度快,会在页面进入动画完成前触发
  142. onReady() {},
  143. //监听页面隐藏
  144. onHide() {},
  145. //监听窗口尺寸变化
  146. onResize() {},
  147. //监听页面卸载
  148. onUnload() {},
  149. //监听用户下拉动作,一般用于下拉刷新
  150. onPullDownRefresh() {},
  151. methods: {
  152. getRepairTypeList() {
  153. // console.log('9999', getDictDataList("UrgencyType"))
  154. // this.UrgencyTypelist=getDictDataList("UrgencyType");
  155. // console.log('888', getDictDataList("RepairType"))
  156. // this.repairTypeList = getDictDataList("RepairType");
  157. },
  158. Workorderdetails(e){
  159. // console.log('111111111111111111',e)
  160. uni.navigateTo({
  161. url: `/pages/index/Workordertodone/Workorderdetails/Workorderdetails?id=${e.id}`
  162. });
  163. },
  164. sectionChange(index) {
  165. this.current = index;
  166. if (index == 0) {
  167. this.cdshow = 0;
  168. this.indexList=[];
  169. this.dataForm.page = 1;
  170. this.dataForm.status = 1;
  171. this.getpaisongdata();
  172. } else if(index == 1) {
  173. this.cdshow = 1;
  174. this.indexList=[];
  175. this.dataForm.page = 1;
  176. this.dataForm.status = 2;
  177. this.getpaisongdata();
  178. } else if(index == 2) {
  179. this.cdshow = 2;
  180. this.indexList=[];
  181. this.dataForm.page = 1;
  182. this.dataForm.status = 3;
  183. this.getpaisongdata();
  184. }
  185. },
  186. scrolltolower() {
  187. if(this.pd){
  188. this.getpaisongdata();
  189. }else{
  190. return
  191. }
  192. },
  193. // dict_filter(val, list) {
  194. // if (isEmpty(val)) {
  195. // return {};
  196. // }
  197. // return this[list].find((item) => item.dictValue == val);
  198. // },
  199. getpaisongdata(){
  200. this.$api.get('/repairorder/page', this.dataForm)
  201. .then(res => {
  202. this.totalnumber=res.data.data.total;
  203. if (res.data.data.list.length != 0) {
  204. this.indexList.push(...res.data.data.list);
  205. this.dataForm.page = this.dataForm.page + 1;
  206. this.pd=true;
  207. this.jfnodata=false;
  208. } else {
  209. uni.showToast({
  210. title:'暂无更多数据了',
  211. icon: 'none',
  212. duration: 1500
  213. })
  214. this.pd=false;
  215. //this.jfnodata=true
  216. }
  217. })
  218. },
  219. }
  220. }
  221. </script>
  222. <style lang="scss">
  223. .nodata{
  224. text-align: center;
  225. padding-top: 400rpx;
  226. }
  227. .paisong{
  228. display: flex;
  229. flex-direction: column;
  230. justify-content:center;
  231. height:170rpx;
  232. background-color: #fff;
  233. margin: 30rpx;
  234. border-radius: 9rpx;
  235. position: relative;
  236. h3 {
  237. height: 70rpx;
  238. line-height: 70rpx;
  239. padding-left: 30rpx;
  240. }
  241. }
  242. .companylist {
  243. margin: 20rpx 30rpx;
  244. background: #fff;
  245. height: 280rpx;
  246. border-radius: 10px;
  247. position: relative;
  248. h3 {
  249. height: 70rpx;
  250. line-height: 70rpx;
  251. padding-left: 30rpx;
  252. }
  253. }
  254. .settled1 {
  255. background-color: #ED3A25;
  256. width: 100rpx;
  257. height: 40rpx;
  258. text-align: center;
  259. line-height: 40rpx;
  260. color: #fff;
  261. font-size: 14rpx;
  262. position: absolute;
  263. top: 0px;
  264. right: 0px;
  265. border-top-right-radius: 10rpx;
  266. border-bottom-left-radius: 10rpx;
  267. }
  268. .settled2 {
  269. background-color: #FF9C27;
  270. width: 100rpx;
  271. height: 40rpx;
  272. text-align: center;
  273. line-height: 40rpx;
  274. color: #fff;
  275. font-size: 14rpx;
  276. position: absolute;
  277. top: 0px;
  278. right: 0px;
  279. border-top-right-radius: 10rpx;
  280. border-bottom-left-radius: 10rpx;
  281. }
  282. .settled3 {
  283. background-color: #30D3A2;
  284. width: 100rpx;
  285. height: 40rpx;
  286. text-align: center;
  287. line-height: 40rpx;
  288. color: #fff;
  289. font-size: 14rpx;
  290. position: absolute;
  291. top: 0px;
  292. right: 0px;
  293. border-top-right-radius: 10rpx;
  294. border-bottom-left-radius: 10rpx;
  295. }
  296. .Currentamount {
  297. padding-left: 30rpx;
  298. height: 50rpx;
  299. line-height: 50rpx;
  300. color: #BCB3A7;
  301. span {
  302. color: #FA5555;
  303. padding-left: 9rpx;
  304. }
  305. }
  306. .Currentamount1 {
  307. padding-left: 30rpx;
  308. height: 40rpx;
  309. line-height: 40rpx;
  310. color: #BCB3A7;
  311. span {
  312. color: #FA5555;
  313. padding-left: 9rpx;
  314. }
  315. }
  316. .records1{
  317. background-color: #FA5555;
  318. width: 100rpx;
  319. height: 40rpx;
  320. text-align: center;
  321. line-height: 40rpx;
  322. color: #fff;
  323. font-size: 14rpx;
  324. position: absolute;
  325. top: 0px;
  326. right: 0px;
  327. border-top-right-radius: 10rpx;
  328. border-bottom-left-radius: 10rpx;
  329. }
  330. .records{
  331. display: flex;
  332. flex-direction: column;
  333. // justify-content: center;
  334. position: relative;
  335. width: 690rpx;
  336. height: 210rpx;
  337. background: #fff;
  338. margin: 0 auto;
  339. border-radius: 9rpx;
  340. }
  341. .onerecord{
  342. width: 750rpx;
  343. height: 90rpx;
  344. line-height: 90rpx;
  345. padding-left: 30rpx;
  346. color: #999;
  347. span{
  348. color: red;
  349. }
  350. }
  351. .topbilledit {
  352. display: flex;
  353. justify-content: center;
  354. align-items: center;
  355. background: #fff;
  356. height: 60rpx;
  357. }
  358. .changetime2 {
  359. padding-left: 10rpx;
  360. }
  361. .subsection {
  362. padding: 30rpx;
  363. background: #fff;
  364. }
  365. .topname {
  366. height: 44px;
  367. width: 750rpx;
  368. display: flex;
  369. align-items: center;
  370. }
  371. .topname1 {
  372. width: 50rpx;
  373. padding-left: 10rpx;
  374. }
  375. .topname2 {
  376. width: 700rpx;
  377. text-align: center;
  378. font-weight: bold;
  379. }
  380. </style>