Files
klp-oa/klp-ui/src/views/wms/purchasePlan/panels/clac.vue

113 lines
2.1 KiB
Vue
Raw Normal View History

2025-07-18 17:22:56 +08:00
<template>
2025-07-22 11:49:48 +08:00
<div class="purchase-plan-transfer">
2025-07-22 13:22:50 +08:00
<!-- 推荐采购计划自动推荐无按钮 -->
<recommend-purchase-panel :order-id="orderId" :show-button="false" @recommend="onRecommend" />
2025-07-19 10:26:00 +08:00
2025-07-22 13:22:50 +08:00
<!-- 创建采购计划表单及明细 -->
<create-purchase-panel
:order-id="orderId"
:recommend-data="recommendData"
@confirm="onConfirm"
/>
2025-07-18 17:22:56 +08:00
</div>
</template>
<script>
2025-07-22 13:22:50 +08:00
import RecommendPurchasePanel from './RecommendPurchasePanel.vue'
import CreatePurchasePanel from './CreatePurchasePanel.vue'
import { updatePurchasePlan } from '@/api/wms/purchasePlan'
import { EOrderStatus } from '@/api/wms/order'
2025-07-19 10:26:00 +08:00
2025-07-18 17:22:56 +08:00
export default {
name: 'PurchasePlanClac',
2025-07-22 13:22:50 +08:00
components: {
RecommendPurchasePanel,
CreatePurchasePanel
},
2025-07-18 17:22:56 +08:00
props: {
orderId: {
type: [String, Number],
required: true
}
},
data() {
return {
2025-07-22 13:22:50 +08:00
recommendData: {}
2025-07-18 17:22:56 +08:00
}
},
methods: {
2025-07-22 13:22:50 +08:00
onRecommend(data) {
this.recommendData = data
2025-07-18 17:22:56 +08:00
},
2025-07-22 13:22:50 +08:00
onConfirm(submitData) {
updatePurchasePlan({
orderId: this.orderId,
orderStatus: EOrderStatus.PRODUCTIONING,
}).then(response => {
this.$emit('confirm', submitData)
})
2025-07-18 17:22:56 +08:00
}
}
}
</script>
<style scoped>
2025-07-22 11:49:48 +08:00
.purchase-plan-transfer {
display: flex;
flex-direction: column;
}
.section-card {
2025-07-18 17:22:56 +08:00
margin-bottom: 20px;
}
2025-07-22 11:49:48 +08:00
.section-title {
font-weight: bold;
font-size: 16px;
color: #333;
}
.transfer-content {
display: flex;
align-items: flex-start;
}
.left-table {
width: 30%;
}
.right-table {
width: 60%;
}
.transfer-actions {
width: 10%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.transfer-actions .el-button {
margin: 10px 0;
}
2025-07-19 10:26:00 +08:00
.global-loading-overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.9);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
z-index: 2000;
border-radius: 4px;
}
.global-loading-overlay p {
margin-top: 10px;
color: #409EFF;
font-size: 14px;
}
2025-07-22 11:49:48 +08:00
.filter-bar {
display: flex;
align-items: center;
margin-bottom: 10px;
2025-07-19 10:26:00 +08:00
}
2025-07-18 17:22:56 +08:00
</style>