1 line
6.0 KiB
JavaScript
1 line
6.0 KiB
JavaScript
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c6040630"],{2617:function(t,e,n){},"2ebe":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"account-details"},[n("van-nav-bar",{attrs:{fixed:"",title:t.account.accountName,"left-arrow":"","left-text":"返回","right-text":"编辑"},on:{"click-left":function(e){return t.$router.go(-1)},"click-right":function(e){return t.$router.push("/accountAdd?accountId="+t.account.id)}}}),n("div",{staticClass:"page"},[n("div",{staticClass:"bookkeeping-background background-image-1"},[n("van-row",{staticClass:"overview"},[n("span",[t._v("总额:")])]),n("van-row",{staticClass:"balance"},[t._v(t._s(t._f("moneyFilter")(t.account.balance)))]),n("van-row",{staticClass:"overview",attrs:{type:"flex",align:"center"}},[n("van-col",[n("span",[t._v("流入:")]),n("span",[t._v(t._s(t._f("moneyFilter")(t.account.inflow)))])]),n("van-col",{staticClass:"partition"}),n("van-col",[n("span",[t._v("流出:")]),n("span",[t._v(t._s(t._f("moneyFilter")(t.account.flowOut)))])])],1)],1),t._l(t.recordList,(function(e){return t.recordList.length>0?n("van-cell-group",{key:Math.random(),attrs:{inset:""}},[n("van-row",{staticClass:"date",attrs:{type:"flex",align:"center",justify:"space-between"}},[n("van-col",{staticClass:"left"},[n("span",[t._v(t._s(new Date(e.payTime).getDate()))]),n("span",[t._v("日 / 周"+t._s(t.parseTime(new Date(e.payTime),"{a}")))])]),n("van-col",{staticClass:"right"},[t.arraySum(e.recordList.filter((function(t){return"0"===t.typeObject.typeDifference})),"money")?n("span",[n("svg-icon",{attrs:{"icon-class":"加号"}}),n("span",[t._v(t._s(t._f("moneyFilter")(t.arraySum(e.recordList.filter((function(t){return"0"===t.typeObject.typeDifference})),"money"))))])],1):t._e(),t.arraySum(e.recordList.filter((function(t){return"1"===t.typeObject.typeDifference})),"money")?n("span",{staticClass:"income"},[n("svg-icon",{attrs:{"icon-class":"减少"}}),n("span",[t._v(t._s(t._f("moneyFilter")(t.arraySum(e.recordList.filter((function(t){return"1"===t.typeObject.typeDifference})),"money"))))])],1):t._e()])],1),t._l(e.recordList,(function(e){return n("van-cell",{key:Math.random(),staticClass:"record-day",class:t.moneyStyle(e),attrs:{center:"",value:t._f("moneyFilter")(e.money)},on:{click:function(n){return t.handleEdit(e)}},scopedSlots:t._u([{key:"title",fn:function(){return[n("svg-icon",{staticClass:"business-icon",attrs:{"icon-class":e.typeObject.typeIcon||""}}),n("div",{staticClass:"content"},["2"===e.typeObject.typeDifference?n("div",{staticClass:"transfer"},[n("span",[t._v(t._s(e.accountObject.accountName))]),n("svg-icon",{staticClass:"business-icon",attrs:{"icon-class":"右箭头"}}),n("span",[t._v(t._s(e.otherAccountObject.accountName))])],1):n("div",[t._v(t._s(e.typeObject.typeName))]),n("div",{staticClass:"remark"},[t._v(" "+t._s(e.remark)+" ")])])]},proxy:!0}],null,!0)})}))],2):t._e()})),0===t.recordList.length?n("van-row",{staticStyle:{"background-color":"#fff",margin:"0 1rem","border-radius":"0.5rem"}},[n("van-empty",{attrs:{description:"暂无记录"}})],1):t._e()],2)],1)},c=[],o=(n("d3b7"),n("159b"),n("7db0"),n("cb13")),a=n("354e"),i={name:"AccountDetails",data:function(){return{account:{},recordList:[]}},mounted:function(){var t=this;this.getRecordList(),Object(o["c"])(this.$route.query.accountId).then((function(e){t.account=e.data}))},methods:{handleEdit:function(t){"3"===t.typeObject.typeDifference?this.$toast("抱歉,余额变更不可编辑"):this.$router.push("/addRecord?recordId="+t.id)},moneyStyle:function(t){return"1"===t.typeObject.typeDifference?"blue":"0"===t.typeObject.typeDifference?"red":"2"===t.typeObject.typeDifference?"gray":void 0},getRecordList:function(){var t=this;Object(a["d"])({account:this.$route.query.accountId}).then((function(e){e.rows.forEach((function(e){t.recordList.find((function(n){return n.payTime===t.parseTime(new Date(e.payTime),"{y}-{m}-{d}")}))?t.recordList.find((function(n){return n.payTime===t.parseTime(new Date(e.payTime),"{y}-{m}-{d}")})).recordList.pu
|