pnkx-admin-mongo/pnkx-app-apk/static/js/chunk-0ef4b6cf.7ab14dcc.js
2024-01-13 13:29:20 +08:00

1 line
6.2 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0ef4b6cf"],{"51eb":function(t,e,n){"use strict";var c=n("825a"),r=n("c04e");t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return r(c(this),"number"!==t)}},5530:function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));n("b64b"),n("a4d3"),n("4de4"),n("d3b7"),n("e439"),n("159b"),n("dbb4");var c=n("53ca");n("8172"),n("efec"),n("e01a"),n("a9e3");function r(t,e){if("object"!==Object(c["a"])(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Object(c["a"])(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function o(t){var e=r(t,"string");return"symbol"===Object(c["a"])(e)?e:String(e)}function i(t,e,n){return e=o(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);e&&(c=c.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,c)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}},"7db0":function(t,e,n){"use strict";var c=n("23e7"),r=n("b727").find,o=n("44d2"),i=n("ae40"),a="find",u=!0,s=i(a);a in[]&&Array(1)[a]((function(){u=!1})),c({target:"Array",proto:!0,forced:u||!s},{find:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),o(a)},8172:function(t,e,n){var c=n("746f");c("toPrimitive")},9598:function(t,e,n){"use strict";n.r(e);var c=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"account"},[n("van-nav-bar",{attrs:{fixed:"",title:"账户管理","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")}}}),n("div",{staticClass:"page"},[n("div",{staticClass:"bookkeeping-background background-image-1"},[n("van-row",[t._v("总资产:")]),n("van-row",[t._v(t._s(t._f("moneyFilter")(t.totalAssets)))])],1),t._l(t.accountTypeList,(function(e){return n("div",{staticClass:"account-type"},[n("van-row",{staticClass:"page-title",attrs:{type:"flex",align:"center"}},[n("van-col",[t._v(" "+t._s(e.dictLabel)+" ")]),n("van-col",{staticClass:"assets",attrs:{offset:1}},[t._v(" 资产:"+t._s(t._f("moneyFilter")(t.arraySum(e.accountList,"balance")))+" ")])],1),t._l(e.accountList,(function(e){return n("van-swipe-cell",{key:e.id,scopedSlots:t._u([{key:"right",fn:function(){return[n("van-button",{attrs:{type:"danger",text:"删除"},on:{click:function(n){return t.handleDelete(e)}}}),n("van-button",{attrs:{type:"info",text:"编辑"},on:{click:function(n){return t.$router.push("/accountAdd?accountId="+e.id)}}})]},proxy:!0}],null,!0)},[n("van-cell",{attrs:{center:"",value:t._f("moneyFilter")(e.balance),"is-link":""},on:{click:function(n){return t.$router.push("/accountDetails?accountId="+e.id)}},scopedSlots:t._u([{key:"title",fn:function(){return[n("div",{staticClass:"left"},[n("svg-icon",{attrs:{"icon-class":e.accountIcon||t.accountTypeList.filter((function(t){return t.dictValue===e.accountType}))[0].remark}})],1),n("div",{staticClass:"right"},[n("div",{staticClass:"title"},[t._v(t._s(e.accountName))]),n("div",{staticClass:"label"},[t._v(t._s(e.remark))])])]},proxy:!0}],null,!0)})],1)}))],2)}))],2)],1)},r=[],o=n("5530"),i=(n("d81d"),n("d3b7"),n("159b"),n("7db0"),n("cb13")),a={name:"Account",data:function(){return{accountTypeList:this.getLocal("accountTypeList"),totalAssets:0}},mounted:function(){this.getAccountTypeList()},methods:{getAccountTypeList:function(){var t=this,e=[];this.totalAssets=0,Object(i["e"])().then((function(n){e=n.rows,t.getDicts("px_bookkeeping_account_type").then((function(n){var c=n.data.map((function(t){return Object(o["a"])(Object(o["a"])({},t),{},{accountList:[]})}));e.forEach((function(e){t.totalAssets+=parseInt(e.balance),c.find((function(t){return t.dictValue===e.accountType})).accountList.push(e)})),t.accountTypeList=c,t.setLocal("accountTypeList",t.accountTypeList)}))}))},handleDelete:function(t){var e=this;this.$dialog.confirm({title:"删除提示",message:"删除该账户,也会删除其下流水",confirmButtonText:"确认删除"}).then((function(){Object(i["b"])(t.id).then((function(t){e.$toast("删除成功"),e.getAccountTypeList()}))})).catch((function(){}))}}},u=a,s=(n("ef46"),n("2877")),f=Object(s["a"])(u,c,r,!1,null,"1062802a",null);e["default"]=f.exports},cb13:function(t,e,n){"use strict";n.d(e,"d",(function(){return r})),n.d(e,"e",(function(){return o})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return a})),n.d(e,"f",(function(){return u})),n.d(e,"b",(function(){return s}));var c=n("b775");function r(t){return Object(c["a"])({url:"/bookkeeping/account/getLatelyAccountList",method:"get",params:t})}function o(t){return Object(c["a"])({url:"/bookkeeping/account/list",method:"get",params:t})}function i(t){return Object(c["a"])({url:"/bookkeeping/account/"+t,method:"get"})}function a(t){return Object(c["a"])({url:"/bookkeeping/account",method:"post",data:t})}function u(t){return Object(c["a"])({url:"/bookkeeping/account",method:"put",data:t})}function s(t){return Object(c["a"])({url:"/bookkeeping/account/"+t,method:"delete"})}},da9d:function(t,e,n){},dbb4:function(t,e,n){var c=n("23e7"),r=n("83ab"),o=n("56ef"),i=n("fc6a"),a=n("06cf"),u=n("8418");c({target:"Object",stat:!0,sham:!r},{getOwnPropertyDescriptors:function(t){var e,n,c=i(t),r=a.f,s=o(c),f={},l=0;while(s.length>l)n=r(c,e=s[l++]),void 0!==n&&u(f,e,n);return f}})},e439:function(t,e,n){var c=n("23e7"),r=n("d039"),o=n("fc6a"),i=n("06cf").f,a=n("83ab"),u=r((function(){i(1)})),s=!a||u;c({target:"Object",stat:!0,forced:s,sham:!a},{getOwnPropertyDescriptor:function(t,e){return i(o(t),e)}})},ef46:function(t,e,n){"use strict";n("da9d")},efec:function(t,e,n){var c=n("9112"),r=n("51eb"),o=n("b622"),i=o("toPrimitive"),a=Date.prototype;i in a||c(a,i,r)}}]);