feat(wms): 新增报表导出文件管理功能
新增报表导出文件管理模块,包含后端接口和前端页面 在各类报表页面添加保存报表功能 优化CoilSelector和CoilCard组件显示 调整分页大小和表格高度 统一各产线报表配置 修复文件预览组件高度问题
This commit is contained in:
60
klp-ui/src/views/crm/components/DeliveryTable.vue
Normal file
60
klp-ui/src/views/crm/components/DeliveryTable.vue
Normal file
@@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="coil-stats" style="margin-bottom: 10px; padding: 10px; background-color: #f5f7fa; border-radius: 4px;">
|
||||
<span style="margin-right: 20px;"><strong>已发货:{{ deliveryCountFinished }}</strong></span>
|
||||
<span><strong>总单据数:{{ deliveryCountTotal }}</strong></span>
|
||||
</div>
|
||||
<el-table border :data="data" highlight-current-row>
|
||||
<el-table-column label="发货单唯一ID" align="center" prop="waybillId" v-if="false" />
|
||||
<el-table-column label="发货单名称" align="center" prop="waybillName" />
|
||||
<el-table-column label="车牌" align="center" prop="licensePlate" width="100" />
|
||||
<el-table-column label="收货单位" align="center" prop="consigneeUnit" />
|
||||
<el-table-column label="发货单位" align="center" prop="senderUnit" />
|
||||
<el-table-column label="订单编号" align="center" prop="orderNo">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.orderId">{{ scope.row.orderCode }}</span>
|
||||
<span v-else>{{ scope.row.principalPhone }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发货时间" align="center" prop="deliveryTime" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.deliveryTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="负责人" align="center" prop="principal" width="60" />
|
||||
<el-table-column label="状态" align="center" prop="status" width="80">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.status === 1">已发货</div>
|
||||
<div v-else-if="scope.row.status === 0">未发货</div>
|
||||
<div v-else-if="scope.row.status === 2">已打印</div>
|
||||
<div v-else>未打印</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" width="100" show-overflow-tooltip />
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "DeliveryWaybill",
|
||||
props: {
|
||||
data: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
/** 计算已发货数量 */
|
||||
deliveryCountFinished() {
|
||||
return this.data.filter(row => row.status === 1 || row.status === 2).length;
|
||||
},
|
||||
/** 计算总数量 */
|
||||
deliveryCountTotal() {
|
||||
return this.data.length;
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -1,60 +1,61 @@
|
||||
<template>
|
||||
<div class="contract-tabs">
|
||||
<div v-if="contractId" class="tabs-content">
|
||||
<el-tabs v-model="activeTab" type="card" tab-position="top" v-loading="tabLoading">
|
||||
<el-tab-pane label="下发订单" name="second">
|
||||
<OrderPage v-if="activeTab === 'second'" :contractId="contractId" :customerId="customerId" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="财务状态" name="third">
|
||||
<KLPTable v-loading="loading" :data="financeList">
|
||||
<el-table-column label="收款日期" align="center" prop="dueDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.dueDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="收款金额" align="center" prop="amount" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
</KLPTable>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="订单异议" name="fourth">
|
||||
<el-table v-loading="loading" :data="objectionList">
|
||||
<el-table-column label="编号" align="center" prop="objectionCode" />
|
||||
<el-table-column label="状态" align="center" prop="objectionStatus">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.objectionStatus === 0" type="danger">待处理</el-tag>
|
||||
<el-tag v-else-if="scope.row.objectionStatus === 1" type="success">已处理</el-tag>
|
||||
<el-tag v-else-if="scope.row.objectionStatus === 2" type="info">已关闭</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="处理人" align="center" prop="handleUser" />
|
||||
<el-table-column label="处理时间" align="center" prop="handleTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.handleTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="发货配卷" name="fifth">
|
||||
<CoilTable :data="coilList" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="合同附件" name="sixth">
|
||||
<div class="attachment-section">
|
||||
<div class="attachment-item">
|
||||
<h4>商务附件</h4>
|
||||
<FileList :oss-ids="contractAttachment" />
|
||||
</div>
|
||||
<div class="attachment-item">
|
||||
<h4>技术附件</h4>
|
||||
<FileList :oss-ids="technicalAgreement" />
|
||||
</div>
|
||||
<div class="attachment-item">
|
||||
<h4>排产函</h4>
|
||||
<FileList :oss-ids="otherAttachment" />
|
||||
</div>
|
||||
<div class="custom-tabbar" v-loading="tabLoading">
|
||||
<div
|
||||
v-for="tab in tabs"
|
||||
:key="tab.name"
|
||||
class="tab-item"
|
||||
:class="{ active: activeTab === tab.name }"
|
||||
@click="activeTab = tab.name"
|
||||
>
|
||||
{{ tab.label }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-content">
|
||||
<OrderPage v-if="activeTab === 'second'" :contractId="contractId" :customerId="customerId" />
|
||||
<KLPTable v-else-if="activeTab === 'third'" v-loading="loading" :data="financeList">
|
||||
<el-table-column label="收款日期" align="center" prop="dueDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.dueDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="收款金额" align="center" prop="amount" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
</KLPTable>
|
||||
<el-table v-else-if="activeTab === 'fourth'" v-loading="loading" :data="objectionList">
|
||||
<el-table-column label="编号" align="center" prop="objectionCode" />
|
||||
<el-table-column label="状态" align="center" prop="objectionStatus">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.objectionStatus === 0" type="danger">待处理</el-tag>
|
||||
<el-tag v-else-if="scope.row.objectionStatus === 1" type="success">已处理</el-tag>
|
||||
<el-tag v-else-if="scope.row.objectionStatus === 2" type="info">已关闭</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="处理人" align="center" prop="handleUser" />
|
||||
<el-table-column label="处理时间" align="center" prop="handleTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.handleTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
</el-table>
|
||||
<CoilTable v-else-if="activeTab === 'fifth'" :data="coilList" />
|
||||
<div v-else-if="activeTab === 'sixth'" class="attachment-section">
|
||||
<div class="attachment-item">
|
||||
<h4>商务附件</h4>
|
||||
<FileList :oss-ids="contractAttachment" />
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<div class="attachment-item">
|
||||
<h4>技术附件</h4>
|
||||
<FileList :oss-ids="technicalAgreement" />
|
||||
</div>
|
||||
<div class="attachment-item">
|
||||
<h4>排产函</h4>
|
||||
<FileList :oss-ids="otherAttachment" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="no-selection" style="display: flex; align-items: center; justify-content: center; height: 100%;">
|
||||
<el-empty description="请先选择合同" />
|
||||
@@ -120,7 +121,15 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
// 活动tab
|
||||
activeTab: "second"
|
||||
activeTab: "second",
|
||||
// 标签页配置
|
||||
tabs: [
|
||||
{ label: "下发订单", name: "second" },
|
||||
{ label: "财务状态", name: "third" },
|
||||
{ label: "订单异议", name: "fourth" },
|
||||
{ label: "发货配卷", name: "fifth" },
|
||||
{ label: "合同附件", name: "sixth" }
|
||||
]
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@@ -152,6 +161,52 @@ export default {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.tabs-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.custom-tabbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
background-color: #f5f7fa;
|
||||
padding: 4px;
|
||||
border-radius: 4px;
|
||||
margin-bottom: 16px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
padding: 8px 16px;
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
transition: all 0.3s ease;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tab-item:hover {
|
||||
color: #409eff;
|
||||
background-color: rgba(64, 158, 255, 0.1);
|
||||
}
|
||||
|
||||
.tab-item.active {
|
||||
color: #409eff;
|
||||
background-color: #fff;
|
||||
border: 1px solid #dcdfe6;
|
||||
font-weight: 500;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.tab-content {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
.attachment-section {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
@@ -90,6 +90,12 @@
|
||||
<CoilTable :data="coilList" />
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="发货单据" name="delivery">
|
||||
<div class="order-record" v-if="activeTab === 'delivery'">
|
||||
<!-- 发货单内容 -->
|
||||
<DeliveryTable :data="deliveryWaybillList" />
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="操作记录" name="record" v-hasPermi="['crm:order:record']">
|
||||
<div class="order-record" v-if="activeTab === 'record'">
|
||||
<!-- 操作记录内容 -->
|
||||
@@ -152,6 +158,8 @@
|
||||
import KLPList from '@/components/KLPUI/KLPList/index.vue'
|
||||
import { listOrder, delOrder, listOrderPackaging } from "@/api/crm/order";
|
||||
import { listCustomer } from "@/api/crm/customer";
|
||||
import { listDeliveryWaybill } from "@/api/wms/deliveryWaybill";
|
||||
|
||||
import { ORDER_STATUS, ORDER_TYPE } from '../js/enum'
|
||||
import { ORDER_ACTIONS, actions } from '../js/actions'
|
||||
import OrderDetail from '../components/OrderDetail.vue';
|
||||
@@ -162,6 +170,7 @@ import OrderRecord from '../components/OrderRecord.vue';
|
||||
import FileList from '@/components/FileList';
|
||||
import { listContract } from "@/api/crm/contract";
|
||||
import CoilTable from "../components/CoilTable.vue";
|
||||
import DeliveryTable from "../components/DeliveryTable.vue";
|
||||
|
||||
export default {
|
||||
name: 'OrderPage',
|
||||
@@ -173,7 +182,8 @@ export default {
|
||||
ReceiveTable,
|
||||
OrderRecord,
|
||||
FileList,
|
||||
CoilTable
|
||||
CoilTable,
|
||||
DeliveryTable
|
||||
},
|
||||
dicts: ['customer_level', 'customer_industry', 'wip_pack_saleman'],
|
||||
props: {
|
||||
@@ -217,6 +227,7 @@ export default {
|
||||
customerList: [],
|
||||
contractList: [],
|
||||
coilList: [],
|
||||
deliveryWaybillList: [],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -240,6 +251,12 @@ export default {
|
||||
this.contractList = response.rows || [];
|
||||
});
|
||||
},
|
||||
/** 查询发货单列表 */
|
||||
getDeliveryWaybillList() {
|
||||
listDeliveryWaybill({ pageNum: 1, pageSize: 1000, orderId: this.currentOrder.orderId }).then(response => {
|
||||
this.deliveryWaybillList = response.rows || [];
|
||||
});
|
||||
},
|
||||
/** 查询发货配卷列表 */
|
||||
getCoilList() {
|
||||
listOrderPackaging(this.currentOrder.orderId).then(response => {
|
||||
@@ -265,6 +282,7 @@ export default {
|
||||
}
|
||||
this.activeTab = 'detail';
|
||||
this.getCoilList()
|
||||
this.getDeliveryWaybillList()
|
||||
console.log('点击订单:', order)
|
||||
},
|
||||
/** 查询正式订单主列表 */
|
||||
|
||||
Reference in New Issue
Block a user