mirror of
https://github.com/shawncai/ERP.git
synced 2025-01-24 16:38:07 +08:00
1 line
33 KiB
JavaScript
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.$ref
|