Browse Source

2023-7-20

codeMan 2 years ago
parent
commit
099efe493a

+ 7 - 8
src/HDrpManagement/collectionRule/modules/table.vue

@@ -13,7 +13,6 @@
       <el-table-column
           prop="remarks"
           label="描述"
-          width="250px"
           >
       </el-table-column>
       <el-table-column label="应收款期计算依据">
@@ -23,7 +22,7 @@
           <el-table-column
             prop="point"
             label="订单审核"
-            width="150">
+            width="100">
             <template slot-scope="scope">
               <div v-if="scope.row.point == '订单审核'" style="color: red">是</div>
               <div v-else>--</div>
@@ -32,7 +31,7 @@
           <el-table-column
             prop="amountrate"
             label="立账额度"
-            width="150">
+            width="100">
             <template slot-scope="scope">
               <div v-if="scope.row.point == '订单审核'">{{scope.row.amountrate * 100}}%</div>
               <div v-else>--</div>
@@ -41,7 +40,7 @@
           <el-table-column
             prop="days"
             label="后置天数"
-            width="150">
+            width="100">
             <template slot-scope="scope">
               <div v-if="scope.row.point == '订单审核'">{{scope.row.days}}</div>
               <div v-else>--</div>
@@ -54,7 +53,7 @@
           <el-table-column
             prop="point"
             label="销售出库审核"
-            width="150">
+            width="120">
             <template slot-scope="scope">
               <div v-if="scope.row.point == '销售出库审核'" style="color: red">是</div>
               <div v-else>--</div>
@@ -63,7 +62,7 @@
           <el-table-column
             prop="days"
             label="后置天数"
-            width="150">
+            width="100">
             <template slot-scope="scope">
               <div v-if="scope.row.point == '销售出库审核'">{{scope.row.days}}</div>
               <div v-else>--</div>
@@ -76,7 +75,7 @@
           <el-table-column
             prop="point"
             label="发票审核"
-            width="150">
+            width="100">
             <template slot-scope="scope">
               <div v-if="scope.row.point == '发票审核'" style="color: red">是</div>
               <div v-else>--</div>
@@ -85,7 +84,7 @@
           <el-table-column
             prop="days"
             label="后置天数"
-            width="150">
+            width="100">
             <template slot-scope="scope">
               <div v-if="scope.row.point == '发票审核'">{{scope.row.days}}</div>
               <div v-else>--</div>

+ 20 - 13
src/HDrpManagement/customerPortrait/modules/detail.vue

@@ -117,7 +117,7 @@
               [
                 {title:'项目数',value:$refs.project && $refs.project.total,bg:'#F3F9FC',color:'#3874F6'},
                 {title:'项目成交率',value:$refs.project && $refs.project.list && $refs.project.list[0] && $refs.project.list[0].cjl,bg:'#E8F7EC',color:'#78B32B'},
-                {title:'总预计签约金额',value:tool.formatAmount($refs.project && $refs.project.list && $refs.project.list[0] && $refs.project.list[0].allSignamount_due || '0'),bg:'#F9F2E5',color:'#FF7603'},
+                {title:'总预计签约金额',value:unitCompile($refs.project && $refs.project.list && $refs.project.list[0] && $refs.project.list[0].allSignamount_due || '0'),bg:'#F9F2E5',color:'#FF7603'},
                 // {title:'参与项目数',descript:'参与项目数:客户参与的项目数',value:$refs.project && $refs.project.list && $refs.project.list[0] && $refs.project.list[0].joinProjectQty,bg:'#FDF3F3',color:'#E899CC'},
               ]"
             ></myCard>
@@ -147,7 +147,7 @@
               :list="
               [
                 {title:'报价次数',value:$refs.baojiadan && $refs.baojiadan.total,bg:'#F3F9FC',color:'#3874F6'},
-                {title:'最近报价金额',value:tool.formatAmount($refs.baojiadan && $refs.baojiadan.list && $refs.baojiadan.list[0] && $refs.baojiadan.list[0].sumamount || '0'),bg:'#E8F7EC',color:'#78B32B'},
+                {title:'最近报价金额',value:unitCompile($refs.baojiadan && $refs.baojiadan.list && $refs.baojiadan.list[0] && $refs.baojiadan.list[0].sumamount || '0'),bg:'#E8F7EC',color:'#78B32B'},
                 {title:'最近报价时间',value:$refs.baojiadan && $refs.baojiadan.list && $refs.baojiadan.list[0] && $refs.baojiadan.list[0].submitdate,bg:'#F9F2E5',color:'#FF7603'},
               ]"
             ></myCard>
@@ -187,13 +187,13 @@
               :list="
               [
                 {title:'项目合同总数',value:$refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].allQty,bg:'#F3F9FC',color:'#3874F6'},
-                {title:'项目合同总金额',value:tool.formatAmount($refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].sumSignAmount || '0'),bg:'#E8F7EC',color:'#78B32B'},
-                {title:'进行中项目总数',value:tool.formatAmount($refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].inProgressQty || '0'),bg:'#FDF3F3',color:'#E85B5B'},
-                {title:'进行中项目金额',value:tool.formatAmount($refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].inProgressAmount || '0'),bg:'#F9F2E5',color:'#FF7603'},
+                {title:'项目合同总金额',value:unitCompile($refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].sumSignAmount || '0'),bg:'#E8F7EC',color:'#78B32B'},
+                {title:'进行中项目总数',value:unitCompile($refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].inProgressQty || '0'),bg:'#FDF3F3',color:'#E85B5B'},
+                {title:'进行中项目金额',value:unitCompile($refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].inProgressAmount || '0'),bg:'#F9F2E5',color:'#FF7603'},
                 {title:'到期项目合同数',value:$refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].expireQty,bg:'#F3F9FC',color:'#3874F6'},
-                {title:'到期项目合同金额',value:tool.formatAmount($refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].expireAmount || '0'),bg:'#E8F7EC',color:'#78B32B'},
+                {title:'到期项目合同金额',value:unitCompile($refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].expireAmount || '0'),bg:'#E8F7EC',color:'#78B32B'},
                 {title:'转订单合同数',value:$refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].convertOrderContractQty,bg:'#F9F2E5',color:'#FF7603'},
-                {title:'转订单金额',value:$refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].convertOrderContractAmount,bg:'#F3F9FC',color:'#3874F6'},
+                {title:'转订单金额',value:unitCompile($refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].convertOrderContractAmount || '0'),bg:'#F3F9FC',color:'#3874F6'},
               ]"
             ></myCard>
             <showIsNone title="合同明细">
@@ -222,12 +222,12 @@
               :list="
               [
                 {title:'订单数量',value:$refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].allOrderQty,bg:'#F3F9FC',color:'#3874F6'},
-                {title:'订单总金额',value:tool.formatAmount($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].allAmount || '0'),bg:'#E8F7EC',color:'#78B32B'},
-                {title:'订单回款金额',value:tool.formatAmount($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].cashbillAmount || '0'),bg:'#F9F2E5',color:'#FF7603'},
-                {title:'订单未出货金额',value:tool.formatAmount($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].allunAmount || '0'),bg:'#FDF3F3',color:'#E85B5B'},
-                {title:'已出货未开票金额',value:tool.formatAmount($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].uninvoicamount || '0'),bg:'#F9F2E5',color:'#FF7603'},
-                {title:'已开票未回款金额',value:tool.formatAmount($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].unwriteoffamount || '0'),bg:'#FDF3F3',color:'#E85B5B'},
-                {title:'参与项目订单金额',descript:'参与项目订单金额:客户参与的项目的订单金额',value:tool.formatAmount($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].joinOrderAmount || '0'),bg:'#F3F9FC',color:'#3874F6'},
+                {title:'订单总金额',value:unitCompile($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].allAmount || '0'),bg:'#E8F7EC',color:'#78B32B'},
+                {title:'订单回款金额',value:unitCompile($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].cashbillAmount || '0'),bg:'#F9F2E5',color:'#FF7603'},
+                {title:'订单未出货金额',value:unitCompile($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].allunAmount || '0'),bg:'#FDF3F3',color:'#E85B5B'},
+                {title:'已出货未开票金额',value:unitCompile($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].uninvoicamount || '0'),bg:'#F9F2E5',color:'#FF7603'},
+                {title:'已开票未回款金额',value:unitCompile($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].unwriteoffamount || '0'),bg:'#FDF3F3',color:'#E85B5B'},
+                {title:'参与项目订单金额',descript:'参与项目订单金额:客户参与的项目的订单金额',value:unitCompile($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].joinOrderAmount || '0'),bg:'#F3F9FC',color:'#3874F6'},
               ]"
             ></myCard>
             <showIsNone title="订单明细">
@@ -493,6 +493,13 @@ export default {
       this[param].content.pageNumber = 1
       this.$refs[el] && this.$refs[el].listData()
     },
+    unitCompile (num) {
+      if (num > 10000 || num < 10000) {
+        return this.tool.formatAmount(num / 10000,2,'¥') + '万'
+      } else {
+        return this.tool.formatAmount(num)
+      }
+    },
     /* 渲染表格 */
     renderer(data) {
       const piePlot = new Bar('Bar', {

+ 6 - 3
src/HDrpManagement/customerPortrait/modules/myCrad.vue

@@ -4,8 +4,11 @@
         <div>
           <p :style="[{'font-size': '14px'}]">{{ item.title }}</p>
           <div style="display:flex;justify-content:space-between">
-            <p :style="[{'font-weight': 'bold'},{'font-size':'18px'},{'color':item.color}]">{{ item.value || '--' }}</p>
-            <p :style="[{'font-size':'12px'},{'color':+item.value2 > 0 ? '#000000' : 'red'}]">{{ item.value2 }}</p>
+            <p :style="[{'font-weight': 'bold'},{'font-size':'18px'},{'color':item.color}]">{{ item.value || 0 }}</p>
+            <div style="position: relative;">
+              <span v-if="item.value2descript" style="position:absolute;top:-20px;right:0px;font-size:14px;color:#000000;white-space:nowrap">{{ item.value2descript }}</span>
+              <p :style="[{'font-size':'16px'},{'color':+item.value2 > 0 ? '#000000' : 'red'}]">{{ item.value2 }}</p>
+            </div>
           </div>
           <slot v-if="item.custom" :name="item.custom" :data="item"></slot>
         </div>
@@ -39,7 +42,7 @@
   flex-wrap:wrap;
 }
 .item {
-  width:260px;
+  min-width:260px;
   padding:10px 10px;
   margin:0 10px 10px 0;
   position:relative;

+ 1 - 1
src/HDrpManagement/customerPortrait/modules/pageTable.vue

@@ -46,7 +46,7 @@ export default {
   methods:{
     async listData(){
       const res = await this.$api.requested(this.param)
-      this.list = res.data[0].isEmpty ? [] : res.data
+      this.list = res.data
       this.total = res.data[0].isEmpty ? 0 : res.total
       console.log(this.list)
     },

+ 20 - 13
src/HDrpManagement/projectPortrait/modules/detail.vue

@@ -23,7 +23,7 @@
               <el-descriptions-item label="项目编号">{{ baseInfo.projectnum }}</el-descriptions-item>
               <el-descriptions-item label="项目类型">{{ baseInfo.projecttype }}</el-descriptions-item>
               <el-descriptions-item label="领域"><span style="color:#E85B5B;font-size:16px;font-weight:bold">{{ baseInfo.tradefield }}</span></el-descriptions-item>
-              <el-descriptions-item label="预计签约金额(元)"> {{ tool.formatAmount(baseInfo.signamount_due || 0) }}</el-descriptions-item>
+              <el-descriptions-item label="预计签约金额(元)"> {{ unitCompile(baseInfo.signamount_due || 0) }}</el-descriptions-item>
               <el-descriptions-item label="项目状态"><span style="color:#3874f6">{{ baseInfo.status }}</span></el-descriptions-item>
               <el-descriptions-item label="未跟进天数"><span style="color:#E85B5B;font-size:16px;font-weight:bold">{{ baseInfo.subdate }}</span></el-descriptions-item>
               <el-descriptions-item label="项目等级"><span style="color:#E85B5B;font-size:16px;font-weight:bold"> {{ baseInfo.grade }}</span></el-descriptions-item>
@@ -188,7 +188,7 @@
               :list="
               [
                 {title:'产品总数',value:$refs.productset && $refs.productset.total,bg:'#F3F9FC',color:'#3874F6'},
-                {title:'产品总金额',value:tool.formatAmount($refs.productset && $refs.productset.list && $refs.productset.list[0] && $refs.productset.list[0].itemSumAmount || 0),bg:'#E8F7EC',color:'#78B32B'},
+                {title:'产品总金额',value:unitCompile($refs.productset && $refs.productset.list && $refs.productset.list[0] && $refs.productset.list[0].itemSumAmount || 0),bg:'#E8F7EC',color:'#78B32B'},
               ]"
             ></myCard>
             <showIsNone title="产品类别及金额">
@@ -207,7 +207,7 @@
                   prop="itemclassAmount"
                   label="金额">
                   <template slot-scope="scope">
-                    {{ tool.formatAmount(scope.row.itemclassAmount || 0,2) }}
+                    {{ unitCompile(scope.row.itemclassAmount || 0,2,'¥') }}
                   </template>
                 </el-table-column>
               </el-table>
@@ -235,7 +235,7 @@
               :list="
               [
                 {title:'报价次数',value:$refs.baojiadan && $refs.baojiadan.total,bg:'#F3F9FC',color:'#3874F6'},
-                {title:'最近报价金额',value:tool.formatAmount($refs.baojiadan && $refs.baojiadan.list && $refs.baojiadan.list[0] && $refs.baojiadan.list[0].sumamount || 0),bg:'#E8F7EC',color:'#78B32B'},
+                {title:'最近报价金额',value:unitCompile($refs.baojiadan && $refs.baojiadan.list && $refs.baojiadan.list[0] && $refs.baojiadan.list[0].sumamount || 0),bg:'#E8F7EC',color:'#78B32B'},
                 {title:'最近报价时间',value:$refs.baojiadan && $refs.baojiadan.list && $refs.baojiadan.list[0] && $refs.baojiadan.list[0].submitdate,bg:'#F9F2E5',color:'#FF7603'},
               ]"
             ></myCard>
@@ -275,13 +275,13 @@
               :list="
               [
                 {title:'项目合同总数',value:$refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].allQty,bg:'#F3F9FC',color:'#3874F6'},
-                {title:'项目合同总金额',value:tool.formatAmount($refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].sumSignAmount || 0),bg:'#E8F7EC',color:'#78B32B'},
+                {title:'项目合同总金额',value:unitCompile($refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].sumSignAmount || 0),bg:'#E8F7EC',color:'#78B32B'},
                 {title:'进行中项目总数',value:$refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].inProgressQty,bg:'#FDF3F3',color:'#E85B5B'},
-                {title:'进行中项目金额',value:tool.formatAmount($refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].inProgressAmount || 0),bg:'#F9F2E5',color:'#FF7603'},
+                {title:'进行中项目金额',value:unitCompile($refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].inProgressAmount || 0),bg:'#F9F2E5',color:'#FF7603'},
                 {title:'到期项目合同数',value:$refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].expireQty,bg:'#FDF3F3',color:'#E85B5B'},
-                {title:'到期项目合同金额',value:tool.formatAmount($refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].expireAmount || 0),bg:'#E8F7EC',color:'#78B32B'},
+                {title:'到期项目合同金额',value:unitCompile($refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].expireAmount || 0),bg:'#E8F7EC',color:'#78B32B'},
                 {title:'转订单合同数',value:$refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].convertOrderContractQty,bg:'#F9F2E5',color:'#FF7603'},
-                {title:'转订单金额',value:tool.formatAmount($refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].convertOrderContractAmount || 0),bg:'#E8F7EC',color:'#78B32B'},
+                {title:'转订单金额',value:unitCompile($refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].convertOrderContractAmount || 0),bg:'#E8F7EC',color:'#78B32B'},
               ]"
             ></myCard>
             <showIsNone title="合同明细">
@@ -306,11 +306,11 @@
               :list="
               [
                 {title:'订单数量',value:$refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].allOrderQty,bg:'#F3F9FC',color:'#3874F6'},
-                {title:'订单金额',value:tool.formatAmount($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].allAmount || 0),bg:'#E8F7EC',color:'#78B32B'},
-                {title:'订单回款金额',value:tool.formatAmount($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].cashbillAmount || 0),bg:'#F9F2E5',color:'#FF7603'},
-                {title:'订单未出货金额',value:tool.formatAmount($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].allunAmount || 0),bg:'#FDF3F3',color:'#E85B5B'},
-                {title:'已出货未开票金额',value:tool.formatAmount($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].uninvoicamount || 0),bg:'#F9F2E5',color:'#FF7603'},
-                {title:'已开票未回款金额',value:tool.formatAmount($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].unwriteoffamount || 0),bg:'#FDF3F3',color:'#E85B5B'},
+                {title:'订单金额',value:unitCompile($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].allAmount || 0),bg:'#E8F7EC',color:'#78B32B'},
+                {title:'订单回款金额',value:unitCompile($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].cashbillAmount || 0),bg:'#F9F2E5',color:'#FF7603'},
+                {title:'订单未出货金额',value:unitCompile($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].allunAmount || 0),bg:'#FDF3F3',color:'#E85B5B'},
+                {title:'已出货未开票金额',value:unitCompile($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].uninvoicamount || 0),bg:'#F9F2E5',color:'#FF7603'},
+                {title:'已开票未回款金额',value:unitCompile($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].unwriteoffamount || 0),bg:'#FDF3F3',color:'#E85B5B'},
               ]"
             ></myCard>
             <showIsNone title="订单明细">
@@ -594,6 +594,13 @@ export default {
     typeChange(param,el) {
       this[param].content.pageNumber = 1
       this.$refs[el] && this.$refs[el].listData()
+    },
+    unitCompile (num) {
+      if (num > 10000 || num < 10000) {
+        return this.tool.formatAmount(num / 10000,2,'¥') + '万'
+      } else {
+        return this.tool.formatAmount(num)
+      }
     }
   },
   mounted() {

+ 33 - 26
src/HDrpManagement/salerPortrait/modules/detail.vue

@@ -45,28 +45,28 @@
             <myCard 
               :list="
               [
-                {custom:'dingdan',data:performance,title:'订单目标',value:performance.orderCR,value2:tool.formatAmount(performance.amount - performance.target_l,2),bg:'#F3F9FC',color:'#3874F6'},
-                {custom:'chuhuo',data:performance,title:'出货目标',value:performance.outOrderCR,value2:tool.formatAmount(performance.outamount - performance.target_l,2),bg:'#E8F7EC',color:'#00B32B'},
-                {custom:'kaipiao',data:performance,title:'开票目标',value:performance.invCR,value2:tool.formatAmount(performance.invoiceamount - performance.target_l,2),bg:'#F9F2E5',color:'#FF7603'},
-                {title:'回款金额',value:tool.formatAmount(performance.writeoffamount || 0,2),bg:'#FDF3F3',color:'#E85B5B'},
+                {custom:'dingdan',data:performance,title:'订单目标',value2descript:'差额',value:performance.orderCR,value2:unitCompile(performance.amount - performance.target_l),bg:'#F3F9FC',color:'#3874F6'},
+                {custom:'chuhuo',data:performance,title:'出货目标',value2descript:'差额',value:performance.outOrderCR,value2:unitCompile(performance.outamount - performance.target_l),bg:'#E8F7EC',color:'#00B32B'},
+                {custom:'kaipiao',data:performance,title:'开票目标',value2descript:'差额',value:performance.invCR,value2:unitCompile(performance.invoiceamount - performance.target_l),bg:'#F9F2E5',color:'#FF7603'},
+                {title:'回款金额',value:unitCompile(performance.writeoffamount || 0),bg:'#FDF3F3',color:'#E85B5B'},
               ]"
             >
               <template v-slot:dingdan="scope">
                   <div>
                     <p style="font-size:14px">实际/目标</p>
-                    <p :style="[{'font-size':'18px'},{color:scope.data.color},{'font-weight':'bold'}]">{{ tool.formatAmount(scope.data.data.amount || 0,2) }}/{{ tool.formatAmount(scope.data.data.target_l || 0,2) }}</p>
+                    <p :style="[{'font-size':'18px'},{color:scope.data.color},{'font-weight':'bold'}]">{{ unitCompile(scope.data.data.amount || 0) }}/{{ unitCompile(scope.data.data.target_l || 0) }}</p>
                   </div>
               </template>
               <template v-slot:chuhuo="scope">
                   <div>
                     <p style="font-size:14px">实际/目标</p>
-                    <p :style="[{'font-size':'18px'},{color:scope.data.color},{'font-weight':'bold'}]">{{ tool.formatAmount(scope.data.data.outamount || 0,2) }}/{{ tool.formatAmount(scope.data.data.target_l || 0,2) }}</p>
+                    <p :style="[{'font-size':'18px'},{color:scope.data.color},{'font-weight':'bold'}]">{{ unitCompile(scope.data.data.outamount || 0) }}/{{ unitCompile(scope.data.data.target_l || 0) }}</p>
                   </div>
               </template>
               <template v-slot:kaipiao="scope">
                   <div>
                     <p style="font-size:14px">实际/目标</p>
-                    <p :style="[{'font-size':'18px'},{color:scope.data.color},{'font-weight':'bold'}]">{{ tool.formatAmount(scope.data.data.invoiceamount || 0,2) }}/{{ tool.formatAmount(scope.data.data.target_l || 0,2) }}</p>
+                    <p :style="[{'font-size':'18px'},{color:scope.data.color},{'font-weight':'bold'}]">{{ unitCompile(scope.data.data.invoiceamount || 0) }}/{{ unitCompile(scope.data.data.target_l || 0) }}</p>
                   </div>
               </template>
             </myCard>
@@ -80,7 +80,7 @@
               <span class="myTitle">订单</span>
               <myRadio :value1="param2.content" key1="isAll" @clickBtn="refreshTable('param2','dingdan')" :btnOptions="[{label:'全部',value:1},{label:'本年',value:0}]">
               </myRadio>
-              <el-select style="margin-left:24px" v-model="param2.content.type" clearable size="mini" placeholder="请选择订单类型" @change="typeChange('param2','dingdan')">
+              <el-select style="margin-left:24px" v-model="param2.content.where.type" clearable size="mini" placeholder="请选择订单类型" @change="typeChange('param2','dingdan')">
                 <el-option label="全部" value=""></el-option>
                 <el-option :label="item.value" :value="item.value" v-for="(item,index) in orderTypeList" :key="index"></el-option>
               </el-select>
@@ -89,11 +89,11 @@
               :list="
               [
                 {title:'订单数量',value:$refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].allOrderQty,bg:'#F3F9FC',color:'#3874F6'},
-                {title:'订单总金额',value:tool.formatAmount($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].allAmount || 0),bg:'#E8F7EC',color:'#78B32B'},
-                {title:'订单回款金额',value:tool.formatAmount($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].cashbillAmount || 0),bg:'#F9F2E5',color:'#FF7603'},
-                {title:'订单未出货金额',value:tool.formatAmount($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].allunAmount || 0),bg:'#FDF3F3',color:'#E85B5B'},
-                {title:'已出货未开票金额',value:tool.formatAmount($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].uninvoicamount || '0'),bg:'#F9F2E5',color:'#FF7603'},
-                {title:'已开票未回款金额',value:tool.formatAmount($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].unwriteoffamount || '0'),bg:'#FDF3F3',color:'#E85B5B'},
+                {title:'订单总金额',value:unitCompile($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].allAmount || 0),bg:'#E8F7EC',color:'#78B32B'},
+                {title:'订单回款金额',value:unitCompile($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].cashbillAmount || 0),bg:'#F9F2E5',color:'#FF7603'},
+                {title:'订单未出货金额',value:unitCompile($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].allunAmount || 0),bg:'#FDF3F3',color:'#E85B5B'},
+                {title:'已出货未开票金额',value:unitCompile($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].alluninvoicamount || '0'),bg:'#F9F2E5',color:'#FF7603'},
+                {title:'已开票未回款金额',value:unitCompile($refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].allunwriteoffamount || '0'),bg:'#FDF3F3',color:'#E85B5B'},
               ]"
             ></myCard>
             <showIsNone title="订单明细">
@@ -119,7 +119,7 @@
               [
                 {title:'线索数',value:$refs.xiansuo && $refs.xiansuo.list[0] && $refs.xiansuo.list[0].orderclueSize,bg:'#F3F9FC',color:'#3874F6'},
                 {title:'新增线索数',value:$refs.xiansuo && $refs.xiansuo.list[0] && $refs.xiansuo.list[0].insertOrderclue,bg:'#E8F7EC',color:'#78B32B'},
-                {title:'线索转化率',value:$refs.fllow && $refs.fllow.list[0] && $refs.fllow.list[0].orderclueConver,bg:'#F9F2E5',color:'#FF7603'},
+                {title:'线索转化率',value:$refs.fllow && $refs.fllow.list[0] && $refs.fllow.list[0].ordercluezhl,bg:'#F9F2E5',color:'#FF7603'},
                 {title:'跟进次数',value:$refs.fllow && $refs.fllow.list[0] && $refs.fllow.list[0].createdate,bg:'#F3F9FC',color:'#3874F6'},
                 {title:'跟进频率',value:$refs.fllow && $refs.fllow.list[0] && $refs.fllow.list[0].followfrequency,descript:'平均一次跟进天数,跟进频率=(总跟进天数-节假日)÷总跟进次数',bg:'#FDF3F3',color:'#E85B5B'},
               ]"
@@ -158,13 +158,13 @@
               <myRadio :value1="param4.content" key1="type" @clickBtn="refreshTable('param4','kehu');param9.content.type=param4.content.type;refreshTable('param9','fllowkehu')" :btnOptions="[{label:'本年',value:3},{label:'本季',value:2},{label:'本月',value:1}]">
               </myRadio>
             </div>
-            <myCard 
+            <myCard
               :list="
               [
                 {title:'客户数',value:$refs.kehu && $refs.kehu.list.length,bg:'#F3F9FC',color:'#3874F6'},
                 {title:'新增客户数',value:$refs.kehu && $refs.kehu.list[0] && $refs.kehu.list[0].customersSize,bg:'#E8F7EC',color:'#78B32B'},
-                {title:'跟进次数',value:$refs.fllowkehu && $refs.fllowkehu.list[0] && $refs.fllowkehu.list[0].followSize,bg:'#F9F2E5',color:'#FF7603'},
-                {title:'跟进频率',value:$refs.fllowkehu && $refs.fllowkehu.list[0] && $refs.fllowkehu.list[0].followfrequency,descript:'平均一次跟进天数,跟进频率=(总跟进天数-节假日)÷总跟进次数',bg:'#FDF3F3',color:'#E85B5B'},
+                {title:'跟进次数',value:$refs.fllowkehu && $refs.fllowkehu.list && $refs.fllowkehu.list[0] && $refs.fllowkehu.list[0].followSize,bg:'#F9F2E5',color:'#FF7603'},
+                {title:'跟进频率',value:$refs.fllowkehu && $refs.fllowkehu.list && $refs.fllowkehu.list[0] && $refs.fllowkehu.list[0].followfrequency,descript:'平均一次跟进天数,跟进频率=(总跟进天数-节假日)÷总跟进次数',bg:'#FDF3F3',color:'#E85B5B'},
               ]"
             >
             </myCard>
@@ -220,7 +220,7 @@
                 {title:'项目数',value:$refs.project && $refs.project.list && $refs.project.list[0] && $refs.project.list[0].projectSize,bg:'#F3F9FC',color:'#3874F6'},
                 {title:'新增项目数',value:$refs.project && $refs.project.list && $refs.project.list[0] && $refs.project.list[0].insertProject,bg:'#E8F7EC',color:'#78B32B'},
                 {title:'项目成交率',value:$refs.project && $refs.project.list && $refs.project.list[0] && $refs.project.list[0].projectcjl,bg:'#F9F2E5',color:'#FF7603'},
-                {title:'跟进次数',value:tool.formatAmount($refs.projectfllow && $refs.projectfllow.list && $refs.projectfllow.list[0] && $refs.projectfllow.list[0].followSize || '0'),bg:'#F3F9FC',color:'#3874F6'},
+                {title:'跟进次数',value:$refs.projectfllow && $refs.projectfllow.list && $refs.projectfllow.list[0] && $refs.projectfllow.list[0].followSize,bg:'#F3F9FC',color:'#3874F6'},
                 {title:'跟进频率',value:$refs.projectfllow && $refs.projectfllow.list[0] && $refs.projectfllow.list[0].followfrequency,descript:'平均一次跟进天数,跟进频率=(总跟进天数-节假日)÷总跟进次数',bg:'#FDF3F3',color:'#E85B5B'},
               ]"
             ></myCard>
@@ -263,7 +263,7 @@
               :list="
               [
                 {title:'报价次数',value:$refs.baojiadan && $refs.baojiadan.total,bg:'#F3F9FC',color:'#3874F6'},
-                {title:'最近报价金额',value:tool.formatAmount($refs.baojiadan && $refs.baojiadan.list && $refs.baojiadan.list[0] && $refs.baojiadan.list[0].sumamount || '0'),bg:'#E8F7EC',color:'#78B32B'},
+                {title:'最近报价金额',value:unitCompile($refs.baojiadan && $refs.baojiadan.list && $refs.baojiadan.list[0] && $refs.baojiadan.list[0].sumamount || '0'),bg:'#E8F7EC',color:'#78B32B'},
                 {title:'最近报价时间',value:$refs.baojiadan && $refs.baojiadan.list && $refs.baojiadan.list[0] && $refs.baojiadan.list[0].submitdate,bg:'#F9F2E5',color:'#FF7603'},
               ]"
             ></myCard>
@@ -304,14 +304,14 @@
             <myCard 
               :list="
               [
-                {title:'项目合同总数',value:$refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].allQty,bg:'#F3F9FC',color:'#3874F6'},
-                {title:'项目合同总金额',value:tool.formatAmount($refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].sumSignAmount || 0),bg:'#E8F7EC',color:'#78B32B'},
-                {title:'进行中项目总数',value:$refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].inProgressQty,bg:'#FDF3F3',color:'#E85B5B'},
-                {title:'进行中项目金额',value:tool.formatAmount($refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].inProgressAmount || 0),bg:'#F9F2E5',color:'#FF7603'},
-                {title:'到期项目合同数',value:$refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].expireQty,bg:'#F3F9FC',color:'#3874F6'},
-                {title:'到期项目合同金额',value:tool.formatAmount($refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].expireAmount || 0),bg:'#F9F2E5',color:'#FF7603'},
+                {title:'合同总数',value:$refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].allQty,bg:'#F3F9FC',color:'#3874F6'},
+                {title:'合同金额',value:unitCompile($refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].sumSignAmount || 0),bg:'#E8F7EC',color:'#78B32B'},
+                {title:'进行中合同数',value:$refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].inProgressQty,bg:'#FDF3F3',color:'#E85B5B'},
+                {title:'进行中合同金额',value:unitCompile($refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].inProgressAmount || 0),bg:'#F9F2E5',color:'#FF7603'},
+                {title:'到期合同数',value:$refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].expireQty,bg:'#F3F9FC',color:'#3874F6'},
+                {title:'到期合同金额',value:unitCompile($refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].expireAmount || 0),bg:'#F9F2E5',color:'#FF7603'},
                 {title:'转订单合同数',value:$refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].convertOrderContractQty,bg:'#F3F9FC',color:'#3874F6'},
-                {title:'转订单金额',value:tool.formatAmount($refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].convertOrderContractAmount || 0),bg:'#E8F7EC',color:'#78B32B'},
+                {title:'转订单金额',value:unitCompile($refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].convertOrderContractAmount || 0),bg:'#E8F7EC',color:'#78B32B'},
               ]"
             ></myCard>
             <showIsNone title="合同明细">
@@ -505,6 +505,13 @@ export default {
     typeChange(param,el) {
       this[param].content.pageNumber = 1
       this.$refs[el] && this.$refs[el].listData()
+    },
+    unitCompile (num) {
+      if (num > 10000 || num < 10000) {
+        return this.tool.formatAmount(num / 10000,2,'¥') + '万'
+      } else {
+        return this.tool.formatAmount(num)
+      }
     }
   },
   mounted() {

+ 3 - 3
src/utils/tool.js

@@ -117,7 +117,7 @@ export default {
     return arr.filter((item) => !res.has(item[uniId]) && res.set(item[uniId], 1));
   },
   // 金额格式化
-  formatAmount(amount, decimalDigits) {
+  formatAmount(amount, decimalDigits, unit='') {
     // const amountStr = String(Number(amount).toFixed(decimalDigits))
     let a = new Intl.NumberFormat(undefined, { minimumFractionDigits: decimalDigits, maximumFractionDigits: decimalDigits }).format(amount)
     const amountStr = String(a)
@@ -129,9 +129,9 @@ export default {
        const integerPart = amountStr.substring(0, amountStr.indexOf('.'))
        // 小数部分
        const decimalPart = amountStr.substring(amountStr.length, amountStr.indexOf('.'))
-       return `${integerPart.replace(reg, ',')}${decimalPart}`
+       return unit + `${integerPart.replace(reg, ',')}${decimalPart}`
     } else {
-      return amountStr.replace(reg, ',')
+      return  unit + amountStr.replace(reg, ',')
     }
   },
   /* 给指定组件触发$emit事件 */