pnkx-admin-mongo/pnkx-app-apk/static/js/chunk-7a4f023b.3c861af5.js

1 line
4.6 KiB
JavaScript
Raw Normal View History

2024-01-13 13:29:20 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7a4f023b"],{5632:function(t,c,o){},"86da":function(t,c,o){"use strict";o("5632")},af73:function(t,c,o){"use strict";o.r(c);var n=function(){var t=this,c=t.$createElement,o=t._self._c||c;return o("div",{staticClass:"account-add"},[o("van-nav-bar",{attrs:{fixed:"",title:t.title,"left-arrow":"","left-text":"返回","right-text":"提交"},on:{"click-left":function(c){return t.$router.go(-1)},"click-right":t.add}}),o("div",{staticClass:"page"},[o("van-cell-group",{attrs:{inset:""}},[o("van-cell",{staticClass:"cell-title",attrs:{title:"账户名"}}),o("van-field",{attrs:{placeholder:"请输入账户名"},model:{value:t.accountForm.accountName,callback:function(c){t.$set(t.accountForm,"accountName",c)},expression:"accountForm.accountName"}}),o("van-cell",{attrs:{value:t.translationDic(t.accountForm.accountType,t.accountTypeList),"is-link":"",title:"账户类型"},on:{click:function(c){t.showAccountType=!0}}}),o("van-cell",{attrs:{center:"",icon:"photo-o",title:"图标"},on:{click:function(c){return t.$router.replace("/selectAccountIcon")}},scopedSlots:t._u([{key:"right-icon",fn:function(){return[t.iconFlag?o("svg-icon",{staticClass:"business-icon",attrs:{"icon-class":t.accountForm.accountIcon||""}}):t._e(),o("van-icon",{attrs:{name:"arrow"}})]},proxy:!0}])}),o("van-field",{attrs:{label:"余额","left-icon":"balance-o",type:"number",placeholder:"请输入余额","input-align":"right"},model:{value:t.accountForm.balance,callback:function(c){t.$set(t.accountForm,"balance",c)},expression:"accountForm.balance"}}),o("van-cell",{attrs:{icon:"label-o",title:"备注"}}),o("van-field",{attrs:{rows:"2",autosize:"",type:"textarea",maxlength:"200","show-word-limit":"",placeholder:"请输入备注"},model:{value:t.accountForm.remark,callback:function(c){t.$set(t.accountForm,"remark",c)},expression:"accountForm.remark"}})],1),o("van-row",{staticClass:"button"},[o("van-button",{attrs:{block:"","native-type":"submit",round:"",type:"info"},on:{click:t.add}},[t._v(" "+t._s(this.$route.query.accountId?"确 认 修 改":"确 认 新 建")+" ")])],1)],1),o("van-popup",{attrs:{position:"bottom",round:""},model:{value:t.showAccountType,callback:function(c){t.showAccountType=c},expression:"showAccountType"}},[o("van-picker",{attrs:{title:"选择账户类型","show-toolbar":"","value-key":"dictLabel",columns:t.accountTypeList},on:{confirm:t.selectAccountTypeConfirm}})],1)],1)},e=[],a=o("cb13"),u={name:"Add",data:function(){return{title:"新增账户",showAccountType:!1,iconFlag:!0,accountForm:{},accountTypeList:[]}},mounted:function(){var t=this;this.$route.query.accountId?(this.title="编辑账户",Object(a["c"])(this.$route.query.accountId).then((function(c){t.accountForm=c.data}))):(this.title="新增账户",this.getLocal("accountForm")&&(this.accountForm=this.getLocal("accountForm"))),this.$route.query.iconName&&(this.iconFlag=!1,this.accountForm.accountIcon=this.$route.query.iconName,this.iconFlag=!0),this.getAccountTypeList()},methods:{getAccountTypeList:function(){var t=this;this.getDicts("px_bookkeeping_account_type").then((function(c){t.accountTypeList=c.data}))},add:function(){var t=this;this.accountForm.accountName?this.accountForm.accountType?this.accountForm.id?Object(a["f"])(this.accountForm).then((function(c){t.$toast("修改成功"),t.removeLocal("accountForm"),t.accountForm={},t.$router.go(-1)})):Object(a["a"])(this.accountForm).then((function(c){t.$toast("新增成功"),t.removeLocal("accountForm"),t.accountForm={},t.$router.go(-1)})):this.$toast("请选择账户类型"):this.$toast("请输入账户名")},selectAccountTypeConfirm:function(t){this.accountType=t,this.accountForm.accountType=t.dictValue,this.accountForm.accountIcon=t.remark,this.showAccountType=!1}},destroyed:function(){this.setLocal("accountForm",this.accountForm)}},i=u,r=(o("86da"),o("2877")),s=Object(r["a"])(i,n,e,!1,null,"2d20807c",null);c["default"]=s.exports},cb13:function(t,c,o){"use strict";o.d(c,"d",(function(){return e})),o.d(c,"e",(function(){return a})),o.d(c,"c",(function(){return u})),o.d(c,"