|
|
@@ -604,17 +604,18 @@
|
|
|
this.IsCompanyUser = this.authUser.Profile.IsCompanyUser;
|
|
|
|
|
|
if (this.IsCompanyUser && this.serviceId === "add") {
|
|
|
- apiCert
|
|
|
- .getEntityByCreatorAndType("01", this.$axios)
|
|
|
- .then(res => {
|
|
|
- this.certId = res.data.Id;
|
|
|
- this.serviceId = res.data.SupplierId;
|
|
|
- this.formData.Id = res.data.SupplierId;
|
|
|
- this.initDatas();
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- console.error(err);
|
|
|
- });
|
|
|
+ // apiCert
|
|
|
+ // .getEntityByCreatorAndType("01", this.$axios)
|
|
|
+ // .then(res => {
|
|
|
+ // this.certId = res.data.Id;
|
|
|
+ // this.serviceId = res.data.SupplierId;
|
|
|
+ // this.formData.Id = res.data.SupplierId;
|
|
|
+ // this.initDatas();
|
|
|
+ // })
|
|
|
+ // .catch(err => {
|
|
|
+ // console.error(err);
|
|
|
+ // });
|
|
|
+ this.inputCompany(this.authUser.Profile.Realname)
|
|
|
} else {
|
|
|
this.initDatas();
|
|
|
}
|
|
|
@@ -709,9 +710,9 @@
|
|
|
inputCompany(val) {
|
|
|
if (!this.certId) {
|
|
|
api
|
|
|
- .getEntityByName(val, this.$axios)
|
|
|
+ .getEntityByName(val,'01', this.$axios)
|
|
|
.then(res => {
|
|
|
- if (res.data && res.data.Id) {
|
|
|
+ if (res.data) {
|
|
|
this.SetFormData(res.data);
|
|
|
}
|
|
|
})
|
|
|
@@ -727,62 +728,83 @@
|
|
|
}
|
|
|
},
|
|
|
SetFormData(fdata) {
|
|
|
- this.isCanUpdateSupplier(fdata.Id);
|
|
|
- this.formData.Id = fdata.Id;
|
|
|
- this.formData.SupplierName = fdata.SupplierName;
|
|
|
- this.formData.OilCertificateNo = fdata.OilCertificateNo;
|
|
|
- this.formData.Grade = fdata.Grade;
|
|
|
- this.formData.MgrUnit = fdata.MgrUnit;
|
|
|
+ console.log(fdata)
|
|
|
+ this.isCanUpdateSupplier(fdata.Id)
|
|
|
+ this.formData.Id = fdata.Id
|
|
|
+ this.formData.SupplierName = fdata.SupplierName
|
|
|
+ this.formData.OilCertificateNo = fdata.OilCertificateNo
|
|
|
+ this.formData.Grade = fdata.Grade
|
|
|
+ this.formData.MgrUnit = fdata.MgrUnit
|
|
|
+ if(fdata.InStyle!=null && fdata.InStyle!=""){
|
|
|
this.formData.InStyle = fdata.InStyle
|
|
|
- this.formData.OperType = fdata.OperType;
|
|
|
- this.formData.Country = fdata.Country;
|
|
|
- this.formData.MaunAgent = fdata.MaunAgent;
|
|
|
- this.formData.ConstructTeam = fdata.ConstructTeam;
|
|
|
- this.formData.CredentialFlag = fdata.CredentialFlag
|
|
|
+ }
|
|
|
+ this.formData.OperType = fdata.OperType
|
|
|
+ if(fdata.Country!=""){
|
|
|
+ this.formData.Country = fdata.Country;
|
|
|
+ }
|
|
|
+ this.formData.MaunAgent = fdata.MaunAgent
|
|
|
+ this.formData.ConstructTeam = fdata.ConstructTeam
|
|
|
+ if(fdata.CredentialFlag!=null&&fdata.CredentialFlag!=""){
|
|
|
+ this.formData.CredentialFlag = fdata.CredentialFlag
|
|
|
+ }
|
|
|
this.formData.CommercialNo = fdata.CommercialNo
|
|
|
- if (this.formData.CredentialFlag != "") {
|
|
|
+ if (fdata.CredentialFlag!=null&&fdata.CredentialFlag!="") {
|
|
|
this.$refs["GoodsInfo"].showorhid(this.formData.CredentialFlag)
|
|
|
}
|
|
|
- this.formData.OrganCode = fdata.OrganCode;
|
|
|
- this.formData.CountryTaxNo = fdata.CountryTaxNo;
|
|
|
- this.formData.LocalTaxNo = fdata.LocalTaxNo;
|
|
|
- this.formData.Address = fdata.Address;
|
|
|
- this.formData.Province = fdata.Province;
|
|
|
- this.formData.City = fdata.City;
|
|
|
- this.formData.Street = fdata.Street;
|
|
|
- this.formData.HouseNo = fdata.HouseNo;
|
|
|
- this.formData.ZipCode = fdata.ZipCode;
|
|
|
- this.formData.LinkAddress = fdata.LinkAddress;
|
|
|
- this.formData.LinkProvince = fdata.LinkProvince;
|
|
|
- this.formData.LinkCity = fdata.LinkCity;
|
|
|
- this.formData.LinkStreet = fdata.LinkStreet;
|
|
|
- this.formData.LinkHouseNo = fdata.LinkHouseNo;
|
|
|
- this.formData.LinkZipCode = fdata.LinkZipCode;
|
|
|
- this.formData.LegalPerson = fdata.LegalPerson;
|
|
|
- this.formData.CategoryCode = fdata.CategoryCode;
|
|
|
- this.formData.CategoryName = fdata.CategoryName;
|
|
|
- this.formData.RegCapital = fdata.RegCapital;
|
|
|
- this.formData.Currency = fdata.Currency;
|
|
|
- this.formData.ContactName = fdata.ContactName;
|
|
|
- this.formData.CompanyType = fdata.CompanyType;
|
|
|
- this.formData.SetupTime = fdata.SetupTime;
|
|
|
- this.formData.DepositBank = fdata.DepositBank;
|
|
|
- this.formData.BankAccount = fdata.BankAccount;
|
|
|
- this.formData.EMail = fdata.EMail;
|
|
|
- this.formData.BankCreditRating = fdata.BankCreditRating;
|
|
|
- this.formData.Mobile = fdata.Mobile;
|
|
|
- this.formData.Telphone = fdata.Telphone;
|
|
|
- this.formData.Fax = fdata.Fax;
|
|
|
- this.formData.CompanyTel = fdata.CompanyTel;
|
|
|
- this.formData.QQ = fdata.QQ;
|
|
|
- this.formData.CompanyUrl = fdata.CompanyUrl;
|
|
|
- this.formData.HseTraining = fdata.HseTraining;
|
|
|
- this.formData.SpecTypeCode = fdata.SpecTypeCode;
|
|
|
+ this.formData.OrganCode = fdata.OrganCode
|
|
|
+ this.formData.CountryTaxNo = fdata.CountryTaxNo
|
|
|
+ this.formData.LocalTaxNo = fdata.LocalTaxNo
|
|
|
+ this.formData.Address = fdata.Address
|
|
|
+ this.formData.Province = fdata.Province
|
|
|
+ this.formData.City = fdata.City
|
|
|
+ this.formData.Street = fdata.Street
|
|
|
+ this.formData.HouseNo = fdata.HouseNo
|
|
|
+ this.formData.ZipCode = fdata.ZipCode
|
|
|
+ this.formData.LinkAddress = fdata.LinkAddress
|
|
|
+ this.formData.LinkProvince = fdata.LinkProvince
|
|
|
+ this.formData.LinkCity = fdata.LinkCity
|
|
|
+ this.formData.LinkStreet = fdata.LinkStreet
|
|
|
+ this.formData.LinkHouseNo = fdata.LinkHouseNo
|
|
|
+ this.formData.LinkZipCode = fdata.LinkZipCode
|
|
|
+ this.formData.LegalPerson = fdata.LegalPerson
|
|
|
+ this.formData.CategoryCode = fdata.CategoryCode
|
|
|
+ this.formData.CategoryName = fdata.CategoryName
|
|
|
+ this.formData.RegCapital = fdata.RegCapital
|
|
|
+ if(fdata.Currency!=null && fdata.Currency!=""){
|
|
|
+ this.formData.Currency = fdata.Currency
|
|
|
+ }
|
|
|
+ this.formData.ContactName = fdata.ContactName
|
|
|
+ if(fdata.CompanyType!=null && fdata.CompanyType!=""){
|
|
|
+ this.formData.CompanyType = fdata.CompanyType
|
|
|
+ }
|
|
|
+ this.formData.SetupTime = fdata.SetupTime
|
|
|
+ this.formData.DepositBank = fdata.DepositBank
|
|
|
+ this.formData.BankAccount = fdata.BankAccount
|
|
|
+ this.formData.EMail = fdata.EMail
|
|
|
+ this.formData.BankCreditRating = fdata.BankCreditRating
|
|
|
+ if(fdata.Mobile!=null && fdata.Mobile!=""){
|
|
|
+ this.formData.Mobile = fdata.Mobile;
|
|
|
+ }else{
|
|
|
+ this.formData.Mobile = fdata.UserTelephone;
|
|
|
+ }
|
|
|
+ this.formData.Telphone = fdata.Telphone
|
|
|
+ this.formData.Fax = fdata.Fax
|
|
|
+ this.formData.CompanyTel = fdata.CompanyTel
|
|
|
+ this.formData.QQ = fdata.QQ
|
|
|
+ this.formData.CompanyUrl = fdata.CompanyUrl
|
|
|
+ if(fdata.HseTraining!=null && fdata.HseTraining!=""){
|
|
|
+ this.formData.HseTraining = fdata.HseTraining
|
|
|
+ }
|
|
|
+ if(fdata.SpecTypeCode!=null && fdata.SpecTypeCode!=""){
|
|
|
+ this.formData.SpecTypeCode = fdata.SpecTypeCode
|
|
|
+ }
|
|
|
this.formData.QualitySystemCert = fdata.QualitySystemCert
|
|
|
this.formData.SafetyLicense = fdata.SafetyLicense
|
|
|
this.formData.SpecIndustryCert = fdata.SpecIndustryCert
|
|
|
this.formData.BusinessScope = fdata.BusinessScope
|
|
|
this.formData.Remark = fdata.Remark
|
|
|
+ this.formData.TjinNotify = fdata.TjinNotify
|
|
|
+ this.formData.Status = fdata.Status
|
|
|
|
|
|
this.$refs["GoodsInfo"].CityAry = [];
|
|
|
this.$refs["GoodsInfo"].CityAry.push(this.formData.Province);
|
|
|
@@ -821,9 +843,9 @@
|
|
|
this.$refs["winningList"].showDialog();
|
|
|
},
|
|
|
|
|
|
- initDatas() {
|
|
|
- this.isCanUpdateSupplier(this.formData.Id);
|
|
|
+ initDatas() {
|
|
|
if (this.formData.Id) {
|
|
|
+ this.isCanUpdateSupplier(this.formData.Id);
|
|
|
api
|
|
|
.getEntityAndCert(this.certId, this.$axios)
|
|
|
.then(res => {
|