|
|
@@ -122,6 +122,7 @@ export default {
|
|
|
fields1: [],
|
|
|
fields2: [],
|
|
|
fields3: [],
|
|
|
+ siteid:JSON.parse(sessionStorage.getItem('active_account')).siteid,
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -186,18 +187,61 @@ export default {
|
|
|
this.data.contactsinfo.phonenumber = this.data.contactsinfo.telephone;
|
|
|
this.data.contactsinfo.telephone = "";
|
|
|
}
|
|
|
- const res = await this.$api.requested({
|
|
|
- id: 20221216184302,
|
|
|
- content: this.data,
|
|
|
- });
|
|
|
- this.tool.showMessage(res, () => {
|
|
|
- if (this.duplicates) {
|
|
|
- this.setTag(res.data.sa_customersid, "疑似重复");
|
|
|
- } else {
|
|
|
- this.$emit("onSuccess");
|
|
|
- /* this.setTag(res.data.sa_customersid,'')*/
|
|
|
+ if (this.siteid == 'HY' && this.$route.path == '/orderclue_detail'){
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": "20221208103601",
|
|
|
+ "content": {
|
|
|
+ "keyword":this.data.enterprisename_customer,
|
|
|
+ "pageNumber":1,
|
|
|
+ "pageSize":5
|
|
|
+ },
|
|
|
+ })
|
|
|
+ console.log(res.data)
|
|
|
+ if (res.code == 0){
|
|
|
+ this.tool.showMessage(res,()=>{})
|
|
|
+ }else {
|
|
|
+ this.data.province = res.data[0].regProvince
|
|
|
+ const res1 = await this.$api.requested({
|
|
|
+ "id": "2024060715002601",
|
|
|
+ "content": {
|
|
|
+ "companyName":res.data[0].companyName
|
|
|
+ },
|
|
|
+ })
|
|
|
+ if (res1.code == 0){
|
|
|
+ this.tool.showMessage(res1,()=>{})
|
|
|
+ }else {
|
|
|
+ this.data.city = res1.data.regCity
|
|
|
+ this.data.county = res1.data.regArea
|
|
|
+ this.data.address = res1.data.address === "-" ? '' : res1.data.address;
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ id: 20221216184302,
|
|
|
+ content: this.data,
|
|
|
+ });
|
|
|
+ this.tool.showMessage(res, () => {
|
|
|
+ if (this.duplicates) {
|
|
|
+ this.setTag(res.data.sa_customersid, "疑似重复");
|
|
|
+ } else {
|
|
|
+ this.$emit("onSuccess");
|
|
|
+ /* this.setTag(res.data.sa_customersid,'')*/
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
- });
|
|
|
+ }else {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ id: 20221216184302,
|
|
|
+ content: this.data,
|
|
|
+ });
|
|
|
+ this.tool.showMessage(res, () => {
|
|
|
+ if (this.duplicates) {
|
|
|
+ this.setTag(res.data.sa_customersid, "疑似重复");
|
|
|
+ } else {
|
|
|
+ this.$emit("onSuccess");
|
|
|
+ /* this.setTag(res.data.sa_customersid,'')*/
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
async setTag(id, data) {
|
|
|
const res = await this.$api.requested({
|