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.push(e):t.recordList.push({payTime:t.parseTime(new Date(e.payTime),"{y}-{m}-{d}"),recordList:[e]})})),t.$sortDesByKey(t.recordList,"payTime")}))}}},s=i,u=(n("b73c"),n("2877")),d=Object(u["a"])(s,r,c,!1,null,"4ae33e71",null);e["default"]=d.exports},"354e":function(t,e,n){"use strict";n.d(e,"d",(function(){return c})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return a})),n.d(e,"e",(function(){return i})),n.d(e,"b",(function(){return s}));var r=n("b775");function c(t){return Object(r["a"])({url:"/bookkeeping/record/list",method:"get",params:t})}function o(t){return Object(r["a"])({url:"/bookkeeping/record/"+t,method:"get"})}function a(t){return Object(r["a"])({url:"/bookkeeping/record",method:"post",data:t})}function i(t){return Object(r["a"])({url:"/bookkeeping/record",method:"put",data:t})}function s(t){return Object(r["a"])({url:"/bookkeeping/record/"+t,method:"delete"})}},"7db0":function(t,e,n){"use strict";var r=n("23e7"),c=n("b727").find,o=n("44d2"),a=n("ae40"),i="find",s=!0,u=a(i);i in[]&&Array(1)[i]((function(){s=!1})),r({target:"Array",proto:!0,forced:s||!u},{find:function(t){return c(this,t,arguments.length>1?arguments[1]:void 0)}}),o(i)},b73c:function(t,e,n){"use strict";n("2617")},cb13:function(t,e,n){"use strict";n.d(e,"d",(function(){return c})),n.d(e,"e",(function(){return o})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return i})),n.d(e,"f",(function(){return s})),n.d(e,"b",(function(){return u}));var r=n("b775");function c(t){return Object(r["a"])({url:"/bookkeeping/account/getLatelyAccountList",method:"get",params:t})}function o(t){return Object(r["a"])({url:"/bookkeeping/account/list",method:"get",params:t})}function a(t){return Object(r["a"])({url:"/bookkeeping/account/"+t,method:"get"})}function i(t){return Object(r["a"])({url:"/bookkeeping/account",method:"post",data:t})}function s(t){return Object(r["a"])({url:"/bookkeeping/account",method:"put",data:t})}function u(t){return Object(r["a"])({url:"/bookkeeping/account/"+t,method:"delete"})}}}]); |