style(wms/waybill): 格式化代码换行与缩进

修复多处代码行过长导致的可读性问题,调整长属性和标签的换行格式,同时补充打印前检查发货单非空的逻辑
This commit is contained in:
2026-05-19 16:26:23 +08:00
parent 6343f66ff7
commit df25151fa5

View File

@@ -26,8 +26,8 @@
<el-empty description="请先选择发货计划" />
</div>
<div v-else>
<el-form style="position: sticky; left: 0; top: 0; padding: 10px;" :model="queryParams" ref="queryForm" size="small"
:inline="true" v-show="showSearch" label-width="68px">
<el-form style="position: sticky; left: 0; top: 0; padding: 10px;" :model="queryParams" ref="queryForm"
size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="发货单名称" prop="waybillName">
<el-input v-model="queryParams.waybillName" placeholder="请输入发货单名称" clearable
@keyup.enter.native="handleQuery" />
@@ -55,7 +55,7 @@
<el-option label="未打印" :value="3" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -113,7 +113,8 @@
<!-- <el-table-column label="负责人电话" align="center" prop="principalPhone" width="100" /> -->
<el-table-column label="完成状态" align="center" prop="status" width="120">
<template slot-scope="scope">
<el-select v-model="scope.row.status" placeholder="请选择完成状态" @change="handleStatusChange(scope.row)">
<el-select v-model="scope.row.status" placeholder="请选择完成状态"
@change="handleStatusChange(scope.row)">
<el-option label="已发货" :value="1" />
<el-option label="未发货" :value="0" />
<el-option label="已打印" :value="2" />
@@ -140,7 +141,8 @@
</template>
<template slot="panelB">
<div style="height: 100%; overflow: auto;">
<DeliveryWaybillDetail v-if="canEdit" ref="detailTable" :waybillId="waybillId" :coilList="coilList" :orderId="orderId" />
<DeliveryWaybillDetail v-if="canEdit" ref="detailTable" :waybillId="waybillId" :coilList="coilList"
:orderId="orderId" />
<el-empty v-else description="已发货,不可修改,点击打印查看详情" />
</div>
</template>
@@ -190,8 +192,10 @@
<!-- 订单选择对话框 -->
<el-dialog title="选择订单" :visible.sync="orderDialogVisible" width="800px" append-to-body>
<el-input @change="loadOrderList" v-model="orderQuery" placeholder="输入关键词搜索" style="margin-bottom: 10px;" @input="handleOrderSearch" />
<el-table v-loading="orderLoading" :data="orderList" max-height="500px" style="width: 100%" @row-click="handleOrderSelect">
<el-input @change="loadOrderList" v-model="orderQuery" placeholder="输入关键词搜索" style="margin-bottom: 10px;"
@input="handleOrderSearch" />
<el-table v-loading="orderLoading" :data="orderList" max-height="500px" style="width: 100%"
@row-click="handleOrderSelect">
<el-table-column prop="orderCode" label="订单编号" />
<el-table-column prop="companyName" label="客户公司" />
<el-table-column prop="salesman" label="销售员" />
@@ -642,18 +646,24 @@ export default {
handlePrint(row, printType) {
this.loading = true;
this.printType = printType || 0;
updateDeliveryWaybill({
waybillId: row.waybillId,
status: 2
}).then(() => {
row.status = 2;
});
// 获取发货单明细
listDeliveryWaybillDetail({
waybillId: row.waybillId,
pageNum: 1,
pageSize: 1000 // 获取所有明细
}).then(response => {
// 该发货单不能是空的
if (response.rows.length === 0) {
this.$modal.msgError("发货单为空不能打印");
this.loading = false;
return;
}
updateDeliveryWaybill({
waybillId: row.waybillId,
status: 2
}).then(() => {
row.status = 2;
});
// 处理字段映射确保与wayBill组件使用的字段名一致
this.currentWaybillDetails = response.rows.map(item => ({
coilId: item.coilId,