| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0df1f5"],{8920:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"new-app-container layout-vertical"},[a("YMTableSearch",{attrs:{loading:t.loading,"search-form":t.searchForm},on:{onValueChange:t.onValueChange,submit:t.onSubmit}}),a("YMTable",{ref:"table",attrs:{"table-key":1,index:!0,selection:!1,columns:t.columns,"rows-actions":t.rowsActions,"show-summary":!1,apis:t.apis,"custom-style":{height:"calc(100vh - 150px)"}}}),a("Dialog",{ref:"dialogLog",attrs:{"dialog-actions":{width:"800px",title:"余额宝日志",confirmButtom:!1}}},[a("template",{slot:"content"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.logLoading,expression:"logLoading"}],attrs:{data:t.logTableData,border:"",stripe:"",height:"400px"}},[a("el-table-column",{attrs:{prop:"type",label:"操作类型",align:"center"}}),a("el-table-column",{attrs:{prop:"amount",label:"操作金额",align:"center"}}),a("el-table-column",{attrs:{prop:"hold_hours",label:"持有时间(小时)",align:"center"}}),a("el-table-column",{attrs:{prop:"interest",label:"利息",align:"center"}}),a("el-table-column",{attrs:{label:"创建时间",align:"center",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(t.formatDate(e.row.create_time))+" ")]}}])})],1)],1)],2)],1)},l=[],o=a("639f"),r=(a("b15b"),a("7acf"),a("9039")),i=a("7e1e"),c={name:"YuebaoItem",components:{Dialog:r["a"]},data:function(){var t=this;return{loading:!1,searchForm:[{label:"会员ID",type:"input",prop:"member_id",clearable:!0},{label:"会员昵称",type:"input",prop:"first_name",clearable:!0},{label:"时间范围",type:"daterange",prop:"dateRange",clearable:!0}],apis:{list:{url:"yuebao/item",dataParam:"data.data",resultParam:"data",init:!0}},rowsActions:[{key:"log",label:"查看日志",method:function(e){t.logTableData=[],t.$refs.dialogLog.open(),t.getLogList(e.user_id)}}],columns:[{label:"记录ID",prop:"id"},{label:"会员ID",prop:"member_id"},{label:"会员昵称",type:"input",prop:"first_name",clearable:!0},{label:"状态",prop:"status",method:function(t){return 1===t.status?"持仓中":"已转出"}},{label:"初始本金",prop:"principal"},{label:"剩余本金",prop:"surplus_principal"},{label:"日利率",prop:"daily_interest_rate"},{label:"创建时间",prop:"create_time",sortable:"custom",method:function(e){return t.formatDate(e.create_time)},width:160},{label:"更新时间",prop:"update_time",method:function(e){return t.formatDate(e.update_time)},width:160}],logTableData:[],logLoading:!1}},methods:{onValueChange:function(t){},onSubmit:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Object(o["a"])({},t);e.dateRange&&2===e.dateRange.length&&(e.start_time=e.dateRange[0],e.end_time=e.dateRange[1]),delete e.dateRange,this.$refs.table.getList(e)},getLogList:function(t){var e=this;this.logLoading=!0,Object(i["Mb"])({user_id:t}).then((function(t){var a;e.logTableData=(null===(a=t.data)||void 0===a?void 0:a.data)||[],e.logLoading=!1})).catch((function(){e.logLoading=!1}))},formatDate:function(t){if(!t)return"--";var e=new Date(1e3*t),a=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),l=String(e.getDate()).padStart(2,"0"),o=String(e.getHours()).padStart(2,"0"),r=String(e.getMinutes()).padStart(2,"0"),i=String(e.getSeconds()).padStart(2,"0");return"".concat(a,"-").concat(n,"-").concat(l," ").concat(o,":").concat(r,":").concat(i)}}},s=c,p=a("1805"),u=Object(p["a"])(s,n,l,!1,null,null,null);e["default"]=u.exports}}]);
|