feat(web-admin): support work-order mode on production conclusion dialog
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
a7f946450e
commit
f110f92040
1 file changed
+29
-3
+29
-3
@@ -1,8 +1,8 @@
|
||||
<!-- 完成任务 — 生产结论 -->
|
||||
<!-- 完成任务 / 完成工单 — 生产结论 -->
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
:title="isCompletedEdit ? '修改生产结论' : '完成任务'"
|
||||
:title="title"
|
||||
width="520px"
|
||||
class="dialog-form-layout"
|
||||
align-center
|
||||
@@ -12,6 +12,7 @@
|
||||
:append-to-body="true"
|
||||
@close="handleClose"
|
||||
>
|
||||
<p v-if="hintText" class="hint-muted">{{ hintText }}</p>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="form"
|
||||
@@ -58,11 +59,15 @@
|
||||
isCompletedEdit?: boolean
|
||||
initialConclusion?: string
|
||||
initialRemark?: string
|
||||
mode?: 'task' | 'workOrder'
|
||||
hint?: string
|
||||
}>(),
|
||||
{
|
||||
isCompletedEdit: false,
|
||||
initialConclusion: '',
|
||||
initialRemark: ''
|
||||
initialRemark: '',
|
||||
mode: 'task',
|
||||
hint: ''
|
||||
}
|
||||
)
|
||||
|
||||
@@ -76,6 +81,19 @@
|
||||
set: (val) => emit('update:visible', val)
|
||||
})
|
||||
|
||||
const title = computed(() => {
|
||||
if (props.mode === 'workOrder') return '完成工单'
|
||||
return props.isCompletedEdit ? '修改生产结论' : '完成任务'
|
||||
})
|
||||
|
||||
const hintText = computed(() => {
|
||||
if (props.hint) return props.hint
|
||||
if (props.mode === 'workOrder') {
|
||||
return '将同步完成该工单下所有未完成的生产任务及其工艺步骤。'
|
||||
}
|
||||
return ''
|
||||
})
|
||||
|
||||
const formRef = ref<FormInstance>()
|
||||
const form = reactive({ conclusion: '', remark: '' })
|
||||
const rules: FormRules = {
|
||||
@@ -106,3 +124,11 @@
|
||||
}
|
||||
)
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.hint-muted {
|
||||
margin: 0 0 12px;
|
||||
font-size: 13px;
|
||||
color: var(--mint-text-muted, #64748b);
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user