feat(订单详情): 在钢卷选择器中添加订单详情显示功能

添加订单ID参数传递至钢卷选择器组件
在钢卷选择器中新增显示订单详情的复选框和面板
移除OrderDetail组件中未使用的API导入
This commit is contained in:
砂糖
2026-04-14 15:38:44 +08:00
parent 263c2b5f37
commit 5f5e5cacb4
4 changed files with 25 additions and 5 deletions

View File

@@ -80,6 +80,7 @@
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
<el-checkbox v-if="orderBy" style="margin-left: 10px;" v-model="showCoilMap" size="small">显示钢卷地图</el-checkbox>
<el-checkbox v-if="orderBy && orderId" style="margin-left: 10px;" v-model="showOrderInfo" size="small">显示订单详情</el-checkbox>
</el-form-item>
</el-form>
@@ -163,6 +164,12 @@
:id="selectedNodeId" :canToggle="false" :canRelease="false" />
</div>
</DragResizeBox>
<DragResizeBox v-if="orderBy && orderId && showOrderInfo" storageKey="coil-order-info">
<div style="height: 100%; width: 100%; background-color: #fff;">
<order-detail v-if="orderBy && orderId && showOrderInfo" :orderId="orderId" :editable="false" />
</div>
</DragResizeBox>
</el-dialog>
</div>
</template>
@@ -177,6 +184,7 @@ import { defaultColumns } from './data';
import ActualWarehouseSelect from '@/components/KLPService/ActualWarehouseSelect/index.vue';
import WarehouseBirdMini from '@/views/wms/warehouse/components/WarehouseBirdMini.vue';
import DragResizeBox from '@/components/DragResizeBox/index.vue';
import OrderDetail from '@/views/crm/components/OrderDetail.vue';
export default {
name: 'CoilSelector',
@@ -185,7 +193,8 @@ export default {
MutiSelect,
ActualWarehouseSelect,
WarehouseBirdMini,
DragResizeBox
DragResizeBox,
OrderDetail
},
dicts: ['coil_itemname', 'coil_material', 'coil_manufacturer', 'coil_quality_status'],
props: {
@@ -254,6 +263,10 @@ export default {
type: Boolean,
default: false
},
orderId: {
type: String,
default: null
}
},
data() {
return {
@@ -287,6 +300,7 @@ export default {
warehouseTree: [],
treeProps: { label: "actualWarehouseName", children: "children" },
treeLoading: false,
showOrderInfo: false,
};
},
computed: {

View File

@@ -113,7 +113,7 @@
</template>
<script>
import { listOrderItem, getOrderItem, delOrderItem, addOrderItem, updateOrderItem } from "@/api/crm/orderItem";
import { listOrderItem, getOrderItem } from "@/api/crm/orderItem";
import { actions, ORDER_ACTIONS } from "../js/actions";
import { getOrder } from "@/api/crm/order";
import OrderPrinter from "./OrderPrinter.vue";

View File

@@ -8,7 +8,7 @@
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
</el-col>
<el-col :span="1.5">
<coil-selector dialogWidth="1200px" :use-trigger="true" multiple @confirm="handleBatchAdd"
<coil-selector dialogWidth="1200px" :use-trigger="true" multiple @confirm="handleBatchAdd" :orderId="orderId"
:filters="{ selectType: 'product', status: 0, excludeBound: true, orderBy: true }" :orderBy="true" :disableO="true">
<el-button type="primary" plain icon="el-icon-plus" size="mini">批量新增</el-button>
</coil-selector>
@@ -154,6 +154,10 @@ export default {
coilList: {
type: Array,
default: () => []
},
orderId: {
type: String,
default: ''
}
},
dicts: ['coil_itemname'],

View File

@@ -131,7 +131,7 @@
</template>
<template slot="panelB">
<div style="height: 100%; overflow: auto;">
<DeliveryWaybillDetail v-if="canEdit" ref="detailTable" :waybillId="waybillId" :coilList="coilList" />
<DeliveryWaybillDetail v-if="canEdit" ref="detailTable" :waybillId="waybillId" :coilList="coilList" :orderId="orderId" />
<el-empty v-else description="已发货,不可修改,点击打印查看详情" />
</div>
</template>
@@ -327,6 +327,7 @@ export default {
orderDialogVisible: false,
// 订单搜索关键词
orderQuery: '',
orderId: '',
};
},
created() {
@@ -354,7 +355,7 @@ export default {
/** 加载订单列表 */
loadOrderList() {
this.orderLoading = true;
listOrder({ pageNum: 1, pageSize: 100, orderType: 1, keyword: this.orderQuery }).then(response => {
listOrder({ pageNum: 1, pageSize: 100, keyword: this.orderQuery }).then(response => {
this.orderList = response.rows || [];
this.orderLoading = false;
}).catch(error => {
@@ -495,6 +496,7 @@ export default {
// this.$modal.msgWarning("已发货的发货单不能操作");
return;
}
this.orderId = row.orderId;
this.canEdit = true;
this.waybillId = row.waybillId;
},