refactor(ui): 优化表格显示和对话框布局

- 修改发货单打印对话框宽度为固定值
- 订单列表显示供应商名称替代ID
- 收货单和退货单显示订单编号替代ID
- 调整发货单明细查询逻辑
- 退货单新增订单选择功能
- 发货单组件添加负责人信息输入
- 调整发货单打印样式和布局
This commit is contained in:
砂糖
2025-11-28 14:27:55 +08:00
parent 507a44c161
commit 346aba6f31
7 changed files with 47 additions and 25 deletions

View File

@@ -116,9 +116,9 @@ export default {
watch: {
waybillId: {
handler(newVal, oldVal) {
if (newVal) {
// if (newVal) {
this.getList();
}
// }
},
immediate: true
}
@@ -176,7 +176,7 @@ export default {
/** 查询发货单明细列表 */
getList() {
this.loading = true;
listDeliveryWaybillDetail(this.queryParams).then(response => {
listDeliveryWaybillDetail({ ...this.queryParams, waybillId: this.waybillId }).then(response => {
this.deliveryWaybillDetailList = response.rows;
this.total = response.total;
this.loading = false;

View File

@@ -22,6 +22,21 @@
</div>
</div>
<div class="waybill-header">
<div class="header-left">
<span class="label">负责人</span>
<input type="text" class="editable-input transparent-input" v-model="localWaybill.principal" />
</div>
<div class="header-right">
<span class="label">电话</span>
<input type="text" class="editable-input transparent-input" v-model="localWaybill.principalPhone" />
</div>
<div class="header-center">
<span class="label">车牌</span>
<input type="text" class="editable-input transparent-input" v-model="localWaybill.licensePlate" />
</div>
</div>
<!-- 表格 -->
<table class="waybill-table">
<thead>
@@ -134,7 +149,10 @@ export default {
senderUnit: '',
deliveryYear: '',
deliveryMonth: '',
deliveryDay: ''
deliveryDay: '',
principal: '',
principalPhone: '',
licensePlate: ''
},
// 本地可编辑的发货单明细
localWaybillDetails: []
@@ -150,7 +168,10 @@ export default {
senderUnit: newVal.senderUnit || '',
deliveryYear: this.getYearFromDate(newVal.deliveryTime) || '',
deliveryMonth: this.getMonthFromDate(newVal.deliveryTime) || '',
deliveryDay: this.getDayFromDate(newVal.deliveryTime) || ''
deliveryDay: this.getDayFromDate(newVal.deliveryTime) || '',
principal: newVal.principal || '',
principalPhone: newVal.principalPhone || '',
licensePlate: newVal.licensePlate || ''
};
}
},
@@ -294,9 +315,9 @@ export default {
<style scoped>
.waybill-container {
width: auto;
width: 850px;
max-width: none;
min-width: 1200px;
min-width: 850px;
margin: 0 auto;
padding: 20px;
background: white;
@@ -329,7 +350,6 @@ export default {
.label {
font-weight: bold;
margin-right: 10px;
display: inline-block;
width: 80px;
text-align: right;
@@ -337,10 +357,9 @@ export default {
}
.date-label {
width: 16px;
width: 1em;
}
/* 可编辑输入框样式 */
.editable-input {
padding: 4px 8px;
@@ -358,7 +377,7 @@ export default {
}
.date-input {
width: 60px;
width: 30px;
text-align: center;
margin-right: 5px;
}
@@ -424,12 +443,12 @@ export default {
.waybill-table th:nth-child(6),
.waybill-table td:nth-child(6) {
width: 80px; /* 卷号 */
width: 100px; /* 卷号 */
}
.waybill-table th:nth-child(7),
.waybill-table td:nth-child(7) {
width: 60px; /* 规格 */
width: 80px; /* 规格 */
}
.waybill-table th:nth-child(8),