hz-zhhq-app/unpackage/dist/build/web/static/js/pages-cars-management-cars-...

1 line
32 KiB
JavaScript
Raw Normal View History

2025-01-22 10:53:47 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-cars-management-cars-approval"],{"1ca6":function(t,e,a){var i=a("bafb");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var n=a("967d").default;n("50965182",i,!0,{sourceMap:!1,shadowMode:!1})},"213f":function(t,e,a){"use strict";var i=a("1ca6"),n=a.n(i);n.a},"3c40":function(t,e,a){"use strict";(function(t){a("6a54");var i=a("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a("c223"),a("aa9c");var n=i(a("b7c7")),o=(i(a("566d")),a("779a")),c=a("8251"),s=i(a("56cd")),r=(i(a("e03c")),i(a("80c8"))),d=i(a("ff38")),l={data:function(){return{userId:(0,c.getStorage)("userInfo").userId,deptId:(0,c.getStorage)("userInfo").deptId,currentTabIndex:0,page0:1,pageSize0:10,page1:1,pageSize1:10,list:[],list0:[],list1:[],stateList:["待审核","已通过","已拒绝"],loadingType0:2,contentText0:{contentdown:"上拉加载更多",contentrefresh:"正在加载...",contentnomore:"没有更多数据了"},loadingType1:2,contentText1:{contentdown:"上拉加载更多",contentrefresh:"正在加载...",contentnomore:"没有更多数据了"},items:[{value:"0",name:"全选",checked:!1},{value:"1",name:"取消选择",checked:!1}],objList:[],paramsDataList:[],checkedListId:[],ids:"",approvalReason:""}},components:{loadMore:s.default,contentNone:r.default,UniPopup:d.default},watch:{currentTabIndex:function(t,e){this.currentTabIndex=t,0==this.currentTabIndex?(this.page0=1,this.loadingType0=0,this.getApprovalList()):1==this.currentTabIndex&&(this.page1=1,this.loadingType1=0,this.getApprovalList())}},onLoad:function(t){this.currentTabIndex=t.currentTabIndex||0,this.getApprovalList()},methods:{getApprovalList:function(){var t=this,e={};e=0==this.currentTabIndex?{method:o.getUsecarApplyList,data:{userid:this.userId,deptid:this.deptId,pageSize:this.pageSize0,page:this.page0,approvalStatus:"0"}}:{method:o.getUsecarApplyList,data:{userid:this.userId,deptid:this.deptId,pageSize:this.pageSize0,page:this.page0,approvalStatus:"3"}},(0,c.callbackRequest)(e).then((function(e){if(1==e.data.returnCode){for(var a=e.data.returnData||[],i=0;i<a.length;i++)a[i].checkValue=!1;0==t.currentTabIndex?1==t.page0?t.list0=a:a.length>0?(t.list0=[].concat((0,n.default)(t.list0),(0,n.default)(a)),t.loadingType0=0):t.loadingType0=2:1==t.currentTabIndex&&(1==t.page1?t.list1=a:a.length>0?(t.list1=[].concat((0,n.default)(t.list1),(0,n.default)(a)),t.loadingType1=0):t.loadingType1=2)}}))},checkBox:function(t,e){e.checkValue=!e.checkValue;var a=[];if(e.checkValue)this.checkedListId.push(e);else{for(var i=0;i<this.checkedListId.length;i++)e.id!=this.checkedListId[i].id&&a.push(this.checkedListId[i]);this.checkedListId=a}},checkRadio:function(t,e){e.checked=!e.checked},getCheckBoxList:function(){for(var t=0;t<this.checkedListId.length;t++)this.ids+=0==t?this.checkedListId[t].id:","+this.checkedListId[t].id},submit:function(t){this.getCheckBoxList();var e={method:o.approvalUseCarApply,data:{ids:this.ids,approvalStatus:t,approvalReason:this.approvalReason,userId:this.userId}},a="是否确认拒绝";1==t&&(a="是否确认同意"),uni.showModal({title:"提示",content:a,success:function(t){t.confirm&&(0,c.callbackRequest)(e).then((function(t){(0,c.alertTip)(t.data.returnMsg),setTimeout((function(){uni.redirectTo({url:"/pages/cars-management/cars-approval?currentTabIndex=0"})}),2e3)}))}})},checkRadioChange:function(t){var e=t.detail.value;if(0==e)for(var a=0;a<this.list0.length;a++)this.list0[a].checkValue=!0;else for(a=0;a<this.list0.length;a++)this.list0[a].checkValue=!1;var i=[];for(a=0;a<this.list0.length;a++)this.list0[a].checkValue&&i.push(this.list0[a]);this.checkedListId=i},circulation:function(){this.$refs.popup.open()},closeCirculation:function(){this.$refs.popup.close()},bindTextAreaBlur:function(e){t.log(e.detail.value)}},onReachBottom:function(){if(0==this.currentTabIndex){if(0!==this.loadingType0)return;this.loadingType0=1,this.page0=this.page0+1,this.getApprovalList()}else{if(0!==this.loadingType1)return;this.loadingType1=1,this.page1=th