pnkx-admin-mongo/pnkx-app-apk/static/js/chunk-3e43b93b.773efddb.js
2024-01-13 13:29:20 +08:00

1 line
5.8 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3e43b93b"],{"1e25":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.classification.typeName,"left-arrow":"","left-text":"返回","right-text":"编辑"},on:{"click-left":function(e){return t.$router.go(-1)},"click-right":function(e){return t.$router.push("/addClassification?classificationId="+t.classification.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.total)))])],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)},i=[],a=(n("d3b7"),n("159b"),n("7db0"),n("354e")),c=n("9fb1"),o={name:"ClassificationDetails",data:function(){return{classification:{},recordList:[],total:0}},mounted:function(){var t=this;this.getRecordList(),Object(c["c"])(this.$route.query.classificationId).then((function(e){t.classification=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"])({type:this.$route.query.classificationId}).then((function(e){t.total=t.arraySum(e.rows,"money"),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=o,u=(n("b069"),n("2877")),f=Object(u["a"])(s,r,i,!1,null,"2bf6de1e",null);e["default"]=f.exports},"354e":function(t,e,n){"use strict";n.d(e,"d",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return c})),n.d(e,"e",(function(){return o})),n.d(e,"b",(function(){return s}));var r=n("b775");function i(t){return Object(r["a"])({url:"/bookkeeping/record/list",method:"get",params:t})}function a(t){return Object(r["a"])({url:"/bookkeeping/record/"+t,method:"get"})}function c(t){return Object(r["a"])({url:"/bookkeeping/record",method:"post",data:t})}function o(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"),i=n("b727").find,a=n("44d2"),c=n("ae40"),o="find",s=!0,u=c(o);o in[]&&Array(1)[o]((function(){s=!1})),r({target:"Array",proto:!0,forced:s||!u},{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),a(o)},"9fb1":function(t,e,n){"use strict";n.d(e,"e",(function(){return i})),n.d(e,"d",(function(){return a})),n.d(e,"c",(function(){return c})),n.d(e,"a",(function(){return o})),n.d(e,"f",(function(){return s})),n.d(e,"b",(function(){return u}));var r=n("b775");function i(t){return Object(r["a"])({url:"/bookkeeping/classification/list",method:"get",params:t})}function a(t){return Object(r["a"])({url:"/bookkeeping/classification/getLatelyTypeList",method:"get",params:t})}function c(t){return Object(r["a"])({url:"/bookkeeping/classification/"+t,method:"get"})}function o(t){return Object(r["a"])({url:"/bookkeeping/classification",method:"post",data:t})}function s(t){return Object(r["a"])({url:"/bookkeeping/classification",method:"put",data:t})}function u(t){return Object(r["a"])({url:"/bookkeeping/classification/"+t,method:"delete"})}},b069:function(t,e,n){"use strict";n("ba48")},ba48:function(t,e,n){}}]);