|
@@ -152,10 +152,10 @@ Page({
|
|
|
item.isTelephone = arr.length == 2 ? "1" : "0";
|
|
item.isTelephone = arr.length == 2 ? "1" : "0";
|
|
|
if (options.enterprisename) {
|
|
if (options.enterprisename) {
|
|
|
item.sys_enterpriseid = [options.enterprisename, [options.sys_enterpriseid]]
|
|
item.sys_enterpriseid = [options.enterprisename, [options.sys_enterpriseid]]
|
|
|
-
|
|
|
|
|
} else if (item.enterprisename || item.company) {
|
|
} else if (item.enterprisename || item.company) {
|
|
|
item.sys_enterpriseid = [item.enterprisename || item.company, [item.sys_enterpriseid]]
|
|
item.sys_enterpriseid = [item.enterprisename || item.company, [item.sys_enterpriseid]]
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
if (typeof item.sys_enterpriseid == "object") {
|
|
if (typeof item.sys_enterpriseid == "object") {
|
|
|
this.data.form.splice(6, 0, {
|
|
this.data.form.splice(6, 0, {
|
|
|
label: "单位",
|
|
label: "单位",
|
|
@@ -173,8 +173,11 @@ Page({
|
|
|
})
|
|
})
|
|
|
this.data.content.sys_enterpriseid = item.sys_enterpriseid[1][0] || 0;
|
|
this.data.content.sys_enterpriseid = item.sys_enterpriseid[1][0] || 0;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
this.data.content.contactsid = item.contactsid;
|
|
this.data.content.contactsid = item.contactsid;
|
|
|
- this.data.content.sys_phonebookid = item.sys_phonebookid || 0
|
|
|
|
|
|
|
+ this.data.content.sys_phonebookid = item.sys_phonebookid || 0;
|
|
|
|
|
+ if (item.sa_customersid) this.data.content.ownerid = item.sa_customersid;
|
|
|
|
|
+ if (options.sys_enterpriseid) this.data.sys_phonebookid = item.sys_phonebookid || 0;
|
|
|
this.setData({
|
|
this.setData({
|
|
|
form: this.data.form.map(v => {
|
|
form: this.data.form.map(v => {
|
|
|
if (v.valueName == 'phonenumber') {
|
|
if (v.valueName == 'phonenumber') {
|
|
@@ -205,7 +208,6 @@ Page({
|
|
|
return v
|
|
return v
|
|
|
})
|
|
})
|
|
|
});
|
|
});
|
|
|
- if (options.sys_enterpriseid && item.sys_phonebookid) this.data.sys_phonebookid = item.sys_phonebookid;
|
|
|
|
|
this.selectComponent("#Form").confirm();
|
|
this.selectComponent("#Form").confirm();
|
|
|
} else {
|
|
} else {
|
|
|
this.data.form.splice(6, 0, {
|
|
this.data.form.splice(6, 0, {
|
|
@@ -226,6 +228,8 @@ Page({
|
|
|
form: this.data.form
|
|
form: this.data.form
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
+ if (options.sa_customersid) this.data.content.ownerid = options.sa_customersid
|
|
|
|
|
+ console.log(this.data.content)
|
|
|
},
|
|
},
|
|
|
/* 打断 */
|
|
/* 打断 */
|
|
|
interrupt({
|
|
interrupt({
|
|
@@ -274,13 +278,16 @@ Page({
|
|
|
if (!data || this.data.disabled) return;
|
|
if (!data || this.data.disabled) return;
|
|
|
const content = {
|
|
const content = {
|
|
|
...this.data.content,
|
|
...this.data.content,
|
|
|
- ...data
|
|
|
|
|
|
|
+ ...data,
|
|
|
|
|
+ ownertable: "sa_customers"
|
|
|
};
|
|
};
|
|
|
if (content.telephone) {
|
|
if (content.telephone) {
|
|
|
content.phonenumber = content.telephone.join("-");
|
|
content.phonenumber = content.telephone.join("-");
|
|
|
delete(content.telephone)
|
|
delete(content.telephone)
|
|
|
}
|
|
}
|
|
|
|
|
+ content.sa_customersid = content.ownerid;
|
|
|
content.sys_enterpriseid = this.data.content.sys_enterpriseid;
|
|
content.sys_enterpriseid = this.data.content.sys_enterpriseid;
|
|
|
|
|
+ content.oldcontactsid = content.contactsid;
|
|
|
if (this.data.sys_phonebookid == null) {
|
|
if (this.data.sys_phonebookid == null) {
|
|
|
this.handleSubmit(content);
|
|
this.handleSubmit(content);
|
|
|
} else {
|
|
} else {
|
|
@@ -292,12 +299,14 @@ Page({
|
|
|
confirm
|
|
confirm
|
|
|
}) {
|
|
}) {
|
|
|
content.sys_phonebookid = confirm ? content.sys_phonebookid : 0;
|
|
content.sys_phonebookid = confirm ? content.sys_phonebookid : 0;
|
|
|
|
|
+ content.contactsid = 0;
|
|
|
that.handleSubmit(content);
|
|
that.handleSubmit(content);
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
handleSubmit(content) {
|
|
handleSubmit(content) {
|
|
|
|
|
+ console.log("提交", content)
|
|
|
_Http.basic({
|
|
_Http.basic({
|
|
|
"id": "20221018141802",
|
|
"id": "20221018141802",
|
|
|
content
|
|
content
|