60.5e79ba97221bdfd0c825.js 6.8 KB

1
  1. webpackJsonp([60],{"7pAC":function(t,e){},PYtG:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={components:{},data:function(){return{ic_number:"",org_id:"",ic_id:"",icinfo:{},pickerOptions:{shortcuts:[{text:"最近一周",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,e])}},{text:"最近一个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,e])}},{text:"最近三个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,e])}}]},times:[],topuporuser:"user",tableData:[],start_time:"",end_time:"",topuppage:1,topuplist:[],topuptotal:10,pic_nums:0,currentPage1:1,electricnum:0,waternum:0}},computed:{},watch:{},methods:{backbtn:function(){this.$router.push({path:"/plantGuard/iccard"})},geticinfo:function(){var t=this;this.$axios({method:"POST",url:"/api/api_gateway?method=water_price_v2.basic_management.ic_list",data:this.qs.stringify({page:1,page_size:9999999,search:this.ic_number,org_id:this.org_id})}).then(function(e){""==e.data.message?e.data.data&&(t.icinfo=e.data.data.page_list[0]):t.$message.error(e.data.message)})},tabletab:function(t){this.topuporuser=t,this.currentPage1=1,this.topuppage=1,"user"==t?this.getuserlist():"topup"==t&&this.gettopuplist()},pickerchange:function(t){console.log(t),t?(this.start_time=Math.floor(+new Date(t[0])/1e3),this.end_time=Math.floor(+new Date(t[1])/1e3)):(this.start_time="",this.end_time=""),"user"==this.topuporuser?(this.topuppage=1,this.getuserlist()):"topup"==this.topuporuser&&(this.topuppage=1,this.gettopuplist())},currentchange:function(t){"user"==this.topuporuser?(this.topuppage=t,this.getuserlist()):"topup"==this.topuporuser&&(this.topuppage=t,this.gettopuplist())},gettopuplist:function(){var t=this;this.$axios({method:"POST",url:"/api/api_gateway?method=water_price_v2.basic_management.ic_recharge_history",data:this.qs.stringify({page:this.topuppage,page_size:12,ic_id:this.ic_id,start_time:this.start_time,end_time:this.end_time})}).then(function(e){if(""==e.data.message){if(e.data.data){t.topuplist=e.data.data.page_list,t.pic_nums=e.data.data.pic_nums;for(var a=0;a<t.topuplist.length;a++)t.topuplist[a].indexs=a+1;t.topuptotal=e.data.data.total_item}}else t.$message.error(e.data.message)})},getuserlist:function(){var t=this;this.$axios({method:"POST",url:"/api/api_gateway?method=water_price_v2.basic_management.ic_operation_history",data:this.qs.stringify({page:this.topuppage,page_size:12,ic_id:this.ic_id,start_time:this.start_time,end_time:this.end_time})}).then(function(e){if(""==e.data.message){if(e.data.data){t.tableData=e.data.data.page_list,t.electricnum=e.data.data.electric,t.waternum=e.data.data.water;for(var a=0;a<t.tableData.length;a++)t.tableData[a].indexs=a+1;t.topuptotal=e.data.data.total_item}}else t.$message.error(e.data.message)})}},beforeCreate:function(){},created:function(){},beforeMount:function(){},mounted:function(){this.ic_number=this.$route.query.ic_number,this.org_id=this.$route.query.org_id,this.ic_id=this.$route.query.ic_id,this.geticinfo(),this.getuserlist()},beforeUpdate:function(){},updated:function(){},beforeDestroy:function(){},destroyed:function(){},activated:function(){}},s={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"recordbox"},[a("div",{staticClass:"recordbox_text"},[a("div",{staticClass:"recordbox_text_top"},[a("div",{staticClass:"btnbox",on:{click:t.backbtn}},[a("i",{staticClass:"el-icon-back"}),t._v(" "),a("span",[t._v("返回")])]),t._v(" "),a("div",{staticClass:"icinfobox"},[a("p",[t._v("IC卡号:"+t._s(t.icinfo.ic_number))]),t._v(" "),a("p",[t._v("农户名:"+t._s(t.icinfo.peasant_name))]),t._v(" "),a("p",[t._v("所属组织:"+t._s(t.icinfo.org_name))]),t._v(" "),a("p",[t._v("当前余额:"+t._s(t.icinfo.balance))]),t._v(" "),a("p",[t._v("办卡日期:"+t._s(t.icinfo.create_time))])])]),t._v(" "),a("div",{staticClass:"recordbox_text_search"},[a("div",{staticClass:"text_search_left"},[a("div",{staticClass:"search_tab"},[a("p",{class:"user"==t.topuporuser?"tabp":"",on:{click:function(e){return t.tabletab("user")}}},[t._v("\n 使用记录\n ")]),t._v(" "),a("p",{class:"topup"==t.topuporuser?"tabp":"",on:{click:function(e){return t.tabletab("topup")}}},[t._v("\n 充值记录\n ")])]),t._v(" "),"user"==t.topuporuser?a("div",{staticClass:"addupbox"},[a("p",[t._v("总耗水量:"+t._s(t.waternum)+"m³")]),t._v(" "),a("p",[t._v("总耗电量:"+t._s(t.electricnum)+"°")])]):a("div",{staticClass:"addupbox"},[a("p",[t._v("累计充值:"+t._s(t.pic_nums)+"元")])])]),t._v(" "),a("div",[a("el-date-picker",{attrs:{type:"datetimerange","picker-options":t.pickerOptions,"range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期",align:"right",size:"small"},on:{change:t.pickerchange},model:{value:t.times,callback:function(e){t.times=e},expression:"times"}})],1)]),t._v(" "),a("div",{staticClass:"recordbox_text_table"},[a("el-table",{directives:[{name:"show",rawName:"v-show",value:"user"==t.topuporuser,expression:"topuporuser == 'user'"}],staticStyle:{width:"100%"},attrs:{data:t.tableData,height:"624px",stripe:!0}},[a("el-table-column",{attrs:{prop:"device_id",label:"水井编号",width:"180"}}),t._v(" "),a("el-table-column",{attrs:{prop:"device_name",label:"水井名称",width:"180"}}),t._v(" "),a("el-table-column",{attrs:{prop:"this_electric_nums",label:"本次耗电量"}}),t._v(" "),a("el-table-column",{attrs:{prop:"this_water_nums",label:"本次耗水量"}}),t._v(" "),a("el-table-column",{attrs:{prop:"start_time",label:"开始时间"}}),t._v(" "),a("el-table-column",{attrs:{prop:"create_time",label:"结束时间"}}),t._v(" "),a("el-table-column",{attrs:{prop:"times",label:"使用时长"}}),t._v(" "),a("el-table-column",{attrs:{prop:"price",label:"消耗金额"}}),t._v(" "),a("el-table-column",{attrs:{prop:"create_time",label:"上报时间"}})],1),t._v(" "),a("el-table",{directives:[{name:"show",rawName:"v-show",value:"topup"==t.topuporuser,expression:"topuporuser == 'topup'"}],staticStyle:{width:"100%"},attrs:{data:t.topuplist,stripe:!0,height:"624px"}},[a("el-table-column",{attrs:{prop:"indexs",label:"序号",width:"180"}}),t._v(" "),a("el-table-column",{attrs:{prop:"ic_number",label:"卡号",width:"180"}}),t._v(" "),a("el-table-column",{attrs:{prop:"payment",label:"充值金额"}}),t._v(" "),a("el-table-column",{attrs:{prop:"modify_time",label:"充值时间"}})],1),t._v(" "),a("el-pagination",{attrs:{background:"",layout:"prev, pager, next","page-size":12,total:t.topuptotal,"current-page":t.currentPage1},on:{"current-change":t.currentchange,"update:currentPage":function(e){t.currentPage1=e},"update:current-page":function(e){t.currentPage1=e}}})],1)])])},staticRenderFns:[]};var r=a("C7Lr")(i,s,!1,function(t){a("7pAC")},"data-v-225fec71",null);e.default=r.exports}});