| | |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | detailData: { |
| | | type: Object, |
| | | default: () => ({}), |
| | | }, |
| | | row: { |
| | | type: Object, |
| | | default: () => ({}), |
| | |
| | | get: () => props.isShow, |
| | | set: (value: boolean) => emits("update:isShow", value), |
| | | }); |
| | | |
| | | /** 工序展示名:工单为 processName,报工列表为 process,缺省与旧版一致为「印铜」 */ |
| | | const processTitlePrefix = computed(() => { |
| | | const row = props.row as Record<string, unknown> | null | undefined; |
| | | if (!row) return "印铜"; |
| | | const name = row.processName ?? row.process; |
| | | if (name != null && String(name).trim() !== "") { |
| | | return String(name).trim(); |
| | | } |
| | | return "印铜"; |
| | | }); |
| | | |
| | | const dialogTitle = computed(() => |
| | | props.isEdit ? `${processTitlePrefix.value}报工` : `${processTitlePrefix.value}详情` |
| | | ); |
| | | |
| | | const formData = reactive({ |
| | | productProcessRouteItemId: undefined, |
| | |
| | | |
| | | const initData = () => { |
| | | if (!props.isEdit) { |
| | | formData.otherData = JSON.parse(props.detailData.otherData || '{}'); |
| | | formData.quantity = props.detailData.quantity; |
| | | formData.otherData = JSON.parse(props.row.otherData || '{}'); |
| | | formData.quantity = props.row.quantity; |
| | | } else { |
| | | const row = props.row; |
| | | formData.planQuantity = row.planQuantity |
| | |
| | | |
| | | <template> |
| | | <el-dialog v-model="visible" |
| | | title="印铜报工" |
| | | :title="dialogTitle" |
| | | width="90%"> |
| | | <el-form :model="formData"> |
| | | <table class="report-table"> |