feat(erp): 补充合同信息字段并完善采购计划关联显示
- 在ErpContractOptionVo中添加crm_order全量字段包括订单类型、交货日期、订单状态等 - 添加@JsonFormat注解支持日期格式化 - 新增selectContractsByOrderCodes方法支持按合同编号批量查询 - 更新SQL映射文件中的selectContractPage和新增selectContractsByOrderCodes查询 - 在采购计划服务实现中查询时刷新进度并关联合同详情 - 在前端界面中新增关联合同标签页显示合同详细信息表格 - 重构采购到货界面将采购要求和到货明细合并显示 - 添加合同状态文本转换方法和相关样式定义
This commit is contained in:
@@ -90,19 +90,19 @@
|
||||
</div>
|
||||
|
||||
<el-tabs v-model="activeTab" class="pd-tabs">
|
||||
<el-tab-pane label="采购要求" name="items">
|
||||
<el-table :data="current.items" border size="mini" max-height="420">
|
||||
<el-tab-pane label="采购与到货" name="all">
|
||||
<div class="pd-sec-title">采购要求</div>
|
||||
<el-table :data="current.items" border size="mini" max-height="300">
|
||||
<el-table-column label="#" type="index" width="44" align="center" />
|
||||
<el-table-column label="规格" prop="spec" min-width="200" show-overflow-tooltip />
|
||||
<el-table-column label="总重量(T)" prop="weight" min-width="110" align="right" />
|
||||
<el-table-column label="厂商" prop="manufacturer" min-width="180" show-overflow-tooltip />
|
||||
<template slot="empty"><span>无采购要求</span></template>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane :label="'到货明细(' + deliveryList.length + ')'" name="delivery">
|
||||
<div class="pd-sec-title" style="margin-top:16px">到货明细({{ deliveryList.length }})</div>
|
||||
<el-table
|
||||
:data="deliveryList" border stripe size="mini" max-height="420"
|
||||
:data="deliveryList" border stripe size="mini" max-height="300"
|
||||
v-loading="deliveryLoading" :row-class-name="rowClass"
|
||||
>
|
||||
<el-table-column label="日期" prop="arrivalDate" width="100" align="center" />
|
||||
@@ -121,6 +121,32 @@
|
||||
<template slot="empty"><span>暂无到货记录,点右上角「上传到货表格」</span></template>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane :label="'关联合同(' + (current.contractInfos ? current.contractInfos.length : 0) + ')'" name="contracts">
|
||||
<el-table :data="current.contractInfos" border size="mini" max-height="420" style="width:100%">
|
||||
<el-table-column label="订单编号" prop="orderCode" width="150" show-overflow-tooltip fixed />
|
||||
<el-table-column label="合同号" prop="contractCode" width="140" show-overflow-tooltip />
|
||||
<el-table-column label="合同名称" prop="contractName" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column label="客户(需方)" prop="customer" width="130" show-overflow-tooltip />
|
||||
<el-table-column label="供方" prop="supplier" width="120" show-overflow-tooltip />
|
||||
<el-table-column label="金额" prop="orderAmount" width="110" align="right" />
|
||||
<el-table-column label="销售员" prop="salesman" width="80" />
|
||||
<el-table-column label="签订时间" prop="signTime" width="105" align="center" />
|
||||
<el-table-column label="签订地点" prop="signLocation" width="110" show-overflow-tooltip />
|
||||
<el-table-column label="交货日期" prop="deliveryDate" width="105" align="center" />
|
||||
<el-table-column label="合同状态" width="90" align="center">
|
||||
<template slot-scope="s">{{ contractStatusText(s.row.status) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="应付定金" prop="depositPayable" width="100" align="right" />
|
||||
<el-table-column label="已付定金" prop="depositPaid" width="100" align="right" />
|
||||
<el-table-column label="未结款" prop="unpaidAmount" width="100" align="right" />
|
||||
<el-table-column label="产品内容" prop="productContent" min-width="180" show-overflow-tooltip />
|
||||
<el-table-column label="供方电话" prop="supplierPhone" width="120" show-overflow-tooltip />
|
||||
<el-table-column label="需方电话" prop="customerPhone" width="120" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="remark" min-width="150" show-overflow-tooltip />
|
||||
<template slot="empty"><span>无关联合同</span></template>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</section>
|
||||
@@ -146,7 +172,7 @@ export default {
|
||||
planList: [],
|
||||
queryParams: { pageNum: 1, pageSize: 20, keyword: undefined },
|
||||
current: {},
|
||||
activeTab: 'items',
|
||||
activeTab: 'all',
|
||||
deliveryList: [],
|
||||
deliveryLoading: false,
|
||||
refreshing: false,
|
||||
@@ -180,7 +206,7 @@ export default {
|
||||
this.getList()
|
||||
},
|
||||
selectPlan(p) {
|
||||
this.activeTab = 'items'
|
||||
this.activeTab = 'all'
|
||||
this.current = { ...p }
|
||||
this.deliveryList = []
|
||||
// 打开即静默按钢卷表复核一次到货状态
|
||||
@@ -228,7 +254,7 @@ export default {
|
||||
} else {
|
||||
this.$modal.msgSuccess(res.msg || '导入成功')
|
||||
}
|
||||
this.activeTab = 'delivery'
|
||||
this.activeTab = 'all'
|
||||
this.refreshDetail()
|
||||
this.getList(true)
|
||||
} else {
|
||||
@@ -240,6 +266,9 @@ export default {
|
||||
},
|
||||
fmt(v) {
|
||||
return Number(v || 0).toLocaleString('zh-CN', { minimumFractionDigits: 0, maximumFractionDigits: 3 })
|
||||
},
|
||||
contractStatusText(v) {
|
||||
return { 0: '草稿', 1: '生效', 2: '作废', 3: '已完成' }[v] || '—'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -292,6 +321,10 @@ $sub: #909399;
|
||||
&.wide { grid-column: span 2; }
|
||||
}
|
||||
.pd-tabs { padding: 0 18px 18px; }
|
||||
.pd-sec-title {
|
||||
font-size: 13px; font-weight: 600; color: $ink;
|
||||
border-left: 3px solid $accent; padding-left: 8px; margin-bottom: 10px;
|
||||
}
|
||||
.pd-mtag {
|
||||
font-size: 11px; line-height: 16px; padding: 0 6px; border-radius: 2px; border: 1px solid #dcdfe6; color: $sub;
|
||||
&.yes { color: #3a8a4d; border-color: #b7d9bf; background: #f0f9f1; }
|
||||
|
||||
@@ -218,6 +218,31 @@
|
||||
<template slot="empty"><span>无采购要求</span></template>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="'关联合同(' + (current.contractInfos ? current.contractInfos.length : 0) + ')'" name="contracts">
|
||||
<el-table :data="current.contractInfos" border size="mini" max-height="340" style="width:100%">
|
||||
<el-table-column label="订单编号" prop="orderCode" width="150" show-overflow-tooltip fixed />
|
||||
<el-table-column label="合同号" prop="contractCode" width="140" show-overflow-tooltip />
|
||||
<el-table-column label="合同名称" prop="contractName" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column label="客户(需方)" prop="customer" width="130" show-overflow-tooltip />
|
||||
<el-table-column label="供方" prop="supplier" width="120" show-overflow-tooltip />
|
||||
<el-table-column label="金额" prop="orderAmount" width="110" align="right" />
|
||||
<el-table-column label="销售员" prop="salesman" width="80" />
|
||||
<el-table-column label="签订时间" prop="signTime" width="105" align="center" />
|
||||
<el-table-column label="签订地点" prop="signLocation" width="110" show-overflow-tooltip />
|
||||
<el-table-column label="交货日期" prop="deliveryDate" width="105" align="center" />
|
||||
<el-table-column label="合同状态" width="90" align="center">
|
||||
<template slot-scope="s">{{ contractStatusText(s.row.status) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="应付定金" prop="depositPayable" width="100" align="right" />
|
||||
<el-table-column label="已付定金" prop="depositPaid" width="100" align="right" />
|
||||
<el-table-column label="未结款" prop="unpaidAmount" width="100" align="right" />
|
||||
<el-table-column label="产品内容" prop="productContent" min-width="180" show-overflow-tooltip />
|
||||
<el-table-column label="供方电话" prop="supplierPhone" width="120" show-overflow-tooltip />
|
||||
<el-table-column label="需方电话" prop="customerPhone" width="120" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="remark" min-width="150" show-overflow-tooltip />
|
||||
<template slot="empty"><span>无关联合同</span></template>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</section>
|
||||
@@ -555,6 +580,9 @@ export default {
|
||||
},
|
||||
auditText(s) {
|
||||
return { '0': '待审核', '1': '已通过', '2': '已驳回', '3': '待送审' }[s] || '—'
|
||||
},
|
||||
contractStatusText(v) {
|
||||
return { 0: '草稿', 1: '生效', 2: '作废', 3: '已完成' }[v] || '—'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user