提交
This commit is contained in:
1 parent
7cec1f2190
commit
13e4c9530a
85 files changed
+23079
-15736
No files matched your search
@@ -103,6 +103,10 @@
|
||||
import SystemViewDialog from '@/components/business/system-view-dialog/index.vue'
|
||||
import type { ViewSection } from '@/components/business/system-view-dialog/index.vue'
|
||||
import { fetchProductionTaskDetail } from '@/api/production-task'
|
||||
import {
|
||||
productionConclusionLabel,
|
||||
productionConclusionTagType
|
||||
} from '@/utils/production-labels'
|
||||
|
||||
const props = defineProps<{
|
||||
visible: boolean
|
||||
@@ -231,6 +235,11 @@
|
||||
{ label: '协议号', value: d.protocolNo || '—' },
|
||||
{ label: '样本编码', value: d.sampleCode || '—' },
|
||||
{ label: '开始时间', value: d.startedTime || '—' },
|
||||
{
|
||||
label: '生产结论',
|
||||
value: productionConclusionLabel(d.conclusion),
|
||||
tagType: productionConclusionTagType(d.conclusion)
|
||||
},
|
||||
{ label: '完成时间', value: d.completedTime || '—' },
|
||||
{ label: '备注', value: d.remark || '—', span: true }
|
||||
]
|
||||
|
||||
@@ -59,6 +59,19 @@
|
||||
<span class="qc-kv__label">完成时间</span>
|
||||
<span class="qc-kv__value">{{ task.completedTime || '—' }}</span>
|
||||
</div>
|
||||
<div class="qc-kv">
|
||||
<span class="qc-kv__label">生产结论</span>
|
||||
<span class="qc-kv__value">
|
||||
<el-tag
|
||||
v-if="productionConclusionTagType(task.conclusion)"
|
||||
:type="productionConclusionTagType(task.conclusion)"
|
||||
size="small"
|
||||
>
|
||||
{{ task.conclusionLabel || productionConclusionLabel(task.conclusion) }}
|
||||
</el-tag>
|
||||
<template v-else>—</template>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="production-task-card__foot">
|
||||
<button type="button" class="production-task-card__link" @click.stop="openTaskView(task)">
|
||||
@@ -82,6 +95,10 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import ProductionTaskViewDialog from '@/components/business/production-task-view-dialog/index.vue'
|
||||
import {
|
||||
productionConclusionLabel,
|
||||
productionConclusionTagType
|
||||
} from '@/utils/production-labels'
|
||||
|
||||
export type ProductionTaskInput = {
|
||||
inputType?: string
|
||||
@@ -101,6 +118,8 @@
|
||||
taskName?: string
|
||||
taskStatus?: string
|
||||
taskStatusLabel?: string
|
||||
conclusion?: string
|
||||
conclusionLabel?: string
|
||||
startedTime?: string
|
||||
completedTime?: string
|
||||
inputs?: ProductionTaskInput[]
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
<!-- 工单备注编辑(入库/临时生产、入库质检) -->
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
:title="title"
|
||||
width="560px"
|
||||
class="dialog-form-layout"
|
||||
align-center
|
||||
destroy-on-close
|
||||
:close-on-click-modal="false"
|
||||
@close="handleClose"
|
||||
>
|
||||
<el-form label-position="top" class="biz-dialog-form">
|
||||
<el-form-item label="备注">
|
||||
<el-input
|
||||
v-model="remark"
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
placeholder="选填"
|
||||
maxlength="512"
|
||||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button class="btn-ghost" @click="handleClose"><el-icon><Close /></el-icon>取消</el-button>
|
||||
<el-button class="btn-main" type="primary" :loading="submitting" @click="handleSubmit">
|
||||
<el-icon><Check /></el-icon>保存
|
||||
</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, watch } from 'vue'
|
||||
import { Close, Check } from '@element-plus/icons-vue'
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
visible: boolean
|
||||
title?: string
|
||||
initialRemark?: string
|
||||
submitting?: boolean
|
||||
}>(),
|
||||
{
|
||||
title: '编辑备注',
|
||||
initialRemark: '',
|
||||
submitting: false
|
||||
}
|
||||
)
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'update:visible', val: boolean): void
|
||||
(e: 'submit', remark: string): void
|
||||
}>()
|
||||
|
||||
const dialogVisible = computed({
|
||||
get: () => props.visible,
|
||||
set: (val) => emit('update:visible', val)
|
||||
})
|
||||
|
||||
const remark = ref('')
|
||||
|
||||
function handleClose() {
|
||||
dialogVisible.value = false
|
||||
}
|
||||
|
||||
function handleSubmit() {
|
||||
emit('submit', remark.value.trim())
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.visible,
|
||||
(val) => {
|
||||
if (val) {
|
||||
remark.value = props.initialRemark || ''
|
||||
}
|
||||
}
|
||||
)
|
||||
</script>
|
||||
Reference in new issue
Block a user