Browse Source

销售漏斗表格调整

qymljy 1 năm trước cách đây
mục cha
commit
d43d724f9f

+ 4 - 1
src/components/table/index10.vue

@@ -9,6 +9,9 @@
           width="35" fixed v-if="checkbox">
       </el-table-column>
       <el-table-column v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="tool.calcTableColWidth($refs.table,layout,index)" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?'right':false : false">
+        <template :slot="headerOptions ? headerOptions.includes(col.columnname) ? 'header' : '' : ''" slot-scope="scope">
+          <slot name="header" :column="{data:scope.row,columnname:col.columnname}"></slot>
+        </template>
         <template slot-scope="scope">
           <div class="table-panel">
             <!-- 自定义表格显示内容 -->
@@ -33,7 +36,7 @@ export default {
     custom:是否启用自定义结构;
     opwidth:操作列宽度
   */
-  props:['layout','data','custom','height','fixedName','width','checkbox','showSummary'],
+  props:['layout','data','custom','height','fixedName','width','checkbox','showSummary','headerOptions'],
   data () {
     return {
       list:[],

+ 11 - 1
src/views/mediaStatistics/modules/salesfunnel.vue

@@ -67,7 +67,17 @@
         <el-col :offset="1" :xs="8" :sm="8" :md="8" :lg="8" :xl="9">
           <div>
             <p class="title">{{$t(`表格数据`)}}</p>
-            <tableNewTemp :layout="tablecolsData" :data="tableData" :opwidth="200" :custom="true" >
+            <tableNewTemp :layout="tablecolsData" :data="tableData" :opwidth="200" :custom="true" :headerOptions="['signamount_due','dealamount']">
+              <template v-slot:header="scope">
+                <div v-if="scope.column.columnname == 'signamount_due'">
+                  <p>{{$t(`预计签约`)}}</p>
+                  <p>{{$t(`金额(万元)`)}}</p>
+                </div>
+                <div v-if="scope.column.columnname == 'dealamount'">
+                  <p>{{$t(`项目成交`)}}</p>
+                  <p>{{$t(`金额(万元)`)}}</p>
+                </div>
+              </template>
               <template v-slot:customcol="scope">
                 <div>
                   {{scope.column.data[[scope.column.columnname]]?scope.column.data[[scope.column.columnname]]:'--'}}