1 line
31 KiB
JavaScript
1 line
31 KiB
JavaScript
|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-medical-drugsApproval"],{"0153":function(t,e,i){var n=i("c792");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=i("967d").default;a("538534e6",n,!0,{sourceMap:!1,shadowMode:!1})},"3ebf":function(t,e,i){"use strict";i.r(e);var n=i("4b94"),a=i.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=a.a},"4b94":function(t,e,i){"use strict";i("6a54");var n=i("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("c223"),i("aa9c"),i("5ef2");var a=n(i("b7c7")),o=(n(i("566d")),i("779a")),d=i("8251"),c=n(i("56cd")),r=(n(i("e03c")),n(i("80c8"))),s=n(i("ff38")),l=n(i("1d1b")),u={data:function(){return{userId:(0,d.getStorage)("userInfo").userId,currentTabIndex:0,page0:1,pageSize0:10,loadingType0:2,page1:1,pageSize1:10,loadingType1:2,list0:[],list1:[],stateList:["待审核","已通过","已拒绝"],contentText0:{contentdown:"上拉加载更多",contentrefresh:"正在加载...",contentnomore:"没有更多数据了"},contentText1:{contentdown:"上拉加载更多",contentrefresh:"正在加载...",contentnomore:"没有更多数据了"},items:[{value:"0",name:"全选",checked:!1},{value:"1",name:"取消选择",checked:!1}],objList:[],paramsDataList:[],checkedListId:[]}},components:{loadMore:c.default,contentNone:r.default,UniPopup:s.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.getDrugsApplyList()}},onLoad:function(t){this.currentTabIndex=t.currentTabIndex||0},onShow:function(){this.getDrugsApplyList()},methods:{detail:function(t){uni.navigateTo({url:"/pages/medical/drugsApprovalDetail?id="+t.id})},getDrugsApplyList:function(){var t=this,e={};e=0==this.currentTabIndex?{userId:this.userId,page:this.page0,pageSize0:this.pageSize,status:0}:{userId:this.userId,page:this.page1,pageSize1:this.pageSize,status:3};var i={method:o.getDrugsApplyList,data:e};(0,d.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.reservationList0),[i]),t.loadingType0=0):t.loadingType0=2:1==t.page1?t.list1=i:i.length>0?(t.list1=[].concat((0,a.default)(t.reservationList1),[i]),t.loadingType1=0):t.loadingType1=2}else(0,d.alertTip)(e.data.returnMsg)}))},toDetail:function(t){uni.navigateTo({url:t})},checkBox:function(t,e){t.stopPropagation(),t.preventDefault();e.checkValue=!e.checkValue;var i=[];if(this.checkedListId.length>0&&this.checkedListId[0].appointmentType!=e.appointmentType){(0,d.alertTip)("请选择来访类型相同的数据进行审批!"),this.$set(e,"checkValue",!1);for(var n=0,a=0;a<this.list.length;a++)e.detail_id==this.list[a].detail_id&&(n=a);this.$set(this.list,n,e)}else this.appointmentTypeForPopup=e.appointmentType;if(e.checkValue)this.checkedListId.push(e);else{for(a=0;a<this.checkedListId.length;a++)e.detail_id!=this.checkedListId[a].detail_id&&i.push(this.checkedListId[a]);this.checkedListId=i}},checkRadio:function(t,e){e.checked=!e.checked},getCheckBoxList:function(){for(var t=[],e=0;e<this.list.length;e++)this.list[e].checkValue&&t.push(this.list[e]);var i=[],n=[];for(e=0;e<t.length;e++)if(t[e].checkValue){var a={userId:this.userId,applyId:"",applyType:"",userLevel:this.userLevel,appointmentType:""};a.applyId=t[e].detail_id,a.appointmentType=t[e].appointmentType,i.push(a);var o={};o.id=this.circulationId,o.applyId=t[e].id,o.userLevel=this.userLevel,n.push(o)}this.objList=i,this.paramsDataList=n},submit:function(t){this.getCheckBoxList();for(var e=this.objList,i=0;i<e.length;i++)e[i].applyType=t;var n={method:updateVisitorInfoBatch,data:{list:e}},a="是否确认拒绝";2==t&&(a="是否确认同意"),uni.showModal({title:"提示",content:a,success:function(t){t.confirm&&(0,d.callbackRequest)(n).then((function(t){(0,d.alertTip)(t.data.returnMsg),setTimeout(
|