🦄 refactor: 封装统一表格组件,便于批量扩展表格能力

This commit is contained in:
砂糖
2025-08-27 16:47:33 +08:00
parent 278b0c8258
commit 7ea0de6a67
133 changed files with 465 additions and 432 deletions

View File

@@ -41,7 +41,7 @@
</el-col>
</el-row>
<el-table v-loading="loading" :data="bomItemList" @selection-change="handleSelectionChange">
<KLPTable v-loading="loading" :data="bomItemList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="属性名称" align="center" prop="attrKey">
<template slot-scope="scope">
@@ -71,7 +71,7 @@
>删除</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<pagination
v-show="total>0"

View File

@@ -41,7 +41,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="categoryList" @selection-change="handleSelectionChange">
<KLPTable v-loading="loading" :data="categoryList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="分类类型" align="center" prop="categoryType">
<template slot-scope="scope">
@@ -63,7 +63,7 @@
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />

View File

@@ -40,7 +40,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="contractList" @selection-change="handleSelectionChange">
<KLPTable v-loading="loading" :data="contractList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="合同ID" align="center" prop="contractId" v-if="false" />
<el-table-column label="合同编号" align="center" prop="contractNo" />
@@ -63,7 +63,7 @@
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />

View File

@@ -124,7 +124,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="expressList" @selection-change="handleSelectionChange">
<KLPTable v-loading="loading" :data="expressList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="物流编号" align="center" prop="expressCode"/>
<el-table-column label="数据状态" align="center" prop="status">
@@ -228,7 +228,7 @@
</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<pagination
v-show="total>0"

View File

@@ -81,7 +81,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="expressQuestionList" @selection-change="handleSelectionChange">
<KLPTable v-loading="loading" :data="expressQuestionList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="问题编号" align="center" prop="questionId" v-if="true"/>
<el-table-column label="快递单号" align="center" prop="expressCode" />
@@ -115,7 +115,7 @@
>删除</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<pagination
v-show="total>0"

View File

@@ -34,7 +34,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="stockLogList" @selection-change="handleSelectionChange">
<KLPTable v-loading="loading" :data="stockLogList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="存储位置" align="center" prop="warehouseName" />
<el-table-column label="物品ID" align="center" prop="itemId">
@@ -67,7 +67,7 @@
>修改</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<pagination
v-show="total>0"

View File

@@ -8,7 +8,7 @@
<span>订单所需的产品统计</span>
</div>
<div class="table-container">
<el-table :data="orderProductStatistics" size="small" height="320"
<KLPTable :data="orderProductStatistics" size="small" height="320"
v-loading="!orderProductStatistics.length">
<el-table-column prop="productName" label="产品名称" width="120" />
<el-table-column prop="orderDemandQuantity" label="需求数量" width="80" />
@@ -21,7 +21,7 @@
</template>
</el-table-column>
<el-table-column prop="relatedOrderCount" label="相关订单" width="80" />
</el-table>
</KLPTable>
<div v-if="!orderProductStatistics.length" class="empty-data">
<i class="el-icon-warning-outline"></i>
<p>暂无数据</p>
@@ -37,7 +37,7 @@
<span>BOM原料需求</span>
</div>
<div class="table-container">
<el-table :data="productMaterialRequirements" size="small" height="320"
<KLPTable :data="productMaterialRequirements" size="small" height="320"
v-loading="!productMaterialRequirements.length">
<el-table-column prop="productName" label="产品" width="100" />
<el-table-column prop="materialName" label="原料" width="100" />
@@ -51,7 +51,7 @@
</span>
</template>
</el-table-column>
</el-table>
</KLPTable>
<div v-if="!productMaterialRequirements.length" class="empty-data">
<i class="el-icon-warning-outline"></i>
<p>暂无数据</p>
@@ -67,7 +67,7 @@
<span>原料库存情况</span>
</div>
<div class="table-container">
<el-table :data="rawMaterialInventory" size="small" height="320" v-loading="!rawMaterialInventory.length">
<KLPTable :data="rawMaterialInventory" size="small" height="320" v-loading="!rawMaterialInventory.length">
<el-table-column prop="materialName" label="原料名称" width="120" />
<el-table-column prop="currentStockQuantity" label="库存" width="60" />
<el-table-column prop="inTransitQuantity" label="在途" width="60" />
@@ -86,7 +86,7 @@
</el-tag>
</template>
</el-table-column>
</el-table>
</KLPTable>
<div v-if="!rawMaterialInventory.length" class="empty-data">
<i class="el-icon-warning-outline"></i>
<p>暂无数据</p>
@@ -102,7 +102,7 @@
<span>订单所需的产品统计</span>
</div>
<div class="table-container">
<el-table :data="orderProductStatistics" size="small" height="320" v-loading="!orderProductStatistics.length">
<KLPTable :data="orderProductStatistics" size="small" height="320" v-loading="!orderProductStatistics.length">
<el-table-column prop="productName" label="产品名称" />
<el-table-column prop="orderDemandQuantity" label="需求数量" />
<el-table-column prop="currentStockQuantity" label="库存数量" />
@@ -114,7 +114,7 @@
</template>
</el-table-column>
<el-table-column prop="relatedOrderCount" label="相关订单" />
</el-table>
</KLPTable>
<div v-if="!orderProductStatistics.length" class="empty-data">
<i class="el-icon-warning-outline"></i>
<p>暂无数据</p>

View File

@@ -8,7 +8,7 @@
<span>订单维度推荐</span>
</div>
<div class="table-container">
<el-table :data="orderRecommendations" size="small" height="320" v-loading="!orderRecommendations.length">
<KLPTable :data="orderRecommendations" size="small" height="320" v-loading="!orderRecommendations.length">
<el-table-column prop="orderCode" label="订单编号" width="120" />
<el-table-column prop="customerName" label="客户名称" width="100" />
<el-table-column prop="orderStatus" label="订单状态" width="80" />
@@ -22,7 +22,7 @@
<el-table-column prop="recommendationReason" label="推荐原因" width="150" show-overflow-tooltip />
<el-table-column prop="suggestedAction" label="建议操作" width="100" />
<el-table-column prop="estimatedCompletionTime" label="预计完成时间" width="120" />
</el-table>
</KLPTable>
<div v-if="!orderRecommendations.length" class="empty-data">
<i class="el-icon-warning-outline"></i>
<p>暂无推荐数据</p>
@@ -38,7 +38,7 @@
<span>原料维度推荐</span>
</div>
<div class="table-container">
<el-table :data="materialRecommendations" size="small" height="320" v-loading="!materialRecommendations.length">
<KLPTable :data="materialRecommendations" size="small" height="320" v-loading="!materialRecommendations.length">
<el-table-column prop="materialName" label="原料名称" width="120" />
<el-table-column prop="recommendedPurchaseQuantity" label="推荐采购数量" width="120" />
<el-table-column prop="recommendedSupplier" label="推荐供应商" width="100" show-overflow-tooltip />
@@ -52,7 +52,7 @@
<el-table-column prop="recommendationReason" label="推荐原因" width="150" show-overflow-tooltip />
<el-table-column prop="suggestedAction" label="建议操作" width="100" />
<el-table-column prop="estimatedArrivalTime" label="预计到货时间" width="120" />
</el-table>
</KLPTable>
<div v-if="!materialRecommendations.length" class="empty-data">
<i class="el-icon-warning-outline"></i>
<p>暂无推荐数据</p>
@@ -65,7 +65,7 @@
<div class="recommendation-area-mini" v-else>
<el-card shadow="hover" class="recommendation-card">
<div class="table-container">
<el-table :data="materialRecommendations" size="small" height="320" v-loading="!materialRecommendations.length">
<KLPTable :data="materialRecommendations" size="small" height="320" v-loading="!materialRecommendations.length">
<el-table-column prop="materialName" label="原料名称" width="120" />
<el-table-column prop="recommendedPurchaseQuantity" label="推荐采购数量" width="120" />
<el-table-column prop="recommendedSupplier" label="推荐供应商" width="100" show-overflow-tooltip />
@@ -79,7 +79,7 @@
<el-table-column prop="recommendationReason" label="推荐原因" width="150" show-overflow-tooltip />
<el-table-column prop="suggestedAction" label="建议操作" width="100" />
<el-table-column prop="estimatedArrivalTime" label="预计到货时间" width="120" />
</el-table>
</KLPTable>
<div v-if="!materialRecommendations.length" class="empty-data">
<i class="el-icon-warning-outline"></i>
<p>暂无推荐数据</p>

View File

@@ -75,7 +75,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="customerList" @selection-change="handleSelectionChange">
<KLPTable v-loading="loading" :data="customerList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="编号,主键自增" align="center" prop="customerId" v-if="false"/>
<el-table-column label="客户名称" align="center" prop="name" />
@@ -109,7 +109,7 @@
>删除</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<pagination
v-show="total>0"
@@ -173,10 +173,14 @@
<script>
import { listCustomer, getCustomer, delCustomer, addCustomer, updateCustomer } from "@/api/wms/customer";
import KLPTable from '@/components/KLPUI/KLPTable/index.vue';
export default {
name: "Customer",
dicts: ['customer_from'],
components: {
KLPTable
},
data() {
return {
// 按钮loading

View File

@@ -34,7 +34,7 @@
</el-col>
</el-row>
<el-table v-loading="loading" :data="orderDetailList">
<KLPTable v-loading="loading" :data="orderDetailList">
<el-table-column label="产品" align="center">
<template slot-scope="scope">
<ProductInfo :product-id="scope.row.productId">
@@ -63,7 +63,7 @@
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<!-- <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" /> -->
@@ -126,6 +126,7 @@ import { EOrderStatus } from "@/utils/enums";
import { ProductInfo } from '@/components/KLPService';
import BomInfoMini from '@/components/KLPService/Renderer/BomInfoMini.vue';
import ProductSpec from './spec.vue';
import KLPTable from '@/components/KLPUI/KLPTable/index.vue';
export default {
name: "OrderDetailPanel",
@@ -140,7 +141,8 @@ export default {
ProductSelect,
ProductInfo,
BomInfoMini,
ProductSpec
ProductSpec,
KLPTable
},
data() {
return {

View File

@@ -42,7 +42,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="productSpecList" @selection-change="handleSelectionChange">
<KLPTable v-loading="loading" :data="productSpecList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键" align="center" prop="specId" v-if="false"/>
<el-table-column label="所属产品规范组ID" align="center" prop="groupId" />
@@ -65,7 +65,7 @@
>删除</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<pagination
v-show="total>0"

View File

@@ -51,7 +51,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
<KLPTable v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="字典编码" align="center" prop="dictCode" />
<el-table-column label="字典标签" align="center" prop="dictLabel">
@@ -89,7 +89,7 @@
>删除</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<pagination
v-show="total>0"

View File

@@ -52,7 +52,7 @@
</el-form>
</div>
<div class="table-panel">
<el-table height="100%" :data="messageList" style="width: 100%" class="message-table" stripe @selection-change="handleSelectionChange">
<KLPTable height="100%" :data="messageList" style="width: 100%" class="message-table" stripe @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column prop="time" label="时间" width="150" align="center" />
<el-table-column prop="itemId" label="物料" align="center">
@@ -106,7 +106,7 @@
<el-button size="mini" type="text" @click="handleConfirm(scope.row)">确认</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
</div>
</el-col> -->
</el-row>

View File

@@ -91,7 +91,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="productList" @selection-change="handleSelectionChange">
<KLPTable v-loading="loading" :data="productList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="产品编号" align="center" prop="productCode" />
<el-table-column label="产品名称" align="center" prop="productName" />
@@ -158,7 +158,7 @@
>BOM</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<pagination
v-show="total>0"

View File

@@ -94,7 +94,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="productList" @selection-change="handleSelectionChange">
<KLPTable v-loading="loading" :data="productList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="半成品编号" align="center" prop="productCode" />
<el-table-column label="半成品名称" align="center" prop="productName" />
@@ -161,7 +161,7 @@
>BOM</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<pagination
v-show="total>0"

View File

@@ -63,7 +63,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="productBomList" @selection-change="handleSelectionChange">
<KLPTable v-loading="loading" :data="productBomList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="产品" align="center" prop="productName">
<template slot-scope="scope">
@@ -94,7 +94,7 @@
>删除</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<pagination
v-show="total>0"

View File

@@ -68,7 +68,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="purchasePlanList" @selection-change="handleSelectionChange">
<KLPTable v-loading="loading" :data="purchasePlanList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="采购计划编号" align="center" prop="planCode" />
<el-table-column label="负责人" align="center" prop="owner" />
@@ -103,7 +103,7 @@
>删除</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<pagination
v-show="total>0"
@@ -173,13 +173,13 @@
</el-form-item>
</el-form>
<el-table v-loading="orderLoading" :data="orderList" @row-click="handleOrderSelect" style="cursor: pointer;">
<KLPTable v-loading="orderLoading" :data="orderList" @row-click="handleOrderSelect" style="cursor: pointer;">
<el-table-column label="订单编号" align="center" prop="orderCode" />
<el-table-column label="客户名称" align="center" prop="customerName" />
<el-table-column label="销售经理" align="center" prop="salesManager" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180" />
</el-table>
</KLPTable>
<pagination
v-show="orderTotal>0"

View File

@@ -43,7 +43,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="purchasePlanDetailList" @selection-change="handleSelectionChange"
<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"/>
@@ -104,7 +104,7 @@
@click="handleStatusChange(scope.row, EPurchaseDetailStatus.FINISH, '采购完成')">设为完成</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />

View File

@@ -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="正在提交数据...">

View File

@@ -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"

View File

@@ -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;">

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -51,7 +51,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
<KLPTable v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="字典编码" align="center" prop="dictCode" />
<el-table-column label="字典标签" align="center" prop="dictLabel">
@@ -89,7 +89,7 @@
>删除</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<pagination
v-show="total>0"

View File

@@ -109,7 +109,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="rawMaterialList" @selection-change="handleSelectionChange">
<KLPTable v-loading="loading" :data="rawMaterialList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="原材料编号" align="center" prop="rawMaterialCode" />
<el-table-column label="原材料名称" align="center" prop="rawMaterialName" />
@@ -161,7 +161,7 @@
>台账</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<pagination
v-show="total>0"

View File

@@ -91,7 +91,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="reportDetailList" @selection-change="handleSelectionChange">
<KLPTable v-loading="loading" :data="reportDetailList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" type="index" v-if="true"/>
<!-- <el-table-column label="关联汇报概述ID" align="center" prop="summaryId" /> -->
@@ -139,7 +139,7 @@
>删除</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<pagination
v-show="total>0"

View File

@@ -85,7 +85,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="reportSummaryList" @selection-change="handleSelectionChange">
<KLPTable v-loading="loading" :data="reportSummaryList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" type="index" v-if="true"/>
<el-table-column label="收发货标题" align="center" prop="reportTitle">
@@ -122,7 +122,7 @@
>删除</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<pagination
v-show="total>0"

View File

@@ -34,7 +34,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="stockList" @selection-change="handleSelectionChange">
<KLPTable v-loading="loading" :data="stockList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="仓库" align="center" prop="warehouseName" />
<el-table-column label="物品类型" align="center" prop="itemType">
@@ -74,7 +74,7 @@
v-hasPermi="['wms:stock:remove']">删除</el-button>
</template>
</el-table-column> -->
</el-table>
</KLPTable>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />

View File

@@ -24,7 +24,7 @@
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
</el-form>
<el-table :data="stockBoxData" style="width: 100%">
<KLPTable :data="stockBoxData" style="width: 100%">
<el-table-column type="selection" width="55" />
<el-table-column prop="warehouseName" label="仓库" />
<el-table-column prop="itemName" label="物料" />
@@ -39,7 +39,7 @@
<el-button type="danger" size="mini" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<div style="text-align: right; margin-top: 10px;">
<el-button type="danger" @click="handleDeleteAll">清空</el-button>
<el-button type="primary" @click="handleGenerateBill">生成单据</el-button>

View File

@@ -88,7 +88,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="stockIoList" @selection-change="handleSelectionChange">
<KLPTable v-loading="loading" :data="stockIoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="出入库单ID" align="center" prop="stockIoId" v-if="true"/>
<el-table-column label="出入库单号" align="center" prop="stockIoCode" />
@@ -144,7 +144,7 @@
>打印条码</el-button> -->
</template>
</el-table-column>
</el-table>
</KLPTable>
<pagination
v-show="total>0"

View File

@@ -20,7 +20,7 @@
<!-- 明细表格 -->
<el-tabs v-model="activeTab" style="margin-bottom: 10px;">
<el-tab-pane label="扫码枪" name="scanner">
<el-table :data="scannerList" :show-header="true" :border="true" style="width: 100%;" :default-sort="{}" :highlight-current-row="true">
<KLPTable :data="scannerList" :show-header="true" :border="true" style="width: 100%;" :default-sort="{}" :highlight-current-row="true">
<el-table-column type="index" width="55" align="center" label="#" />
<el-table-column label="库区/库位" align="center" prop="warehouseName" />
<el-table-column v-if="stockIo.ioType === 'transfer'" label="源库区/库位" align="center" prop="fromWarehouseName" />
@@ -58,7 +58,7 @@
>删除</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
</el-tab-pane>
<el-tab-pane label="手动录入" name="manual">
<el-row :gutter="10" class="mb8">
@@ -103,7 +103,7 @@
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="manualList" @selection-change="handleSelectionChange">
<KLPTable v-loading="loading" :data="manualList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="库区/库位" align="center" prop="warehouseName" />
<el-table-column
@@ -151,7 +151,7 @@
>删除</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
</el-tab-pane>
</el-tabs>

View File

@@ -24,7 +24,7 @@
</el-form-item>
</el-form>
</el-row>
<el-table v-loading="loading" :data="manualList">
<KLPTable v-loading="loading" :data="manualList">
<el-table-column label="库区/库位" align="center" prop="warehouseName" />
<el-table-column v-if="stockIo.ioType === 'transfer'" label="源库区/库位" align="center" prop="fromWarehouseName" />
<el-table-column label="物品类型" align="center" prop="itemType">
@@ -59,7 +59,7 @@
placeholder="请输入数量" @input="handleQuantityInput(scope.row)" />
</template>
</el-table-column>
</el-table>
</KLPTable>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
<!-- 操作按钮 -->

View File

@@ -42,7 +42,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="stockIoList" @selection-change="handleSelectionChange">
<KLPTable v-loading="loading" :data="stockIoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="出入库单ID" align="center" prop="stockIoId" v-if="false" />
<el-table-column label="出入库单号" align="center" prop="stockIoCode" />
@@ -79,7 +79,7 @@
@click="showReturnCreate(scope.row)">退库</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />

View File

@@ -81,7 +81,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="supplierList" @selection-change="handleSelectionChange">
<KLPTable v-loading="loading" :data="supplierList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="供应商ID" align="center" prop="supplierId" v-if="false"/>
<el-table-column label="供应商名称" align="center" prop="name" />
@@ -105,7 +105,7 @@
>删除</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<pagination
v-show="total>0"

View File

@@ -65,7 +65,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="cameraManagementList" @selection-change="handleSelectionChange">
<KLPTable v-loading="loading" :data="cameraManagementList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="摄像头编号" align="center" prop="cameraCode" />
<el-table-column label="摄像头名称" align="center" prop="cameraName" />
@@ -95,7 +95,7 @@
>删除</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<pagination
v-show="total>0"

View File

@@ -62,7 +62,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table
<KLPTable
v-if="refreshTable"
v-loading="loading"
:data="warehouseList"
@@ -107,7 +107,7 @@
>删除</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<!-- 添加或修改仓库/库区/库位自关联对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>

View File

@@ -89,7 +89,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="processeList" @selection-change="handleSelectionChange">
<KLPTable v-loading="loading" :data="processeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="工艺ID" align="center" prop="processId" v-if="false"/>
<el-table-column label="工艺编码" align="center" prop="processCode" />
@@ -114,7 +114,7 @@
>删除</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<pagination
v-show="total>0"

View File

@@ -72,7 +72,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="productionLineList" @selection-change="handleSelectionChange">
<KLPTable v-loading="loading" :data="productionLineList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="产线编号" align="center" prop="lineCode" />
<el-table-column label="产线名称" align="center" prop="lineName" />
@@ -113,7 +113,7 @@
>删除</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<pagination
v-show="total>0"

View File

@@ -69,7 +69,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="schedulePlanList" @selection-change="handleSelectionChange">
<KLPTable v-loading="loading" :data="schedulePlanList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="排产计划ID" align="center" prop="planId" v-if="true"/> -->
<el-table-column label="排产计划编号" align="center" prop="planCode" />
@@ -140,7 +140,7 @@
>详情</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<pagination
v-show="total>0"

View File

@@ -46,7 +46,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="batchList" @selection-change="handleSelectionChange">
<KLPTable v-loading="loading" :data="batchList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="生产任务ID" align="center" prop="batchId" v-if="true" />
<el-table-column label="生产任务编号" align="center" prop="batchNo" />
@@ -87,7 +87,7 @@
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<!-- 添加或修改批次合并相同工艺的任务对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
@@ -127,7 +127,7 @@
</el-dialog>
<el-drawer title="生成生产任务" direction="btt" size="90vh" :visible.sync="batchGenerateDialogVisible" append-to-body>
<el-table :data="generateBatchList" style="width: 100%;" border>
<KLPTable :data="generateBatchList" style="width: 100%;" border>
<el-table-column label="生产任务编号" align="center" prop="batchNo">
<template slot-scope="scope">
<el-input v-model="scope.row.batchNo" />
@@ -161,7 +161,7 @@
<el-button type="primary" size="mini" @click="handleAddBatch(scope.row)">创建生产任务</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
</el-drawer>
</div>
</template>

View File

@@ -1,6 +1,6 @@
<template>
<div>
<el-table
<KLPTable
v-loading="loading"
:data="list"
border
@@ -28,10 +28,10 @@
<el-button type="text" @click="handleProcessTask(scope.row)">工序</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<el-dialog title="工序" :visible.sync="processTaskDialogVisible" width="80%">
<el-table
<KLPTable
:data="processTaskList"
border
style="width: 100%"
@@ -97,7 +97,7 @@
<el-button type="text" size="small" @click="handleSave(scope.row)">保存</el-button>
</template>
</el-table-column>
</el-table>
</KLPTable>
<!-- 新增按钮区域 -->
<div style="margin-top: 15px; text-align: right;">