1384.5bf08122.js 3.7 KB

1
  1. "use strict";(self["webpackChunkyos_manage"]=self["webpackChunkyos_manage"]||[]).push([[1384],{91384:function(e,t,r){r.r(t),r.d(t,{default:function(){return m}});var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(t){e.dialogFormVisible=!0}}},[e._v("新 建")]),r("el-dialog",{attrs:{title:"新建收款条件","append-to-body":"",visible:e.dialogFormVisible,width:"40%"},on:{"update:visible":function(t){e.dialogFormVisible=t},close:e.onClose}},[r("el-row",{attrs:{gutter:20}},[r("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"140px","label-position":"right",size:"mini"}},[r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"账期依据",prop:"point"}},[r("el-select",{staticClass:"width-240",attrs:{placeholder:"请选择账期依据"},model:{value:e.form.point,callback:function(t){e.$set(e.form,"point",t)},expression:"form.point"}},[r("el-option",{attrs:{label:"订单",value:"订单审核"}}),r("el-option",{attrs:{label:"出库",value:"销售出库审核"}}),r("el-option",{attrs:{label:"发票",value:"发票审核"}})],1)],1)],1),"订单审核"==e.form.point?r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"立账额度比例(%)",prop:"amountrate"}},[r("el-input",{attrs:{placeholder:"请输入立账额度比例(%)"},model:{value:e.form.amountrate,callback:function(t){e.$set(e.form,"amountrate",t)},expression:"form.amountrate"}})],1)],1):e._e(),r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"后置天数",prop:"days"}},[r("el-input",{attrs:{placeholder:"请输入后置天数"},model:{value:e.form.days,callback:function(t){e.$set(e.form,"days",t)},expression:"form.days"}})],1)],1),r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"描述",prop:"remarks"}},[r("el-input",{attrs:{type:"textarea",placeholder:"请输入描述"},model:{value:e.form.remarks,callback:function(t){e.$set(e.form,"remarks",t)},expression:"form.remarks"}})],1)],1),r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"是否默认条件",prop:"isdefault"}},[r("el-checkbox",{attrs:{"true-label":1,"false-label":0},model:{value:e.form.isdefault,callback:function(t){e.$set(e.form,"isdefault",t)},expression:"form.isdefault"}})],1)],1)],1)],1),r("div",{staticClass:"dialog-footer"},[r("el-button",{staticClass:"normal-btn-width",attrs:{size:"small"},on:{click:e.onClose}},[e._v("取 消")]),r("el-button",{staticClass:"normal-btn-width",attrs:{size:"small",type:"primary",disabled:""==e.form.point&&""==e.form.amountrate&&""==e.form.days&&""==e.form.remarks},on:{click:e.onSubmit}},[e._v("确 定")])],1)],1)],1)},l=[],s=(r(21703),{name:"add",data(){var e=(e,t,r)=>{if(!(+t>=0&&+t<=100))return r(new Error("额度比率范围(0-100)"));r()};return{dialogFormVisible:!1,form:{sa_receivableruleid:0,days:"",amountrate:"",point:"",remarks:"",isdefault:1},rules:{point:[{required:!1,message:"请选择账期依据",trigger:"change"}],amountrate:[{required:!1,message:"请输入立账额度比率",trigger:"blur"},{validator:e,trigger:"blur"}],days:[{required:!1,message:"请输入后置天数",trigger:"blur"}],isdefault:[{required:!1,message:"请选择是否默认条件",trigger:"blur"}],remarks:[{required:!1,message:"请输入描述",trigger:"blur"}]}}},methods:{onSubmit(){console.log(this.form),this.$refs["form"].validate((async e=>{if(!e)return!1;this.form.amountrate=(this.form.amountrate/100).toFixed(4);const t=await this.$api.requested({id:"20230110095903",version:1,content:this.form});this.tool.showMessage(t,(()=>{this.$emit("onSuccess"),this.$refs["form"].resetFields(),this.dialogFormVisible=!1}))}))},onClose(){this.$refs["form"].resetFields(),this.dialogFormVisible=!1}}}),o=s,i=r(43736),n=(0,i.Z)(o,a,l,!1,null,"d678141a",null),m=n.exports}}]);