(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-24a2"],{FpJA:function(e,t,o){"use strict";o.r(t);var n=o("6HaC"),r={name:"Commission",components:{MyEmp:o("1ZjH").a},data:function(){return{paymentIds:[],levelIds:[],transportIds:[],giveIds:[],typeIds:[],empcontrol:!1,nations:[],provinces:[],cities:[],regions:[],props:{value:"id",label:"regionName",children:"regionListVos"},buyerId:"",perregions:[],personalForm:{roleId:"",productCategoryId:"",commissionType:"",commissionValue:"",countryId:""},personalrules:{roleId:[{required:!0,message:"请输入供应商名称",trigger:"blur"}],productCategoryId:[{required:!0,message:"请选择供应商类别",trigger:"change"}],commissionType:[{required:!0,message:"请选择供应商分组",trigger:"change"}],commissionValue:[{required:!0,message:"请选择",trigger:"change"}],countryId:[{required:!0,message:"请选择国家",trigger:"change"}]}}},created:function(){this.getnationlist()},methods:{getnationlist:function(){var e=this;Object(n.b)().then(function(t){200===t.data.ret?e.nations=t.data.data.content:e.$notify.error({title:"错误",message:"出错了",offset:100})}),Object(n.d)().then(function(t){200===t.data.ret?e.regions=e.tranKTree(t.data.data.content):e.$notify.error({title:"错误",message:"出错了",offset:100})})},handlechange:function(e){var t=this;Object(n.c)(e).then(function(e){200===e.data.ret?t.provinces=e.data.data.content:t.$notify.error({title:"错误",message:"出错了",offset:100})})},handlechange2:function(e){var t=this;Object(n.a)(e).then(function(e){console.log(e),200===e.data.ret?t.cities=e.data.data.content:t.$notify.error({title:"错误",message:"出错了",offset:100})})},tranKTree:function(e){var t=this;if(e&&e.length)return e.map(function(e){return{id:e.id,regionName:e.regionName,regionListVos:t.tranKTree(e.regionListVos)}})},handlesave:function(){this.personalForm.regionId=this.perregions[this.perregions.length-1]},restAllForm:function(){this.personalForm={BasicSettingsName:"",typeId:"",BasicSettingsShortName:"",BasicSettingsIntroduction:"",countryId:"",provinceId:"",cityId:"",detailAddress:"",groupId:"",zipCode:"",contactPersonName:"",contactPersonPhone:"",regionId:"",giveId:"",transportId:"",levelId:"",isHot:"",isEffective:"",buyerId:"",businessScopeIntroduction:"",paymentId:"",moneyId:"",bankName:"",accountName:"",account:"",establishDate:"",legalPerson:"",taxNumber:"",businessLicense:"",companyTypeId:""},this.perregions=[],this.buyerId=""},handleentry:function(){this.personalForm.regionId=this.perregions[this.perregions.length-1]},handlecancel:function(){this.$router.go(-1);this.$store.dispatch("delView",{path:"/BasicSettings/NewBasicSettings",name:"NewBasicSettings",fullPath:"/BasicSettings/NewBasicSettings",title:"NewBasicSettings"}).then(function(e){e.visitedViews})},handlechoose:function(){this.empcontrol=!0},personName:function(e){console.log(e),this.buyerId=e.personName,this.personalForm.buyerId=e.id}}},s=(o("W6iA"),o("KHd+")),a=Object(s.a)(r,function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"ERP-container"},[o("div",{staticClass:"app-container"},[o("h2",{ref:"geren",staticClass:"form-name"},[e._v("基本信息")]),e._v(" "),o("div",{staticClass:"container"},[o("el-form",{ref:"personalForm",staticClass:"demo-ruleForm",staticStyle:{"margin-left":"30px"},attrs:{model:e.personalForm,rules:e.personalrules,"status-icon":"","label-position":"left","label-width":"300px"}},[o("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("BasicSettings.roleId"),prop:"roleId"}},[o("el-input",{attrs:{placeholder:"请选择员工职位",clearable:""},model:{value:e.personalForm.roleId,callback:function(t){e.$set(e.personalForm,"roleId",t)},expression:"personalForm.roleId"}})],1),e._v(" "),o("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("BasicSettings.productCategoryId"),prop:"productCategoryId"}},[o("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择商品类别"},model:{value:e.personalForm.productCategoryId,callback:function(t){e.$set(e.personalForm,"productCategoryId",t)},expression:"personalForm.productCategoryId"}},e._l(e.typeIds,function(e,t){return o("el-option",{key:t,attrs:{label:e.categoryName,value:e.id}})}))],1),e._v(" "),o("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("BasicSettings.commissionType"),prop:"commissionType"}},[o("el-radio-group",{model:{value:e.personalForm.commissionType,callback:function(t){e.$set(e.personalForm,"commissionType",t)},expression:"personalForm.commissionType"}},[o("el-radio",{attrs:{label:1}},[e._v("提成比例")]),e._v(" "),o("el-radio",{attrs:{label:2}},[e._v("固定金额")]),e._v(" "),o("el-radio",{attrs:{label:3}},[e._v("绩效分")])],1)],1),e._v(" "),o("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("BasicSettings.commissionValue"),prop:"commissionValue"}},[o("el-input",{attrs:{placeholder:"请输入提成",clearable:""},model:{value:e.personalForm.commissionValue,callback:function(t){e.$set(e.personalForm,"commissionValue",t)},expression:"personalForm.commissionValue"}})],1),e._v(" "),o("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("public.countyrId"),prop:"countryId"}},[o("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"国家"},on:{change:e.handlechange},model:{value:e.personalForm.countryId,callback:function(t){e.$set(e.personalForm,"countryId",t)},expression:"personalForm.countryId"}},e._l(e.nations,function(e,t){return o("el-option",{key:t,attrs:{label:e.name,value:e.id}})}))],1)],1)],1),e._v(" "),o("div",{staticClass:"buttons",staticStyle:{"margin-top":"20px"}},[o("el-button",{attrs:{type:"primary"},on:{click:function(t){e.handlesave()}}},[e._v("保存")]),e._v(" "),o("el-button",{attrs:{type:"danger"},on:{click:function(t){e.handlecancel()}}},[e._v("取消")])],1)])])},[],!1,null,"58f76d88",null);a.options.__file="Commission.vue";t.default=a.exports},W6iA:function(e,t,o){"use strict";var n=o("mA96");o.n(n).a},mA96:function(e,t,o){}}]);