feat(合同/客户): 添加发货单据展示功能

在合同和客户详情页新增发货单据标签页,展示wmsDeliveryWaybills数据
移除CustomerOrder中未使用的getSummary方法和相关代码
This commit is contained in:
砂糖
2026-04-11 16:24:04 +08:00
parent b4dc0ed9e4
commit 4beaf79fd6
4 changed files with 32 additions and 48 deletions

View File

@@ -108,8 +108,6 @@ export default {
rules: { rules: {
}, },
orderId: '', orderId: '',
// customerList: [],
currentCustomer: {},
}; };
}, },
computed: { computed: {
@@ -123,46 +121,12 @@ export default {
if (newVal !== oldVal) { if (newVal !== oldVal) {
this.queryParams.customerId = newVal; this.queryParams.customerId = newVal;
this.getList(); this.getList();
this.getSummary();
} }
}, },
immediate: true immediate: true
} }
}, },
methods: { methods: {
/** 查询正式订单主列表 */
getSummary() {
Promise.all(
[
listOrder({
pageNum: 1,
pageSize: 1,
customerId: this.customerId,
preOrderStatus: 0, // 待审核
}),
listOrder({
pageNum: 1,
pageSize: 1,
customerId: this.customerId,
preOrderStatus: 1, // 已审核
}),
listOrder({
pageNum: 1,
pageSize: 1,
customerId: this.customerId,
preOrderStatus: 2, // 已取消
}),
]
).then(([preOrderList, auditOrderList, canOrderList]) => {
console.log(preOrderList, auditOrderList, canOrderList)
this.currentCustomer = {
waitCount: preOrderList.total,
dealCount: auditOrderList.total,
cancelCount: canOrderList.total,
total: preOrderList.total + auditOrderList.total + canOrderList.total,
}
})
},
getList() { getList() {
if (!this.customerId) { if (!this.customerId) {
this.total = 0; this.total = 0;

View File

@@ -40,6 +40,7 @@
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
</el-table> </el-table>
<DeliveryTable v-else-if="activeTab === 'seventh'" :data="wmsDeliveryWaybills" />
<CoilTable v-else-if="activeTab === 'fifth'" :data="coilList" /> <CoilTable v-else-if="activeTab === 'fifth'" :data="coilList" />
<div v-else-if="activeTab === 'sixth'" class="attachment-section"> <div v-else-if="activeTab === 'sixth'" class="attachment-section">
<div class="attachment-item"> <div class="attachment-item">
@@ -67,14 +68,16 @@
import OrderPage from "@/views/crm/order/index.vue"; import OrderPage from "@/views/crm/order/index.vue";
import CoilTable from "../../components/CoilTable.vue"; import CoilTable from "../../components/CoilTable.vue";
import FileList from "@/components/FileList"; import FileList from "@/components/FileList";
import DeliveryTable from "../../components/DeliveryTable.vue";
export default { export default {
name: "ContractTabs", name: "ContractTabs",
components: { components: {
OrderPage, OrderPage,
CoilTable, CoilTable,
FileList FileList,
}, DeliveryTable
},
props: { props: {
contractId: { contractId: {
type: [Number, String], type: [Number, String],
@@ -116,6 +119,10 @@ export default {
otherAttachment: { otherAttachment: {
type: String, type: String,
default: '' default: ''
},
wmsDeliveryWaybills: {
type: Array,
default: () => []
} }
}, },
data() { data() {
@@ -128,7 +135,8 @@ export default {
{ label: "财务状态", name: "third" }, { label: "财务状态", name: "third" },
{ label: "订单异议", name: "fourth" }, { label: "订单异议", name: "fourth" },
{ label: "发货配卷", name: "fifth" }, { label: "发货配卷", name: "fifth" },
{ label: "合同附件", name: "sixth" } { label: '发货单据', name: 'seventh' },
{ label: "合同附件", name: "sixth" },
] ]
}; };
}, },

View File

@@ -26,6 +26,7 @@
<div class="tab-panel" ref="tabPanel" style="flex: 1; overflow-y: auto;"> <div class="tab-panel" ref="tabPanel" style="flex: 1; overflow-y: auto;">
<ContractTabs :contractId="form.contractId" <ContractTabs :contractId="form.contractId"
:customerId="form.customerId" :financeList="financeList" :objectionList="objectionList" :customerId="form.customerId" :financeList="financeList" :objectionList="objectionList"
:wmsDeliveryWaybills="wmsDeliveryWaybills"
:coilList="coilList" :tabLoading="tabLoading" :coilList="coilList" :tabLoading="tabLoading"
:contract-attachment="form.businessAnnex" :contract-attachment="form.businessAnnex"
:technical-agreement="form.techAnnex" :technical-agreement="form.techAnnex"
@@ -157,7 +158,6 @@ import ContractPreview from "./components/ContractPreview.vue";
import ContractTabs from "./components/ContractTabs.vue"; import ContractTabs from "./components/ContractTabs.vue";
import ProductContent from "./components/ProductContent.vue"; import ProductContent from "./components/ProductContent.vue";
import CustomerSelect from "@/components/KLPService/CustomerSelect/index.vue"; import CustomerSelect from "@/components/KLPService/CustomerSelect/index.vue";
import { formatAreaTextEnhanced } from '@/components/ChinaAreaSelect/index.js'
export default { export default {
name: "Contract", name: "Contract",
@@ -166,12 +166,13 @@ export default {
ContractPreview, ContractPreview,
ContractTabs, ContractTabs,
ProductContent, ProductContent,
CustomerSelect CustomerSelect,
}, },
data() { data() {
return { return {
financeList: [], financeList: [],
objectionList: [], objectionList: [],
wmsDeliveryWaybills: [],
coilList: [], coilList: [],
loading: false, loading: false,
tabLoading: false, tabLoading: false,
@@ -319,6 +320,7 @@ export default {
listContractOrderObjection(row.contractId).then(response => { listContractOrderObjection(row.contractId).then(response => {
this.financeList = response.data.financeList || []; this.financeList = response.data.financeList || [];
this.objectionList = response.data.oobjectionList || []; this.objectionList = response.data.oobjectionList || [];
this.wmsDeliveryWaybills = response.data.wmsDeliveryWaybills || [];
}).finally(() => { }).finally(() => {
this.tabLoading = false; this.tabLoading = false;
}) })

View File

@@ -6,17 +6,18 @@
<div style="font-weight: 900;">客户列表</div> <div style="font-weight: 900;">客户列表</div>
<!-- 搜索区域 --> <!-- 搜索区域 -->
<div style="display: flex; align-items: center; gap: 5px; margin-top: 10px;"> <div style="display: flex; align-items: center; gap: 5px; margin-top: 10px;">
<el-input style="flex: 1;" prefix-icon="el-icon-search" placeholder="输入关键字搜索" <el-input style="flex: 1;" prefix-icon="el-icon-search" placeholder="输入关键字搜索" v-model="queryParams.keyword"
v-model="queryParams.keyword" @change="getCustomerList" clearable></el-input> @change="getCustomerList" clearable></el-input>
<el-button icon="el-icon-sort" @click="toggleQuery"></el-button> <el-button icon="el-icon-sort" @click="toggleQuery"></el-button>
<el-button type="primary" icon="el-icon-search" style="margin-left: 0;" size="mini" @click="getCustomerList"></el-button> <el-button type="primary" icon="el-icon-search" style="margin-left: 0;" size="mini"
@click="getCustomerList"></el-button>
<el-button type="primary" icon="el-icon-plus" style="margin-left: 0;" @click="handleAdd"></el-button> <el-button type="primary" icon="el-icon-plus" style="margin-left: 0;" @click="handleAdd"></el-button>
</div> </div>
<!-- 高级查询区域 --> <!-- 高级查询区域 -->
<div v-show="showQuery" <div v-show="showQuery"
style="display: flex; align-items: center; gap: 5px; margin-top: 10px; flex-wrap: wrap;"> style="display: flex; align-items: center; gap: 5px; margin-top: 10px; flex-wrap: wrap;">
<el-input style="width: 180px" placeholder="客户编码" <el-input style="width: 180px" placeholder="客户编码" v-model="queryParams.customerCode" @change="getCustomerList"
v-model="queryParams.customerCode" @change="getCustomerList" clearable></el-input> clearable></el-input>
<el-select style="width: 100px;" v-model="queryParams.industry" placeholder="客户行业" clearable <el-select style="width: 100px;" v-model="queryParams.industry" placeholder="客户行业" clearable
@change="getCustomerList"> @change="getCustomerList">
<el-option v-for="item in dict.type.customer_industry" :key="item.value" :label="item.label" <el-option v-for="item in dict.type.customer_industry" :key="item.value" :label="item.label"
@@ -98,6 +99,9 @@
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="发货单据" name="seventh">
<DeliveryTable :data="wmsDeliveryWaybills" />
</el-tab-pane>
<el-tab-pane label="发货配卷" name="fifth"> <el-tab-pane label="发货配卷" name="fifth">
<CoilTable :data="coilList" /> <CoilTable :data="coilList" />
</el-tab-pane> </el-tab-pane>
@@ -164,6 +168,7 @@ import CustomerEdit from '../components/CustomerEdit.vue'
import CustomerOrder from '../components/CustomerOrder.vue' import CustomerOrder from '../components/CustomerOrder.vue'
import ChinaAreaSelect from '@/components/ChinaAreaSelect/index.vue' import ChinaAreaSelect from '@/components/ChinaAreaSelect/index.vue'
import CoilTable from '../components/CoilTable.vue' import CoilTable from '../components/CoilTable.vue'
import DeliveryTable from '../components/DeliveryTable.vue'
import { listCustomer, addCustomer, updateCustomer, delCustomer, listCoilByCustomerId, listFinanceByCustomerId } from '@/api/crm/customer' import { listCustomer, addCustomer, updateCustomer, delCustomer, listCoilByCustomerId, listFinanceByCustomerId } from '@/api/crm/customer'
@@ -176,13 +181,15 @@ export default {
CustomerEdit, CustomerEdit,
CustomerOrder, CustomerOrder,
ChinaAreaSelect, ChinaAreaSelect,
CoilTable CoilTable,
DeliveryTable
}, },
dicts: ['customer_industry', 'customer_level'], dicts: ['customer_industry', 'customer_level'],
data() { data() {
return { return {
customerList: [], customerList: [],
financeList: [], financeList: [],
wmsDeliveryWaybills: [],
objectionList: [], objectionList: [],
coilList: [], coilList: [],
showQuery: false, showQuery: false,
@@ -235,6 +242,7 @@ export default {
listFinanceByCustomerId(this.currentCustomerId).then(response => { listFinanceByCustomerId(this.currentCustomerId).then(response => {
this.financeList = response.data.financeList || []; this.financeList = response.data.financeList || [];
this.objectionList = response.data.oobjectionList || []; this.objectionList = response.data.oobjectionList || [];
this.wmsDeliveryWaybills = response.data.wmsDeliveryWaybills || [];
}).catch(() => { }).catch(() => {
this.$message.error('获取客户财务状态失败'); this.$message.error('获取客户财务状态失败');
}); });
@@ -242,7 +250,7 @@ export default {
/** 查询合同配卷列表 */ /** 查询合同配卷列表 */
getCoilList() { getCoilList() {
listContractPackaging(this.form.contractId).then(response => { listCoilByCustomerId(this.currentCustomerId).then(response => {
this.coilList = response.data || []; this.coilList = response.data || [];
}) })
}, },
@@ -303,6 +311,8 @@ export default {
handleItemClick(item) { handleItemClick(item) {
this.currentCustomer = { ...item }; this.currentCustomer = { ...item };
this.getFinanceList();
this.getCoilList();
this.activeTab = 'detail'; this.activeTab = 'detail';
}, },