xiaohaizhao hace 1 año
padre
commit
ef31210a2d

+ 2 - 2
components/Yl_Detail/index.wxml

@@ -1,8 +1,8 @@
 <view class="box" wx:if="{{list}}">
     <slot name='top' />
     <view class="row" wx:for="{{list}}" wx:key="index">
-        <view class="label">{{language[item.label]||item.label}}:</view>
-        <view class="value">{{language[item.value]||item.value||'--'}}</view>
+        <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>
     <slot name='bottom' />
 </view>

+ 14 - 2
packageA/offers/detail.js

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

+ 28 - 6
packageA/project/detail.js

@@ -126,7 +126,12 @@ Page({
             value: data.projectname
         }, {
             label: "报备进度",
-            value: data.reportstatus
+            value: data.reportstatus,
+            color: {
+                未报备: '#3874f6',
+                报备中: '#e6a23c',
+                已报备: '#67c23a',
+            } [data.reportstatus] || ""
         }, {
             label: "项目类型",
             value: data.projecttype
@@ -181,10 +186,10 @@ Page({
         }, {
             label: "品牌是否填报方植入",
             value: data.isfillbrangd == 1 ? '是' : (data.isfillbrangd + "").length == 0 ? '' : "否"
-        },  {
+        }, {
             label: "项目来源",
             value: data.source
-        },{
+        }, {
             label: "赢率",
             value: data.winrate
         }, {
@@ -192,7 +197,13 @@ Page({
             value: data.name
         }, {
             label: "项目状态",
-            value: getApp().globalData.Language.getMapText(data.status)
+            value: getApp().globalData.Language.getMapText(data.status),
+            color: {
+                跟进中: '#3874f6',
+                已成交: '#67C23A',
+                已失败: '#F56C6C',
+                已结案: '#cccccc',
+            } [data.status] || ""
         }, {
             label: "结案/失败原因",
             value: data.status == '已结案' ? data.endreason : data.defeattype + (data.defeatreason ? "," + data.defeatreason : data.defeatreason)
@@ -204,7 +215,12 @@ Page({
                 value: data.projectnum
             }, {
                 label: "报备进度",
-                value: data.reportstatus
+                value: data.reportstatus,
+                color: {
+                    未报备: '#3874f6',
+                    报备中: '#e6a23c',
+                    已报备: '#67c23a',
+                } [data.reportstatus] || ""
             }, {
                 label: "项目类型",
                 value: data.projecttype
@@ -216,7 +232,13 @@ Page({
                 value: data.grade
             }, {
                 label: "状态",
-                value: getApp().globalData.Language.getMapText(data.status)
+                value: getApp().globalData.Language.getMapText(data.status),
+                color: {
+                    跟进中: '#3874f6',
+                    已成交: '#67C23A',
+                    已失败: '#F56C6C',
+                    已结案: '#cccccc',
+                } [data.status] || ""
             }, {
                 label: '营销费用',
                 value: CNY(data.salesfeesamount || '0')

+ 14 - 1
packageA/project/modules/list/index.wxml

@@ -36,7 +36,7 @@
         </view>
         <view class="replenish">
             <text style="color: #666;">{{language['报备进度']||'报备进度'}}:</text>
-            <text>{{language[item.reportstatus]||item.reportstatus||'--'}}</text>
+            <text style="color: {{render.getColor1(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" />
@@ -71,6 +71,19 @@
                 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>