123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437 |
- <template>
- <view class="">
-
- <view class="subsection">
- <u-subsection :list="list" fontSize="30rpx" :current="current" @change="sectionChange"></u-subsection>
- </view>
-
- <!-- 待派送 -->
- <view class="" v-show="cdshow==0">
- <view style="padding:20rpx 0 0 30rpx">
- 共有 <span style="color: red">{{totalnumber}}</span>条记录
- </view>
-
- <view class="u-listdata" >
- <u-list @scrolltolower="scrolltolower" :pagingEnabled='true'>
- <u-list-item v-for="(item, index) in indexList" :key="index">
- <view class="paisong" @click="Workorderdetails(item)">
- <h3>{{item.repairPosition}}</h3>
- <view class="Currentamount1" v-if='item.repairType==1'>
- 报修类型: 水
- </view>
- <view class="Currentamount1" v-if='item.repairType==2'>
- 报修类型: 电
- </view>
- <view class="Currentamount1" v-if='item.repairType==3'>
- 报修类型: 其他
- </view>
-
- <view class="Currentamount1">
- 报修时间: {{item.createDate}}
- </view>
- </view>
-
- </u-list-item>
- </u-list>
- </view>
- </view>
- <!-- 已派送(待维修) -->
- <view class="" v-show="cdshow==1">
- <!-- 列表 -->
- <view class="u-listdata" >
- <view style="padding:20rpx 0 0 30rpx">
- 共有 <span style="color: red">{{totalnumber}}</span>条记录
- </view>
-
- <u-list @scrolltolower="scrolltolower" :pagingEnabled='true'>
- <u-list-item v-for="(item, index) in indexList" :key="index">
-
- <view class="paisong" @click="Workorderdetails(item)">
- <view class="settled1" v-if="item.urgency==1">
- 非常紧急
- </view>
- <view class="settled2" v-if="item.urgency==2">
- 紧急
- </view>
- <view class="settled3" v-if="item.urgency==3">
- 普通
- </view>
-
- <h3>{{item.repairPosition}}</h3>
- <view class="Currentamount1" v-if='item.repairType==1'>
- 报修类型: 水
- </view>
- <view class="Currentamount1" v-if='item.repairType==2'>
- 报修类型: 电
- </view>
- <view class="Currentamount1" v-if='item.repairType==3'>
- 报修类型: 其他
- </view>
- <view class="Currentamount1">
- 派送时间:{{ item.updateDate }}
- </view>
-
- </view>
-
- </u-list-item>
- </u-list>
- </view>
-
- </view>
- <!--已维修 -->
- <view class="" v-show="cdshow==2">
- <!-- 列表 -->
- <view class="u-listdata" >
- <view style="padding:20rpx 0 0 30rpx">
- 共有 <span style="color: red">{{totalnumber}}</span>条记录
- </view>
-
- <u-list @scrolltolower="scrolltolower" :pagingEnabled='true'>
- <u-list-item v-for="(item, index) in indexList" :key="index">
-
- <view class="paisong" @click="Workorderdetails(item)">
- <view class="settled1" v-if="item.urgency==1">
- 非常紧急
- </view>
- <view class="settled2" v-if="item.urgency==2">
- 紧急
- </view>
- <view class="settled3" v-if="item.urgency==3">
- 普通
- </view>
-
- <h3>{{item.repairPosition}}</h3>
- <view class="Currentamount1" v-if='item.repairType==1'>
- 报修类型: 水
- </view>
- <view class="Currentamount1" v-if='item.repairType==2'>
- 报修类型: 电
- </view>
- <view class="Currentamount1" v-if='item.repairType==3'>
- 报修类型: 其他
- </view>
- <view class="Currentamount1">
- 维修完成时间:{{ item.repairFinishTime }}
- </view>
-
- </view>
-
- </u-list-item>
- </u-list>
- </view>
- </view>
-
- </view>
- </template>
- <script>
- // import { isEmpty, getDictDataList } from "@/utils/index";
-
- export default {
- name:'Workordertodone',
- data() {
- return {
- totalnumber:0,
- jfnodata:false,
- showtype: false,
- cdshow: 0,
- fatherparameter: {},
- expensedata:'全部',
- list: ['待派送', '已派送(待维修)','已维修' ],
- current: 0,
- dataForm: {
- status: "1",
- page: 1,
- limit: 10,
- },
- indexList: [],
- payStatusList: [],
- nodata:true,
- pd:true,
- columnstype: [],
- repairTypeList:[],
- UrgencyTypelist:[],
- }
- },
- //监听页面加载,其参数为上个页面传递的数据,参数类型为 Object(用于页面传参
- onLoad: function(options) { //option为object类型,会序列化上个页面传递的参数
-
-
- this.getRepairTypeList();
-
- this.getpaisongdata();
-
- },
- //监听页面初次渲染完成。注意如果渲染速度快,会在页面进入动画完成前触发
- onReady() {},
- //监听页面隐藏
- onHide() {},
- //监听窗口尺寸变化
- onResize() {},
- //监听页面卸载
- onUnload() {},
- //监听用户下拉动作,一般用于下拉刷新
- onPullDownRefresh() {},
- methods: {
- getRepairTypeList() {
- // console.log('9999', getDictDataList("UrgencyType"))
- // this.UrgencyTypelist=getDictDataList("UrgencyType");
- // console.log('888', getDictDataList("RepairType"))
- // this.repairTypeList = getDictDataList("RepairType");
- },
- Workorderdetails(e){
- // console.log('111111111111111111',e)
- uni.navigateTo({
- url: `/pages/index/Workordertodone/Workorderdetails/Workorderdetails?id=${e.id}`
- });
- },
-
- sectionChange(index) {
- this.current = index;
- if (index == 0) {
- this.cdshow = 0;
- this.indexList=[];
- this.dataForm.page = 1;
- this.dataForm.status = 1;
- this.getpaisongdata();
- } else if(index == 1) {
- this.cdshow = 1;
- this.indexList=[];
- this.dataForm.page = 1;
- this.dataForm.status = 2;
- this.getpaisongdata();
- } else if(index == 2) {
- this.cdshow = 2;
- this.indexList=[];
- this.dataForm.page = 1;
- this.dataForm.status = 3;
- this.getpaisongdata();
- }
-
- },
- scrolltolower() {
- if(this.pd){
- this.getpaisongdata();
- }else{
- return
- }
- },
- // dict_filter(val, list) {
- // if (isEmpty(val)) {
- // return {};
- // }
- // return this[list].find((item) => item.dictValue == val);
- // },
- getpaisongdata(){
- this.$api.get('/repairorder/page', this.dataForm)
- .then(res => {
- this.totalnumber=res.data.data.total;
-
- if (res.data.data.list.length != 0) {
- this.indexList.push(...res.data.data.list);
- this.dataForm.page = this.dataForm.page + 1;
- this.pd=true;
- this.jfnodata=false;
- } else {
- uni.showToast({
- title:'暂无更多数据了',
- icon: 'none',
- duration: 1500
- })
- this.pd=false;
- //this.jfnodata=true
- }
-
- })
- },
-
-
-
- }
- }
- </script>
- <style lang="scss">
-
-
-
- .nodata{
- text-align: center;
- padding-top: 400rpx;
-
- }
- .paisong{
- display: flex;
- flex-direction: column;
- justify-content:center;
- height:170rpx;
- background-color: #fff;
- margin: 30rpx;
- border-radius: 9rpx;
- position: relative;
- h3 {
- height: 70rpx;
- line-height: 70rpx;
- padding-left: 30rpx;
- }
- }
-
-
- .companylist {
- margin: 20rpx 30rpx;
- background: #fff;
- height: 280rpx;
- border-radius: 10px;
- position: relative;
-
- h3 {
- height: 70rpx;
- line-height: 70rpx;
- padding-left: 30rpx;
- }
- }
- .settled1 {
- background-color: #ED3A25;
- width: 100rpx;
- height: 40rpx;
- text-align: center;
- line-height: 40rpx;
- color: #fff;
- font-size: 14rpx;
- position: absolute;
- top: 0px;
- right: 0px;
- border-top-right-radius: 10rpx;
- border-bottom-left-radius: 10rpx;
- }
- .settled2 {
- background-color: #FF9C27;
- width: 100rpx;
- height: 40rpx;
- text-align: center;
- line-height: 40rpx;
- color: #fff;
- font-size: 14rpx;
- position: absolute;
- top: 0px;
- right: 0px;
- border-top-right-radius: 10rpx;
- border-bottom-left-radius: 10rpx;
- }
- .settled3 {
- background-color: #30D3A2;
- width: 100rpx;
- height: 40rpx;
- text-align: center;
- line-height: 40rpx;
- color: #fff;
- font-size: 14rpx;
- position: absolute;
- top: 0px;
- right: 0px;
- border-top-right-radius: 10rpx;
- border-bottom-left-radius: 10rpx;
- }
-
-
-
- .Currentamount {
- padding-left: 30rpx;
- height: 50rpx;
- line-height: 50rpx;
- color: #BCB3A7;
-
- span {
- color: #FA5555;
- padding-left: 9rpx;
- }
- }
-
- .Currentamount1 {
- padding-left: 30rpx;
- height: 40rpx;
- line-height: 40rpx;
- color: #BCB3A7;
-
- span {
- color: #FA5555;
- padding-left: 9rpx;
- }
- }
-
- .records1{
- background-color: #FA5555;
- width: 100rpx;
- height: 40rpx;
- text-align: center;
- line-height: 40rpx;
- color: #fff;
- font-size: 14rpx;
- position: absolute;
- top: 0px;
- right: 0px;
- border-top-right-radius: 10rpx;
- border-bottom-left-radius: 10rpx;
- }
- .records{
- display: flex;
- flex-direction: column;
- // justify-content: center;
- position: relative;
- width: 690rpx;
- height: 210rpx;
- background: #fff;
- margin: 0 auto;
- border-radius: 9rpx;
- }
- .onerecord{
- width: 750rpx;
- height: 90rpx;
- line-height: 90rpx;
- padding-left: 30rpx;
- color: #999;
- span{
- color: red;
- }
- }
- .topbilledit {
- display: flex;
- justify-content: center;
- align-items: center;
- background: #fff;
- height: 60rpx;
- }
- .changetime2 {
- padding-left: 10rpx;
- }
- .subsection {
- padding: 30rpx;
- background: #fff;
- }
- .topname {
- height: 44px;
- width: 750rpx;
- display: flex;
- align-items: center;
- }
- .topname1 {
- width: 50rpx;
- padding-left: 10rpx;
- }
- .topname2 {
- width: 700rpx;
- text-align: center;
- font-weight: bold;
- }
- </style>
|