소스 검색

客户添加终止功能

xiaohaizhao 1 년 전
부모
커밋
161d86bb3b
5개의 변경된 파일107개의 추가작업 그리고 32개의 파일을 삭제
  1. 70 7
      packageA/setclient/detail.js
  2. 9 9
      packageA/setclient/detail.wxml
  3. 19 16
      pages/tags/modules/Yl-tags/index.js
  4. 9 0
      static/font-icon.wxss
  5. 0 0
      static/stylesheet.wxss

+ 70 - 7
packageA/setclient/detail.js

@@ -261,6 +261,54 @@ Page({
                     })}&radio=true&principal=true`,
                 })
                 break;
+            case "终止":
+                wx.showModal({
+                    content: getApp().globalData.Language.getMapText('是否确定终止客户合作?'),
+                    cancelText: getApp().globalData.Language.getMapText('取消'),
+                    confirmText: that.data.language['确定'] || '确定终止',
+                    complete: ({
+                        confirm
+                    }) => {
+                        if (confirm) _Http.basic({
+                            "id": 20221010164602,
+                            "content": {
+                                "sa_customersids": [this.data.sa_customersid],
+                                "status": "已终止"
+                            }
+                        }).then(res => {
+                            wx.showToast({
+                                title: res.code == '1' ? getApp().globalData.Language.getMapText('已终止合作状态') : res.msg,
+                                icon: "none"
+                            });
+                            that.getDetail();
+                        })
+                    }
+                })
+                break;
+            case "恢复":
+                wx.showModal({
+                    content: getApp().globalData.Language.getMapText('是否确定恢复客户合作?'),
+                    cancelText: getApp().globalData.Language.getMapText('取消'),
+                    confirmText: that.data.language['确定'] || '确定恢复',
+                    complete: ({
+                        confirm
+                    }) => {
+                        if (confirm) _Http.basic({
+                            "id": 20221010164602,
+                            "content": {
+                                "sa_customersids": [this.data.sa_customersid],
+                                "status": "潜在"
+                            }
+                        }).then(res => {
+                            wx.showToast({
+                                title: res.code == '1' ? getApp().globalData.Language.getMapText('已恢复合作状态') : res.msg,
+                                icon: "none"
+                            });
+                            that.getDetail();
+                        })
+                    }
+                })
+                break;
             case "查看重复":
                 _Http.basic({
                     "id": 20221208172002,
@@ -424,7 +472,7 @@ Page({
             editdataleader = isLeader ? 1 : 0,
             tabbarList = [];
 
-        if (this.data.appAuth.isdatafollowup) tabbarList.push({
+        if (this.data.appAuth.isdatafollowup && detail.status != '已终止') tabbarList.push({
             icon: "icon-genjin",
             label: "跟进"
         });
@@ -441,7 +489,7 @@ Page({
         }
 
         //负责人或管理员基础功能
-        if (isLeader || isAdmin) {
+        if ((isLeader || isAdmin) && detail.status != '已终止') {
             tabbarList.push({
                 icon: "icon-bianji",
                 label: "编辑"
@@ -458,11 +506,26 @@ Page({
                 icon: detail.status == '暂缓' ? "icon-quxiaozanhuan" : "icon-zanhuan",
                 label: detail.status == '暂缓' ? "取消暂缓" : "暂缓"
             })
-            tabbarList.push({
-                icon: "icon-shanchu",
-                label: "作废"
-            })
         }
+
+
+        if (this.data.options.includes('Abort')) {
+            if (detail.status == '已终止') {
+                tabbarList.push({
+                    label: "恢复",
+                    icon: "icon-huifu1"
+                })
+            } else {
+                tabbarList.push({
+                    label: "终止",
+                    icon: "icon-zhongzhi"
+                })
+            }
+        }
+        if (isLeader || isAdmin) tabbarList.push({
+            icon: "icon-shanchu",
+            label: "作废"
+        })
         //来自公海
         if (detail.ispublic == 1) {
             //查询到回收公海客户权限
@@ -630,7 +693,7 @@ Page({
     },
     //更新标签
     getTags() {
-        this.selectComponent("#Tags").getTags();
+        this.selectComponent("#Tags").getTags()
     },
     //更新团队成员
     getGroup() {

+ 9 - 9
packageA/setclient/detail.wxml

@@ -19,25 +19,25 @@
 <!-- 简介 -->
 <Yl_Detail list="{{briefs}}">
     <!-- 团队管理 -->
-    <Yl-group wx:if="{{appAuth.isdatateam}}" id='Group' slot='bottom' add ownertable='sa_customers' ownerid='{{sa_customersid}}' />
+    <Yl-group wx:if="{{appAuth.isdatateam}}" id='Group' slot='bottom' add="{{detail.status != '已终止'}}" ownertable='sa_customers' ownerid='{{sa_customersid}}' />
 </Yl_Detail>
 <view style="height: 20rpx;" />
 <!-- 功能 -->
 <Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">
-    <Trace slot='跟进动态' id='Trace' ownertable='sa_customers' ownerid='{{sa_customersid}}' ownerid1='{{detail.sys_enterpriseid}}' isAdmin="{{per.query(options,'expenseBreakdown')}}" />
-    <Work slot='任务' id='Work' ownertable='sa_customers' ownerid='{{sa_customersid}}' disabled="{{isAdmin||isLeader}}" />
+    <Trace slot='跟进动态' id='Trace' ownertable='sa_customers' ownerid='{{sa_customersid}}' disabled="{{detail.status != '已终止'}}" ownerid1='{{detail.sys_enterpriseid}}' isAdmin="{{per.query(options,'expenseBreakdown')}}" />
+    <Work slot='任务' id='Work' ownertable='sa_customers' ownerid='{{sa_customersid}}' disabled="{{(isAdmin||isLeader) && detail.status != '已终止'}}" />
     <Project slot='项目商机' id="Project" />
     <Preview slot='详细信息' list1='{{list1}}' list2='{{list2}}' />
     <Clue slot='关联线索' id='Clue' disabled="{{false}}" />
-    <Address slot='客户地址' id='Address' disabled="{{per.query(options,'address')||isAdmin||isLeader}}" />
-    <Contacts slot='联系人' id='Contacts' disabled="{{per.query(options,'contact')||isAdmin||isLeader}}" path='/packageA/setclient/modules/contacts/quickly/index' sa_customersid='{{sa_customersid}}' enterprisename='{{detail.enterprisename}}' />
+    <Address slot='客户地址' id='Address' disabled="{{(per.query(options,'address')||isAdmin||isLeader)&& detail.status != '已终止'}}" />
+    <Contacts slot='联系人' id='Contacts' disabled="{{(per.query(options,'contact')||isAdmin||isLeader) && detail.status != '已终止'}}" path='/packageA/setclient/modules/contacts/quickly/index' sa_customersid='{{sa_customersid}}' enterprisename='{{detail.enterprisename}}' />
     <Offers slot='报价单' id='Offers' disabled="{{per.query(options,'offer')||isAdmin||isLeader}}" />
     <Contract slot='合同' id='Contract' />
     <Account slot='账户余额' id='Account' />
-    <Bankcard slot='银行卡信息' id="Bankcard" disabled="{{isAdmin||isLeader}}" />
-    <Financing slot='开票信息' id="Financing" disabled="{{per.query(options,'invoice')||isAdmin||isLeader}}" />
+    <Bankcard slot='银行卡信息' id="Bankcard" disabled="{{(isAdmin||isLeader) && detail.status != '已终止'}}" />
+    <Financing slot='开票信息' id="Financing" disabled="{{(per.query(options,'invoice')||isAdmin||isLeader)&& detail.status != '已终止'}}" />
     <Record slot="操作" id="Record" ownertable='sa_customers' ownerid='{{sa_customersid}}' />
-    <Files slot="附件" id="Files" ownertable='sa_customers' ownerid='{{sa_customersid}}' />
+    <Files slot="附件" id="Files" ownertable='sa_customers' ownerid='{{sa_customersid}}' disabled="{{detail.status != '已终止'}}" />
 </Yl_FunTabs>
 <!-- 底部 -->
 <Yl_Tabbar wx:if="{{tabbarList.length}}" list='{{tabbarList}}' bind:callback="tabbarOnClick" />
@@ -76,4 +76,4 @@
 </van-popup>
 <wxs src='../../utils/wxmlQueryPer.wxs' module="per" />
 <!-- 更换合作模式 -->
-<van-action-sheet show="{{ changeMode }}" actions="{{ modeList }}"cancel-text="{{language['取消']||'取消'}}" bind:select='modeSelect' bind:cancel='modeCancel' bind:click-overlay='modeCancel' z-index='9999999' />
+<van-action-sheet show="{{ changeMode }}" actions="{{ modeList }}" cancel-text="{{language['取消']||'取消'}}" bind:select='modeSelect' bind:cancel='modeCancel' bind:click-overlay='modeCancel' z-index='9999999' />

+ 19 - 16
pages/tags/modules/Yl-tags/index.js

@@ -26,22 +26,25 @@ Component({
     methods: {
         /* 获取标签 */
         getTags() {
-            _Http.basic({
-                "id": 20220929085401,
-                "content": {
-                    nocache: true,
-                    ownertable: this.data.ownertable,
-                    ownerid: this.data.ownerid
-                }
-            }).then(res => {
-                console.log("标签列表", res)
-                if (res.code != '1') return wx.showToast({
-                    title: res.data,
-                    icon: "none"
-                });
-                this.triggerEvent("onGetList", res)
-                this.setData({
-                    ...res.data
+            return new Promise((resolve, reject) => {
+                _Http.basic({
+                    "id": 20220929085401,
+                    "content": {
+                        nocache: true,
+                        ownertable: this.data.ownertable,
+                        ownerid: this.data.ownerid
+                    }
+                }).then(res => {
+                    console.log("标签列表", res)
+                    if (res.code != '1') return wx.showToast({
+                        title: res.data,
+                        icon: "none"
+                    });
+                    resolve(res.code != '1' ? {datatag:[],option:[],systemtag:[]} : res.data)
+                    this.triggerEvent("onGetList", res)
+                    this.setData({
+                        ...res.data
+                    })
                 })
             })
         },

+ 9 - 0
static/font-icon.wxss

@@ -9,6 +9,15 @@
     -moz-osx-font-smoothing: grayscale;
 }
 
+
+.icon-huifu1:before {
+  content: "\e709";
+}
+
+.icon-zhongzhi:before {
+  content: "\e70a";
+}
+
 .icon-quxiaozanhuan:before {
   content: "\e704";
 }

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
static/stylesheet.wxss


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.