完成排产(测试过了)

This commit is contained in:
2026-03-08 16:02:44 +08:00
parent b660ddcc3e
commit 7736ac3311
125 changed files with 10418 additions and 15 deletions

View File

@@ -40,12 +40,34 @@
<dict-tag :options="dict.type.order_status" :value="item.orderStatus" />
</template>
<!-- actions 插槽el-button Element UI Vue2 组件用法不变 -->
<!-- actions 插槽操作区 -->
<template slot="actions" slot-scope="{ item }">
<el-button size="mini" plain title="预订单确认" type="success" icon="el-icon-check" v-if="isPre"
@click.stop="handleStartProduction(item)"></el-button>
<el-button size="small" type="text" style="color: red" icon="el-icon-delete"
@click.stop="handleDelete(item)"></el-button>
<el-button
size="mini"
plain
title="预订单确认"
type="success"
icon="el-icon-check"
v-if="isPre"
@click.stop="handleStartProduction(item)"
/>
<el-button
size="mini"
plain
type="primary"
icon="el-icon-s-operation"
title="进入排产中心"
@click.stop="goApsSchedule(item)"
>
排产
</el-button>
<el-button
size="small"
type="text"
style="color: red"
icon="el-icon-delete"
@click.stop="handleDelete(item)"
/>
</template>
</klp-list>
@@ -64,6 +86,23 @@
<!-- 选中行时显示Tab详情 -->
<div v-else>
<!-- 订单详情操作区 -->
<div class="order-detail-header">
<div class="order-detail-title">
当前订单{{ form.orderCode || form.orderId }}
</div>
<div class="order-detail-actions">
<el-button
type="primary"
size="mini"
icon="el-icon-magic-stick"
:disabled="!form.orderId"
@click="goApsOneKeySchedule"
>
排产
</el-button>
</div>
</div>
<!-- Tab容器 -->
<el-tabs v-loading="loading" v-model="activeTab" type="border-card" class="mt-2">
<!-- 订单信息Tab -->
@@ -460,6 +499,34 @@ export default {
}).catch(() => {
this.$modal.msgError("转化失败");
});
},
/** 跳转到 APS 排产中心,携带当前订单标识 */
goApsSchedule(row) {
if (!row || !row.orderId) {
this.$modal.msgWarning("当前订单数据异常,无法进入排产");
return;
}
this.$router
.push({
path: "/aps/index",
query: { orderId: row.orderId, orderCode: row.orderCode }
})
.catch(() => {});
},
/** 从订单详情一键排产并查看结果 */
goApsOneKeySchedule() {
if (!this.form || !this.form.orderId) {
this.$modal.msgWarning("请先选择需要排产的订单");
return;
}
this.$router
.push({
path: "/aps/index",
query: { orderId: this.form.orderId, orderCode: this.form.orderCode, autoOneKey: "1" }
})
.catch(() => {});
}
}
};
@@ -485,6 +552,17 @@ export default {
margin-bottom: 16px;
}
.order-detail-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 8px;
}
.order-detail-title {
font-weight: 600;
font-size: 14px;
}
::v-deep .el-input-group__append,
::v-deep .el-input-group__prepend {
width: 20px !important;