|
|
@@ -5,7 +5,17 @@ Page({
|
|
|
isLeader: false, //是否为负责人
|
|
|
tabsActive: 1, //tabs 选中项
|
|
|
sa_customersid: 0,
|
|
|
-
|
|
|
+ modeList: [{
|
|
|
+ name: '潜在',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '合作中'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '已终止'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ changeMode: false
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
const appAuth = wx.getStorageSync('auth').wCustomer;
|
|
|
@@ -75,6 +85,41 @@ Page({
|
|
|
})
|
|
|
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({
|
|
|
detail
|
|
|
@@ -82,6 +127,11 @@ Page({
|
|
|
let data = this.data.detail,
|
|
|
that = this;
|
|
|
switch (detail.label) {
|
|
|
+ case "更改合作模式":
|
|
|
+ this.setData({
|
|
|
+ changeMode: true
|
|
|
+ })
|
|
|
+ break;
|
|
|
case "退回":
|
|
|
wx.showModal({
|
|
|
title: '提示',
|
|
|
@@ -316,6 +366,10 @@ Page({
|
|
|
icon: "icon-zhuanyi",
|
|
|
label: "更换负责人"
|
|
|
})
|
|
|
+ if (isLeader) tabbarList.push({
|
|
|
+ icon: "icon-dibu-biangengchengjiaozhuangtai",
|
|
|
+ label: "更改合作模式"
|
|
|
+ })
|
|
|
tabbarList.push({
|
|
|
icon: "icon-shanchu",
|
|
|
label: "作废"
|