Просмотр исходного кода

作业看板添加差额显示

xiaohaizhao 2 лет назад
Родитель
Сommit
e2147bd110
2 измененных файлов с 26 добавлено и 11 удалено
  1. 5 3
      packageA/achievement/index.js
  2. 21 8
      packageA/achievement/index.wxml

+ 5 - 3
packageA/achievement/index.js

@@ -257,11 +257,13 @@ Page({
         res[key].outamount = conversion(res[key].outamount);
         res[key].invoiceamount = conversion(res[key].invoiceamount);
         //差额
-        res[key].unamount = CNY(res[key].unamount, '');
+        res[key].unamount = CNY(currency(res[key].unamount).divide(10000), '') - 0;
         res[key].unamountcolor = res[key].unamount >= 0 ? '#5AB73F' : '#EB4B5C';
-        res[key].unoutamount = CNY(res[key].unoutamount, '¥');
+
+        res[key].unoutamount = CNY(currency(res[key].unoutamount).divide(10000), '') - 0;
         res[key].unoutamountcolor = res[key].unoutamount >= 0 ? '#5AB73F' : '#EB4B5C';
-        res[key].uninvoiceamount = CNY(res[key].uninvoiceamount, '¥');
+
+        res[key].uninvoiceamount = CNY(currency(res[key].uninvoiceamount).divide(10000), '') - 0;
         res[key].uninvoiceamountcolor = res[key].uninvoiceamount >= 0 ? '#5AB73F' : '#EB4B5C';
         //达成率
         res[key].wcamount = currency(res[key].wcamount).multiply(100) + '%';

+ 21 - 8
packageA/achievement/index.wxml

@@ -6,6 +6,7 @@
   </view>
 </van-dropdown-menu>
 <view class="head" />
+
 <view hidden="{{dropdownItem!=0}}">
   <Yl_ListBox pullDown='{{false}}' id='ListBox'>
     <view class="box">
@@ -55,16 +56,16 @@
       </view>
       <view class="spectaculars">
         <view class="item">
-          <view class="label">销售金额</view>
-          <view class="value">{{xssj[xssj.tab.active].xsje.show}}</view>
+          <view class="label">回款金额</view>
+          <view class="value">{{xssj[xssj.tab.active].skje.show}}</view>
         </view>
         <view class="item">
           <view class="label">出货金额</view>
           <view class="value">{{xssj[xssj.tab.active].chje.show}}</view>
         </view>
         <view class="item">
-          <view class="label">收款金额</view>
-          <view class="value">{{xssj[xssj.tab.active].skje.show}}</view>
+          <view class="label">订单金额</view>
+          <view class="value">{{xssj[xssj.tab.active].xsje.show}}</view>
         </view>
         <view class="item">
           <view class="label">开票金额</view>
@@ -81,7 +82,6 @@
           <view class="item {{yjsj.tab.active==item.id?'active':''}}" wx:for="{{yjsj.tab.list}}" wx:key="id" data-name="yjsj" data-id="{{item.id}}" catchtap='changeId'>{{item.name}}</view>
         </view>
       </view>
-
       <view class="performance">
         <view class="title">订单 <text style="color: {{yjsj[yjsj.tab.active].unamountcolor}};">{{yjsj[yjsj.tab.active].unamount.value}}</text></view>
         <view class="row">
@@ -97,9 +97,12 @@
             <view class="title">目标金额</view>
             <view class="value">{{yjsj[yjsj.tab.active].target_l.show}}</view>
           </view>
+          <view class="item">
+            <view class="title">差额</view>
+            <view class="value" style="color: {{yjsj[yjsj.tab.active].unamountcolor}};">{{yjsj[yjsj.tab.active].unamount}}万</view>
+          </view>
         </view>
       </view>
-
       <view class="performance">
         <view class="title">出货 <text style="color: {{yjsj[yjsj.tab.active].unoutamountcolor}};">{{yjsj[yjsj.tab.active].unoutamount.value}}</text></view>
         <view class="row">
@@ -115,27 +118,37 @@
             <view class="title">目标金额</view>
             <view class="value">{{yjsj[yjsj.tab.active].target_l.show}}</view>
           </view>
+          <view class="item">
+            <view class="title">差额</view>
+            <view class="value" style="color: {{yjsj[yjsj.tab.active].unoutamountcolor}};">{{yjsj[yjsj.tab.active].unoutamount}}万</view>
+          </view>
         </view>
       </view>
-
       <view class="performance">
         <view class="title">开票 <text style="color: {{yjsj[yjsj.tab.active].uninvoiceamountcolor}};">{{yjsj[yjsj.tab.active].uninvoiceamount.value}}</text></view>
         <view class="row">
+
           <view class="item">
             <view class="title">目标达成</view>
             <view class="value">{{yjsj[yjsj.tab.active].wcinvoiceamount}}</view>
           </view>
+
           <view class="item">
             <view class="title">实际金额</view>
             <view class="value">{{yjsj[yjsj.tab.active].invoiceamount.show}}</view>
           </view>
+
           <view class="item">
             <view class="title">目标金额</view>
             <view class="value">{{yjsj[yjsj.tab.active].target_l.show}}</view>
           </view>
+
+          <view class="item">
+            <view class="title">差额</view>
+            <view class="value" style="color: {{yjsj[yjsj.tab.active].uninvoiceamountcolor}};">{{yjsj[yjsj.tab.active].uninvoiceamount}}万</view>
+          </view>
         </view>
       </view>
-
     </view>
   </Yl_ListBox>
 </view>