Merge remote-tracking branch 'origin/0.8.X' into 0.8.X
# Conflicts: # klp-ui/src/views/wms/post/aps/schedule.vue
This commit is contained in:
@@ -626,7 +626,7 @@
|
||||
<div style="margin-bottom:12px;font-size:13px;color:#e67e22;">
|
||||
请为每条明细配置工序,所有明细配置完成后才能接收。
|
||||
</div>
|
||||
|
||||
|
||||
<el-table :data="receiveDetailList" border size="small" class="aps-table" max-height="400">
|
||||
<el-table-column label="规格" prop="spec" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column label="材质" prop="material" width="90" align="center" show-overflow-tooltip />
|
||||
@@ -634,8 +634,8 @@
|
||||
<el-table-column label="品名" prop="productType" min-width="90" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="配置工序" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
<ProcessSelect
|
||||
v-model="scope.row.processId"
|
||||
<ProcessSelect
|
||||
v-model="scope.row.processId"
|
||||
placeholder="请选择工序"
|
||||
@change="(val, data) => handleReceiveProcessChange(scope.row, val, data)"
|
||||
/>
|
||||
@@ -682,6 +682,14 @@ import draggable from 'vuedraggable'
|
||||
export default {
|
||||
name: 'ApsSchedule',
|
||||
components: { ProcessSelect, draggable },
|
||||
components: { ProcessSelect },
|
||||
props: {
|
||||
// 由 flow.vue 通过 switchApsPage 传入的参数
|
||||
apsParams: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
const today = new Date()
|
||||
const y = today.getFullYear()
|
||||
@@ -769,7 +777,49 @@ export default {
|
||||
this.refreshScheduledStepItems()
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 接收 flow.vue 传入的参数:设置日期并自动查询
|
||||
apsParams: {
|
||||
handler(val) {
|
||||
if (val && val.prodDate) {
|
||||
this.queryDate = val.prodDate
|
||||
}
|
||||
if (val && val.scheduleStatus !== undefined) {
|
||||
// 根据产需单状态自动切换 Tab
|
||||
// 1=待审核 2=已接收 4=已排产
|
||||
const statusToTab = { 1: 'pending', 2: 'accepted', 4: 'scheduled' }
|
||||
const tab = statusToTab[val.scheduleStatus] || 'pending'
|
||||
this.activeTab = tab
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.handleQuery()
|
||||
})
|
||||
},
|
||||
immediate: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 优先从路由参数获取(产需单点击"跳转排产"通过 $router.push 传参)
|
||||
const query = this.$route.query
|
||||
// 其次从 apsParams prop 获取(弹窗内由 flow.vue 切换组件传入)
|
||||
const params = this.apsParams
|
||||
|
||||
let hasExternal = false
|
||||
if (query && query.prodDate) {
|
||||
this.queryDate = query.prodDate
|
||||
hasExternal = true
|
||||
if (query.scheduleStatus !== undefined) {
|
||||
const statusToTab = { 1: 'pending', 2: 'accepted', 4: 'scheduled' }
|
||||
this.activeTab = statusToTab[Number(query.scheduleStatus)] || 'pending'
|
||||
}
|
||||
} else if (params && params.prodDate) {
|
||||
this.queryDate = params.prodDate
|
||||
hasExternal = true
|
||||
if (params.scheduleStatus !== undefined) {
|
||||
const statusToTab = { 1: 'pending', 2: 'accepted', 4: 'scheduled' }
|
||||
this.activeTab = statusToTab[params.scheduleStatus] || 'pending'
|
||||
}
|
||||
}
|
||||
this.handleQuery()
|
||||
},
|
||||
methods: {
|
||||
|
||||
Reference in New Issue
Block a user