|
@@ -5,7 +5,17 @@ Page({
|
|
|
isLeader: false, //是否为负责人
|
|
isLeader: false, //是否为负责人
|
|
|
tabsActive: 1, //tabs 选中项
|
|
tabsActive: 1, //tabs 选中项
|
|
|
sa_customersid: 0,
|
|
sa_customersid: 0,
|
|
|
-
|
|
|
|
|
|
|
+ modeList: [{
|
|
|
|
|
+ name: '潜在',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ name: '合作中'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ name: '已终止'
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+ changeMode: false
|
|
|
},
|
|
},
|
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
|
const appAuth = wx.getStorageSync('auth').wCustomer;
|
|
const appAuth = wx.getStorageSync('auth').wCustomer;
|
|
@@ -75,6 +85,41 @@ Page({
|
|
|
})
|
|
})
|
|
|
this.getDetail();
|
|
this.getDetail();
|
|
|
},
|
|
},
|
|
|
|
|
+ modeSelect(e) {
|
|
|
|
|
+ console.log(e)
|
|
|
|
|
+ let {
|
|
|
|
|
+ sa_customersid,
|
|
|
|
|
+ status
|
|
|
|
|
+ } = this.data.detail,
|
|
|
|
|
+ that = this;
|
|
|
|
|
+ wx.showModal({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ content: `是否确定将合作模式更改为:“${e.detail.name}”`,
|
|
|
|
|
+ complete: (res) => {
|
|
|
|
|
+ if (res.cancel) that.modeCancel()
|
|
|
|
|
+ if (res.confirm) _Http.basic({
|
|
|
|
|
+ "id": 20221010164602,
|
|
|
|
|
+ "content": {
|
|
|
|
|
+ "sa_customersids": [sa_customersid],
|
|
|
|
|
+ "status": e.detail.name
|
|
|
|
|
+ }
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ console.log("更改合作状态", res)
|
|
|
|
|
+ wx.showToast({
|
|
|
|
|
+ title: res.msg == '成功' ? '修改成功' : res.msg,
|
|
|
|
|
+ icon: "none"
|
|
|
|
|
+ })
|
|
|
|
|
+ if (res.msg == '成功') that.getDetail()
|
|
|
|
|
+ that.modeCancel()
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ modeCancel() {
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ changeMode: false
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
//详情按钮回调
|
|
//详情按钮回调
|
|
|
tabbarOnClick({
|
|
tabbarOnClick({
|
|
|
detail
|
|
detail
|
|
@@ -82,6 +127,11 @@ Page({
|
|
|
let data = this.data.detail,
|
|
let data = this.data.detail,
|
|
|
that = this;
|
|
that = this;
|
|
|
switch (detail.label) {
|
|
switch (detail.label) {
|
|
|
|
|
+ case "更改合作状态":
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ changeMode: true
|
|
|
|
|
+ })
|
|
|
|
|
+ break;
|
|
|
case "退回":
|
|
case "退回":
|
|
|
wx.showModal({
|
|
wx.showModal({
|
|
|
title: '提示',
|
|
title: '提示',
|
|
@@ -316,6 +366,10 @@ Page({
|
|
|
icon: "icon-zhuanyi",
|
|
icon: "icon-zhuanyi",
|
|
|
label: "更换负责人"
|
|
label: "更换负责人"
|
|
|
})
|
|
})
|
|
|
|
|
+ if (isLeader) tabbarList.push({
|
|
|
|
|
+ icon: "icon-dibu-biangengchengjiaozhuangtai",
|
|
|
|
|
+ label: "更改合作状态"
|
|
|
|
|
+ })
|
|
|
tabbarList.push({
|
|
tabbarList.push({
|
|
|
icon: "icon-shanchu",
|
|
icon: "icon-shanchu",
|
|
|
label: "作废"
|
|
label: "作废"
|
|
@@ -492,5 +546,24 @@ Page({
|
|
|
onReachBottom() {
|
|
onReachBottom() {
|
|
|
this.partialRenewal();
|
|
this.partialRenewal();
|
|
|
},
|
|
},
|
|
|
- onShareAppMessage() {}
|
|
|
|
|
|
|
+ onUnload() {
|
|
|
|
|
+ const page = getCurrentPages().find(v => v.__route__ == 'packageA/setclient/index');
|
|
|
|
|
+ if (!page) return;
|
|
|
|
|
+ let content = JSON.parse(JSON.stringify(page.data.content));
|
|
|
|
|
+ content.pageSize = (content.pageNumber - 1) * content.pageSize;
|
|
|
|
|
+ content.pageNumber = 1;
|
|
|
|
|
+ _Http.basic({
|
|
|
|
|
+ id: '20221012164402',
|
|
|
|
|
+ content
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ console.log("更新客户列表", res);
|
|
|
|
|
+ if (res.msg == '成功') {
|
|
|
|
|
+ page.setData({
|
|
|
|
|
+ list: res.data,
|
|
|
|
|
+ "content.total": res.total
|
|
|
|
|
+ })
|
|
|
|
|
+ page.getTags()
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|