1 line
31 KiB
JavaScript
1 line
31 KiB
JavaScript
|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-report-report-sl"],{2909:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var n=d(i("6005")),a=d(i("db90")),o=d(i("06c5")),r=d(i("3427"));function d(t){return t&&t.__esModule?t:{default:t}}function s(t){return(0,n.default)(t)||(0,a.default)(t)||(0,o.default)(t)||(0,r.default)()}},3427:function(t,e,i){"use strict";function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}Object.defineProperty(e,"__esModule",{value:!0}),e.default=n},"54a8":function(t,e,i){"use strict";var n=i("4ea4");i("99af"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=n(i("2909")),o=(n(i("f6ba")),i("37f6")),r=i("b742"),d=n(i("8e28")),s=(n(i("023f")),n(i("bd50"))),c=n(i("80de")),l=n(i("f6d8")),f={data:function(){return{formatDate:r.formatDate,userId:(0,r.getStorage)("userInfo").userId,currentTabIndex:0,page0:1,pageSize0:10,loadingType0:2,page1:1,pageSize1:10,loadingType1:2,page2:1,pageSize2:10,loadingType2:2,list0:[],list1:[],list2:[],contentText0:{contentdown:"上拉加载更多",contentrefresh:"正在加载...",contentnomore:"没有更多数据了"},contentText1:{contentdown:"上拉加载更多",contentrefresh:"正在加载...",contentnomore:"没有更多数据了"},contentText2:{contentdown:"上拉加载更多",contentrefresh:"正在加载...",contentnomore:"没有更多数据了"},reportType:0,startDate:this.getDay(-7),endDate:this.getDay(0),endCount:""}},components:{loadMore:d.default,contentNone:s.default,UniPopup:c.default,xflSelect:l.default},watch:{currentTabIndex:function(t,e){this.currentTabIndex=t,0==this.currentTabIndex?(this.page0=1,this.loadingType0=0):1==this.currentTabIndex&&(this.page1=1,this.loadingType1=0),this.getReportList()}},onLoad:function(t){this.currentTabIndex=t.currentTabIndex||0,this.reportType=t.reportType||0},onShow:function(){this.getReportList()},methods:{detail:function(t){uni.navigateTo({url:"/pages/report/report-detail?id="+t.id+"&queryType=1"})},getReportList:function(){var t=this,e={};0==this.currentTabIndex?e={pageNum:this.page0,pageSize:this.pageSize0,reportStatus:0,reportType:this.reportType}:1==this.currentTabIndex?e={pageNum:this.page1,pageSize:this.pageSize1,reportStatus:1,reportType:this.reportType}:2==this.currentTabIndex&&(e={pageNum:this.page2,pageSize:this.pageSize2,reportStatus:2,reportType:this.reportType,startDate:this.startDate,endDate:this.endDate});var i={method:o.getReportList,data:e};(0,r.callbackRequest)(i).then((function(e){if(1==e.data.returnCode){var i=e.data.returnData||[];0==t.currentTabIndex?1==t.page0?t.list0=i:i.length>0?(t.list0=[].concat((0,a.default)(t.list0),[i]),t.loadingType0=0):t.loadingType0=2:1==t.currentTabIndex?1==t.page1?t.list1=i:i.length>0?(t.list1=[].concat((0,a.default)(t.list1),[i]),t.loadingType1=0):t.loadingType1=2:2==t.currentTabIndex&&(1==t.page2?t.list2=i:i.length>0?(t.list2=[].concat((0,a.default)(t.list2),[i]),t.loadingType2=0):t.loadingType2=2,t.getReportCount())}else(0,r.alertTip)(e.data.returnMsg)}))},getReportCount:function(){var t=this,e={reportStatus:2,reportType:this.reportType,startDate:this.startDate,endDate:this.endDate},i={method:o.getReportCount,data:e};(0,r.callbackRequest)(i).then((function(e){1==e.data.returnCode?t.endCount=e.data.returnData:(0,r.alertTip)(e.data.returnMsg)}))},getDay:function(t){var e=new Date((new Date).getTime()+24*t*60*60*1e3),i=e.getFullYear(),n=e.getMonth()+1;n<10&&(n="0"+n);var a=e.getDate();return a<10&&(a="0"+a),i+"-"+n+"-"+a},startDateChange:function(t){this.page2=1,this.loadingType2=0,this.list2=[],this.startDate=t.target.value,this.getReportList()},endDateChange:function(t){this.page2=1,this.loadingType2=0,this.list2=[],this.endDate=t.target.value,this.getReportList()}},onReachBottom:function(){if(0==this.currentTabIndex){if(0!==this.loadingType0)return;this.loadingType0=1,this.page0=this.page0+1,this.getReportList()}else if(1==this.currentTabIndex){if(0!==this.loadingType1)return
|