Browse Source

暂存新建居间费用

qymljy 1 year ago
parent
commit
b241a88800

+ 299 - 0
src/HDrpManagement/contractManage/components/priceDifference/addPriceDiff.vue

@@ -0,0 +1,299 @@
+<template>
+  <div>
+    <el-button size="small" type="primary" @click="addBtn(drawerFormVisible = true)">新 建</el-button>
+    <el-drawer
+        :title="title"
+        :visible.sync="drawerFormVisible"
+        size="700px"
+        direction="rtl"
+        append-to-body
+        :show-close="false"
+        @close="onClose">
+      <div class="drawer__panel">
+        <el-row :gutter="10">
+          <el-form :model="form"  ref="form" :rules="rules" label-width="125px" label-position="right" size="mini">
+            <el-col :span="24">
+              <el-form-item label="合同标题:" prop="title" :rules="{ required: true, message: '请填写合同标题', trigger: 'change' }">
+                <el-input v-model="form.title" placeholder="合同标题"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="居间商:" :rules="{ required: false, message: '请选择居间商', trigger: 'change' }">
+                <el-popover
+                    placement="bottom"
+                    trigger="manual"
+                    v-model="agentVisible"
+                    width="500">
+                  <selectAgentNew ref="member" type="22" :param="agentListPrams" :radio="true" @onSelect="centerChange" @onCancel="agentVisible = false" ></selectAgentNew>
+                  <el-input readonly type="text" slot="reference" size="small" @focus="showChange('agentVisible')" v-model="ascription.enterprisename" placeholder="请选择居间商" >
+                    <template slot="append">
+                      <el-button size="small" @click="agentVisible = false;ascription.enterprisename = '';agentListPrams.content.where.condition = '';$refs.member.selected = []" style="width:100%" type="primary">清空</el-button>
+                    </template>
+                  </el-input>
+                </el-popover>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="合同:" prop="ascription_contractid" :rules="{ required: true, message: '请输入合同', trigger: 'change' }">
+                <el-input v-model="ascription.ascription_title" placeholder="合同" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="项目名称:" prop="projectname">
+                <el-input v-model="ascription.projectname" placeholder="项目名称" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="项目编号:" prop="projectnum">
+                <el-input v-model="ascription.projectnum" placeholder="项目编号" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="客户名称:" prop="customername">
+                <el-input v-model="ascription.customername" placeholder="客户名称" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="业务员:" prop="saler_hrid" :rules="{ required: true, message: '请填写业务员', trigger: 'change' }">
+                <el-input v-model="ascription.salername" placeholder="业务员" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="签约日期:" prop="signdate" :rules="{ required: true, message: '请选择签约日期', trigger: 'change' }">
+                <el-input v-model="form.signdate" placeholder="签约日期" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="有效期:" prop="begdate" :rules="{ required: true, message: '请选择有效期', trigger: 'change' }">
+                <el-input v-model="ascription.expiration_date" placeholder="有效期" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="订单金额比例:" prop="orderratio" >
+                <el-input v-model="form.orderratio" placeholder="请填写比例,百分数%" ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="合同描述:" prop="remarks">
+                <el-input v-model="form.remarks" placeholder="请填写描述" ></el-input>
+              </el-form-item>
+            </el-col>
+          </el-form>
+        </el-row>
+      </div>
+      <div class="fixed__btn__panel">
+        <el-button  size="small" @click="onClose" class="normal-btn-width inline-16">取 消</el-button>
+        <el-button size="small" type="primary" :loading="loading" @click="onSubmit" class="normal-btn-width">确 定</el-button>
+      </div>
+    </el-drawer>
+    <el-dialog  :visible.sync="dialogTableVisible" append-to-body center width="780px">
+      <template slot="title">
+        <span style="float: left" >居间费调整确认</span>
+      </template>
+      <p style="color: red" class="mt-10">以下是居间费调整前后情况,若确认调整,系统自动将业务员提成重新计算并生成新的收入凭证</p>
+      <div class="mt-10">
+        <span>合计</span>
+        <span style="margin-left: 20px">调整前提成:<span style="color: red;margin-left: 10px">{{totalrewardamount == 0?'¥ '+tool.formatAmount(0,2):'¥ '+tool.formatAmount(totalrewardamount,2)}}</span></span>
+        <span style="margin-left: 20px">调整后提成:<span style="color: red;margin-left: 10px">{{totaladjustrewardamount == 0?'¥ '+tool.formatAmount(0,2):'¥ '+tool.formatAmount(totaladjustrewardamount,2)}}</span></span>
+        <span style="margin-left: 20px">差额:<span style="color: red;margin-left: 10px">{{totalsubamount == 0?'¥ '+tool.formatAmount(0,2):'¥ '+tool.formatAmount(totalsubamount,2)}}</span></span>
+      </div>
+      <table-detail :layout="adjustTable" :data="adjustList" :custom="true" :width="true" :height="tableHieght">
+        <template v-slot:customcol="scope" >
+          <div v-if="scope.column.columnname == 'rewardamount'">
+            {{scope.column.data[[scope.column.columnname]]?tool.formatAmount(scope.column.data[[scope.column.columnname]],2):scope.column.data[[scope.column.columnname]] == 0?'0.00':'--'}}
+          </div>
+          <div v-else-if="scope.column.columnname == 'adjustrewardamount'" style="color: red">
+            {{scope.column.data[[scope.column.columnname]]?tool.formatAmount(scope.column.data[[scope.column.columnname]],2):scope.column.data[[scope.column.columnname]] == 0?'0.00':'--'}}
+          </div>
+          <div v-else-if="scope.column.columnname == 'subamount'">
+            {{scope.column.data[[scope.column.columnname]]?tool.formatAmount(scope.column.data[[scope.column.columnname]],2):scope.column.data[[scope.column.columnname]] == 0?'0.00':'--'}}
+          </div>
+          <div v-else>
+            {{ scope.column.data[[scope.column.columnname]] || scope.column.columnname === 'operation' ? scope.column.data[[scope.column.columnname]] : '--' }}
+          </div>
+        </template>
+      </table-detail>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogTableVisible = false">取消</el-button>
+        <el-button type="primary" @click="dialogTableVisible = false">确定调整</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import selectAgentNew from '../selectAgentNew.vue'
+export default {
+  name: "addPriceDiff",
+  props:["data"],
+  components:{selectAgentNew},
+  data(){
+    return {
+      title:'新建居间协议',
+      drawerFormVisible:false,
+      dialogTableVisible:false,
+      agentVisible:false,
+      loading:false,
+      tableHieght:'calc(100vh - 380px)',
+      form:{
+        "sa_contractid": 0,//合同id
+        "sys_enterpriseid": "",//居间商id
+        "begdate": "",//有效期开始时间
+        "enddate": "",//有效期截止时间
+        "sa_projectid": "",//项目id选择项目合同时传
+        "type": "居间",
+        "saler_hrid": "",//业务员id
+        "signdate": "",//签约时间
+        "remarks": "",//备注
+        "title": "",//标题
+        "calculatemodel": "",
+        "orderratio": "",//订单金额比例
+        "ascription_contractid": "",//归属合同ID,关联合同ID
+        "billno": "",
+      },
+      ascription:{
+        "enterprisename":"",
+        "ascription_title":"",
+        "projectname":"",
+        "projectnum":"",
+        "customername":"",
+        "salername":"",
+        "expiration_date":""
+      },
+      agentListPrams: {
+        "id": 20220920083901,
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": "",
+            "type":5,
+            "typemx":"",
+          }
+        }
+      },
+      rules:{
+        orderratio: [
+          { pattern:/^[0-9]+\.{0,1}[0-9]{0,4}$/,message: '输入不合法,请输入数值',trigger: 'blur'},
+          { required: true, message: '请填写比例,百分数%', trigger: 'blur' },
+        ],
+      },
+      adjustParam:{
+        "id": 20240828165904,
+        "content": {
+          "sa_contractid": "0",
+          "orderratio": "",
+          "isadd": true, //新建时请求确认列表传true
+          "ascription_contractid": "",// 来源合同id
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": ""
+          }
+        }
+      },
+      adjustList:[],
+      adjustTable:[],
+      adjustTotal:0,
+      adjustCurrentPage:0,
+      totalrewardamount:0,
+      totaladjustrewardamount:0,
+      totalsubamount:0
+    }
+  },
+  methods:{
+    addBtn(){
+      this.form.title = this.data.enterprisename + '/' + this.data.title + '_居间费'
+      this.form.ascription_contractid = this.data.sa_contractid
+      this.form.sa_projectid = this.data.sa_projectid
+      this.form.saler_hrid = this.data.saler_hrid
+      this.form.begdate = this.data.begdate
+      this.form.enddate = this.data.enddate
+      this.form.signdate = this.data.signdate
+      this.ascription = {
+        "ascription_title":this.data.title,
+        "projectname":this.data.projectname,
+        "projectnum":this.data.projectnum,
+        "customername":this.data.enterprisename,
+        "salername":this.data.salername,
+        "expiration_date":this.data.begdate + '至' + this.data.enddate
+      }
+    },
+    editBtn(data){
+      this.title = '编辑居间协议'
+      this.form.title = data.title
+      this.form.sa_contractid = data.sa_contractid
+      this.form.sys_enterpriseid = data.sys_enterpriseid == -1 ? '':data.sys_enterpriseid
+      this.form.orderratio = Math.round((data.orderratio * 100)*100)/100
+      this.form.ascription_contractid = this.data.sa_contractid
+      this.form.sa_projectid = this.data.sa_projectid
+      this.form.saler_hrid = this.data.saler_hrid
+      this.form.begdate = this.data.begdate
+      this.form.enddate = this.data.enddate
+      this.form.signdate = this.data.signdate
+      this.ascription = {
+        "ascription_title":this.data.title,
+        "enterprisename":data.sys_enterpriseid == -1  ? '':data.enterprisename,
+        "projectname":this.data.projectname,
+        "projectnum":this.data.projectnum,
+        "customername":this.data.enterprisename,
+        "salername":this.data.salername,
+        "expiration_date":this.data.begdate + '至' + this.data.enddate
+      }
+    },
+    onSubmit(){
+      this.$refs.form.validate(async (valid)=>{
+        this.loading = true
+        if (!valid) return false
+        this.form.orderratio = (this.form.orderratio / 100).toFixed(4)
+        let res = await this.$api.requested({
+          "id": 20221121185302,
+          "content": this.form
+        })
+        if (res.code == 0){
+          this.form.orderratio = this.form.orderratio * 100
+          this.loading = false
+        }else {
+          this.dialogTableVisible = true
+          this.onAdjust(res.data)
+        }
+      })
+    },
+    async onAdjust(data){
+      console.log(data,'data3333')
+      this.adjustParam.content.sa_contractid = data.sa_contractid
+      this.adjustParam.content.orderratio = data.orderratio
+      this.adjustParam.content.ascription_contractid = data.ascription_contractid
+      const res = await this.$api.requested(this.adjustParam)
+      this.adjustList = res.data
+      this.adjustTotal = res.total
+      this.adjustCurrentPage = res.pageNumber
+      this.totaladjustrewardamount = res.data[0].totaladjustrewardamount
+      this.totalrewardamount = res.data[0].totalrewardamount
+      this.totalsubamount = res.data[0].totalsubamount
+    },
+    showChange(){
+      this.agentVisible = true
+      this.$refs.member.listData(this.$refs.member.param.content.pageNumber = 1)
+    },
+    centerChange (data) {
+      this.ascription.enterprisename = data[0].enterprisename
+      this.form.sys_enterpriseid = data[0].sys_enterpriseid
+      this.agentVisible = false
+    },
+    onClose(){
+      this.drawerFormVisible = false
+      this.form.orderratio = ''
+      this.$refs.form.resetFields()
+      this.form.remarks = ''
+    }
+  },
+  created() {
+    this.adjustTable = this.tool.tabelCol(this.$route.name).adjustTable.tablecols
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 100 - 0
src/HDrpManagement/contractManage/components/priceDifference/index.vue

@@ -0,0 +1,100 @@
+<template>
+  <div>
+    <el-input style="width:200px;" placeholder="输入搜索内容" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="mt-10 input-with-select inline-16 layout_search__panel" clearable>
+    </el-input>
+    <addPriceDiff ref="priceDiff" class="inline-16" :data="data"></addPriceDiff>
+    <table-detail  :layout="tablecols" :data="list" :custom="true" :width="true" :height="tableHieght">
+      <template v-slot:customcol="scope" >
+        <div v-if="scope.column.columnname == 'orderratio'">
+          {{scope.column.data[[scope.column.columnname]]?tool.formatAmount(scope.column.data[[scope.column.columnname]],2):scope.column.data[[scope.column.columnname]] == 0?'0.00':'--'}}
+        </div>
+        <div v-else-if="scope.column.columnname == 'amount'">
+          {{scope.column.data[[scope.column.columnname]]?tool.formatAmount(scope.column.data[[scope.column.columnname]],2):scope.column.data[[scope.column.columnname]] == 0?'0.00':'--'}}
+        </div>
+        <div v-else-if="scope.column.columnname == 'rebate'">
+          {{scope.column.data[[scope.column.columnname]]?tool.formatAmount(scope.column.data[[scope.column.columnname]],2):scope.column.data[[scope.column.columnname]] == 0?'0.00':'--'}}
+        </div>
+        <div v-else>
+          {{ scope.column.data[[scope.column.columnname]] || scope.column.columnname === 'operation' ? scope.column.data[[scope.column.columnname]] : '--' }}
+        </div>
+      </template>
+      <template v-slot:opreation="scope">
+        <el-button type="text" @click="adjustClick(scope.data)">调整</el-button>
+      </template>
+    </table-detail>
+    <div  class="container normal-panel" style="text-align:right;padding-bottom: 0!important;">
+      <el-pagination
+          background
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="currentPage"
+          :page-sizes="[50, 100, 150, 200]"
+          :page-size="50"
+          layout="total,sizes, prev, pager, next, jumper"
+          :total="total">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+import addPriceDiff from "./addPriceDiff"
+export default {
+  name: "index",
+  props:["data"],
+  components:{addPriceDiff},
+  data(){
+    return {
+      tableHieght:'calc(100vh - 380px)',
+      tablecols:[],
+      list:[],
+      currentPage:0,
+      total:0,
+      param:{
+        "id": 20240829103004,
+        "content": {
+          "sa_contractid": "",
+          "pageNumber": 1,
+          "pageSize": 50,
+          "where": {
+            "condition": ""
+          }
+        }
+      }
+    }
+  },
+  methods:{
+    async listData(){
+      this.param.content.sa_contractid = this.$route.query.id
+      const res = await this.$api.requested(this.param)
+      this.list = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.listData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.listData()
+    },
+    adjustClick(data){
+      this.$refs.priceDiff.drawerFormVisible = true
+      this.$refs.priceDiff.editBtn(data)
+    },
+  },
+  mounted() {
+    this.listData()
+  },
+  created() {
+    this.tablecols = this.tool.tabelCol(this.$route.name).priceDifferenceTable.tablecols
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 34 - 11
src/HDrpManagement/contractManage/modules/detail.vue

@@ -9,8 +9,7 @@
         idname="sa_contractid"
         typeTask="合同"
         ownertable="sa_contract"
-        :tabs="mainData.type === '项目' ? ['产品明细折扣','产品类别折扣','详细信息'] : mainData.type === '框架' ? ['产品明细折扣','产品类别折扣','业绩目标','详细信息'] : mainData.type === '居间' ? siteid === 'HY' ? ['详细信息'] : ['产品明细折扣','产品类别折扣','详细信息']  : mainData.type === '直销' ? ['产品明细折扣','产品类别折扣','业绩目标','详细信息'] : ['工具清单','详细信息']"
-
+        :tabs="tabs"
         :statusCheck="[{key:'status',value:'已提交'},{key:'status',value:'审核'},{key:'status',value:'已终止'}]"
         @pageChange="pageChange"
         @onEditSuccess="editSuccess">
@@ -152,15 +151,9 @@
             </el-dialog>
           </template>
         </itemClass>
-        <!--合同条款-->
-<!--        <contractClause :sys_enterpriseid="mainData.sys_enterpriseid" :disabled="mainData.status != '新建' || !isLeader" ref="Claus" v-if=" mainData.type == '工具借用'">
-        </contractClause>-->
         <BaseInfo v-if="mainData.type === '工具借用'" :detailInfo="detailInfo"/>
       </div>
       <div slot="slot2">
-        <!--合同条款-->
-<!--        <contractClause :sys_enterpriseid="mainData.sys_enterpriseid" :disabled="mainData.status != '新建' || !isLeader" ref="Claus" v-if="mainData.type == '项目' ">
-        </contractClause>-->
         <!--业绩目标-->
         <taskTarget ref="taskTarget" v-if="Object.keys(mainData).length > 0 && (mainData.type == '框架' || mainData.type == '直销')" :data="mainData">
           <template v-slot:addTarget="scope">
@@ -173,8 +166,16 @@
             <del-target @onSuccess="$refs.taskTarget.queryData()" class="inline-16" :disabled="mainData.status != '新建' || !isLeader" v-if="tool.checkAuth($route.name,'taskTargetManage')" :id="scope.data.sa_salestargetbillid"></del-target>
           </template>
         </taskTarget>
+        <div>
+          <!--   差价     -->
+          <priceDifference v-if="mainData.type == '项目' && siteid == 'HY' && tool.checkAuth($route.name,'brokerageFeeEntrySet')" :data="mainData"></priceDifference>
+
+          <!--   详细信息     -->
+          <BaseInfo v-else :detailInfo="detailInfo"/>
+        </div>
 
-        <BaseInfo v-if="mainData.type !== '框架' && mainData.type !== '直销'" :detailInfo="detailInfo"/>
+        <!--   详细信息     -->
+        <BaseInfo v-if="(mainData.type !== '框架' && mainData.type !== '直销' && mainData.type !== '项目')" :detailInfo="detailInfo"/>
       </div>
       <div slot="slot3">
         <BaseInfo v-if="mainData.type !== '居间'" :detailInfo="detailInfo"/>
@@ -207,6 +208,7 @@ import BaseInfo from '@/HDrpManagement/projectChange/modules/modules/baseInfo/ba
 import itemClass from '../components/itemClass/index.vue'
 import importFile from '../components/importFile'
 import copyTo from '../components/copyTo'
+import priceDifference from '../components/priceDifference/index'
 import { Loading } from 'element-ui';
 export default {
   name: "detail",
@@ -224,7 +226,8 @@ export default {
         "sa_contractid": "",
         "isadd":''
       },
-      siteid:JSON.parse(sessionStorage.getItem('active_account')).siteid
+      siteid:JSON.parse(sessionStorage.getItem('active_account')).siteid,
+      tabs:[]
     }
   },
   components:{
@@ -250,7 +253,8 @@ export default {
     revoke,
     itemClass,
     importFile,
-    copyTo
+    copyTo,
+    priceDifference
   },
   watch: {
     mainData: {
@@ -297,6 +301,24 @@ export default {
     }
   },
   methods:{
+    tabsSet(){
+      switch (this.mainData.type) {
+        case '项目':
+          this.tabs = this.siteid == 'HY'?this.tool.checkAuth(this.$route.name,'brokerageFeeEntrySet')?['产品明细折扣','产品类别折扣','差价','详细信息']:['产品明细折扣','产品类别折扣','详细信息']:['产品明细折扣','产品类别折扣','详细信息']
+              break
+        case '框架':
+          this.tabs = this.siteid == 'HY'?this.tool.checkAuth(this.$route.name,'brokerageFeeEntrySet')?['产品明细折扣','产品类别折扣','业绩目标','差价','详细信息']:['产品明细折扣','产品类别折扣','业绩目标','详细信息']:['产品明细折扣','产品类别折扣','业绩目标','详细信息']
+              break
+        case '居间':
+          this.tabs = this.siteid == 'HY'?['详细信息']:['产品明细折扣','产品类别折扣','详细信息']
+              break
+        case '直销':
+          this.tabs = this.siteid == 'HY'?this.tool.checkAuth(this.$route.name,'brokerageFeeEntrySet')?['产品明细折扣','产品类别折扣','业绩目标','差价','详细信息']:['产品明细折扣','产品类别折扣','业绩目标','详细信息']:['产品明细折扣','产品类别折扣','业绩目标','详细信息']
+              break
+        default:
+          this.tabs = ['工具清单','详细信息']
+      }
+    },
     editSuccess(){
       this.queryMainData(this.$route.query.id)
     },
@@ -320,6 +342,7 @@ export default {
           : this.$router.replace({path:'/contractDetail',query:{id:this.$route.query.id,rowindex:this.$route.query.rowindex,type:this.mainData.type,tabIndex:this.$route.query.tabIndex,listqueryid:listqueryid,fieldname:'sa_contractid'}})
 
       this.changeDataStructure()
+      this.tabsSet()
     },
     changeDataStructure() {
       let that = this

+ 78 - 0
src/components/dynamic-table-detail/index.vue

@@ -0,0 +1,78 @@
+<template>
+  <div>
+    <!-- :header-cell-style="{background:'#EEEEEE',color:'#333'}" -->
+    <el-table ref="table" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini"  :height="height"  @row-click="rowClick" :style="{width:'100%',minHeight:minHeight?minHeight:''}" :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
+              :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}" border @selection-change="selectionChange">
+      <el-table-column
+          type="selection"
+          width="35" fixed v-if="checkbox">
+      </el-table-column>
+      <el-table-column show-overflow-tooltip v-for="col in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :min-width="width ? col.width : 150" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?redirect ? redirect : 'right' :false : false">
+        <template v-slot:header="{ column,$index }" v-if="customHeader">
+          <slot name="header" :data="column"></slot>
+        </template>
+        <template slot-scope="scope">
+          <div class="table-panel">
+            <!-- 自定义表格显示内容 -->
+            <slot v-if="custom" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>
+            <!-- 否则就是默认 -->
+            <span v-else>{{scope.row[col.columnname]}}</span>
+            <!-- 操作结构内容 -->
+            <slot v-if="col.columnname === 'operation'" name="opreation" :data="scope.row"></slot>
+          </div>
+        </template>
+      </el-table-column>
+    </el-table>
+  </div>
+</template>
+
+<script>
+import {mapGetters} from "vuex"
+export default {
+  /*
+    layout:表结构数据;
+    data:表渲染数据;
+    custom:是否启用自定义结构;
+    opwidth:操作列宽度
+  */
+  props:['layout','data','custom','height','fixedName','width','checkbox','redirect','customHeader','minHeight'],
+  data () {
+    return {
+      list:[],
+    }
+  },
+  computed:{
+    ...mapGetters({
+      loading:'loading'
+    })
+  },
+  watch:{
+    data(val){
+      this.doLayout()
+    }
+  },
+  methods:{
+    rowClick (row) {
+      this.$emit('rowClick',row)
+    },
+    tableClassName ({row,rowIndex}) {
+      row.index = rowIndex
+    },
+    selectionChange(row){
+      this.$emit('selectionChange',row)
+    },
+    doLayout(){
+      if (this.$refs.table){
+        this.$nextTick(()=>{
+          this.$refs.table.doLayout()
+        })
+      }
+    }
+  },
+  mounted () {
+  }
+}
+
+</script>
+<style>
+</style>

+ 3 - 0
src/main.js

@@ -20,6 +20,7 @@ import tableLayout from './components/dynamic-table'
 import tableNewLayout from './components/dynamic-newTable'
 import basicLayout from './components/normal-basic-layout'
 import tableMainLayout from './template/tableMainLayout'
+import tableDetail from './components/dynamic-table-detail'
 import normalLayout from './components/normal-basic-layout/normal.vue'
 import basicDetails from './components/normal-basic-layout/details'
 import deleteBtn from './components/delete_btn/index'
@@ -59,6 +60,8 @@ Vue.component('tableNewLayout',tableNewLayout)
 
 Vue.component('tableMainLayout',tableMainLayout)
 
+Vue.component('tableDetail',tableDetail)
+
 Vue.component('basicLayout', basicLayout)
 
 Vue.component('basicDetails', basicDetails)