52.2dba719378289dcb3b40.js 11 KB

1
  1. webpackJsonp([52],{Oudo:function(e,t,a){(e.exports=a("FZ+f")(!1)).push([e.i,"\n.face-image[data-v-379dd976] {\n display: block;\n width: 50px;\n height: 50px;\n margin: 0 auto;\n}\n.birthday[data-v-379dd976] {\n width: 94%;\n}\n[data-v-379dd976] .el-dialog__body {\n padding: 10px 20px;\n}\n",""])},hid2:function(e,t,a){var l=a("Oudo");"string"==typeof l&&(l=[[e.i,l,""]]),l.locals&&(e.exports=l.locals);a("rjj0")("3361b83f",l,!0)},jEt7:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=a("Xxa5"),n=a.n(l),o=a("exGp"),c=a.n(o),i=a("Dd8w"),r=a.n(i),s=a("aANz"),u={name:"collectingAccount",data:function(){return{loading:!1,params:{page_no:1,page_size:10},tableData:"",collectingAccountForm:{},advancedForm:{},formRules:{name:[this.MixinRequired("支付方式名称必填!"),{min:2,max:30,message:"长度在 2 到 30 个字符"}]},dialogVisible:!1}},watch:{},mounted:function(){this.GET_CollectingAccountList()},methods:{advancedSearchEvent:function(){this.params=r()({},this.params,this.advancedForm),this.params.page_no=1,this.GET_CollectingAccountList()},handlePageSizeChange:function(e){this.params.page_size=e,this.GET_CollectingAccountList()},handlePageCurrentChange:function(e){this.params.page_no=e,this.GET_CollectingAccountList()},handleAdd:function(){this.collectingAccountForm={default_flag:!0,enable_flag:!0},this.dialogVisible=!0},handleEdit:function(e){var t=this;s.d(e.id).then(function(e){t.collectingAccountForm=t.MixinClone(e),t.dialogVisible=!0})},handleUpdateDefault:function(e){var t=this;return c()(n.a.mark(function a(){return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,t.$confirm("确认要设置为默认支付方式吗?","提示");case 2:return a.next=4,s.f(e);case 4:return t.$message.success("操作成功!"),a.next=7,t.GET_CollectingAccountList();case 7:case"end":return a.stop()}},a,t)}))()},handleDelete:function(e){var t=this;this.$confirm("确定要删除吗?","提示",{type:"warning"}).then(function(){s.b(e).then(function(){t.$message.success("删除成功!"),t.GET_CollectingAccountList()})}).catch(function(){})},handleUpdateEnableFlag:function(e){var t=this;return c()(n.a.mark(function a(){var l;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,l=e.enable_flag?"启用":"禁用",a.next=4,t.$confirm("确认要"+l+"吗?","提示");case 4:return a.next=6,s.g(e.id,e.enable_flag);case 6:return t.$message.success("操作成功!"),a.next=9,t.GET_CollectingAccountList();case 9:a.next=14;break;case 11:a.prev=11,a.t0=a.catch(0),e.enable_flag=!e.enable_flag;case 14:case"end":return a.stop()}},a,t,[[0,11]])}))()},handleDialogOpen:function(){var e=this;setTimeout(function(){e.$refs.collectingAccountForm.clearValidate()})},submitCollectingAccountForm:function(){var e=this;this.$refs.collectingAccountForm.validate(function(t){if(!t)return!1;var a=e.collectingAccountForm.id,l=e.MixinClone(e.collectingAccountForm);a?s.c(a,l).then(function(t){e.dialogVisible=!1,e.$message.success("修改成功!"),e.GET_CollectingAccountList()}):s.a(l).then(function(){e.dialogVisible=!1,e.$message.success("添加成功!"),e.GET_CollectingAccountList()})})},searchEvent:function(e){this.params=r()({},this.params,{name:e}),this.params.page_no=1,this.GET_CollectingAccountList()},GET_CollectingAccountList:function(){var e=this;this.loading=!0,s.e(this.params).then(function(t){e.loading=!1,e.tableData=t}).catch(function(){e.loading=!1})}}},d=a("XyMi");var m=function(e){a("hid2")},g=Object(d.a)(u,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("en-table-layout",{attrs:{tableData:e.tableData.data,loading:e.loading}},[a("div",{staticClass:"inner-toolbar",attrs:{slot:"toolbar"},slot:"toolbar"},[a("div",{staticClass:"toolbar-btns"},[e.checkPermission(["collectingAccount:add"])?a("el-button",{attrs:{size:"mini",type:"primary",icon:"el-icon-circle-plus-outline"},on:{click:e.handleAdd}},[e._v("添加")]):e._e()],1),e._v(" "),a("div",{staticClass:"toolbar-search"},[a("en-table-search",{attrs:{placeholder:"请输入支付方式名称",advanced:""},on:{search:e.searchEvent,advancedSearch:e.advancedSearchEvent}},[a("template",{slot:"advanced-content"},[a("el-form",{ref:"advancedForm",attrs:{model:e.advancedForm,"label-width":"90px"}},[a("el-form-item",{attrs:{label:"编号"}},[a("el-input",{attrs:{placeholder:"请输入编号",clearable:""},model:{value:e.advancedForm.sn,callback:function(t){e.$set(e.advancedForm,"sn",t)},expression:"advancedForm.sn"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"状态"}},[a("el-select",{model:{value:e.advancedForm.enable_flag,callback:function(t){e.$set(e.advancedForm,"enable_flag",t)},expression:"advancedForm.enable_flag"}},[a("el-option",{key:0,attrs:{label:"启用",value:!0}}),e._v(" "),a("el-option",{key:-1,attrs:{label:"禁用",value:!1}})],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"是否默认"}},[a("el-select",{model:{value:e.advancedForm.default_flag,callback:function(t){e.$set(e.advancedForm,"default_flag",t)},expression:"advancedForm.default_flag"}},[a("el-option",{key:0,attrs:{label:"是",value:!0}}),e._v(" "),a("el-option",{key:-1,attrs:{label:"否",value:!1}})],1)],1)],1)],1)],2)],1)]),e._v(" "),a("template",{slot:"table-columns"},[a("el-table-column",{attrs:{prop:"name",label:"名称"}}),e._v(" "),a("el-table-column",{attrs:{prop:"sn",label:"编号"}}),e._v(" "),a("el-table-column",{attrs:{prop:"default_flag",label:"是否默认"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.default_flag?"是":"否")+"\n ")]}}])}),e._v(" "),a("el-table-column",{key:"enable_flag",attrs:{label:"是否启用"},scopedSlots:e._u([{key:"default",fn:function(t){return[e.checkPermission(["collectingAccount:updateEnableFlag"])?a("el-switch",{attrs:{"active-value":!0,"inactive-value":!1},on:{change:function(a){return e.handleUpdateEnableFlag(t.row)}},model:{value:t.row.enable_flag,callback:function(a){e.$set(t.row,"enable_flag",a)},expression:"scope.row.enable_flag"}}):a("span",[e._v(e._s(t.row.enable_flag?"启用":"禁用"))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"remark",label:"备注"}}),e._v(" "),a("el-table-column",{attrs:{label:"操作",width:"300px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e.checkPermission(["collectingAccount:edit"])?a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(a){return e.handleEdit(t.row)}}},[e._v("编辑")]):e._e(),e._v(" "),e.checkPermission(["collectingAccount:updateDefault"])?a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(a){return e.handleUpdateDefault(t.row.id)}}},[e._v("设为默认")]):e._e(),e._v(" "),e.checkPermission(["collectingAccount:delete"])?a("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(a){return e.handleDelete(t.row.id)}}},[e._v("删除")]):e._e()]}}])})],1),e._v(" "),e.tableData?a("el-pagination",{attrs:{slot:"pagination","current-page":e.tableData.page_no,"page-sizes":[10,20,50,100],"page-size":e.tableData.page_size,layout:"total, sizes, prev, pager, next, jumper",total:e.tableData.data_total},on:{"size-change":e.handlePageSizeChange,"current-change":e.handlePageCurrentChange},slot:"pagination"}):e._e()],2),e._v(" "),a("el-dialog",{attrs:{title:e.collectingAccountForm.id?"编辑支付方式":"添加支付方式",visible:e.dialogVisible,width:"500px","modal-append-to-body":!1,"close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(t){e.dialogVisible=t},open:e.handleDialogOpen}},[a("el-form",{ref:"collectingAccountForm",attrs:{model:e.collectingAccountForm,rules:e.formRules,"label-width":"80px"}},[e.collectingAccountForm.id?a("el-form-item",{attrs:{label:"编号",prop:"sn"}},[a("el-input",{attrs:{disabled:""},model:{value:e.collectingAccountForm.sn,callback:function(t){e.$set(e.collectingAccountForm,"sn",t)},expression:"collectingAccountForm.sn"}})],1):e._e(),e._v(" "),a("el-form-item",{attrs:{label:"名称",prop:"name"}},[a("el-input",{attrs:{maxlength:20,clearable:"",placeholder:"请输入支付方式名称"},model:{value:e.collectingAccountForm.name,callback:function(t){e.$set(e.collectingAccountForm,"name",t)},expression:"collectingAccountForm.name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"抬头",prop:"invoice"}},[a("el-input",{attrs:{maxlength:20,clearable:"",placeholder:"请输入抬头"},model:{value:e.collectingAccountForm.invoice,callback:function(t){e.$set(e.collectingAccountForm,"invoice",t)},expression:"collectingAccountForm.invoice"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"税号",prop:"duty_paragraph"}},[a("el-input",{attrs:{maxlength:20,clearable:"",placeholder:"请输入税号"},model:{value:e.collectingAccountForm.duty_paragraph,callback:function(t){e.$set(e.collectingAccountForm,"duty_paragraph",t)},expression:"collectingAccountForm.duty_paragraph"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"开户行",prop:"bank"}},[a("el-input",{attrs:{maxlength:20,clearable:"",placeholder:"请输入开户行"},model:{value:e.collectingAccountForm.bank,callback:function(t){e.$set(e.collectingAccountForm,"bank",t)},expression:"collectingAccountForm.bank"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"银行账号",prop:"bank_no"}},[a("el-input",{attrs:{maxlength:20,clearable:"",placeholder:"请输入银行账号"},model:{value:e.collectingAccountForm.bank_no,callback:function(t){e.$set(e.collectingAccountForm,"bank_no",t)},expression:"collectingAccountForm.bank_no"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"是否默认",prop:"default_flag"}},[a("el-radio-group",{model:{value:e.collectingAccountForm.default_flag,callback:function(t){e.$set(e.collectingAccountForm,"default_flag",t)},expression:"collectingAccountForm.default_flag"}},[a("el-radio",{attrs:{label:!0}},[e._v("是")]),e._v(" "),a("el-radio",{attrs:{label:!1}},[e._v("否")])],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"状态",prop:"enable_flag"}},[a("el-radio-group",{model:{value:e.collectingAccountForm.enable_flag,callback:function(t){e.$set(e.collectingAccountForm,"enable_flag",t)},expression:"collectingAccountForm.enable_flag"}},[a("el-radio",{attrs:{label:!0}},[e._v("启用")]),e._v(" "),a("el-radio",{attrs:{label:!1}},[e._v("禁用")])],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"备注",prop:"remark"}},[a("el-input",{attrs:{type:"textarea",autosize:{minRows:3,maxRows:4},placeholder:"请输入备注"},model:{value:e.collectingAccountForm.remark,callback:function(t){e.$set(e.collectingAccountForm,"remark",t)},expression:"collectingAccountForm.remark"}})],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.submitCollectingAccountForm}},[e._v("确 定")])],1)],1)],1)},[],!1,m,"data-v-379dd976",null);t.default=g.exports}});