ERP/static/js/chunk-7e40.cda7fb1d.js
2019-03-11 19:01:31 +08:00

1 line
33 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-7e40"],{J4xz:function(e,t,a){"use strict";var l=a("mstn");a.n(l).a},Vz7j:function(e,t,a){},bkUN:function(e,t,a){"use strict";a.r(t);var l=a("P2sY"),r=a.n(l),o=a("6HaC"),i=a("/PQ/"),n=a("ZySA"),s=a("Mz3J"),c={components:{MyEmp:a("EAXk").a},props:{control:{type:Boolean,default:!1},editdata:{type:Object,default:null}},data:function(){return{groupIds:[],editVisible:this.control,paymentIds:[],levelIds:[],transportIds:[],giveIds:[],typeIds:[],empcontrol:!1,nations:[],provinces:[],cities:[],regions:[],props:{value:"id",label:"regionName",children:"regionListVos"},buyerId:"",perregions:[],personalForm:this.editdata,personalrules:{supplierName:[{required:!0,message:"请输入供应商名称",trigger:"blur"}],typeId:[{required:!0,message:"请选择供应商类别",trigger:"change"}],groupId:[{required:!0,message:"请选择供应商分组",trigger:"change"}],isHot:[{required:!0,message:"请选择",trigger:"change"}],countryId:[{required:!0,message:"请选择国家",trigger:"change"}]}}},watch:{control:function(){this.editVisible=this.control},editdata:function(){this.personalForm=this.editdata,this.buyerId=this.editdata.buyerName,console.log(this.editdata)}},created:function(){this.getnationlist()},methods:{getnationlist:function(){var e=this;Object(o.b)().then(function(t){200===t.data.ret?e.nations=t.data.data.content:e.$notify.error({title:"错误",message:"出错了",offset:100})}),Object(o.d)().then(function(t){200===t.data.ret?e.regions=e.tranKTree(t.data.data.content):e.$notify.error({title:"错误",message:"出错了",offset:100})}),Object(i.i)(1).then(function(t){200===t.data.ret?e.typeIds=t.data.data.content.list:e.$notify.error({title:"错误",message:"出错了",offset:100})}),Object(i.i)(2).then(function(t){200===t.data.ret?e.giveIds=t.data.data.content.list:e.$notify.error({title:"错误",message:"出错了",offset:100})}),Object(i.i)(3).then(function(t){200===t.data.ret?e.transportIds=t.data.data.content.list:e.$notify.error({title:"错误",message:"出错了",offset:100})}),Object(i.i)(4).then(function(t){200===t.data.ret?e.levelIds=t.data.data.content.list:e.$notify.error({title:"错误",message:"出错了",offset:100})}),Object(i.i)(5).then(function(t){200===t.data.ret?e.paymentIds=t.data.data.content.list:e.$notify.error({title:"错误",message:"出错了",offset:100})}),Object(i.k)().then(function(t){200===t.data.ret?e.groupIds=t.data.data.content:e.$notify.error({title:"错误",message:"出错了",offset:100})})},handlechange:function(e){var t=this;Object(o.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(o.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)}})},handlechoose:function(){this.empcontrol=!0},personName:function(e){console.log(e),this.buyerId=e.personName,this.personalForm.buyerId=e.id},handleEditok:function(){var e=this;this.personalForm.regionId=this.perregions[this.perregions.length-1],console.log(this.personalForm),Object(i.l)(this.personalForm).then(function(t){200===t.data.ret?(e.$notify({title:"操作成功",message:"操作成功",type:"success",duration:1e3,offset:100}),e.$emit("rest",!0),e.$refs.personalForm.clearValidate(),e.$refs.personalForm.resetFields(),e.$refs.personalForm2.clearValidate(),e.$refs.personalForm2.resetFields(),e.$refs.personalForm3.clearValidate(),e.$refs.personalForm3.resetFields(),e.$refs.personalForm4.clearValidate(),e.$refs.personalForm4.resetFields(),e.editVisible=!1):e.$notify.error({title:"错误",message:"出错了",offset:100})})},handlecancel:function(){this.$refs.personalForm.clearValidate(),this.$refs.personalForm.resetFields(),this.$refs.personalForm2.clearValidate(),this.$refs.personalForm2.resetFields(),this.$refs.personalForm3.clearValidate(),this.$refs.personalForm3.resetFields(),this.$refs.personalForm4.clearValidate(),this.$refs.personalForm4.resetFields(),this.editVisible=!1}}},p=(a("ifqM"),a("KHd+")),d=Object(p.a)(c,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{visible:e.editVisible,control:e.control,editdata:e.editdata,"close-on-press-escape":!1,top:"10px",title:"修改供应商"},on:{"update:visible":function(t){e.editVisible=t},close:function(t){e.$emit("update:control",!1)}}},[a("h2",{ref:"geren",staticClass:"form-name"},[e._v("基本信息")]),e._v(" "),a("div",{staticClass:"container"},[a("el-form",{ref:"personalForm",staticClass:"demo-ruleForm",staticStyle:{"margin-left":"30px"},attrs:{model:e.personalForm,rules:e.personalrules,inline:!0,"status-icon":"","label-position":"top","label-width":"300px"}},[a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("Supplier.supplierName"),prop:"supplierName"}},[a("el-input",{attrs:{placeholder:"请输入供应商名称",clearable:""},model:{value:e.personalForm.supplierName,callback:function(t){e.$set(e.personalForm,"supplierName",t)},expression:"personalForm.supplierName"}})],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("Supplier.typeId"),prop:"typeId"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择供应商类别"},model:{value:e.personalForm.typeId,callback:function(t){e.$set(e.personalForm,"typeId",t)},expression:"personalForm.typeId"}},e._l(e.typeIds,function(e,t){return a("el-option",{key:t,attrs:{label:e.categoryName,value:e.id}})}))],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("Supplier.supplierShortName"),prop:"supplierShortName"}},[a("el-input",{attrs:{placeholder:"请输入供应商简称",clearable:""},model:{value:e.personalForm.supplierShortName,callback:function(t){e.$set(e.personalForm,"supplierShortName",t)},expression:"personalForm.supplierShortName"}})],1),a("br"),e._v(" "),a("el-form-item",{staticStyle:{width:"80%","margin-top":"1%"},attrs:{label:e.$t("Supplier.supplierIntroduction")}},[a("el-input",{attrs:{type:"textarea",clearable:""},model:{value:e.personalForm.supplierIntroduction,callback:function(t){e.$set(e.personalForm,"supplierIntroduction",t)},expression:"personalForm.supplierIntroduction"}})],1)],1)],1),e._v(" "),a("h2",{ref:"lianxi",staticClass:"form-name"},[e._v("业务信息")]),e._v(" "),a("div",{staticClass:"container"},[a("el-form",{ref:"personalForm2",staticClass:"demo-ruleForm",staticStyle:{"margin-left":"30px"},attrs:{model:e.personalForm,rules:e.personalrules,inline:!0,"status-icon":"","label-position":"top","label-width":"300px"}},[a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("public.countyrId")}},[a("el-input",{attrs:{disabled:""},model:{value:e.personalForm.countryNname,callback:function(t){e.$set(e.personalForm,"countryNname",t)},expression:"personalForm.countryNname"}})],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("Supplier.countyrId"),prop:"countryId"}},[a("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 a("el-option",{key:t,attrs:{label:e.name,value:e.id}})}))],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("public.provinceId")}},[a("el-input",{attrs:{disabled:""},model:{value:e.personalForm.provinceName,callback:function(t){e.$set(e.personalForm,"provinceName",t)},expression:"personalForm.provinceName"}})],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("Supplier.provinceId")}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择省"},on:{change:e.handlechange2},model:{value:e.personalForm.provinceid,callback:function(t){e.$set(e.personalForm,"provinceid",t)},expression:"personalForm.provinceid"}},e._l(e.provinces,function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.id}})}))],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("Supplier.cityId")}},[a("el-input",{attrs:{disabled:""},model:{value:e.personalForm.cityName,callback:function(t){e.$set(e.personalForm,"cityName",t)},expression:"personalForm.cityName"}})],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("public.cityId")}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择市"},model:{value:e.personalForm.cityid,callback:function(t){e.$set(e.personalForm,"cityid",t)},expression:"personalForm.cityid"}},e._l(e.cities,function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.id}})}))],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("public.address")}},[a("el-input",{attrs:{placeholder:"请输入地址",clearable:""},model:{value:e.personalForm.detailAddress,callback:function(t){e.$set(e.personalForm,"detailAddress",t)},expression:"personalForm.detailAddress"}})],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("Supplier.groupId")}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择供应商分组"},model:{value:e.personalForm.groupId,callback:function(t){e.$set(e.personalForm,"groupId",t)},expression:"personalForm.groupId"}},e._l(e.groupIds,function(e,t){return a("el-option",{key:t,attrs:{label:e.groupName,value:e.id}})}))],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("Supplier.zipCode")}},[a("el-input",{attrs:{placeholder:"请输入邮编",clearable:""},model:{value:e.personalForm.zipCode,callback:function(t){e.$set(e.personalForm,"zipCode",t)},expression:"personalForm.zipCode"}})],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("Supplier.contactPersonName")}},[a("el-input",{attrs:{placeholder:"请输入联系人",clearable:""},model:{value:e.personalForm.contactPersonName,callback:function(t){e.$set(e.personalForm,"contactPersonName",t)},expression:"personalForm.contactPersonName"}})],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("Supplier.contactPersonPhone")}},[a("el-input",{attrs:{placeholder:"请输入电话",clearable:""},model:{value:e.personalForm.contactPersonPhone,callback:function(t){e.$set(e.personalForm,"contactPersonPhone",t)},expression:"personalForm.contactPersonPhone"}})],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("Supplier.regionId")}},[a("el-input",{attrs:{disabled:""},model:{value:e.personalForm.regionName,callback:function(t){e.$set(e.personalForm,"regionName",t)},expression:"personalForm.regionName"}})],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("Supplier.editregionId"),prop:"regionid"}},[a("el-cascader",{staticStyle:{width:"100%"},attrs:{options:e.regions,props:e.props,"show-all-levels":!1,placeholder:"请选择区域","change-on-select":"",filterable:"",clearable:""},model:{value:e.perregions,callback:function(t){e.perregions=t},expression:"perregions"}})],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("Supplier.giveId")}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择交货方式"},model:{value:e.personalForm.giveId,callback:function(t){e.$set(e.personalForm,"giveId",t)},expression:"personalForm.giveId"}},e._l(e.giveIds,function(e,t){return a("el-option",{key:t,attrs:{label:e.categoryName,value:e.id}})}))],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("Supplier.transportId")}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择运送方式"},model:{value:e.personalForm.transportId,callback:function(t){e.$set(e.personalForm,"transportId",t)},expression:"personalForm.transportId"}},e._l(e.transportIds,function(e,t){return a("el-option",{key:t,attrs:{label:e.categoryName,value:e.id}})}))],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("Supplier.levelId")}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择供应商优质级别"},model:{value:e.personalForm.levelId,callback:function(t){e.$set(e.personalForm,"levelId",t)},expression:"personalForm.levelId"}},e._l(e.levelIds,function(e,t){return a("el-option",{key:t,attrs:{label:e.categoryName,value:e.id}})}))],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("Supplier.isHot"),prop:"isHot"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择"},model:{value:e.personalForm.isHot,callback:function(t){e.$set(e.personalForm,"isHot",t)},expression:"personalForm.isHot"}},[a("el-option",{attrs:{label:"是",value:"1"}}),e._v(" "),a("el-option",{attrs:{label:"否",value:"2"}})],1)],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("Supplier.isEffective")}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择启用状态"},model:{value:e.personalForm.isEffective,callback:function(t){e.$set(e.personalForm,"isEffective",t)},expression:"personalForm.isEffective"}},[a("el-option",{attrs:{label:"启用",value:"1"}}),e._v(" "),a("el-option",{attrs:{label:"未启用",value:"2"}})],1)],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("Supplier.buyerId")}},[a("el-input",{attrs:{placeholder:"请输入采购员"},on:{focus:e.handlechoose},model:{value:e.buyerId,callback:function(t){e.buyerId=t},expression:"buyerId"}})],1),e._v(" "),a("br"),e._v(" "),a("my-emp",{attrs:{control:e.empcontrol},on:{"update:control":function(t){e.empcontrol=t},personName:e.personName}}),e._v(" "),a("el-form-item",{staticStyle:{width:"80%","margin-top":"1%"},attrs:{label:e.$t("Supplier.businessScopeIntroduction")}},[a("el-input",{attrs:{type:"textarea",clearable:""},model:{value:e.personalForm.businessScopeIntroduction,callback:function(t){e.$set(e.personalForm,"businessScopeIntroduction",t)},expression:"personalForm.businessScopeIntroduction"}})],1)],1)],1),e._v(" "),a("h2",{staticClass:"form-name"},[e._v("财务信息")]),e._v(" "),a("div",{staticClass:"container"},[a("el-form",{ref:"personalForm3",staticClass:"demo-ruleForm",staticStyle:{"margin-left":"30px"},attrs:{model:e.personalForm,rules:e.personalrules,inline:!0,"status-icon":"","label-position":"top","label-width":"300px"}},[a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("Supplier.paymentId")}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择结算方式"},model:{value:e.personalForm.paymentId,callback:function(t){e.$set(e.personalForm,"paymentId",t)},expression:"personalForm.paymentId"}},e._l(e.paymentIds,function(e,t){return a("el-option",{key:t,attrs:{label:e.categoryName,value:e.id}})}))],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("Supplier.moneyId")}},[a("el-select",{staticStyle:{width:"100%"},attrs:{value:e.personalForm.moneyId,placeholder:"请选择币种"},model:{value:e.personalForm.moneyId,callback:function(t){e.$set(e.personalForm,"moneyId",t)},expression:"personalForm.moneyId"}},[a("el-option",{attrs:{label:"RMB",value:"1"}}),e._v(" "),a("el-option",{attrs:{label:"USD",value:"2"}})],1)],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("Supplier.bankName")}},[a("el-input",{attrs:{placeholder:"请输入开户行",clearable:""},model:{value:e.personalForm.bankName,callback:function(t){e.$set(e.personalForm,"bankName",t)},expression:"personalForm.bankName"}})],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("Supplier.accountName")}},[a("el-input",{attrs:{placeholder:"请输入户名",clearable:""},model:{value:e.personalForm.accountName,callback:function(t){e.$set(e.personalForm,"accountName",t)},expression:"personalForm.accountName"}})],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("Supplier.account")}},[a("el-input",{attrs:{placeholder:"请输入账号",clearable:""},model:{value:e.personalForm.account,callback:function(t){e.$set(e.personalForm,"account",t)},expression:"personalForm.account"}})],1)],1)],1),e._v(" "),a("h2",{ref:"fuzhu",staticClass:"form-name"},[e._v("辅助信息")]),e._v(" "),a("div",{staticClass:"container"},[a("el-form",{ref:"personalForm4",staticClass:"demo-ruleForm",staticStyle:{"margin-left":"30px"},attrs:{model:e.personalForm,rules:e.personalrules,inline:!0,"status-icon":"","label-position":"top","label-width":"300px"}},[a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("Supplier.establishDate")}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"date",placeholder:"选择成立时间","value-format":"yyyy-MM-dd",clearable:""},model:{value:e.personalForm.establishDate,callback:function(t){e.$set(e.personalForm,"establishDate",t)},expression:"personalForm.establishDate"}})],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("Supplier.legalPerson")}},[a("el-input",{attrs:{placeholder:"请输入法人代表",clearable:""},model:{value:e.personalForm.legalPerson,callback:function(t){e.$set(e.personalForm,"legalPerson",t)},expression:"personalForm.legalPerson"}})],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("Supplier.taxNumber")}},[a("el-input",{attrs:{placeholder:"请输入税务登记号",clearable:""},model:{value:e.personalForm.taxNumber,callback:function(t){e.$set(e.personalForm,"taxNumber",t)},expression:"personalForm.taxNumber"}})],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("Supplier.businessLicense")}},[a("el-input",{attrs:{placeholder:"请输入营业执照号",clearable:""},model:{value:e.personalForm.businessLicense,callback:function(t){e.$set(e.personalForm,"businessLicense",t)},expression:"personalForm.businessLicense"}})],1),e._v(" "),a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:e.$t("Supplier.companyTypeId")}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择单位性质"},model:{value:e.personalForm.companyTypeId,callback:function(t){e.$set(e.personalForm,"companyTypeId",t)},expression:"personalForm.companyTypeId"}},[a("el-option",{attrs:{label:"类型1",value:"1"}}),e._v(" "),a("el-option",{attrs:{label:"类型2",value:"2"}})],1)],1)],1)],1),e._v(" "),a("div",{staticClass:"buttons",staticStyle:{"margin-top":"20px","margin-left":"30px"}},[a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.handleEditok()}}},[e._v("修改")]),e._v(" "),a("el-button",{attrs:{type:"danger"},on:{click:function(t){e.handlecancel()}}},[e._v("取消")])],1)])},[],!1,null,"5a9dbb2d",null);d.options.__file="MyDialog.vue";var m=d.exports,u={name:"SupplierList",directives:{waves:n.a},components:{Pagination:s.a,MyDialog:m},filters:{genderFilter:function(e){return{1:"男",2:"女"}[e]}},data:function(){return{employeeVisible:this.control,groupName:"",groupData:[],GroupVisible:!1,moreaction:"",levelIds:[],typeIds:[],downloadLoading:!1,list:[],total:0,tableKey:0,listLoading:!0,getemplist:{id:"",supplierName:"",typeId:"",regionId:"",levelId:"",pagenum:1,pagesize:10},depts:[],props:{value:"id",label:"regionName",children:"regionListVos"},regions:[],getemplistregions:[],repositories:[],personalForm:{},editVisible:!1}},mounted:function(){this.getlist()},methods:{getlist:function(){var e=this;this.listLoading=!0,Object(i.h)(this.getemplist).then(function(t){200===t.data.ret?(e.list=t.data.data.content.list,e.total=t.data.data.content.totalCount):e.$notify.error({title:"错误",message:"出错了",offset:100}),setTimeout(function(){e.listLoading=!1},50)}),Object(i.i)(1).then(function(t){200===t.data.ret?e.typeIds=t.data.data.content.list:e.$notify.error({title:"错误",message:"出错了",offset:100})}),Object(i.i)(4).then(function(t){200===t.data.ret?e.levelIds=t.data.data.content.list:e.$notify.error({title:"错误",message:"出错了",offset:100})}),Object(o.d)().then(function(t){200===t.data.ret&&(e.regions=e.tranKTree(t.data.data.content))})},handleFilter:function(){var e=this;this.getemplist.pagenum=1,this.getemplist.regionId=this.getemplistregions[this.getemplistregions.length-1],Object(i.h)(this.getemplist).then(function(t){200===t.data.ret?(e.list=t.data.data.content.list,e.total=t.data.data.content.totalCount):e.$notify.error({title:"错误",message:"出错了",offset:100})})},handleEdit:function(e){console.log(e),this.editVisible=!0,this.personalForm=r()({},e),this.personalForm.isHot=String(e.isHot),this.personalForm.isEffective=String(e.isEffective),this.personalForm.moneyId=String(e.moneyId),this.personalForm.companyTypeId=String(e.companyTypeId)},refreshlist:function(e){!0===e&&this.getlist()},handleSelectionChange:function(e){this.moreaction=e},handleCommand:function(e){var t=this,a=this.moreaction.map(function(e){return e.id}).join();"delete"===e&&this.$confirm("此操作将永久删除该文件, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(i.e)(a).then(function(e){200===e.data.ret?(t.$notify({title:"删除成功",type:"success",offset:100}),t.getlist()):t.$notify.error({title:"错误",message:"出错了",offset:100})})}).catch(function(){t.$message({type:"info",message:"已取消删除"})})},handleDelete:function(e){var t=this;this.$confirm("此操作将永久删除该文件, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(i.e)(e.id).then(function(e){200===e.data.ret?(t.$notify({title:"删除成功",type:"success",offset:100}),t.getlist()):t.$notify.error({title:"错误",message:"出错了",offset:100})})}).catch(function(){t.$message({type:"info",message:"已取消删除"})})},groupList:function(){var e=this;Object(i.k)().then(function(t){200===t.data.ret?e.groupData=t.data.data.content:e.$notify.error({title:"错误",message:"出错了",offset:100})})},handleAdd:function(){this.$router.push("/EmployeeInformation/Supplier")},handleGroup:function(){this.groupList(),this.GroupVisible=!0},restGroup:function(){this.groupName=""},handleAddGroup:function(){var e=this;Object(i.c)(this.groupName).then(function(t){200===t.data.ret?(e.$notify({title:"添加成功",type:"success",offset:100}),e.restGroup(),e.groupList()):e.$notify.error({title:"错误",message:"出错了",offset:100})})},handleDeleteGroup:function(e){var t=this;this.$confirm("此操作将永久删除该文件, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(i.f)(e.id).then(function(e){200===e.data.ret?(t.$notify({title:"删除成功",type:"success",offset:100}),t.groupList()):t.$notify.error({title:"错误",message:"出错了",offset:100})})}).catch(function(){t.$message({type:"info",message:"已取消删除"})})},handleExport:function(){var e=this;this.downloadLoading=!0,Promise.all([a.e("chunk-ef4a"),a.e("chunk-6b3a")]).then(a.bind(null,"S/jZ")).then(function(t){var a=e.formatJson(["id","supplierName","supplierShortName","typeName","regionName","buyerName","levelName","createName","createTime"],e.list);t.export_json_to_excel({header:["供应商编号","供应商名称","供应商简称","供应商类别","所在区域","采购员","供应商优质级别","建档人","建档日期"],data:a,filename:"经销商资料表"}),e.downloadLoading=!1})},formatJson:function(e,t){return t.map(function(t){return e.map(function(e){return t[e]})})},handlePrint:function(){console.log(456)},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)}})},handlechange4:function(e){var t=this,a=e[e.length-1];Object(o.e)(a).then(function(e){200===e.data.ret?t.repositories=e.data.data.content:t.$message.error("出错了")})}}},f=(a("J4xz"),Object(p.a)(u,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"ERP-container"},[a("div",{staticClass:"filter-container"},[a("el-input",{staticClass:"filter-item",attrs:{placeholder:e.$t("Supplier.id"),clearable:""},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.handleFilter(t):null}},model:{value:e.getemplist.id,callback:function(t){e.$set(e.getemplist,"id",t)},expression:"getemplist.id"}}),e._v(" "),a("el-input",{staticClass:"filter-item",attrs:{placeholder:e.$t("Supplier.supplierName"),clearable:""},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.handleFilter(t):null}},model:{value:e.getemplist.supplierName,callback:function(t){e.$set(e.getemplist,"supplierName",t)},expression:"getemplist.supplierName"}}),e._v(" "),a("el-select",{staticClass:"filter-item",attrs:{value:e.getemplist.typeId,placeholder:"请选择供应商",clearable:""},model:{value:e.getemplist.typeId,callback:function(t){e.$set(e.getemplist,"typeId",t)},expression:"getemplist.typeId"}},e._l(e.typeIds,function(e,t){return a("el-option",{key:t,attrs:{label:e.categoryName,value:e.id}})})),e._v(" "),a("el-popover",{attrs:{placement:"bottom",width:"500",trigger:"click"}},[a("el-cascader",{staticStyle:{width:"40%",float:"left","margin-left":"20px"},attrs:{options:e.regions,props:e.props,"show-all-levels":!1,placeholder:"所在区域","change-on-select":"",filterable:"",clearable:""},on:{change:e.handlechange4},model:{value:e.getemplistregions,callback:function(t){e.getemplistregions=t},expression:"getemplistregions"}}),e._v(" "),a("el-select",{staticStyle:{width:"40%",float:"right","margin-right":"20px"},attrs:{placeholder:"请选择优质级别",clearable:""},model:{value:e.getemplist.levelId,callback:function(t){e.$set(e.getemplist,"levelId",t)},expression:"getemplist.levelId"}},e._l(e.levelIds,function(e,t){return a("el-option",{key:t,attrs:{label:e.categoryName,value:e.id}})})),e._v(" "),a("div",{staticClass:"seachbutton",staticStyle:{width:"100%",float:"right","margin-top":"20px"}},[a("el-button",{directives:[{name:"waves",rawName:"v-waves"}],staticClass:"filter-item",staticStyle:{float:"right"},attrs:{type:"primary"},on:{click:e.handleFilter}},[e._v(e._s(e.$t("public.search")))])],1),e._v(" "),a("el-button",{directives:[{name:"waves",rawName:"v-waves"}],staticClass:"filter-item",staticStyle:{width:"130px"},attrs:{slot:"reference",type:"primary"},slot:"reference"},[e._v(e._s(e.$t("public.filter"))),a("svg-icon",{staticStyle:{"margin-left":"4px"},attrs:{"icon-class":"shaixuan"}})],1)],1),e._v(" "),a("el-button",{directives:[{name:"waves",rawName:"v-waves"}],staticClass:"filter-item",staticStyle:{width:"86px"},attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.handleFilter}},[e._v(e._s(e.$t("public.search")))]),e._v(" "),a("el-dropdown",{on:{command:e.handleCommand}},[a("el-button",{directives:[{name:"waves",rawName:"v-waves"}],staticClass:"filter-item",attrs:{type:"primary"}},[e._v("\n "+e._s(e.$t("public.batchoperation"))+" "),a("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e._v(" "),a("el-dropdown-menu",{staticStyle:{width:"140px"},attrs:{slot:"dropdown"},slot:"dropdown"},[a("el-dropdown-item",{staticStyle:{"text-align":"left"},attrs:{command:"delete"}},[a("svg-icon",{staticStyle:{width:"40px"},attrs:{"icon-class":"shanchu"}}),e._v(e._s(e.$t("public.delete")))],1)],1)],1),e._v(" "),a("el-button",{directives:[{name:"waves",rawName:"v-waves"}],staticClass:"filter-item",staticStyle:{width:"100px"},attrs:{type:"primary"},on:{click:e.handleGroup}},[e._v(e._s(e.$t("Supplier.supplierGroup")))]),e._v(" "),a("el-dialog",{attrs:{visible:e.GroupVisible,title:"新建分组",width:"35%"},on:{"update:visible":function(t){e.GroupVisible=t}}},[a("el-input",{staticClass:"filter-item",staticStyle:{width:"40%","margin-left":"-1px",float:"left"},attrs:{placeholder:e.$t("Supplier.groupName"),clearable:""},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.handleAddGroup(t):null}},model:{value:e.groupName,callback:function(t){e.groupName=t},expression:"groupName"}}),e._v(" "),a("el-button",{directives:[{name:"waves",rawName:"v-waves"}],staticClass:"filter-item",staticStyle:{width:"86px",float:"left"},attrs:{type:"success"},on:{click:e.handleAddGroup}},[e._v(e._s(e.$t("public.add")))]),e._v(" "),a("el-table",{attrs:{data:e.groupData,border:""}},[a("el-table-column",{attrs:{property:"id",label:"编号",align:"center",width:"150"}}),e._v(" "),a("el-table-column",{attrs:{property:"groupName",label:"组名称",align:"center","min-width":"300"}}),e._v(" "),a("el-table-column",{attrs:{label:e.$t("public.actions"),resizable:!1,align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(a){e.handleDeleteGroup(t.row)}}},[e._v(e._s(e.$t("public.delete")))])]}}])})],1)],1),e._v(" "),a("el-button",{directives:[{name:"waves",rawName:"v-waves"}],staticClass:"filter-item",staticStyle:{width:"86px"},attrs:{loading:e.downloadLoading},on:{click:e.handleExport}},[a("svg-icon",{attrs:{"icon-class":"daochu"}}),e._v(e._s(e.$t("public.export")))],1),e._v(" "),a("el-button",{directives:[{name:"waves",rawName:"v-waves"}],staticClass:"filter-item",staticStyle:{width:"86px"},attrs:{icon:"el-icon-printer"},on:{click:e.handlePrint}},[e._v(e._s(e.$t("public.print")))]),e._v(" "),a("el-button",{directives:[{name:"waves",rawName:"v-waves"}],staticClass:"filter-item",staticStyle:{width:"86px",float:"right"},attrs:{icon:"el-icon-plus",type:"success"},on:{click:e.handleAdd}},[e._v(e._s(e.$t("public.add")))])],1),e._v(" "),a("div",{staticClass:"app-container"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],key:e.tableKey,staticStyle:{width:"100%"},attrs:{data:e.list,border:"",fit:"","highlight-current-row":""},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:e.$t("Supplier.id"),resizable:!1,prop:"id",align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.id))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:e.$t("Supplier.supplierName"),resizable:!1,prop:"supplierName",align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.supplierName))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:e.$t("Supplier.supplierShortName"),resizable:!1,prop:"supplierShortName",align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.supplierShortName))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:e.$t("Supplier.typeId"),resizable:!1,align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.typeName))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:e.$t("Supplier.regionId"),resizable:!1,prop:"regionName",align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.regionName))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:e.$t("Supplier.buyerId"),resizable:!1,prop:"buyerName",align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.buyerName))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:e.$t("Supplier.levelId"),resizable:!1,prop:"levelName",align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.levelName))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:e.$t("Supplier.createId"),resizable:!1,prop:"createId",align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.createName))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:e.$t("Supplier.createTime"),resizable:!1,prop:"createTime",align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.createTime))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:e.$t("public.actions"),resizable:!1,align:"center","min-width":"230"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(a){e.handleEdit(t.row)}}},[e._v(e._s(e.$t("public.edit")))]),e._v(" "),a("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(a){e.handleDelete(t.row)}}},[e._v(e._s(e.$t("public.delete")))])]}}])})],1),e._v(" "),a("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],attrs:{total:e.total,page:e.getemplist.pagenum,limit:e.getemplist.pagesize},on:{"update:page":function(t){e.$set(e.getemplist,"pagenum",t)},"update:limit":function(t){e.$set(e.getemplist,"pagesize",t)},pagination:e.getlist}}),e._v(" "),a("my-dialog",{attrs:{control:e.editVisible,editdata:e.personalForm},on:{"update:control":function(t){e.editVisible=t},"update:editdata":function(t){e.personalForm=t},rest:e.refreshlist}})],1)])},[],!1,null,"3a3af651",null));f.options.__file="SupplierList.vue";t.default=f.exports},ifqM:function(e,t,a){"use strict";var l=a("Vz7j");a.n(l).a},mstn:function(e,t,a){}}]);