mirror of
https://github.com/shawncai/ERP.git
synced 2025-01-08 16:27:45 +08:00
1 line
24 KiB
JavaScript
1 line
24 KiB
JavaScript
|
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-cd7f"],{"10Hk":function(t,e,a){},"6YiU":function(t,e,a){},"6mSg":function(t,e,a){"use strict";var o=a("6YiU");a.n(o).a},aVBj:function(t,e,a){"use strict";a.r(e);var o=a("P2sY"),r=a.n(o),s=a("BJvg"),i=a("ZySA"),l=a("Mz3J"),n=a("ql3t"),c=a.n(n),m=a("6HaC"),u={components:{MyEmp:a("LWcQ").a},props:{control:{type:Boolean,default:!1},editdata:{type:Object,default:null}},data:function(){return{editVisible:this.control,trader:this.editdata.traderName,empcontrol:!1,nations:[],provinces:[],cities:[],repositories:[],customerForm:this.editdata,customerFormrules:{phone:[{required:!0,validator:function(t,e,a){if(!e)return a(new Error("手机号不能为空"));setTimeout(function(){c()(e)?a():a(new Error("请输入数字值"))},1e3)},trigger:"change"}],agentName:[{required:!0,message:"请输入客户名称",trigger:"blur"}],type:[{required:!0,message:"请选择客户类型",trigger:"change"}],countryid:[{required:!0,message:"请选择国家",trigger:"change"}],contactName:[{required:!0,message:"请输入联系人",trigger:"blur"}]},customertypes:[],customertyp:1,levels:[],levelstype:2,sources:[],sourcestype:3}},watch:{control:function(){this.editVisible=this.control},editdata:function(){this.customerForm=this.editdata,this.trader=this.editdata.traderName,console.log(this.editdata)}},created:function(){this.getnationlist(),this.getCategory()},methods:{getCategory:function(){var t=this;Object(s.j)(this.customertyp).then(function(e){200===e.data.ret?t.customertypes=e.data.data.content.list:t.$notify.error({title:"错误",message:"出错了",offset:100})}),Object(s.j)(this.levelstype).then(function(e){200===e.data.ret?t.levels=e.data.data.content.list:t.$notify.error({title:"错误",message:"出错了",offset:100})}),Object(s.j)(this.sourcestype).then(function(e){200===e.data.ret?t.sources=e.data.data.content.list:t.$notify.error({title:"错误",message:"出错了",offset:100})})},getnationlist:function(){var t=this;Object(m.b)().then(function(e){200===e.data.ret?t.nations=e.data.data.content:t.$notify.error({title:"错误",message:"出错了",offset:100})})},handlechange:function(t){var e=this;Object(m.c)(t).then(function(t){200===t.data.ret?e.provinces=t.data.data.content:e.$notify.error({title:"错误",message:"出错了",offset:100})})},handlechange2:function(t){var e=this;Object(m.a)(t).then(function(t){console.log(t),200===t.data.ret?e.cities=t.data.data.content:e.$notify.error({title:"错误",message:"出错了",offset:100})})},handlechoose:function(){this.empcontrol=!0},personName:function(t){console.log(t),this.trader=t.personName,this.customerForm.traderid=t.id},handleEditok:function(){var t=this;Object(s.n)(this.customerForm).then(function(e){200===e.data.ret?(t.$notify({title:"操作成功",message:"操作成功",type:"success",duration:1e3,offset:100}),t.$emit("rest",!0),t.$refs.customerForm.clearValidate(),t.$refs.customerForm.resetFields(),t.$refs.customerForm2.clearValidate(),t.$refs.customerForm2.resetFields(),t.editVisible=!1):t.$notify.error({title:"错误",message:"出错了",offset:100})})},handlecancel:function(){this.$refs.customerForm.clearValidate(),this.$refs.customerForm.resetFields(),this.$refs.customerForm2.clearValidate(),this.$refs.customerForm2.resetFields(),this.editVisible=!1}}},d=(a("6mSg"),a("KHd+")),p=Object(d.a)(u,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-dialog",{attrs:{visible:t.editVisible,control:t.control,editdata:t.editdata,"close-on-press-escape":!1,top:"10px",title:"修改经销商"},on:{"update:visible":function(e){t.editVisible=e},close:function(e){t.$emit("update:control",!1)}}},[a("h2",{ref:"geren",staticClass:"form-name"},[t._v("基本信息")]),t._v(" "),a("div",{staticClass:"container"},[a("el-form",{ref:"customerForm",staticClass:"demo-ruleForm",staticStyle:{"margin-left":"30px"},attrs:{model:t.customerForm,rules:t.customerFormrules,inline:!0,"status-icon":"","label-position":"top","label-width":"300px"}},[a("el-form-item",{staticStyle:{width:"40%","margin-top":"1%"},attrs:{label:t.$t("Customer.agen
|