qymljy пре 2 година
родитељ
комит
bca8d35a75

+ 148 - 19
src/Form/accountsOverdueAdjustment/add.vue

@@ -42,16 +42,19 @@
                       <p>{{scope.column.data[scope.column.columnname]}}</p>
                     </template>
                   </tableTemplate>
-                  <el-input slot="reference" :readonly="true" v-model="sonum" autocomplete="off" placeholder="请选择客户" ></el-input>
+                  <el-input slot="reference" :readonly="true" v-model="sonum" autocomplete="off" placeholder="请选择订单" ></el-input>
                 </el-popover>
               </el-form-item>
             </el-col>
             <el-col :span="24">
               <el-form-item label="订单行" prop="orderRow">
-                <tableTemplate prop="amount" :checkbox="true" ref="orderRow" :param="orderRow.param" :layout="orderRow.tablecols" height="calc(100vh - 295px)" :custom="true" :width="true" @selectionChange="orderRowSelect">
+                <tableTemplate prop="amount" :isPagination="false" :isInput="false" :checkbox="false" ref="orderRow" :layout="orderRow.tablecols" height="calc(100vh - 266px)" :custom="true" :width="true">
+                  <template v-slot:add>
+                    <el-button size="small" type="primary" @click="addRowsShow(visible = true)" :disabled="sonum === ''">添加</el-button>
+                  </template>
                   <template v-slot:customcol="scope">
                     <div v-if="scope.column.columnname === 'amount'">
-                      <el-form-item   style="margin-bottom: 0 !important;" :rules="[{required: true, validator: validateAmount(scope.column.data,scope.column.data.amount,scope.column.data.overdueamount),message: '姓名不能为空', trigger: 'blur'}]" >
+                      <el-form-item   style="margin-bottom: 0 !important;" :rules="[{required: true, validator: validateAmount(scope.column.data,scope.column.data.amount,scope.column.data.overdueamount),message: '不能为空', trigger: 'blur'}]" >
                         <el-input  v-model="scope.column.data.amount" autocomplete="off" placeholder="请输入" ></el-input>
                         <div style="font-size: 12px;color: red" v-if="scope.column.data.isAmount">大于原逾期金额</div>
                       </el-form-item>
@@ -69,6 +72,9 @@
                     </div>
                     <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
                   </template>
+                  <template v-slot:opreation="scope">
+                    <el-button size="mini" type="text" @click="delRows(scope.data)" :disabled="sonum === ''">删除</el-button>
+                  </template>
                 </tableTemplate>
               </el-form-item>
             </el-col>
@@ -80,14 +86,56 @@
         <el-button size="small" type="primary" @click="onSubmit" :loading="loading" class="normal-btn-width" :disabled="orderInfo.length === 0">确 定</el-button>
       </div>
     </el-drawer>
+    <el-drawer
+        title="可选订单行"
+        :visible.sync="visible"
+        size="65%"
+        direction="rtl"
+        :show-close="false"
+        append-to-body
+        @close="onClose(visible = false)">
+      <div class="drawer__panel" style="margin-bottom: 0 !important;">
+        <el-form :model="form" :rules="rules" ref="form"  label-position="right" size="mini">
+        <tableTemplate ref="rows" :checkbox="true" :isInput="false" :isPagination="false" :param="orderRow.param" :layout="tablecols" height="calc(100vh - 200px)" :custom="true" :width="true" @selectionChange="rowsSelect" @listData="queryListData">
+          <template v-slot:customcol="scope">
+            <div v-if="scope.column.columnname === 'amount'">
+
+                <el-form-item   style="margin-bottom: 0 !important;" :rules="[{required: true, validator: validateAmount(scope.column.data,scope.column.data.amount,scope.column.data.overdueamount),message: '不能为空', trigger: 'blur'}]" >
+                  <el-input  v-model="scope.column.data.amount" autocomplete="off" placeholder="请输入" style="width: 100%"></el-input>
+                  <div style="font-size: 12px;color: red" v-if="scope.column.data.isAmount">大于原逾期金额</div>
+                </el-form-item>
+            </div>
+            <div v-else-if="scope.column.columnname === 'intoaccountdate'">
+              <el-date-picker
+                  style="width: 100%"
+                  v-model="scope.column.data.intoaccountdate"
+                  value-format="yyyy-MM-dd"
+                  size="mini"
+                  format="yyyy-MM-dd"
+                  type="date"
+                  @change="orderRowChange(scope.column.data)"
+                  placeholder="选择日期">
+              </el-date-picker>
+            </div>
+            <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
+          </template>
+        </tableTemplate>
+        </el-form>
+      </div>
+      <div class="fixed__btn__panel">
+        <el-button size="small" @click="visible = false" class="normal-btn-width">取 消</el-button>
+        <el-button size="small" type="primary" @click="rowsData" :loading="loading" class="normal-btn-width" :disabled="rowsInfo.length === 0">确 定</el-button>
+      </div>
+    </el-drawer>
   </div>
 </template>
 
 <script>
 import tableTemplate from '@/template/tableTemplate/index'
+import addRows from './addRows'
 export default {
   name: "add",
-  components:{tableTemplate},
+  components:{tableTemplate,addRows},
   data(){
     var validateAmount = (rule, value, callback) =>{
       console.log(rule,'rule')
@@ -95,8 +143,10 @@ export default {
     }
     return {
       dialogVisible:false,
+      visible:false,
       enterprisename:'',
       sonum:'',
+      tablecols:[],
       customer:{
         show:false,
         tablecols:[],
@@ -132,13 +182,14 @@ export default {
           "content": {
             "sa_orderid": "",
             "pageNumber": 1,
-            "pageSize": 20,
+            "pageSize": 999,
             "where": {
               "condition": ""
             }
           }
         }
       },
+
       form:{
         "sys_enterpriseid": "",
         "sa_overdueadjustid": 0,
@@ -160,21 +211,55 @@ export default {
           // 其他校验规则
         ],*/
       },
+      rowsInfo:[],
       orderInfo:[],
       loading:false,
-      inputValidations: {}
+      rowsListOld:[],
+      inputValidations: {},
+      isCheck:false
     }
   },
   methods:{
     validateAmount(data,val,oldVal) {
       if (val > oldVal){
         data.isAmount = true
+        this.isCheck = true
       }else {
         data.isAmount = false
+        this.isCheck = false
       }
       this.orderRowChange(data)
     },
     addShow(){
+
+    },
+    addRowsShow(){
+      let oldArr = this.rowsListOld
+      var newArr = []
+      var k = 0
+      for (var i = 0; i < oldArr.length; i++) {
+        let flag = 0
+        for (var j=0;j< this.orderInfo.length;j++){
+          if (this.orderInfo[j].sa_orderitemsid === oldArr[i].sa_orderitemsid && this.orderInfo[j].sa_order_receivableruleid === oldArr[i].sa_order_receivableruleid) {
+            flag = 1
+            break
+          }
+        }
+        if (flag === 0){
+          newArr[k] = oldArr[i]
+          k ++
+        }
+      }
+      this.$refs.rows.list = newArr
+
+    },
+    delRows(data){
+      this.orderInfo.forEach(item=>{
+        if (data.sa_orderitemsid === item.sa_orderitemsid && data.sa_order_receivableruleid === item.sa_order_receivableruleid){
+          this.orderInfo.splice(item.index,1)
+        }
+      })
+      this.$refs.orderRow.list = this.orderInfo
     },
     /*可选客户*/
     async customerList(){
@@ -195,14 +280,18 @@ export default {
       this.sonum = item.sonum
       this.order.show = false
       this.orderRow.param.content.sa_orderid = item.sa_orderid
-      this.$refs.orderRow.listData()
+      this.visible = true
+      this.$nextTick(()=>{
+        this.$refs.rows.listData()
+      })
     },
-    /*可选订单行*/
-    orderRowSelect(item){
-      console.log(item)
-      this.form.orderRow = item
-      this.orderInfo = []
-      this.orderInfo = this.form.orderRow.map(item=>{
+    queryListData(list){
+      this.rowsListOld = list
+    },
+    /*选择订单行*/
+    rowsSelect(item){
+      this.rowsInfo = item
+      this.rowsInfo = item.map(item=>{
         return {
           "sa_orderitemsid": item.sa_orderitemsid,
           "sa_overdueadjustitemsid": "0",
@@ -212,10 +301,43 @@ export default {
           "ownertable": item.ownertable,
           "ownerid": item.ownerid,
           "amount": item.amount,
-          "rowindex":item.rowindex
+          "rowindex":item.rowindex,
+          "rowno":item.rowno,
+          "overdueamount":item.overdueamount,
+          "overduedays":item.overduedays,
+          "sa_order_receivableruleid":item.sa_order_receivableruleid
+        }
+      })
+      console.log(this.rowsInfo,'ordersInfo')
+    },
+    /*确定所选订单行*/
+    rowsData(){
+      if (this.rowsInfo.length === 0){
+        this.orderInfo = this.rowsInfo
+        this.visible = false
+        this.$refs.orderRow.list = this.orderInfo
+      }else {
+        this.visible = false
+        this.orderInfo = this.orderInfo.concat(this.rowsInfo)
+        this.$refs.orderRow.list = this.orderInfo
+      }
+      this.orderInfo = this.$refs.orderRow.list.map(item=>{
+        return {
+          "sa_orderitemsid": item.sa_orderitemsid,
+          "sa_overdueadjustitemsid": "0",
+          "oldintoaccountdate": item.oldintoaccountdate,
+          "point": item.point,
+          "intoaccountdate": item.intoaccountdate,
+          "ownertable": item.ownertable,
+          "ownerid": item.ownerid,
+          "amount": item.amount,
+          "rowindex":item.rowindex,
+          "rowno":item.rowno,
+          "overdueamount":item.overdueamount,
+          "overduedays":item.overduedays,
+          "sa_order_receivableruleid":item.sa_order_receivableruleid
         }
       })
-      console.log(this.orderInfo,'orderInfo')
     },
     orderRowChange(item){
       this.orderInfo.forEach(row=>{
@@ -228,16 +350,18 @@ export default {
     onSubmit(){
       this.$refs.form.validate(async (valid)=> {
         if (!valid) return false
-        console.log(this.orderInfo, '22222')
         let flag = false
         this.orderInfo.forEach(item=>{
           if (item.amount && item.intoaccountdate){
-            flag = true
+            if (this.isCheck){
+              flag = false
+            }else {
+              flag = true
+            }
           }else {
             flag = false
           }
         })
-        console.log(flag,'flag')
         if (flag){
           const res = await this.$api.requested({
             "id": 20240306134804,
@@ -267,7 +391,11 @@ export default {
             this.$message.error(res.msg)
           }
         }else {
-          this.$message.error('信息未完善')
+          if (this.isCheck){
+            this.$message.error('输入信息不合法')
+          }else {
+            this.$message.error('信息未完善')
+          }
         }
       })
 
@@ -278,6 +406,7 @@ export default {
     this.customer.tablecols = this.tool.tabelCol(this.$route.name).customerTable.tablecols
     this.order.tablecols = this.tool.tabelCol(this.$route.name).orderTable.tablecols
     this.orderRow.tablecols = this.tool.tabelCol(this.$route.name).orderRowTable.tablecols
+    this.tablecols = this.tool.tabelCol(this.$route.name).rowsTable.tablecols
   }
 }
 </script>

+ 69 - 0
src/Form/accountsOverdueAdjustment/addRows.vue

@@ -0,0 +1,69 @@
+<template>
+  <div>
+    <el-drawer
+        title="可选订单行"
+        :visible.sync="visible"
+        size="65%"
+        direction="rtl"
+        :show-close="false"
+        append-to-body
+        @close="onClose(visible = false)">
+      <div class="drawer__panel" style="margin-bottom: 0 !important;">
+        <tableTemplate :checkbox="true" ref="rows" :param="orderRows.param" :layout="tablecols" height="calc(100vh - 295px)" :custom="true" :width="true" @selectionChange="rowsSelect">
+          <template v-slot:customcol="scope">
+            <!--            <div v-if="scope.column.columnname === 'amount'">
+                        </div>
+                        <div v-else-if="scope.column.columnname === 'intoaccountdate'">
+                        </div>-->
+            <p>{{scope.column.data[scope.column.columnname]}}</p>
+          </template>
+        </tableTemplate>
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+import tableTemplate from '@/template/tableTemplate/index'
+export default {
+  name: "addRows",
+  components:{tableTemplate},
+  data(){
+    return {
+      visible:false,
+      tablecols:[],
+      orderRows:{
+        show:false,
+        param:{
+          "id": 20240319155104,
+          "content": {
+            "sa_orderid": "",
+            "pageNumber": 1,
+            "pageSize": 20,
+            "where": {
+              "condition": ""
+            }
+          }
+        }
+      },
+    }
+  },
+  methods:{
+    listData(){
+      this.visible = true
+      this.$refs.orderRows.listData()
+    },
+    rowsSelect(){},
+    onClose(){
+
+    }
+  },
+  created() {
+    this.tablecols = this.tool.tabelCol(this.$route.name).orderRowTable.tablecols
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 80 - 53
src/SDrpManagement/accountsOverdueAdjustment/modules/addOrderRows.vue

@@ -2,7 +2,7 @@
   <div>
     <el-button type="primary" size="small" @click="addShow(dialogVisible = true)" v-if="data.status === '新建'">新增</el-button>
     <el-drawer
-        title="新建订单行"
+        title="添加订单行"
         :visible.sync="dialogVisible"
         size="75%"
         direction="rtl"
@@ -10,34 +10,36 @@
         append-to-body
         @close="onClose(dialogVisible = false)">
       <div class="drawer__panel" style="margin-bottom: 0 !important;">
-        <tableTemplate :checkbox="true" ref="orderRow" :param="param" :layout="tablecols" height="calc(100vh - 245px)" :custom="true" :width="true" @selectionChange="orderRowSelect">
-          <template v-slot:customcol="scope">
-            <div v-if="scope.column.columnname === 'amount'">
-              <el-input  v-model="scope.column.data.amount" autocomplete="off" placeholder="请输入"
-                         :placeholder="'Input ' + scope.column.data.amount"
-                         :ref="'input_' + scope.column.data.amount"
-                         @change="validateInput(scope.column.data.amount)"
-              ></el-input>
-            </div>
-            <div v-else-if="scope.column.columnname === 'intoaccountdate'">
-              <el-date-picker
-                  style="width: 100%"
-                  v-model="scope.column.data.intoaccountdate"
-                  value-format="yyyy-MM-dd"
-                  format="yyyy-MM-dd"
-                  type="date"
-                  @change="orderRowChange(scope.column.data)"
-                  :picker-options="pickerOptions"
-                  placeholder="选择日期">
-              </el-date-picker>
-            </div>
-            <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
-          </template>
-        </tableTemplate>
+        <el-form :model="form"  ref="form"  label-position="right" size="mini">
+          <tableTemplate :checkbox="true" ref="orderRow" :isInput="false" :isPagination="false" :param="param" :layout="tablecols" height="calc(100vh - 245px)" :custom="true" :width="true" @selectionChange="orderRowSelect">
+            <template v-slot:customcol="scope">
+              <div v-if="scope.column.columnname === 'amount'">
+                <el-form-item   style="margin-bottom: 0 !important;" :rules="[{required: true, validator: validateAmount(scope.column.data,scope.column.data.amount,scope.column.data.overdueamount),message: '不能为空', trigger: 'blur'}]" >
+                  <el-input  v-model="scope.column.data.amount" autocomplete="off" placeholder="请输入" style="width: 100%"></el-input>
+                  <div style="font-size: 12px;color: red" v-if="scope.column.data.isAmount">大于原逾期金额</div>
+                </el-form-item>
+              </div>
+              <div v-else-if="scope.column.columnname === 'intoaccountdate'">
+                <el-date-picker
+                    style="width: 100%"
+                    v-model="scope.column.data.intoaccountdate"
+                    value-format="yyyy-MM-dd"
+                    format="yyyy-MM-dd"
+                    size="mini"
+                    type="date"
+                    @change="orderRowChange(scope.column.data)"
+                    :picker-options="pickerOptions"
+                    placeholder="选择日期">
+                </el-date-picker>
+              </div>
+              <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
+            </template>
+          </tableTemplate>
+        </el-form>
       </div>
       <div class="fixed__btn__panel">
         <el-button size="small" @click="dialogVisible = false" class="normal-btn-width">取 消</el-button>
-        <el-button size="small" type="primary" @click="onSubmit" :loading="loading" class="normal-btn-width">确 定</el-button>
+        <el-button size="small" type="primary" @click="onSubmit" :loading="loading" class="normal-btn-width" :disabled="orderInfo.length === 0">确 定</el-button>
       </div>
     </el-drawer>
   </div>
@@ -71,27 +73,28 @@ export default {
         "content": {
           "sa_orderid": "",
           "pageNumber": 1,
-          "pageSize": 20,
+          "pageSize": 999,
           "where": {
             "condition": ""
           }
         }
       },
-      form:[],
+      form:{},
       orderInfo:[],
-      inputValidations: {}
+      inputValidations: {},
+      isCheck:false
     }
   },
   methods:{
-    validateInput(index) {
-      console.log(index,'1111')
-     /* const inputValue = this.tableData[index].value;
-      // 校验规则示例:非空校验
-      if (inputValue.trim() === '') {
-        this.$set(this.inputValidations, `input_${index}`, false);
-      } else {
-        this.$set(this.inputValidations, `input_${index}`, true);
-      }*/
+    validateAmount(data,val,oldVal) {
+      if (val > oldVal){
+        data.isAmount = true
+        this.isCheck = true
+      }else {
+        data.isAmount = false
+        this.isCheck = false
+      }
+      this.orderRowChange(data)
     },
     addShow(){
       this.param.content.sa_orderid = this.data.sa_orderid
@@ -119,34 +122,58 @@ export default {
           "sa_overdueadjustitemsid": "0",
           "oldintoaccountdate": item.oldintoaccountdate,
           "point": item.point,
-          "intoaccountdate": item.intoaccountdate,
+          "intoaccountdate": '',
           "ownertable": item.ownertable,
           "ownerid": item.ownerid,
-          "amount": item.amount,
-          "rowindex":item.rowindex
+          "amount": '',
+          "rowindex":item.rowindex,
+          "sa_order_receivableruleid":item.sa_order_receivableruleid
         }
       })
       console.log(this.orderInfo,'orderInfo')
     },
     async onSubmit(){
-      const res = await this.$api.requested({
-        "id": "20240319154904",
-        "content": {
-          "sa_overdueadjustid": this.$route.query.id,
-          "overdueadjustitems": this.orderInfo
+      let flag = false
+      console.log(this.isCheck,'isCheck')
+      this.orderInfo.forEach(item=>{
+        if (item.amount && item.intoaccountdate){
+          if (this.isCheck){
+            flag = false
+          }else {
+            flag = true
+          }
+        }else {
+          flag = false
         }
       })
-      this.tool.showMessage(res,()=>{
-        this.dialogVisible = false
-        this.form = []
-        this.orderInfo = []
-        this.$emit('addSuccess')
-      })
+      if (flag){
+        const res = await this.$api.requested({
+          "id": "20240319154904",
+          "content": {
+            "sa_overdueadjustid": this.$route.query.id,
+            "overdueadjustitems": this.orderInfo
+          }
+        })
+        this.tool.showMessage(res,()=>{
+          this.dialogVisible = false
+          this.form = {}
+          this.orderInfo = []
+          this.$emit('addSuccess')
+        })
+      }else {
+        if (this.isCheck){
+          this.$message.error('输入信息不合法')
+        }else {
+          this.$message.error('信息未完善')
+        }
+
+      }
+
     },
     onClose(){}
   },
   created() {
-    this.tablecols = this.tool.tabelCol(this.$route.name).orderRowTable.tablecols
+    this.tablecols = this.tool.tabelCol(this.$route.name).rowsTable.tablecols
   }
 }
 </script>

+ 4 - 3
src/template/tableTemplate/index.vue

@@ -2,7 +2,7 @@
   <div>
     <!-- :header-cell-style="{background:'#EEEEEE',color:'#333'}" -->
     <slot name="add"></slot>
-    <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="input-with-select inline-16 layout_search__panel" clearable>
+    <el-input v-if="isInput !== false" 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="input-with-select inline-16 layout_search__panel" clearable>
     </el-input>
     <el-table ref="table" :row-class-name="tableClassName" highlight-current-row :data="list"  size="mini" :height="height ? height : list.length <= 5?'280px':'calc(100vh - 268px)'"  @row-click="rowClick" style="width:100%;margin-top: 10px" :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
               :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}" border @selection-change="selectionChange">
@@ -26,7 +26,7 @@
         </template>
       </el-table-column>
     </el-table>
-    <div class="container normal-panel" style="text-align:right;padding-bottom: 5px !important;">
+    <div class="container normal-panel" style="text-align:right;padding-bottom: 5px !important;" v-if="isPagination !== false">
       <el-pagination
           background
           @size-change="handleSizeChange"
@@ -51,7 +51,7 @@ export default {
   custom:是否启用自定义结构;
   opwidth:操作列宽度
 */
-  props:['layout','custom','param','height','fixedName','width','checkbox','redirect','customHeader','prop'],
+  props:['layout','custom','param','height','fixedName','width','checkbox','redirect','customHeader','prop','isInput','isPagination'],
   data () {
     return {
       list:[],
@@ -75,6 +75,7 @@ export default {
       this.list = res.data
       this.total = res.total
       this.currentPage = res.pageNumber
+      this.$emit('listData',this.list)
     },
     rowClick (row) {
       console.log(row,'row')

+ 115 - 0
src/template/tableTemplate/index1.vue

@@ -0,0 +1,115 @@
+<template>
+  <div>
+    <!-- :header-cell-style="{background:'#EEEEEE',color:'#333'}" -->
+    <slot name="add"></slot>
+    <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="input-with-select inline-16 layout_search__panel" clearable>
+    </el-input>
+    <el-table ref="table" :row-class-name="tableClassName" highlight-current-row :data="list"  size="mini" :height="height ? height : list.length <= 5?'280px':'calc(100vh - 268px)'"  @row-click="rowClick" style="width:100%;margin-top: 10px" :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  ref="table" show-overflow-tooltip v-for="col in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :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 class="container normal-panel" style="text-align:right;padding-bottom: 5px !important;">
+      <el-pagination
+          background
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="currentPage"
+          :page-sizes="[20, 50, 100, 200]"
+          :page-size="20"
+          layout="total,sizes, prev, pager, next, jumper"
+          :total="total">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+import {mapGetters} from "vuex"
+export default {
+  name: "index",
+  /*
+  layout:表结构数据;
+  data:表渲染数据;
+  custom:是否启用自定义结构;
+  opwidth:操作列宽度
+*/
+  props:['layout','custom','param','height','fixedName','width','checkbox','redirect','customHeader','prop'],
+  data () {
+    return {
+      list:[],
+      currentPage:0,
+      total:0
+    }
+  },
+  computed:{
+    ...mapGetters({
+      loading:'loading'
+    })
+  },
+  watch:{
+    list(val){
+      this.doLayout()
+    }
+  },
+  methods:{
+    async listData(){
+      console.log('2222')
+      const res = await this.$api.requested(this.param)
+      this.list = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+    },
+    rowClick (row) {
+      console.log(row,'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()
+        })
+      }
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.listData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.listData()
+    },
+  },
+  mounted () {
+  }
+}
+</script>
+
+<style scoped>
+
+</style>