xiaohaizhao пре 1 година
родитељ
комит
14b1d802b6
34 измењених фајлова са 88 додато и 305 уклоњено
  1. 1 1
      components/Yl_Detail/index.wxml
  2. 1 1
      components/Yl_ReportForms/index.wxml
  3. 4 2
      packageA/activity/detail.js
  4. 2 2
      packageA/activity/modules/clue/list/index.wxml
  5. 2 16
      packageA/activity/modules/list/index.wxml
  6. 4 2
      packageA/contract/detail.js
  7. 1 1
      packageA/contract/modules/list/index.wxml
  8. 0 15
      packageA/contract/modules/type.wxs
  9. 1 2
      packageA/finishforecast/detail.wxml
  10. 0 11
      packageA/finishforecast/modules/getColor.wxs
  11. 2 3
      packageA/finishforecast/modules/list/index.wxml
  12. 1 2
      packageA/invoiceforecast/detail.wxml
  13. 2 3
      packageA/invoiceforecast/modules/list/index.wxml
  14. 2 12
      packageA/offers/detail.js
  15. 2 16
      packageA/offers/modules/history/list/index.wxml
  16. 2 16
      packageA/offers/modules/list/index.wxml
  17. 2 12
      packageA/project/detail.js
  18. 3 0
      packageA/project/modules/list/index.js
  19. 2 28
      packageA/project/modules/list/index.wxml
  20. 8 4
      packageA/publicClue/detail.js
  21. 1 15
      packageA/publicClue/modules/list/list.wxml
  22. 4 2
      packageA/publicCustomer/detail.js
  23. 8 4
      packageA/saleAdmin/detail.js
  24. 3 19
      packageA/saleAdmin/modules/list/index.wxml
  25. 8 4
      packageA/saleClue/detail.js
  26. 2 22
      packageA/saleClue/modules/clue/list/index.wxml
  27. 2 18
      packageA/saleClue/modules/list/list.wxml
  28. 4 2
      packageA/salesForecasting/detail.js
  29. 1 15
      packageA/salesForecasting/modules/list/index.wxml
  30. 2 17
      packageA/select/clue/select.wxml
  31. 3 2
      packageA/setclient/detail.js
  32. 2 18
      packageA/setclient/modules/clue/list/index.wxml
  33. 4 2
      packageA/work/detail.js
  34. 2 16
      packageA/work/modules/list/index.wxml

+ 1 - 1
components/Yl_Detail/index.wxml

@@ -2,7 +2,7 @@
     <slot name='top' />
     <view class="row" wx:for="{{list}}" wx:key="index">
         <view style="color:{{item.labelColor||'#666666'}};" class="label">{{language[item.label]||item.label}}:</view>
-        <view style="color:{{item.color||'#666666'}};" class="value">{{language[item.value]||item.value||'--'}}</view>
+        <view style="{{item.style || ''}}" class="value">{{language[item.value]||item.value||'--'}}</view>
     </view>
     <slot name='bottom' />
 </view>

+ 1 - 1
components/Yl_ReportForms/index.wxml

@@ -2,7 +2,7 @@
     <van-transition show="{{ showAll || item.value }}" name="fade" custom-class="block">
         <navigator url="#" class="box" bindtap="clickItem" data-item="{{item}}">
             <view class="label">{{language[item.label]||item.label}}</view>
-            <view class="value" style="color:{{item.color||'#333'}} ;">{{language[item.value]||item.value||'--'}}</view>
+            <view class="value" style="{{item.style || ''}}">{{language[item.value]||item.value||'--'}}</view>
             <view class="replenish" catchtap="clickRep" data-item="{{item}}" wx:if="{{item.slot}}">
                 <slot name='{{item.slot}}' />
             </view>

+ 4 - 2
packageA/activity/detail.js

@@ -70,7 +70,8 @@ Page({
                     value: res.data.director
                 }, {
                     label: "状态",
-                    value: getApp().globalData.Language.getMapText(res.data.status)
+                    value: getApp().globalData.Language.getMapText(res.data.status),
+                    style:`color:${this.data.sColors[res.data.status]}`
                 }],
                 list1: [{
                     label: "市场活动名称",
@@ -86,7 +87,8 @@ Page({
                     value: res.data.address
                 }, {
                     label: "状态",
-                    value: getApp().globalData.Language.getMapText(res.data.status)
+                    value: getApp().globalData.Language.getMapText(res.data.status),
+                    style:`color:${this.data.sColors[res.data.status]}`
                 }, {
                     label: "开始时间",
                     value: res.data.begdate

+ 2 - 2
packageA/activity/modules/clue/list/index.wxml

@@ -4,7 +4,7 @@
     </view>
     <view>{{language['联系人']||'联系人'}}:{{item.name||" --"}}</view>
     <view class="line-1">{{language['手机号']||'手机号'}}:{{item.phonenumber}}</view>
-    <view>{{language['分配状态']||'分配状态'}}:{{item.allocationstatus ? item.allocationstatus : '--'}}</view>
-    <view>{{language['跟进状态']||'跟进状态'}}:{{item.status ? item.status : '--'}}</view>
+    <view>{{language['分配状态']||'分配状态'}}:<text style="color:{{sColors[item.allocationstatus]}};">{{item.allocationstatus ? item.allocationstatus : '--'}}</text></view>
+    <view>{{language['跟进状态']||'跟进状态'}}:<text style="color:{{sColors[item.status]}};">{{item.status ? item.status : '--'}}</text></view>
     <view>{{language['负责人']||'负责人'}}:{{item.leader[0] ? item.leader[0].name : '--'}}</view>
 </navigator>

+ 2 - 16
packageA/activity/modules/list/index.wxml

@@ -2,25 +2,11 @@
 <navigator class="offer-list" url="/packageA/activity/detail?id={{item.sat_campaignid}}" wx:for="{{list}}" wx:key="sat_campaignid">
     <view class="title">
         <text class="line-1">{{item.name}}</text>
-        <view class="status" style="background-color: {{backColor.getColor(item.status)}};">{{language[item.status]||item.status}}</view>
+        <view class="status" style="background-color: {{sColors[item.status]}};">{{language[item.status]||item.status}}</view>
     </view>
     <view class="exp line-1">{{language['活动类型']||'活动类型'}}:<text>{{language[item.type]||item.type}}</text></view>
     <view class="exp line-1">{{language['线索数']||'线索数'}}:<text>{{item.ordercluecount}}</text></view>
     <view class="exp line-1">{{language['负责人']||'负责人'}}:<text>{{item.leader[0].name|| '--'}}</text></view>
 </navigator>
 
-<My_empty wx:if="{{list.length == 0}}" />
-
-<wxs module="backColor">
-    module.exports.getColor = function (status) {
-        var color = null;
-        if (status == '新建') {
-            color = '#3874F6';
-        } else if (status == '发布') {
-            color = '#67C23A';
-        } else {
-            color = '#cccccc';
-        };
-        return color
-    }
-</wxs>
+<My_empty wx:if="{{list.length == 0}}" />

+ 4 - 2
packageA/contract/detail.js

@@ -283,7 +283,8 @@ Page({
                 value: data.signdate
             }, {
                 label: "状态",
-                value: getApp().globalData.Language.getMapText(data.status)
+                value: getApp().globalData.Language.getMapText(data.status),
+                style:`color:${this.data.sColors[data.status]}`
             }],
             list1 = [{
                 label: "合同标题",
@@ -311,7 +312,8 @@ Page({
                 value: data.leader[0].name
             }, {
                 label: "状态",
-                value: getApp().globalData.Language.getMapText(data.status)
+                value: getApp().globalData.Language.getMapText(data.status),
+                style:`color:${this.data.sColors[data.status]}`
             }];
         if (data.typemx) {
             briefs.splice(3, 0, {

+ 1 - 1
packageA/contract/modules/list/index.wxml

@@ -2,7 +2,7 @@
 <navigator class="offer-list" url="/packageA/contract/detail?id={{item.sa_contractid}}" wx:for="{{list}}" wx:key="billno">
     <view class="title">
         <text class="line-1">{{item.title}}</text>
-        <view class="status" style="background-color: {{handle.getColor(item.status)}};">{{language[item.status]||item.status}}</view>
+        <view class="status" style="background-color: {{sColors[item.status]}};">{{language[item.status]||item.status}}</view>
     </view>
     <view class="tag-box">
         <view class="systemtag" wx:for="{{item.tags.systemtag}}" wx:key="item">{{language[item]||item}}</view>

+ 0 - 15
packageA/contract/modules/type.wxs

@@ -1,19 +1,4 @@
 module.exports = {
-    getColor: function (status) {
-        var color = null;
-        if (status == '新建') {
-            color = '#3874F6';
-        } else if (status == '已提交') {
-            color = '#52C41A';
-        } else if (status == '已终止') {
-            color = '#BBB';
-        } else if (status == '已过期') {
-            color = '#BBB';
-        } else {
-            color = '#FA8C16';
-        };
-        return color
-    },
     getType: function (type) {
         var result = "";
         switch (type) {

+ 1 - 2
packageA/finishforecast/detail.wxml

@@ -13,7 +13,7 @@
         <view class="row">{{language['部门']||'部门'}}:{{detail.depname||' --'}}</view>
         <view class="row">{{language['预测时间']||'预测时间'}}:{{detail.periodstart}} {{language['至']||'至'}} {{detail.periodend}}</view>
         <view class="row">{{language['预测金额']||'预测金额'}}:<text style="color: #F60909;">{{detail.projectamount}}</text></view>
-        <view class="row" style="margin-bottom: 8rpx;">{{language['状态']||'状态'}}:<text style="color:{{backColor.getColor(detail.status)}};">{{language[detail.status]||detail.status}}</text></view>
+        <view class="row" style="margin-bottom: 8rpx;">{{language['状态']||'状态'}}:<text style="color:{{sColors[detail.status]}};">{{language[detail.status]||detail.status}}</text></view>
         <Yl-group wx:if="{{isdatateam}}" add id='Group' ownertable='sa_salesforecastbill' ownerid='{{sa_salesforecastbillid}}' />
     </view>
     <view style="height: 20rpx;" />
@@ -25,7 +25,6 @@
         <Work slot='任务' id='Work' ownertable='sa_salesforecastbill' ownerid='{{sa_salesforecastbillid}}' disabled="{{(detail.status=='进行中'|| detail.status=='未开始') && isLeader}}" />
     </Yl_FunTabs>
     <Yl_Tabbar wx:if="{{(detail.status=='进行中'|| detail.status=='未开始') && isLeader}}" list='{{tabbarList}}' bind:callback="tabbarOnClick" />
-    <wxs src="./modules/getColor.wxs" module="backColor" />
 </view>
 
 <view hidden="{{pageIndex!=1}}">

+ 0 - 11
packageA/finishforecast/modules/getColor.wxs

@@ -1,11 +0,0 @@
-module.exports.getColor = function (status) {
-    var color = null;
-    if (status == '未开始') {
-        color = 'var(--warning)';
-    } else if (status == '进行中') {
-        color = '#67C23A';
-    } else if (status == '已截止') {
-        color = '#999999';
-    };
-    return color
-}

+ 2 - 3
packageA/finishforecast/modules/list/index.wxml

@@ -1,7 +1,7 @@
 <navigator url="/packageA/finishforecast/detail?id={{item.sa_salesforecastbillid}}&admin={{admin}}" class="box" wx:for="{{list}}" wx:key="sa_salesforecastbillid">
     <view class="title">
         {{item.title}}
-        <view class="status" style="background-color:{{backColor.getColor(item.status)}};">
+        <view class="status" style="background-color:{{sColors[item.status]}};">
             {{language[item.status]||item.status}}
         </view>
     </view>
@@ -24,5 +24,4 @@
     </view>
 </navigator>
 
-<My_empty wx:if="{{!list.length}}" />
-<wxs src="../getColor.wxs" module="backColor" />
+<My_empty wx:if="{{!list.length}}" />

+ 1 - 2
packageA/invoiceforecast/detail.wxml

@@ -13,7 +13,7 @@
         <view class="row">{{language['预测时间']||'预测时间'}}:{{detail.periodstart}} {{language['至']||'至'}} {{detail.periodend}}</view>
         <view class="row">{{language['出货预测金额']||'出货预测金额'}}:<text style="color: #F60909;">{{detail.orderoutamount}}</text></view>
         <view class="row">{{language['开票预测金额']||'开票预测金额'}}:<text style="color: #F60909;">{{detail.orderinvoamount}}</text></view>
-        <view class="row" style="margin-bottom: 10rpx;">{{language['状态']||'状态'}}:<text style="color:{{backColor.getColor(detail.status)}};">{{language[detail.status]||detail.status}}</text></view>
+        <view class="row" style="margin-bottom: 10rpx;">{{language['状态']||'状态'}}:<text style="color:{{sColors[detail.status]}};">{{language[detail.status]||detail.status}}</text></view>
         <Yl-group wx:if="{{isdatateam}}" add id='Group' ownertable='sa_salesforecastbill' ownerid='{{sa_salesforecastbillid}}' />
     </view>
     <view style="height: 20rpx;" />
@@ -26,7 +26,6 @@
         <Files slot='附件' id="Files" ownertable='sa_salesforecastbill' disabled="{{(detail.status=='进行中'|| detail.status=='未开始') && isLeader}}" ownerid='{{sa_salesforecastbillid}}' />
         <Work slot='任务' id='Work' ownertable='sa_salesforecastbill' ownerid='{{sa_salesforecastbillid}}' disabled="{{(detail.status=='进行中'|| detail.status=='未开始') && isLeader}}" />
     </Yl_FunTabs>
-    <wxs src="../finishforecast/modules/getColor.wxs" module="backColor" />
 </view>
 
 <view hidden="{{pageIndex!=1}}">

+ 2 - 3
packageA/invoiceforecast/modules/list/index.wxml

@@ -1,7 +1,7 @@
 <navigator url="/packageA/invoiceforecast/detail?id={{item.sa_salesforecastbillid}}&admin={{admin}}" class="box" wx:for="{{list}}" wx:key="sa_salesforecastbillid">
     <view class="title">
         {{item.title}}
-        <view class="status" style="background-color:{{backColor.getColor(item.status)}};">
+        <view class="status" style="background-color:{{sColors[item.status]}};">
             {{language[item.status]||item.status}}
         </view>
     </view>
@@ -29,5 +29,4 @@
     </view>
 </navigator>
 
-<My_empty wx:if="{{!list.length}}" />
-<wxs src="../../../finishforecast/modules/getColor.wxs" module="backColor" />
+<My_empty wx:if="{{!list.length}}" />

+ 2 - 12
packageA/offers/detail.js

@@ -112,12 +112,7 @@ Page({
         }, {
             label: "状态",
             value: getApp().globalData.Language.getMapText(res.data.status),
-            color: {
-                新建: '#3874f6',
-                提交: '#67C23A',
-                审核: '#e6a23c',
-                复核: '#e6a23c',
-            } [res.data.status] || ""
+            style:`color:${this.data.sColors[res.data.status]}`
         }];
         //客户报价移除项目字段
         if (res.data.quotedpricetype == '客户报价') briefs.splice(1, 1);
@@ -172,12 +167,7 @@ Page({
         }, {
             label: "状态",
             value: getApp().globalData.Language.getMapText(res.data.status),
-            color: {
-                新建: '#3874f6',
-                提交: '#67C23A',
-                审核: '#e6a23c',
-                复核: '#e6a23c',
-            } [res.data.status] || ""
+            style:`color:${this.data.sColors[res.data.status]}`
         }, {
             label: "负责人",
             value: res.data.leader.length ? res.data.leader[0].name : ""

+ 2 - 16
packageA/offers/modules/history/list/index.wxml

@@ -2,7 +2,7 @@
 <navigator class="offer-list" data-id="{{item.sa_quotedpriceid}}" bindtap="toDetail" wx:for="{{list}}" wx:key="billno">
     <view class="title">
         <text class="line-1">{{language['单号']||'单号'}}:{{item.billno}}</text>
-        <view class="status" style="background-color: {{backColor.getColor(item.status)}};">{{language[item.status]||item.status}}</view>
+        <view class="status" style="background-color: {{sColors[item.status]}};">{{language[item.status]||item.status}}</view>
     </view>
     <view class="tag-box">
         <van-tag custom-class='tag' color='#FA8C16' text-color='#fff' round>{{language[item.quotedpricetype]||item.quotedpricetype}}</van-tag>
@@ -13,18 +13,4 @@
     <view class="exp line-1">{{language['报价日期']||'报价日期'}}:<text>{{item.billdate}}</text></view>
     <view class="exp line-1">{{language['特价']||'特价'}}:<text>{{language[item.specialoffer==1?'是':'否']||item.specialoffer==1?'是':'否'}}</text></view>
     <van-button custom-class='copy' data-item="{{item}}" catch:tap='copyItem'>{{language['复制']||'复制'}}</van-button>
-</navigator>
-
-<wxs module="backColor">
-    module.exports.getColor = function (status) {
-        var color = null;
-        if (status == '新建') {
-            color = '#3874F6';
-        } else if (status == '提交') {
-            color = '#52C41A';
-        } else {
-            color = '#FA8C16';
-        };
-        return color
-    }
-</wxs>
+</navigator>

+ 2 - 16
packageA/offers/modules/list/index.wxml

@@ -2,7 +2,7 @@
 <navigator class="offer-list" url="/packageA/offers/detail?sa_quotedpriceid={{item.sa_quotedpriceid}}" wx:for="{{list}}" wx:key="billno">
     <view class="title">
         <text class="line-1">{{language['单号']||'单号'}}:{{item.billno}}</text>
-        <view class="status" style="background-color: {{backColor.getColor(item.status)}};">{{language[item.status]||item.status}}</view>
+        <view class="status" style="background-color: {{sColors[item.status]}};">{{language[item.status]||item.status}}</view>
     </view>
     <view class="tag-box">
         <van-tag custom-class='tag' color='#FA8C16' text-color='#fff' round>{{language[item.quotedpricetype]||item.quotedpricetype}}</van-tag>
@@ -13,18 +13,4 @@
     <view class="exp line-1">{{language['客户']||'客户'}}:<text>{{item.enterprisename||' --'}}</text></view>
     <view class="exp line-1">{{language['报价日期']||'报价日期'}}:<text>{{item.billdate}}</text></view>
     <view class="exp line-1">{{language['是否特价']||'是否特价'}}:<text>{{language[item.specialoffer==1?'是':'否']||item.specialoffer==1?'是':'否'}}</text></view>
-</navigator>
-
-<wxs module="backColor">
-    module.exports.getColor = function (status) {
-        var color = null;
-        if (status == '新建') {
-            color = '#3874F6';
-        } else if (status == '提交') {
-            color = '#67C23A';
-        } else {
-            color = '#e6a23c';
-        };
-        return color
-    }
-</wxs>
+</navigator>

+ 2 - 12
packageA/project/detail.js

@@ -198,12 +198,7 @@ Page({
         }, {
             label: "项目状态",
             value: getApp().globalData.Language.getMapText(data.status),
-            color: {
-                跟进中: '#3874f6',
-                已成交: '#67C23A',
-                已失败: '#F56C6C',
-                已结案: '#cccccc',
-            } [data.status] || ""
+            style:`color:${this.data.sColors[data.status]}`
         }, {
             label: "结案/失败原因",
             value: data.status == '已结案' ? data.endreason : data.defeattype + (data.defeatreason ? "," + data.defeatreason : data.defeatreason)
@@ -233,12 +228,7 @@ Page({
             }, {
                 label: "状态",
                 value: getApp().globalData.Language.getMapText(data.status),
-                color: {
-                    跟进中: '#3874f6',
-                    已成交: '#67C23A',
-                    已失败: '#F56C6C',
-                    已结案: '#cccccc',
-                } [data.status] || ""
+                style:`color:${this.data.sColors[data.status]}`
             }, {
                 label: '营销费用',
                 value: CNY(data.salesfeesamount || '0')

+ 3 - 0
packageA/project/modules/list/index.js

@@ -4,6 +4,9 @@ Component({
             type: Array
         }
     },
+    data: {
+        sColors: {}
+    },
     lifetimes: {
         attached: function () {
             getApp().globalData.Language.getLanguagePackage(this)

+ 2 - 28
packageA/project/modules/list/index.wxml

@@ -12,7 +12,7 @@
     <view class="main">
         <view class="label">
             <view class="title line-1">{{item.projectname}}</view>
-            <view class="state" style="background-color: {{render.getColor(item.status)}};">{{language[item.status]||item.status}}</view>
+            <view class="state" style="background-color: {{sColors[item.status]}};">{{language[item.status]||item.status}}</view>
         </view>
         <view class="tag-box">
             <view class="systemtag" wx:for="{{item.tags.systemtag}}" wx:key="item">{{language[item]||item}}</view>
@@ -36,7 +36,7 @@
         </view>
         <view class="replenish">
             <text style="color: #666;">{{language['报备进度']||'报备进度'}}:</text>
-            <text style="color: {{render.getColor1(item.reportstatus)}};">{{language[item.reportstatus]||item.reportstatus||'--'}}</text>
+            <text style="color: {{sColors[item.reportstatus]}};">{{language[item.reportstatus]||item.reportstatus||'--'}}</text>
         </view>
         <view class="leader">
             <image src="{{item.leader[0].headpic}}" wx:if="{{item.leader[0].headpic}}" mode="aspectFill" />
@@ -58,32 +58,6 @@
             if (rate - 0 >= 50) {
                 return 'transform: rotate(' + 3.6 * (rate - 50) + 'deg);';
             }
-        },
-        getColor: function (status) {
-            var color = null;
-            if (status == '跟进中') {
-                color = '#3874f6';
-            } else if (status == '已成交') {
-                color = '#67C23A';
-            } else if (status == '已失败') {
-                color = ' #F56C6C';
-            } else {
-                color = '#cccccc';
-            };
-            return color
-        },
-        getColor1: function (status) {
-            var color = null;
-            if (status == '未报备') {
-                color = '#3874f6';
-            } else if (status == '报备中') {
-                color = '#e6a23c';
-            } else if (status == '已报备') {
-                color = ' #67c23a';
-            } else {
-                color = '#cccccc';
-            };
-            return color
         }
     }
 </wxs>

+ 8 - 4
packageA/publicClue/detail.js

@@ -131,10 +131,12 @@ Page({
                 value: res.data.uppictured
             }, {
                 label: '分配状态',
-                value: res.data.allocationstatus
+                value: res.data.allocationstatus,
+                style:`color:${this.data.sColors[res.data.allocationstatus]}`
             }, {
                 label: '跟进状态',
-                value: getApp().globalData.Language.getMapText(res.data.status)
+                value: getApp().globalData.Language.getMapText(res.data.status),
+                style:`color:${this.data.sColors[res.data.status]}`
             }];
             if (wx.getStorageSync('userMsg').siteid == 'HY') list1 = list1.filter(v => !["项目预算(万元)", "总投资额(万元)", "造价(万元)"].includes(v.label))
 
@@ -159,11 +161,13 @@ Page({
                     },
                     {
                         label: '分配状态',
-                        value: res.data.allocationstatus
+                        value: res.data.allocationstatus,
+                        style:`color:${this.data.sColors[res.data.allocationstatus]}`
                     },
                     {
                         label: '跟进状态',
-                        value: getApp().globalData.Language.getMapText(res.data.status)
+                        value: getApp().globalData.Language.getMapText(res.data.status),
+                        style:`color:${this.data.sColors[res.data.status]}`
                     },
                     {
                         label: '跟进次数',

+ 1 - 15
packageA/publicClue/modules/list/list.wxml

@@ -17,18 +17,4 @@
     <van-button wx:if="{{allot && item.allocationstatus=='待分配'}}" custom-class='action' catchtap="distribution" data-item="{{item}}">{{language['分配']||'分配'}}</van-button>
 </navigator>
 
-<My_empty wx:if="{{list.length == 0}}" />
-
-<wxs module="backColor">
-    module.exports.getColor = function (status) {
-        var color = null;
-        if (status == '待分配') {
-            color = '#FA8C16';
-        } else if (status == '待跟进') {
-            color = '#52C41A';
-        } else {
-            color = '#F60909';
-        };
-        return color
-    }
-</wxs>
+<My_empty wx:if="{{list.length == 0}}" />

+ 4 - 2
packageA/publicCustomer/detail.js

@@ -360,13 +360,15 @@ Page({
             value: res.data.sourcepoolname
         }, {
             label: "成交状态",
-            value: res.data.tradingstatus
+            value: res.data.tradingstatus,
+            style:`color:${this.data.sColors[res.data.tradingstatus]}`
         }, {
             label: "成交次数",
             value: res.data.contact_signnum
         }, {
             label: "合作状态",
-            value: getApp().globalData.Language.getMapText(res.data.status)
+            value: getApp().globalData.Language.getMapText(res.data.status),
+            style:`color:${this.data.sColors[res.data.status]}`
         }];
         /* 系统信息 */
         let list2 = [{

+ 8 - 4
packageA/saleAdmin/detail.js

@@ -164,10 +164,12 @@ Page({
                 value: res.data.uppictured
             }, {
                 label: '分配状态',
-                value: res.data.allocationstatus
+                value: res.data.allocationstatus,
+                style:`color:${this.data.sColors[res.data.allocationstatus]}`
             }, {
                 label: '跟进状态',
-                value: getApp().globalData.Language.getMapText(res.data.status)
+                value: getApp().globalData.Language.getMapText(res.data.status),
+                style:`color:${this.data.sColors[res.data.status]}`
             }];
             if (wx.getStorageSync('userMsg').siteid == 'HY') list1 = list1.filter(v => !["项目预算(万元)", "总投资额(万元)", "造价(万元)"].includes(v.label))
             this.setData({
@@ -191,11 +193,13 @@ Page({
                     },
                     {
                         label: '分配状态',
-                        value: res.data.allocationstatus
+                        value: res.data.allocationstatus,
+                        style:`color:${this.data.sColors[res.data.allocationstatus]}`
                     },
                     {
                         label: '跟进状态',
-                        value: getApp().globalData.Language.getMapText(res.data.status)
+                        value: getApp().globalData.Language.getMapText(res.data.status),
+                        style:`color:${this.data.sColors[res.data.status]}`
                     },
                     {
                         label: '跟进次数',

+ 3 - 19
packageA/saleAdmin/modules/list/index.wxml

@@ -1,7 +1,7 @@
 <navigator class="offer-list" url="/packageA/saleAdmin/detail?id={{item.sat_orderclueid}}" wx:for="{{list}}" wx:key="sat_orderclueid">
     <view class="title">
         <text class="line-1">{{item.enterprisename_customer || " --"}}</text>
-        <view class="status" style="background-color: {{backColor.getColor(item.status)}};">{{language[item.status]||item.status}}</view>
+        <view class="status" style="background-color: {{sColors[item.status]}};">{{language[item.status]||item.status}}</view>
     </view>
 
     <view class="tag-box">
@@ -13,25 +13,9 @@
     <view class="exp line-1">{{language['联系方式']||'联系方式'}}:<text>{{item.phonenumber || '--'}}</text></view>
     <view class="exp line-1">{{language['领域']||'领域'}}:<text>{{item.tradefield || '--'}}</text></view>
     <view class="exp line-1">{{language['市场活动']||'市场活动'}}:{{item.campaign_name||"--"}}</view>
-    <view class="exp line-1">{{language['分配状态']||'分配状态'}}:{{item.allocationstatus||"--"}}</view>
+    <view class="exp line-1">{{language['分配状态']||'分配状态'}}:<text style="color:{{sColors[item.allocationstatus]}} ;">{{item.allocationstatus||"--"}}</text></view>
     <van-button wx:if="{{allot && item.allocationstatus=='待分配'}}" custom-class='action' catchtap="distribution" data-item="{{item}}">{{language['分配']||'分配'}}</van-button>
 
 </navigator>
 
-<My_empty wx:if="{{list.length == 0}}" />
-
-<wxs module="backColor">
-    module.exports.getColor = function (status) {
-        var color = null;
-        if (status == '待跟进') {
-            color = '#3874f6';
-        } else if (status == '跟进中') {
-            color = '#67C23A';
-        } else if (status == '已转化') {
-            color = '#e6A23c';
-        } else {
-            color = '#999999';
-        };
-        return color
-    }
-</wxs>
+<My_empty wx:if="{{list.length == 0}}" />

+ 8 - 4
packageA/saleClue/detail.js

@@ -143,10 +143,12 @@ Page({
                 value: res.data.uppictured
             }, {
                 label: '分配状态',
-                value: res.data.allocationstatus
+                value: res.data.allocationstatus,
+                style:`color:${this.data.sColors[res.data.allocationstatus]}`
             }, {
                 label: '跟进状态',
-                value: getApp().globalData.Language.getMapText(res.data.status)
+                value: getApp().globalData.Language.getMapText(res.data.status),
+                style:`color:${this.data.sColors[res.data.status]}`
             }];
             if (wx.getStorageSync('userMsg').siteid == 'HY') list1 = list1.filter(v => !["项目预算(万元)", "总投资额(万元)", "造价(万元)"].includes(v.label))
 
@@ -170,10 +172,12 @@ Page({
                     value: res.data.leader && res.data.leader.length > 0 ? res.data.leader[0].name : ''
                 }, {
                     label: '分配状态',
-                    value: res.data.allocationstatus
+                    value: res.data.allocationstatus,
+                    style:`color:${this.data.sColors[res.data.allocationstatus]}`
                 }, {
                     label: '跟进状态',
-                    value: getApp().globalData.Language.getMapText(res.data.status)
+                    value: getApp().globalData.Language.getMapText(res.data.status),
+                    style:`color:${this.data.sColors[res.data.status]}`
                 }, {
                     label: '跟进次数',
                     value: res.data.followcount || '0'

+ 2 - 22
packageA/saleClue/modules/clue/list/index.wxml

@@ -1,32 +1,12 @@
 <view class="offer-list" wx:for="{{list}}" wx:key="sat_orderclueid">
     <view class="title">
         <text class="line-1">{{item.enterprisename || " --"}}</text>
-        <view class="status" style="background-color: {{backColor.getColor(item.status)}};">{{language[item.status]||item.status}}</view>
+        <view class="status" style="background-color: {{sColors[item.status]}};">{{language[item.status]||item.status}}</view>
     </view>
-    <!--     <view class="tag-box">
-        <view class="systemtag" wx:for="{{item.tags.systemtag}}" wx:key="item">{{language[item]||item}}</view>
-        <view class="datatag" wx:for="{{item.tags.datatag}}" wx:key="item">{{language[item]||item}}</view>
-    </view> -->
     <view class="exp line-1">{{language['联系人']||'联系人'}}:<text>{{item.name ? item.name : '--'}}</text></view>
     <view class="exp line-1">{{language['联系方式']||'联系方式'}}:<text>{{item.phonenumber || '--'}}</text></view>
     <view class="exp line-1">{{language['联系方式']||'联系方式'}}:<text>{{item.leader || '--'}}</text></view>
     <view class="exp line-1">{{language['来源站点']||'来源站点'}}:<text>{{item.sitename || '--'}}</text></view>
 </view>
 
-<My_empty wx:if="{{list.length == 0}}" />
-
-<wxs module="backColor">
-    module.exports.getColor = function (status) {
-        var color = null;
-        if (status == '待跟进') {
-            color = '#FA8C16';
-        } else if (status == '跟进中') {
-            color = '#52C41A';
-        } else if (status == '已转化') {
-            color = '#F60909';
-        } else {
-            color = '#BBBBBB';
-        };
-        return color
-    }
-</wxs>
+<My_empty wx:if="{{list.length == 0}}" />

+ 2 - 18
packageA/saleClue/modules/list/list.wxml

@@ -1,7 +1,7 @@
 <navigator class="offer-list" url="/packageA/saleClue/detail?sat_orderclueid={{item.sat_orderclueid}}" wx:for="{{list}}" wx:key="sat_orderclueid">
     <view class="title">
         <text class="line-1">{{item.enterprisename_customer || " --"}}</text>
-        <view class="status" style="background-color: {{backColor.getColor(item.status)}};">{{language[item.status]||item.status}}</view>
+        <view class="status" style="background-color: {{sColors[item.status]}};">{{language[item.status]||item.status}}</view>
     </view>
 
     <view class="tag-box">
@@ -17,20 +17,4 @@
 
 </navigator>
 
-<My_empty wx:if="{{list.length == 0}}" />
-
-<wxs module="backColor">
-    module.exports.getColor = function (status) {
-        var color = null;
-        if (status == '待跟进') {
-            color = '#3874f6';
-        } else if (status == '跟进中') {
-            color = '#67C23A';
-        } else if (status == '已转化') {
-            color = '#e6A23c';
-        } else {
-            color = '#999999';
-        };
-        return color
-    }
-</wxs>
+<My_empty wx:if="{{list.length == 0}}" />

+ 4 - 2
packageA/salesForecasting/detail.js

@@ -87,7 +87,8 @@ Page({
                 value: data.createby
             }, {
                 label: "状态",
-                value: getApp().globalData.Language.getMapText(data.status)
+                value: getApp().globalData.Language.getMapText(data.status),
+                style:`color:${this.data.sColors[data.status]}`
             }],
             list1: [{
                 label: "提报类型",
@@ -106,7 +107,8 @@ Page({
                 value: data.sumamount
             }, {
                 label: "状态",
-                value: getApp().globalData.Language.getMapText(data.status)
+                value: getApp().globalData.Language.getMapText(data.status),
+                style:`color:${this.data.sColors[data.status]}`
             }],
             list2: [{
                 label: "提报人",

+ 1 - 15
packageA/salesForecasting/modules/list/index.wxml

@@ -2,7 +2,7 @@
 <navigator class="offer-list" url="/packageA/salesForecasting/detail?sa_salesforecastbillid={{item.sa_salesforecastbillid}}" wx:for="{{list}}" wx:key="billnum">
     <view class="title">
         <text class="line-1">{{language['单号']||'单号'}}:{{item.billnum}}</text>
-        <view class="status" style="background-color: {{backColor.getColor(item.status)}};">{{language[item.status]||item.status}}</view>
+        <view class="status" style="background-color: {{sColors[item.status]}};">{{language[item.status]||item.status}}</view>
     </view>
     <view class="tag-box">
         <van-tag custom-class='tag' wx:for="{{item.tags.systemtag}}" wx:key="index" wx:for-item='tag' color='#FA8C16' text-color='#fff' round>{{language[tag]||tag}}</van-tag>
@@ -13,17 +13,3 @@
     <view class="exp line-1">{{language['提报截止时间']||'提报截止时间'}}:<text>{{item.periodend||' --'}}</text></view>
     <view class="exp line-1">{{language['预测金额']||'预测金额'}}:<text>{{item.amount}}</text></view>
 </navigator>
-
-<wxs module="backColor">
-    module.exports.getColor = function (status) {
-        var color = null;
-        if (status == '待提报') {
-            color = '#3874F6';
-        } else if (status == '提报中') {
-            color = '#52C41A';
-        } else {
-            color = '#BBBBBB';
-        };
-        return color
-    }
-</wxs>

+ 2 - 17
packageA/select/clue/select.wxml

@@ -10,7 +10,7 @@
             <view class="mian">
                 <view class="title line-1">
                     <text class="line-1">{{item.enterprisename_customer || " --"}}</text>
-                    <view class="status" style="background-color: {{backColor.getColor(item.status)}};">{{language[item.status]||item.status}}</view>
+                    <view class="status" style="background-color: {{sColors[item.status]}};">{{language[item.status]||item.status}}</view>
                 </view>
                 <view class="tag-box">
                     <view class="systemtag" wx:for="{{item.tags.systemtag}}" wx:key="item">{{language[item]||item}}</view>
@@ -45,19 +45,4 @@
             },
         }
     </wxs>
-</block>
-<wxs module="backColor">
-    module.exports.getColor = function (status) {
-        var color = null;
-        if (status == '待跟进') {
-            color = '#FA8C16';
-        } else if (status == '跟进中') {
-            color = '#52C41A';
-        } else if (status == '已转化') {
-            color = '#F60909';
-        } else {
-            color = '#BBBBBB';
-        };
-        return color
-    }
-</wxs>
+</block>

+ 3 - 2
packageA/setclient/detail.js

@@ -557,14 +557,15 @@ Page({
             value: res.data.sourcepoolname
         }, {
             label: "成交状态",
-            value: res.data.tradingstatus
+            value: res.data.tradingstatus,
+            style:`color:${this.data.sColors[res.data.tradingstatus]}`
         }, {
             label: "成交次数",
             value: res.data.contact_signnum
         }, {
             label: "合作状态",
             value: getApp().globalData.Language.getMapText(res.data.status),
-            color: res.data.status == '暂缓' ? "#d90a0a" : ''
+            style:`color:${this.data.sColors[res.data.status]}`
         }, {
             label: "负责人",
             value: res.data.leader.map(v => v.name) || ""

+ 2 - 18
packageA/setclient/modules/clue/list/index.wxml

@@ -1,7 +1,7 @@
 <navigator class="offer-list" url="/packageA/saleClue/detail?sat_orderclueid={{item.sat_orderclueid}}" wx:for="{{list}}" wx:key="sat_orderclueid">
     <view class="title">
         <text class="line-1">{{item.enterprisename_customer || " --"}}</text>
-        <view class="status" style="background-color: {{backColor.getColor(item.status)}};">{{language[item.status]||item.status}}</view>
+        <view class="status" style="background-color: {{sColors[item.status]}};">{{language[item.status]||item.status}}</view>
     </view>
     <view class="tag-box">
         <view class="systemtag" wx:for="{{item.tags.systemtag}}" wx:key="item">{{language[item]||item}}</view>
@@ -16,20 +16,4 @@
     <!-- <view class="exp line-1">{{language['来源'||'来源']}}:<text>{{item.cluesource ? item.cluesource : '--'}}</text></view> -->
 </navigator>
 
-<My_empty wx:if="{{list.length == 0}}" />
-
-<wxs module="backColor">
-    module.exports.getColor = function (status) {
-        var color = null;
-        if (status == '待跟进') {
-            color = '#FA8C16';
-        } else if (status == '跟进中') {
-            color = '#52C41A';
-        } else if (status == '已转化') {
-            color = '#F60909';
-        } else {
-            color = '#BBBBBB';
-        };
-        return color
-    }
-</wxs>
+<My_empty wx:if="{{list.length == 0}}" />

+ 4 - 2
packageA/work/detail.js

@@ -228,7 +228,8 @@ Page({
                         value: res.data.title
                     }, {
                         label: '状态',
-                        value: getApp().globalData.Language.getMapText(res.data.status)
+                        value: getApp().globalData.Language.getMapText(res.data.status),
+                        style:`color:${this.data.sColors[res.data.status]}`
                     }
                 ],
                 list1: [{
@@ -256,7 +257,8 @@ Page({
                     slot: 'title'
                 }, {
                     label: '状态',
-                    value: getApp().globalData.Language.getMapText(res.data.status)
+                    value: getApp().globalData.Language.getMapText(res.data.status),
+                    style:`color:${this.data.sColors[res.data.status]}`
                 }, {
                     label: '完成说明',
                     value: res.data.finishnotes

+ 2 - 16
packageA/work/modules/list/index.wxml

@@ -2,7 +2,7 @@
 <navigator class="offer-list" url="/packageA/work/detail?id={{item.sys_taskid}}" wx:for="{{list}}" wx:key="sys_taskid">
     <view class="title">
         <text class="line-1">{{item.title}}</text>
-        <view class="status" style="background-color: {{backColor.getColor(item.status)}};">{{language[item.status]||item.status}}</view>
+        <view class="status" style="color:{{sColors[detail.status]}};">{{language[item.status]||item.status}}</view>
     </view>
     <view class="tag-box">
         <van-tag custom-class='tag' wx:for="{{item.tags.systemtag}}" wx:key="index" wx:for-item='tag' color='#FA8C16' text-color='#fff' round>{{language[tag]||tag}}</van-tag>
@@ -10,18 +10,4 @@
     </view>
     <view class="exp line-1">{{language['开始日期']||'开始日期'}}:<text>{{item.starttime}}</text></view>
     <view class="exp line-1">{{language['结束日期']||'结束日期'}}:<text>{{item.endtime||' --'}}</text></view>
-</navigator>
-
-<wxs module="backColor">
-    module.exports.getColor = function (status) {
-        var color = null;
-        if (status == '待执行') {
-            color = '#3874F6';
-        } else if (status == '进行中') {
-            color = '#67C23A';
-        } else {
-            color = '#BBB';
-        };
-        return color
-    }
-</wxs>
+</navigator>