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

1 line
42 KiB
JavaScript
Raw Normal View History

2025-02-25 15:19:01 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-cars-management-cars-management"],{"144a":function(t,e,a){"use strict";a.r(e);var i=a("e11b"),n=a("81de");for(var o in n)["default"].indexOf(o)<0&&function(t){a.d(e,t,(function(){return n[t]}))}(o);a("4197");var d=a("828b"),r=Object(d["a"])(n["default"],i["b"],i["c"],!1,null,"347c93c8",null,!1,i["a"],void 0);e["default"]=r.exports},1701:function(t,e,a){"use strict";a("6a54");var i=a("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a("c223");var n=i(a("b7c7")),o=a("2352"),d=a("5ffc"),r=i(a("144a")),s=i(a("4c78")),l=i(a("2a91")),c=((new Date).getTime(),{data:function(){return{page:1,pageSize:10,loadingType:0,contentText:{contentdown:"上拉加载更多",contentrefresh:"正在加载...",contentnomore:"没有更多数据了"},userId:(0,o.getStorage)("userInfo").id,user:(0,o.getStorage)("userInfo"),currentTabIndex:0,date:(0,o.getDate)(),selectedDate:this.getTime(),chooseDateIndex:0,times:[],chooseTimeIndex:null,deptList:["财务部","会计部","广告部","研发部"],rersonList:["生产用车","公务办事","公务接待","出差送站","出差接站","机要取件","其它"],RersonIndex:0,departmentIndex:0,applyPersonName:(0,o.getStorage)("userInfo").username,applyPersonMobile:(0,o.getStorage)("userInfo").telnumber,reservationList:[],formatDate:o.formatDate,peoplenum:1,remark:"",destination:""}},components:{loadMore:r.default,contentNone:s.default,hTimePicker:l.default},onLoad:function(t){this.currentTabIndex=t.currentTabIndex||0},onShow:function(){0==this.currentTabIndex?this.getDepartment():this.getMyUsecarApplyList()},watch:{currentTabIndex:function(t,e){1==t?(this.page=1,this.loadingType=0,this.getMyUsecarApplyList()):this.getDepartment()}},methods:{changeTime:function(t,e){this.selectedDate=this.formatDate(e,"m_Time")},open:function(){this.$refs.calendar.open()},getTime:function(){var t=new Date,e=t.getFullYear(),a=t.getMonth()+1,i=t.getDate(),n=t.getHours(),o=t.getMinutes(),d=(t.getSeconds(),e+"-"+r(a)+"-"+r(i)+" "+r(n)+":"+r(o));function r(t){return t>9?t:"0"+t}return d},getDepartment:function(){var t=this,e={method:d.getAllDept,data:{}};(0,o.callbackRequest)(e).then((function(e){if(1==e.data.returnCode){t.deptList=e.data.returnData;for(var a=0;a<t.deptList.length;a++)t.deptList[a].id==t.user.deptId&&(t.departmentIndex=a)}}))},getMyUsecarApplyList:function(){var t=this,e={method:d.getMyUsecarApplyList,data:{pageSize:this.pageSize,page:this.page,userid:this.userId}};(0,o.callbackRequest)(e).then((function(e){1==e.data.returnCode&&(1==t.page?t.reservationList=e.data.returnData:e.data.returnData.length>0?(t.reservationList=[].concat((0,n.default)(t.reservationList),(0,n.default)(e.data.returnData)),t.loadingType=0):t.loadingType=2)}))},switchTab:function(t){this.chooseDateIndex=t},changeDepartment:function(t){this.departmentIndex=t.detail.value},changeRerson:function(t){this.RersonIndex=t.detail.value},submit:function(){var t=this;if(""==this.peoplenum||0==this.peoplenum)return(0,o.alertTip)("请输入乘车人数"),!1;if(""==this.destination)return(0,o.alertTip)("请输入目的地"),!1;var e={method:d.submitUseCarApply,data:{userid:this.userId,username:this.applyPersonName,deptname:this.deptList[this.departmentIndex].name,deptid:this.deptList[this.departmentIndex].id,telnumber:this.applyPersonMobile,starttime:this.selectedDate,peoplenum:this.peoplenum,reason:this.rersonList[this.RersonIndex],destination:this.destination,remark:this.remark}};(0,o.callbackRequest)(e).then((function(e){1==e.data.returnCode?((0,o.alertTip)("申请成功"),setTimeout((function(e){t.currentTabIndex=1}),2e3)):(0,o.alertTip)(e.data.returnMsg)}))},goEvaluatePage:function(t){uni.navigateTo({url:"/pages/cars-management/cars-evaluate?type=5&typeId=".concat(t)})}},onReachBottom:function(){0===this.loadingType&&1==this.currentTabIndex&&(this.loadingType=1,this.page=this.page+1,this.getMyUsecarApplyList())}});e.default=c},"21a3":function(t,e,a){var i=a("d130");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.l