|
|
@@ -243,19 +243,28 @@ Page({
|
|
|
if (followObjectIndex !== -1) {
|
|
|
this.data.form.splice(followObjectIndex + 1, 0, ...lcForm);
|
|
|
}
|
|
|
+ this.setData({
|
|
|
+ form: this.data.form
|
|
|
+ })
|
|
|
} else {
|
|
|
- const existingJxsIndex = this.data.form.findIndex(item => item.label === "医院");
|
|
|
- if (existingJxsIndex !== -1) {
|
|
|
- this.data.form.splice(existingJxsIndex, 1);
|
|
|
- }
|
|
|
- existingJxsIndex = this.data.form.findIndex(item => item.label === "医生");
|
|
|
- if (existingJxsIndex !== -1) {
|
|
|
- this.data.form.splice(existingJxsIndex, 1);
|
|
|
- }
|
|
|
- existingJxsIndex = this.data.form.findIndex(item => item.label === "科室");
|
|
|
- if (existingJxsIndex !== -1) {
|
|
|
- this.data.form.splice(existingJxsIndex, 1);
|
|
|
+ console.log('删除医院内容')
|
|
|
+ const existingYyIndex = this.data.form.findIndex(item => item.label === "医院");
|
|
|
+ if (existingYyIndex !== -1) {
|
|
|
+ console.log(existingYyIndex,'执行进行删除')
|
|
|
+ this.data.form.splice(existingYyIndex, 3);
|
|
|
+ console.log(this.data.form,'输出')
|
|
|
+ this.setData({
|
|
|
+ form: this.data.form
|
|
|
+ })
|
|
|
}
|
|
|
+ // const existingYsIndex = this.data.form.findIndex(item => item.label === "医生");
|
|
|
+ // if (existingYsIndex !== -1) {
|
|
|
+ // this.data.form.splice(existingYsIndex, 1);
|
|
|
+ // }
|
|
|
+ // const existingKsIndex = this.data.form.findIndex(item => item.label === "科室");
|
|
|
+ // if (existingKsIndex !== -1) {
|
|
|
+ // this.data.form.splice(existingKsIndex, 1);
|
|
|
+ // }
|
|
|
let jxsForm = [{
|
|
|
label: "经销商",
|
|
|
error: false,
|
|
|
@@ -279,14 +288,20 @@ Page({
|
|
|
},
|
|
|
query: "&radio=true",
|
|
|
}]
|
|
|
- const followObjectIndex = this.data.form.findIndex(item => item.label === "跟进对象");
|
|
|
- if (followObjectIndex !== -1) {
|
|
|
- this.data.form.splice(followObjectIndex + 1, 0, ...jxsForm);
|
|
|
+ const followObjectJxsIndex = this.data.form.findIndex(item => item.label === "跟进对象");
|
|
|
+ if (followObjectJxsIndex !== -1) {
|
|
|
+ this.data.form.splice(followObjectJxsIndex + 1, 0, ...jxsForm);
|
|
|
+ console.log('1111',this.data.form)
|
|
|
+
|
|
|
+ this.setData({
|
|
|
+ form: this.data.form
|
|
|
+ })
|
|
|
}
|
|
|
+ this.setData({
|
|
|
+ form: this.data.form
|
|
|
+ })
|
|
|
}
|
|
|
- this.setData({
|
|
|
- form: this.data.form
|
|
|
- })
|
|
|
+
|
|
|
},
|
|
|
interrupt(e) {
|
|
|
console.log(e, 'e的数据初始')
|
|
|
@@ -297,8 +312,11 @@ Page({
|
|
|
} = e.detail;
|
|
|
console.log(data, form, temporary)
|
|
|
if (temporary.item.label == '跟进对象') {
|
|
|
- this.formSetNew()
|
|
|
+ this.formSetNew(data.value)
|
|
|
}
|
|
|
+ this.setData({
|
|
|
+ form
|
|
|
+ })
|
|
|
},
|
|
|
/* 表单必填项是否完成 */
|
|
|
onConfirm({
|