Jelajahi Sumber

数据销售新增去年

qymljy 1 tahun lalu
induk
melakukan
46dc88f802

+ 8 - 8
src/views/salesData/components/boxLine.vue

@@ -29,37 +29,37 @@
               <span v-else>{{tool.formatAmount(list.amount/10000,2)}}</span>
 
             <p class="box-title" style="color: #929292" v-if="list.tbxsje > 0">
-              <span v-if="param.content.dateType == '本年'">年同比</span>
+              <span v-if="param.content.dateType == '本年' || param.content.dateType == '去年'">年同比</span>
               <span v-else-if="param.content.dateType == '本季'">季同比</span>
               <span v-else-if="param.content.dateType == '本月'">月同比</span>
               <i class="el-icon-caret-top" style="color: #2ad72a"></i><span class="box-size-color">{{Math.round((list.tbxsje * 100)*100)/100}}%</span>
             </p>
             <p class="box-title" style="color: #929292" v-if="list.tbxsje == 0">
-              <span v-if="param.content.dateType == '本年'">年同比</span>
+              <span v-if="param.content.dateType == '本年' || param.content.dateType == '去年'">年同比</span>
               <span v-else-if="param.content.dateType == '本季'">季同比</span>
               <span v-else-if="param.content.dateType == '本月'">月同比</span>
               <span class="box-size-color" style="margin-left: 10px">{{Math.round((list.tbxsje * 100)*100)/100}}%</span>
             </p>
             <p class="box-title" style="color: #929292" v-if="list.tbxsje < 0">
-              <span v-if="param.content.dateType == '本年'">年同比</span>
+              <span v-if="param.content.dateType == '本年' || param.content.dateType == '去年'">年同比</span>
               <span v-else-if="param.content.dateType == '本季'">季同比</span>
               <span v-else-if="param.content.dateType == '本月'">月同比</span>
               <i class="el-icon-caret-bottom" style="color: red"></i><span class="box-size-color">{{Math.round((list.tbxsje * 100)*100)/100}}%</span>
             </p>
             <p class="box-title" style="color: #929292" v-if="list.hbxsje > 0">
-              <span v-if="param.content.dateType == '本年'">年环比</span>
+              <span v-if="param.content.dateType == '本年' || param.content.dateType == '去年'">年环比</span>
               <span v-else-if="param.content.dateType == '本季'">季环比</span>
               <span v-else-if="param.content.dateType == '本月'">月环比</span>
-              <i class="el-icon-caret-bottom" style="color: #2ad72a"></i><span class="box-size-color">{{Math.round((list.hbxsje * 100)*100)/100}}%</span>
+              <i class="el-icon-caret-top" style="color: #2ad72a"></i><span class="box-size-color">{{Math.round((list.hbxsje * 100)*100)/100}}%</span>
             </p>
             <p class="box-title" style="color: #929292" v-if="list.hbxsje == 0">
-              <span v-if="param.content.dateType == '本年'">年环比</span>
+              <span v-if="param.content.dateType == '本年' || param.content.dateType == '去年'">年环比</span>
               <span v-else-if="param.content.dateType == '本季'">季环比</span>
               <span v-else-if="param.content.dateType == '本月'">月环比</span>
               <span class="box-size-color" style="margin-left: 10px">{{Math.round((list.hbxsje * 100)*100)/100}}%</span>
             </p>
             <p class="box-title" style="color: #929292" v-if="list.hbxsje < 0">
-              <span v-if="param.content.dateType == '本年'">年环比</span>
+              <span v-if="param.content.dateType == '本年' || param.content.dateType == '去年'">年环比</span>
               <span v-else-if="param.content.dateType == '本季'">季环比</span>
               <span v-else-if="param.content.dateType == '本月'">月环比</span>
               <i class="el-icon-caret-bottom" style="color: red"></i><span class="box-size-color">{{Math.round((list.hbxsje * 100)*100)/100}}%</span>
@@ -120,7 +120,7 @@ export default {
         "content": {
           "type": 1, // 0人员 1部门
           "dataid": 103,
-          "dateType":"年",// 本年 本季 本月
+          "dateType":"年",// 本年 本季 本月
           "datatype":2,// 1-订单 2-出货 3-开票 4-回款
         }
       },

+ 12 - 1
src/views/salesData/modules/digitalSigns.vue

@@ -4,6 +4,7 @@
       <div class="div-line"></div>
       <div class="title">销售面板</div>
       <el-button-group class="container">
+        <el-button :type="dataType === '去年'?'primary':''" @click="onChange('去年')" size="small">去年</el-button>
         <el-button :type="dataType === '本年'?'primary':''" @click="onChange('本年')" size="small">本年</el-button>
         <el-button :type="dataType === '本季'?'primary':''" @click="onChange('本季')" size="small">本季</el-button>
         <el-button :type="dataType === '本月'?'primary':''" @click="onChange('本月')" size="small">本月</el-button>
@@ -26,7 +27,7 @@ export default {
   props:['windowWidth'],
   data(){
     return {
-      dataType:'年',
+      dataType:'年',
 
     }
   },
@@ -53,6 +54,16 @@ export default {
         this.$refs.invoicing.listData()
         this.$refs.returned.param.content.dateType = '本季'
         this.$refs.returned.listData()
+      }else if (val === '去年'){
+        this.dataType = '去年'
+        this.$refs.order.param.content.dateType = '去年'
+        this.$refs.order.listData()
+        this.$refs.shipment.param.content.dateType = '去年'
+        this.$refs.shipment.listData()
+        this.$refs.invoicing.param.content.dateType = '去年'
+        this.$refs.invoicing.listData()
+        this.$refs.returned.param.content.dateType = '去年'
+        this.$refs.returned.listData()
       }else {
         this.dataType = '本月'
         this.$refs.order.param.content.dateType = '本月'