✨ feat(mes): 更新杂项类型为整数并添加明细服务
将杂项类型字段从字符串更改为整数,以支持新的枚举类型。同时,新增杂项出库明细的服务接口和实现,提供对明细的增删改查功能,提升系统的灵活性和可维护性。pull/871/MERGE
parent
8948a76f63
commit
8138e9fa93
|
|
@ -5,7 +5,7 @@ export interface WmMiscReceiptVO {
|
||||||
id: number
|
id: number
|
||||||
code: string
|
code: string
|
||||||
name: string
|
name: string
|
||||||
type: string
|
type: number
|
||||||
sourceDocId: number
|
sourceDocId: number
|
||||||
sourceDocCode: string
|
sourceDocCode: string
|
||||||
sourceDocType: string
|
sourceDocType: string
|
||||||
|
|
|
||||||
|
|
@ -306,4 +306,5 @@ export enum DICT_TYPE {
|
||||||
MES_WM_PRODUCT_SALES_STATUS = 'mes_wm_product_sales_status', // MES 销售出库单状态
|
MES_WM_PRODUCT_SALES_STATUS = 'mes_wm_product_sales_status', // MES 销售出库单状态
|
||||||
MES_SALES_NOTICE_STATUS = 'mes_sales_notice_status', // MES 发货通知单状态
|
MES_SALES_NOTICE_STATUS = 'mes_sales_notice_status', // MES 发货通知单状态
|
||||||
MES_WM_MISC_ISSUE_TYPE = 'mes_wm_misc_issue_type', // MES 杂项单类型
|
MES_WM_MISC_ISSUE_TYPE = 'mes_wm_misc_issue_type', // MES 杂项单类型
|
||||||
|
MES_WM_MISC_RECEIPT_TYPE = 'mes_wm_misc_receipt_type', // MES 杂项单类型
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,17 +12,6 @@
|
||||||
border
|
border
|
||||||
:row-key="(row: any) => row.id"
|
:row-key="(row: any) => row.id"
|
||||||
>
|
>
|
||||||
<el-table-column type="expand">
|
|
||||||
<template #default="scope">
|
|
||||||
<MiscIssueDetailList
|
|
||||||
:ref="(el: any) => setDetailListRef(scope.row.id, el)"
|
|
||||||
:issue-id="props.issueId"
|
|
||||||
:line-id="scope.row.id"
|
|
||||||
:item-id="scope.row.itemId"
|
|
||||||
:form-type="props.formType"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="物料编码" align="center" prop="itemCode" min-width="120" />
|
<el-table-column label="物料编码" align="center" prop="itemCode" min-width="120" />
|
||||||
<el-table-column label="物料名称" align="center" prop="itemName" min-width="140" />
|
<el-table-column label="物料名称" align="center" prop="itemName" min-width="140" />
|
||||||
<el-table-column label="规格型号" align="center" prop="specification" min-width="120" />
|
<el-table-column label="规格型号" align="center" prop="specification" min-width="120" />
|
||||||
|
|
@ -275,16 +264,6 @@ const resetForm = () => {
|
||||||
formRef.value?.resetFields()
|
formRef.value?.resetFields()
|
||||||
}
|
}
|
||||||
|
|
||||||
// ==================== 展开行:出库明细 ====================
|
|
||||||
const detailListRefs = ref<Record<number, InstanceType<typeof MiscIssueDetailList>>>({})
|
|
||||||
|
|
||||||
/** 缓存子组件 ref */
|
|
||||||
const setDetailListRef = (lineId: number, el: any) => {
|
|
||||||
if (el) {
|
|
||||||
detailListRefs.value[lineId] = el
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getList()
|
await getList()
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
:disabled="isHeaderReadonly"
|
:disabled="isHeaderReadonly"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in getStrDictOptions(DICT_TYPE.MES_WM_MISC_RECEIPT_TYPE)"
|
v-for="dict in getIntDictOptions(DICT_TYPE.MES_WM_MISC_RECEIPT_TYPE)"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
:label="dict.label"
|
:label="dict.label"
|
||||||
:value="dict.value"
|
:value="dict.value"
|
||||||
|
|
@ -113,7 +113,7 @@
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { generateRandomStr } from '@/utils'
|
import { generateRandomStr } from '@/utils'
|
||||||
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
|
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||||
import { WmMiscReceiptApi, WmMiscReceiptVO } from '@/api/mes/wm/miscreceipt'
|
import { WmMiscReceiptApi, WmMiscReceiptVO } from '@/api/mes/wm/miscreceipt'
|
||||||
import MiscReceiptLineList from './MiscReceiptLineList.vue'
|
import MiscReceiptLineList from './MiscReceiptLineList.vue'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
>
|
>
|
||||||
<!-- TODO @AI:需呀在 DICT_TYPE 枚举下; -->
|
<!-- TODO @AI:需呀在 DICT_TYPE 枚举下; -->
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in getStrDictOptions(DICT_TYPE.MES_WM_MISC_RECEIPT_TYPE)"
|
v-for="dict in getIntDictOptions(DICT_TYPE.MES_WM_MISC_RECEIPT_TYPE)"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
:label="dict.label"
|
:label="dict.label"
|
||||||
:value="dict.value"
|
:value="dict.value"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue