Workordertodone.vue 9.0 KB

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