|
|
@@ -18,25 +18,6 @@ Page({
|
|
|
num: 132
|
|
|
}],
|
|
|
tabbarList: [{
|
|
|
- icon: "icon-bianji",
|
|
|
- label: "编辑"
|
|
|
- }, {
|
|
|
- icon: "icon-genjin",
|
|
|
- label: "跟进"
|
|
|
- }, {
|
|
|
- icon: "icon-genjin",
|
|
|
- label: "无效"
|
|
|
- }, {
|
|
|
- icon: "icon-dibu-zhuanhuan",
|
|
|
- label: "转化"
|
|
|
- }, {
|
|
|
- icon: "icon-dibu-zhuanhuan",
|
|
|
- label: "转移"
|
|
|
- }, {
|
|
|
- icon: "icon-dibu-jieshu",
|
|
|
- label: "作废"
|
|
|
- }],
|
|
|
- oldtabbarList: [{
|
|
|
icon: "icon-genjin",
|
|
|
label: "跟进"
|
|
|
}, {
|
|
|
@@ -63,7 +44,6 @@ Page({
|
|
|
this.getDetail();
|
|
|
},
|
|
|
getDetail() {
|
|
|
- console.log(111);
|
|
|
_Http.basic({
|
|
|
"classname": "saletool.orderclue.web.orderclue",
|
|
|
"method": "selectDetail",
|
|
|
@@ -78,7 +58,6 @@ Page({
|
|
|
title: res.msg,
|
|
|
icon: "none"
|
|
|
});
|
|
|
- console.log(res.data.createBy);
|
|
|
this.setData({
|
|
|
detail: res.data,
|
|
|
briefs: [{
|
|
|
@@ -177,25 +156,23 @@ Page({
|
|
|
}],
|
|
|
tabsList: this.data.tabsList,
|
|
|
});
|
|
|
- let arr = this.data.oldtabbarList
|
|
|
- if (res.data.status != '待跟进' && res.data.status != '跟进中') {
|
|
|
- arr = []
|
|
|
+ /* 更新列表中状态 */
|
|
|
+ let page = getCurrentPages().find(v => v.__route__ == 'packageA/saleClue/index');
|
|
|
+ if (page) {
|
|
|
+ let index = page.data.list.findIndex(v => v.sat_orderclueid == res.data.sat_orderclueid);
|
|
|
+ console.log("列表中位置", index)
|
|
|
+ if (index != -1) page.setData({
|
|
|
+ [`list[${index}].status`]: res.data.status
|
|
|
+ })
|
|
|
}
|
|
|
- this.setData({
|
|
|
- tabbarList: arr
|
|
|
+ if (res.data.status != '待跟进' && res.data.status != '跟进中') this.setData({
|
|
|
+ tabbarList: []
|
|
|
})
|
|
|
this.getTags();
|
|
|
this.getGroup();
|
|
|
this.partialRenewal();
|
|
|
})
|
|
|
},
|
|
|
- /*跟进提交*/
|
|
|
- endFollow({
|
|
|
- detail
|
|
|
- }) {
|
|
|
- this.getDetail()
|
|
|
- this.selectComponent('#follow').getList(this.data.detail.sat_orderclueid, true)
|
|
|
- },
|
|
|
//tabs 切换
|
|
|
tabsChange({
|
|
|
detail
|
|
|
@@ -254,7 +231,8 @@ Page({
|
|
|
tabbarOnClick({
|
|
|
detail
|
|
|
}) {
|
|
|
- let data = this.data.detail;
|
|
|
+ let data = this.data.detail,
|
|
|
+ that = this;
|
|
|
switch (detail.label) {
|
|
|
case "编辑":
|
|
|
wx.navigateTo({
|
|
|
@@ -271,26 +249,26 @@ Page({
|
|
|
if (confirm) _Http.basic({
|
|
|
"id": 20221123193702,
|
|
|
"content": {
|
|
|
- "sat_orderclueids": [this.data.detail.sat_orderclueid]
|
|
|
+ "sat_orderclueids": [that.data.detail.sat_orderclueid]
|
|
|
}
|
|
|
}).then(res => {
|
|
|
wx.showToast({
|
|
|
- title: res.msg == '成功' ? `已作废该线索` : res.msg,
|
|
|
+ title: res.msg == '成功' ? `操作成功` : res.msg,
|
|
|
icon: "none"
|
|
|
});
|
|
|
- if (res.msg == '成功') {
|
|
|
- wx.navigateBack()
|
|
|
- getCurrentPages().forEach(v => {
|
|
|
- if (v.__route__ == "packageA/saleClue/index") {
|
|
|
- v.getList(true)
|
|
|
- }
|
|
|
+ setTimeout(() => {
|
|
|
+ let pages = getCurrentPages(),
|
|
|
+ page = pages[pages.length - 2];
|
|
|
+ if (page.getList) page.setData({
|
|
|
+ list: page.data.list.filter(v => v.sat_orderclueid != that.data.detail.sat_orderclueid)
|
|
|
})
|
|
|
- }
|
|
|
+ }, 300)
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
break;
|
|
|
case "无效":
|
|
|
+
|
|
|
wx.showModal({
|
|
|
title: '提示',
|
|
|
content: `是否设置该线索为"无效"状态,确定后无法撤销!`,
|
|
|
@@ -300,25 +278,24 @@ Page({
|
|
|
if (confirm) _Http.basic({
|
|
|
id: "20221208100602",
|
|
|
"content": {
|
|
|
- "sat_orderclueid": this.data.detail.sat_orderclueid,
|
|
|
+ "sat_orderclueid": that.data.detail.sat_orderclueid,
|
|
|
+ sat_ordercluefollowuplogid: 0,
|
|
|
"content": "",
|
|
|
"followupmode": "",
|
|
|
"logtype": "无效",
|
|
|
"competitor": ""
|
|
|
}
|
|
|
}).then(res => {
|
|
|
- wx.showToast({
|
|
|
- title: res.msg == '成功' ? `已无效该线索` : res.msg,
|
|
|
- icon: "none"
|
|
|
- });
|
|
|
if (res.msg == '成功') {
|
|
|
- wx.navigateBack()
|
|
|
- getCurrentPages().forEach(v => {
|
|
|
- if (v.__route__ == "packageA/saleClue/index") {
|
|
|
- v.getList(true)
|
|
|
- }
|
|
|
- })
|
|
|
+ that.getDetail();
|
|
|
+ that.selectComponent("#follow").getList(that.data.detail.sat_orderclueid, true)
|
|
|
}
|
|
|
+ setTimeout(() => {
|
|
|
+ wx.showToast({
|
|
|
+ title: res.msg == '成功' ? `操作成功` : res.msg,
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ }, 1000)
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
@@ -330,7 +307,7 @@ Page({
|
|
|
break;
|
|
|
case "跟进":
|
|
|
wx.navigateTo({
|
|
|
- url: `/packageA/saleClue/addFollow?sat_orderclueid=`+this.data.detail.sat_orderclueid
|
|
|
+ url: `/packageA/saleClue/addFollow?sat_orderclueid=` + this.data.detail.sat_orderclueid
|
|
|
})
|
|
|
break;
|
|
|
case "更换负责人":
|