🦄 refactor: 封装统一表格组件,便于批量扩展表格能力
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
<!-- 采购单明细区 -->
|
||||
<el-card shadow="never">
|
||||
<div slot="header" class="section-title">采购单明细</div>
|
||||
<el-table
|
||||
<KLPTable
|
||||
:data="purchaseList"
|
||||
@selection-change="handleRightSelectionChange"
|
||||
style="width: 100%"
|
||||
@@ -56,7 +56,7 @@
|
||||
<el-input v-model="scope.row.remark" size="small" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</KLPTable>
|
||||
</el-card>
|
||||
</div>
|
||||
<div style="margin-top: 20px; text-align: right;" v-loading="submitLoading" element-loading-text="正在提交数据...">
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="purchasePlanDetailList" @selection-change="handleSelectionChange" ref="purchasePlanDetailTable">
|
||||
<KLPTable v-loading="loading" :data="purchasePlanDetailList" @selection-change="handleSelectionChange" ref="purchasePlanDetailTable">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="明细ID" align="center" prop="detailId" v-if="true"/>
|
||||
<el-table-column label="采购计划ID" align="center" prop="planId" /> -->
|
||||
@@ -137,7 +137,7 @@
|
||||
>设为完成</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</KLPTable>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
</el-row>
|
||||
<el-row :gutter="20" style="margin-top: 20px;">
|
||||
<el-col :span="12">
|
||||
<el-table :data="oldResult" style="width: 100%">
|
||||
<KLPTable :data="oldResult" style="width: 100%">
|
||||
<el-table-column prop="attrKey" label="属性名称" />
|
||||
<el-table-column prop="attrValue" label="属性值" />
|
||||
</el-table>
|
||||
</KLPTable>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<!-- 默认全部选中 -->
|
||||
<el-table :data="newResult" style="width: 100%" @selection-change="handleSelectionChange" :default-sort="{ prop: 'attrKey', order: 'ascending' }">
|
||||
<KLPTable :data="newResult" style="width: 100%" @selection-change="handleSelectionChange" :default-sort="{ prop: 'attrKey', order: 'ascending' }">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="attrKey" label="属性名称">
|
||||
<template slot-scope="scope">
|
||||
@@ -25,7 +25,7 @@
|
||||
<el-input v-model="scope.row.attrValue" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</KLPTable>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 20px;">
|
||||
|
||||
@@ -58,10 +58,10 @@
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-table :data="newResult" style="width: 100%">
|
||||
<KLPTable :data="newResult" style="width: 100%">
|
||||
<el-table-column prop="attrKey" label="属性名称" />
|
||||
<el-table-column prop="attrValue" label="属性值" />
|
||||
</el-table>
|
||||
</KLPTable>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
<!-- 入库明细表格 -->
|
||||
<el-form-item label="入库明细">
|
||||
<el-table
|
||||
<KLPTable
|
||||
:data="form.details"
|
||||
border
|
||||
style="width: 100%"
|
||||
@@ -108,7 +108,7 @@
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</KLPTable>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<el-row style="height: 60vh;">
|
||||
<el-col :span="8">
|
||||
<!-- 原材料表格 -->
|
||||
<el-table v-loading="rawMaterialLoading" ref="leftTable" :data="rawMaterialList" style="width: 100%" height="600" class="message-table" stripe @selection-change="handleSelectionChange">
|
||||
<KLPTable v-loading="rawMaterialLoading" ref="leftTable" :data="rawMaterialList" style="width: 100%" height="600" class="message-table" stripe @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="rawMaterialId" label="原材料" align="center">
|
||||
<template #default="scope">
|
||||
@@ -35,7 +35,7 @@
|
||||
<el-table-column prop="onTheWay" label="在途" align="center" />
|
||||
<el-table-column prop="inventory" label="在库" align="center" />
|
||||
<el-table-column prop="demand" label="所需" align="center" />
|
||||
</el-table>
|
||||
</KLPTable>
|
||||
|
||||
<el-pagination
|
||||
style="margin-top: 10px;"
|
||||
@@ -56,7 +56,7 @@
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<div slot="header" class="section-title">采购单明细</div>
|
||||
<el-table
|
||||
<KLPTable
|
||||
:data="purchaseList"
|
||||
@selection-change="handleRightSelectionChange"
|
||||
style="width: 100%"
|
||||
@@ -94,7 +94,7 @@
|
||||
<el-input v-model="scope.row.remark" size="small" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</KLPTable>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user