"use strict";(self["webpackChunkyos_manage"]=self["webpackChunkyos_manage"]||[]).push([[1946],{41946:function(e,r,t){t.r(r),t.d(r,{default:function(){return m}});var a=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("div",[t("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.onShow}},[e._v("新 建")]),t("el-drawer",{attrs:{title:"新建",visible:e.drawer,direction:"rtl","append-to-body":"","show-close":!1,size:"700px"},on:{"update:visible":function(r){e.drawer=r},close:function(r){e.drawer=!1,e.$refs["form"].resetFields()}}},[t("div",{staticClass:"drawer__panel"},[t("el-form",{ref:"form",staticClass:"demo-form-inline",attrs:{model:e.form,rules:e.rules,"status-icon":!1,size:"mini","label-position":"right","label-width":"100px"}},[t("el-form-item",{attrs:{label:"开票抬头",prop:"enterprisename"}},[t("el-input",{attrs:{placeholder:"请填写开票抬头"},model:{value:e.form.enterprisename,callback:function(r){e.$set(e.form,"enterprisename",r)},expression:"form.enterprisename"}})],1),t("el-form-item",{attrs:{label:"税号",prop:"taxno"}},[t("el-input",{attrs:{placeholder:"请填写税号"},model:{value:e.form.taxno,callback:function(r){e.$set(e.form,"taxno",r)},expression:"form.taxno"}})],1),t("el-form-item",{attrs:{label:"开户银行",prop:"bank"}},[t("el-input",{attrs:{placeholder:"请填写开户银行"},model:{value:e.form.bank,callback:function(r){e.$set(e.form,"bank",r)},expression:"form.bank"}})],1),t("el-form-item",{attrs:{label:"开户账号",prop:"bankcardno"}},[t("el-input",{attrs:{placeholder:"请填写开户账号"},model:{value:e.form.bankcardno,callback:function(r){e.$set(e.form,"bankcardno",r)},expression:"form.bankcardno"}})],1),t("el-form-item",{attrs:{label:"开票地址",prop:"address"}},[t("el-input",{attrs:{placeholder:"请填写开票地址"},model:{value:e.form.address,callback:function(r){e.$set(e.form,"address",r)},expression:"form.address"}})],1),t("el-form-item",{attrs:{label:"电话",prop:"phonenumber"}},[t("el-input",{attrs:{placeholder:"请填写手机号(电话)"},model:{value:e.form.phonenumber,callback:function(r){e.$set(e.form,"phonenumber",r)},expression:"form.phonenumber"}})],1),t("el-form-item",{attrs:{label:"备注",prop:"remarks"}},[t("el-input",{attrs:{placeholder:"请填写备注"},model:{value:e.form.remarks,callback:function(r){e.$set(e.form,"remarks",r)},expression:"form.remarks"}})],1),t("el-form-item",{attrs:{label:"是否默认",prop:"remarks"}},[t("el-radio",{attrs:{label:"1"},model:{value:e.form.isdefault,callback:function(r){e.$set(e.form,"isdefault",r)},expression:"form.isdefault"}},[e._v("是")]),t("el-radio",{attrs:{label:"0"},model:{value:e.form.isdefault,callback:function(r){e.$set(e.form,"isdefault",r)},expression:"form.isdefault"}},[e._v("否")])],1)],1)],1),t("div",{staticClass:"fixed__btn__panel"},[t("el-button",{staticClass:"normal-btn-width",attrs:{size:"small"},on:{click:function(r){e.drawer=!1,e.$refs["form"].resetFields()}}},[e._v("取 消")]),t("el-button",{staticClass:"normal-btn-width",attrs:{size:"small",type:"primary"},on:{click:e.onSubmit}},[e._v("确 定")])],1)])],1)},s=[],o={props:["data"],name:"add",data(){return{drawer:!1,form:{sys_enterprise_financeid:0,sys_enterpriseid:0,enterprisename:"",taxno:"",bank:"",bankcardno:"",address:"",phonenumber:"",remarks:"",isdefault:"1"},rules:{enterprisename:[{required:!0,message:"请输入抬头",trigger:"blur"}],taxno:[{required:!0,message:"请输入税号",trigger:"blur"}]}}},methods:{onShow(){""===this.data.enterprisename||""===this.data.abbreviation||""===this.data.contact?this.$message.error("请先将企业基础信息补充完整,再进行此操作"):this.drawer=!0},onSubmit(){console.log(this.form,"表单"),this.$refs["form"].validate((async e=>{if(!e)return!1;const r=await this.$api.requested({id:20221013160402,content:this.form});this.tool.showMessage(r,(()=>{this.$emit("onSuccess"),this.drawer=!1,this.$refs["form"].resetFields()}))}))}},mounted(){console.log(this.data,"财务"),this.form.enterprisename=this.data.enterprisename,this.form.sys_enterpriseid=this.data.sys_enterpriseid,console.log(this.form)}},l=o,n=t(43736),i=(0,n.Z)(l,a,s,!1,null,"04206fd0",null),m=i.exports}}]);