✨ feat(mes): 重命名产品收货单相关类和接口
重命名产品收货单及其相关的 VO、DO、Service 和 API 接口,以统一命名为“Receipt”,提升代码可读性和一致性。此变更包括多个文件的重命名和相应的引用更新,确保系统功能不受影响。pull/871/MERGE
parent
21cfbb9314
commit
c2e397e84c
|
|
@ -0,0 +1,53 @@
|
||||||
|
import request from '@/config/axios'
|
||||||
|
|
||||||
|
// MES 产品入库单明细 VO
|
||||||
|
export interface WmProductReceiptDetailVO {
|
||||||
|
id: number
|
||||||
|
lineId: number
|
||||||
|
receiptId: number
|
||||||
|
itemId: number
|
||||||
|
itemCode: string
|
||||||
|
quantity: number
|
||||||
|
batchId: number
|
||||||
|
warehouseId: number
|
||||||
|
warehouseName: string
|
||||||
|
locationId: number
|
||||||
|
locationName: string
|
||||||
|
areaId: number
|
||||||
|
areaName: string
|
||||||
|
remark: string
|
||||||
|
createTime: string
|
||||||
|
}
|
||||||
|
|
||||||
|
// MES 产品入库单明细 API
|
||||||
|
export const WmProductReceiptDetailApi = {
|
||||||
|
// 查询产品入库单明细列表
|
||||||
|
getProductReceiptDetailList: async (params: any) => {
|
||||||
|
return await request.get({ url: '/mes/wm/product-receipt-detail/list', params })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 根据行项目ID查询产品入库单明细列表
|
||||||
|
getProductReceiptDetailListByLineId: async (lineId: number) => {
|
||||||
|
return await request.get({ url: '/mes/wm/product-receipt-detail/list-by-line', params: { lineId } })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 查询产品入库单明细详情
|
||||||
|
getProductReceiptDetail: async (id: number) => {
|
||||||
|
return await request.get({ url: '/mes/wm/product-receipt-detail/get?id=' + id })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 新增产品入库单明细
|
||||||
|
createProductReceiptDetail: async (data: WmProductReceiptDetailVO) => {
|
||||||
|
return await request.post({ url: '/mes/wm/product-receipt-detail/create', data })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 修改产品入库单明细
|
||||||
|
updateProductReceiptDetail: async (data: WmProductReceiptDetailVO) => {
|
||||||
|
return await request.put({ url: '/mes/wm/product-receipt-detail/update', data })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 删除产品入库单明细
|
||||||
|
deleteProductReceiptDetail: async (id: number) => {
|
||||||
|
return await request.delete({ url: '/mes/wm/product-receipt-detail/delete?id=' + id })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,77 @@
|
||||||
|
import request from '@/config/axios'
|
||||||
|
|
||||||
|
// MES 产品入库单 VO
|
||||||
|
export interface WmProductReceiptVO {
|
||||||
|
id: number
|
||||||
|
code: string
|
||||||
|
name: string
|
||||||
|
workOrderId: number
|
||||||
|
workOrderCode: string
|
||||||
|
itemId: number
|
||||||
|
itemCode: string
|
||||||
|
itemName: string
|
||||||
|
specification: string
|
||||||
|
unitMeasureName: string
|
||||||
|
receiptDate: string
|
||||||
|
status: number
|
||||||
|
remark: string
|
||||||
|
createTime: string
|
||||||
|
}
|
||||||
|
|
||||||
|
// MES 产品入库单 API
|
||||||
|
export const WmProductReceiptApi = {
|
||||||
|
// 查询产品入库单分页
|
||||||
|
getProductReceiptPage: async (params: any) => {
|
||||||
|
return await request.get({ url: '/mes/wm/product-receipt/page', params })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 查询产品入库单详情
|
||||||
|
getProductReceipt: async (id: number) => {
|
||||||
|
return await request.get({ url: '/mes/wm/product-receipt/get?id=' + id })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 新增产品入库单
|
||||||
|
createProductReceipt: async (data: WmProductReceiptVO) => {
|
||||||
|
return await request.post({ url: '/mes/wm/product-receipt/create', data })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 修改产品入库单
|
||||||
|
updateProductReceipt: async (data: WmProductReceiptVO) => {
|
||||||
|
return await request.put({ url: '/mes/wm/product-receipt/update', data })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 删除产品入库单
|
||||||
|
deleteProductReceipt: async (id: number) => {
|
||||||
|
return await request.delete({ url: '/mes/wm/product-receipt/delete?id=' + id })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 提交产品入库单
|
||||||
|
submitProductReceipt: async (id: number) => {
|
||||||
|
return await request.put({ url: '/mes/wm/product-receipt/submit?id=' + id })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 执行上架
|
||||||
|
stockProductReceipt: async (id: number) => {
|
||||||
|
return await request.put({ url: '/mes/wm/product-receipt/stock?id=' + id })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 执行入库
|
||||||
|
executeProductReceipt: async (id: number) => {
|
||||||
|
return await request.put({ url: '/mes/wm/product-receipt/execute?id=' + id })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 取消产品入库单
|
||||||
|
cancelProductReceipt: async (id: number) => {
|
||||||
|
return await request.put({ url: '/mes/wm/product-receipt/cancel?id=' + id })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 校验产品入库单明细数量
|
||||||
|
checkProductReceiptQuantity: async (id: number) => {
|
||||||
|
return await request.get({ url: '/mes/wm/product-receipt/check-quantity?id=' + id })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 导出产品入库单 Excel
|
||||||
|
exportProductReceipt: async (params: any) => {
|
||||||
|
return await request.download({ url: '/mes/wm/product-receipt/export-excel', params })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
import request from '@/config/axios'
|
||||||
|
|
||||||
|
// MES 产品入库单行 VO
|
||||||
|
export interface WmProductReceiptLineVO {
|
||||||
|
id: number
|
||||||
|
receiptId: number
|
||||||
|
itemId: number
|
||||||
|
itemCode: string
|
||||||
|
itemName: string
|
||||||
|
specification: string
|
||||||
|
unitMeasureName: string
|
||||||
|
quantity: number
|
||||||
|
batchId: number
|
||||||
|
batchCode: string
|
||||||
|
remark: string
|
||||||
|
createTime: string
|
||||||
|
}
|
||||||
|
|
||||||
|
// MES 产品入库单行 API
|
||||||
|
export const WmProductReceiptLineApi = {
|
||||||
|
// 查询产品入库单行分页
|
||||||
|
getProductReceiptLinePage: async (params: any) => {
|
||||||
|
return await request.get({ url: '/mes/wm/product-receipt-line/page', params })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 查询产品入库单行详情
|
||||||
|
getProductReceiptLine: async (id: number) => {
|
||||||
|
return await request.get({ url: '/mes/wm/product-receipt-line/get?id=' + id })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 新增产品入库单行
|
||||||
|
createProductReceiptLine: async (data: WmProductReceiptLineVO) => {
|
||||||
|
return await request.post({ url: '/mes/wm/product-receipt-line/create', data })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 修改产品入库单行
|
||||||
|
updateProductReceiptLine: async (data: WmProductReceiptLineVO) => {
|
||||||
|
return await request.put({ url: '/mes/wm/product-receipt-line/update', data })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 删除产品入库单行
|
||||||
|
deleteProductReceiptLine: async (id: number) => {
|
||||||
|
return await request.delete({ url: '/mes/wm/product-receipt-line/delete?id=' + id })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,53 +0,0 @@
|
||||||
import request from '@/config/axios'
|
|
||||||
|
|
||||||
// MES 产品入库单明细 VO
|
|
||||||
export interface WmProductRecptDetailVO {
|
|
||||||
id: number
|
|
||||||
lineId: number
|
|
||||||
recptId: number
|
|
||||||
itemId: number
|
|
||||||
itemCode: string
|
|
||||||
quantity: number
|
|
||||||
batchId: number
|
|
||||||
warehouseId: number
|
|
||||||
warehouseName: string
|
|
||||||
locationId: number
|
|
||||||
locationName: string
|
|
||||||
areaId: number
|
|
||||||
areaName: string
|
|
||||||
remark: string
|
|
||||||
createTime: string
|
|
||||||
}
|
|
||||||
|
|
||||||
// MES 产品入库单明细 API
|
|
||||||
export const WmProductRecptDetailApi = {
|
|
||||||
// 查询产品入库单明细列表
|
|
||||||
getProductRecptDetailList: async (params: any) => {
|
|
||||||
return await request.get({ url: '/mes/wm/product-recpt-detail/list', params })
|
|
||||||
},
|
|
||||||
|
|
||||||
// 根据行项目ID查询产品入库单明细列表
|
|
||||||
getProductRecptDetailListByLineId: async (lineId: number) => {
|
|
||||||
return await request.get({ url: '/mes/wm/product-recpt-detail/list-by-line', params: { lineId } })
|
|
||||||
},
|
|
||||||
|
|
||||||
// 查询产品入库单明细详情
|
|
||||||
getProductRecptDetail: async (id: number) => {
|
|
||||||
return await request.get({ url: '/mes/wm/product-recpt-detail/get?id=' + id })
|
|
||||||
},
|
|
||||||
|
|
||||||
// 新增产品入库单明细
|
|
||||||
createProductRecptDetail: async (data: WmProductRecptDetailVO) => {
|
|
||||||
return await request.post({ url: '/mes/wm/product-recpt-detail/create', data })
|
|
||||||
},
|
|
||||||
|
|
||||||
// 修改产品入库单明细
|
|
||||||
updateProductRecptDetail: async (data: WmProductRecptDetailVO) => {
|
|
||||||
return await request.put({ url: '/mes/wm/product-recpt-detail/update', data })
|
|
||||||
},
|
|
||||||
|
|
||||||
// 删除产品入库单明细
|
|
||||||
deleteProductRecptDetail: async (id: number) => {
|
|
||||||
return await request.delete({ url: '/mes/wm/product-recpt-detail/delete?id=' + id })
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,77 +0,0 @@
|
||||||
import request from '@/config/axios'
|
|
||||||
|
|
||||||
// MES 产品入库单 VO
|
|
||||||
export interface WmProductRecptVO {
|
|
||||||
id: number
|
|
||||||
code: string
|
|
||||||
name: string
|
|
||||||
workOrderId: number
|
|
||||||
workOrderCode: string
|
|
||||||
itemId: number
|
|
||||||
itemCode: string
|
|
||||||
itemName: string
|
|
||||||
specification: string
|
|
||||||
unitMeasureName: string
|
|
||||||
receiptDate: string
|
|
||||||
status: number
|
|
||||||
remark: string
|
|
||||||
createTime: string
|
|
||||||
}
|
|
||||||
|
|
||||||
// MES 产品入库单 API
|
|
||||||
export const WmProductRecptApi = {
|
|
||||||
// 查询产品入库单分页
|
|
||||||
getProductRecptPage: async (params: any) => {
|
|
||||||
return await request.get({ url: '/mes/wm/product-recpt/page', params })
|
|
||||||
},
|
|
||||||
|
|
||||||
// 查询产品入库单详情
|
|
||||||
getProductRecpt: async (id: number) => {
|
|
||||||
return await request.get({ url: '/mes/wm/product-recpt/get?id=' + id })
|
|
||||||
},
|
|
||||||
|
|
||||||
// 新增产品入库单
|
|
||||||
createProductRecpt: async (data: WmProductRecptVO) => {
|
|
||||||
return await request.post({ url: '/mes/wm/product-recpt/create', data })
|
|
||||||
},
|
|
||||||
|
|
||||||
// 修改产品入库单
|
|
||||||
updateProductRecpt: async (data: WmProductRecptVO) => {
|
|
||||||
return await request.put({ url: '/mes/wm/product-recpt/update', data })
|
|
||||||
},
|
|
||||||
|
|
||||||
// 删除产品入库单
|
|
||||||
deleteProductRecpt: async (id: number) => {
|
|
||||||
return await request.delete({ url: '/mes/wm/product-recpt/delete?id=' + id })
|
|
||||||
},
|
|
||||||
|
|
||||||
// 提交产品入库单
|
|
||||||
submitProductRecpt: async (id: number) => {
|
|
||||||
return await request.put({ url: '/mes/wm/product-recpt/submit?id=' + id })
|
|
||||||
},
|
|
||||||
|
|
||||||
// 执行上架
|
|
||||||
stockProductRecpt: async (id: number) => {
|
|
||||||
return await request.put({ url: '/mes/wm/product-recpt/stock?id=' + id })
|
|
||||||
},
|
|
||||||
|
|
||||||
// 执行入库
|
|
||||||
executeProductRecpt: async (id: number) => {
|
|
||||||
return await request.put({ url: '/mes/wm/product-recpt/execute?id=' + id })
|
|
||||||
},
|
|
||||||
|
|
||||||
// 取消产品入库单
|
|
||||||
cancelProductRecpt: async (id: number) => {
|
|
||||||
return await request.put({ url: '/mes/wm/product-recpt/cancel?id=' + id })
|
|
||||||
},
|
|
||||||
|
|
||||||
// 校验产品入库单明细数量
|
|
||||||
checkProductRecptQuantity: async (id: number) => {
|
|
||||||
return await request.get({ url: '/mes/wm/product-recpt/check-quantity?id=' + id })
|
|
||||||
},
|
|
||||||
|
|
||||||
// 导出产品入库单 Excel
|
|
||||||
exportProductRecpt: async (params: any) => {
|
|
||||||
return await request.download({ url: '/mes/wm/product-recpt/export-excel', params })
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
||||||
import request from '@/config/axios'
|
|
||||||
|
|
||||||
// MES 产品入库单行 VO
|
|
||||||
export interface WmProductRecptLineVO {
|
|
||||||
id: number
|
|
||||||
recptId: number
|
|
||||||
itemId: number
|
|
||||||
itemCode: string
|
|
||||||
itemName: string
|
|
||||||
specification: string
|
|
||||||
unitMeasureName: string
|
|
||||||
quantity: number
|
|
||||||
batchId: number
|
|
||||||
batchCode: string
|
|
||||||
remark: string
|
|
||||||
createTime: string
|
|
||||||
}
|
|
||||||
|
|
||||||
// MES 产品入库单行 API
|
|
||||||
export const WmProductRecptLineApi = {
|
|
||||||
// 查询产品入库单行分页
|
|
||||||
getProductRecptLinePage: async (params: any) => {
|
|
||||||
return await request.get({ url: '/mes/wm/product-recpt-line/page', params })
|
|
||||||
},
|
|
||||||
|
|
||||||
// 查询产品入库单行详情
|
|
||||||
getProductRecptLine: async (id: number) => {
|
|
||||||
return await request.get({ url: '/mes/wm/product-recpt-line/get?id=' + id })
|
|
||||||
},
|
|
||||||
|
|
||||||
// 新增产品入库单行
|
|
||||||
createProductRecptLine: async (data: WmProductRecptLineVO) => {
|
|
||||||
return await request.post({ url: '/mes/wm/product-recpt-line/create', data })
|
|
||||||
},
|
|
||||||
|
|
||||||
// 修改产品入库单行
|
|
||||||
updateProductRecptLine: async (data: WmProductRecptLineVO) => {
|
|
||||||
return await request.put({ url: '/mes/wm/product-recpt-line/update', data })
|
|
||||||
},
|
|
||||||
|
|
||||||
// 删除产品入库单行
|
|
||||||
deleteProductRecptLine: async (id: number) => {
|
|
||||||
return await request.delete({ url: '/mes/wm/product-recpt-line/delete?id=' + id })
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -300,5 +300,5 @@ export enum DICT_TYPE {
|
||||||
MES_WM_QUALITY_STATUS = 'mes_wm_quality_status', // MES 质量状态
|
MES_WM_QUALITY_STATUS = 'mes_wm_quality_status', // MES 质量状态
|
||||||
MES_WM_RETURN_ISSUE_STATUS = 'mes_wm_return_issue_status', // MES 生产退料单状态
|
MES_WM_RETURN_ISSUE_STATUS = 'mes_wm_return_issue_status', // MES 生产退料单状态
|
||||||
MES_WM_RETURN_ISSUE_TYPE = 'mes_wm_return_issue_type', // MES 退料类型
|
MES_WM_RETURN_ISSUE_TYPE = 'mes_wm_return_issue_type', // MES 退料类型
|
||||||
MES_WM_PRODUCT_RECPT_STATUS = 'mes_wm_product_recpt_status', // MES 成品入库单状态
|
MES_WM_PRODUCT_RECPT_STATUS = 'mes_wm_product_receipt_status', // MES 成品入库单状态
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -245,7 +245,7 @@ export const MesWmProductProduceStatusEnum = {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** MES 产品入库单状态枚举 */
|
/** MES 产品入库单状态枚举 */
|
||||||
export const MesWmProductRecptStatusEnum = {
|
export const MesWmProductReceiptStatusEnum = {
|
||||||
PREPARE: MesOrderStatusConstants.DRAFT,
|
PREPARE: MesOrderStatusConstants.DRAFT,
|
||||||
APPROVING: MesOrderStatusConstants.APPROVING,
|
APPROVING: MesOrderStatusConstants.APPROVING,
|
||||||
APPROVED: MesOrderStatusConstants.APPROVED,
|
APPROVED: MesOrderStatusConstants.APPROVED,
|
||||||
|
|
|
||||||
|
|
@ -41,16 +41,16 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { WmProductRecptDetailApi, WmProductRecptDetailVO } from '@/api/mes/wm/productrecpt/detail'
|
import { WmProductReceiptDetailApi, WmProductReceiptDetailVO } from '@/api/mes/wm/productreceipt/detail'
|
||||||
import MdItemSelect from '@/views/mes/md/item/components/MdItemSelect.vue'
|
import MdItemSelect from '@/views/mes/md/item/components/MdItemSelect.vue'
|
||||||
import WmWarehouseSelect from '@/views/mes/wm/warehouse/components/WmWarehouseSelect.vue'
|
import WmWarehouseSelect from '@/views/mes/wm/warehouse/components/WmWarehouseSelect.vue'
|
||||||
import WmWarehouseLocationSelect from '@/views/mes/wm/warehouse/components/WmWarehouseLocationSelect.vue'
|
import WmWarehouseLocationSelect from '@/views/mes/wm/warehouse/components/WmWarehouseLocationSelect.vue'
|
||||||
import WmWarehouseAreaSelect from '@/views/mes/wm/warehouse/components/WmWarehouseAreaSelect.vue'
|
import WmWarehouseAreaSelect from '@/views/mes/wm/warehouse/components/WmWarehouseAreaSelect.vue'
|
||||||
|
|
||||||
defineOptions({ name: 'ProductRecptDetailForm' })
|
defineOptions({ name: 'ProductReceiptDetailForm' })
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
recptId: number
|
receiptId: number
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const emit = defineEmits(['success'])
|
const emit = defineEmits(['success'])
|
||||||
|
|
@ -67,7 +67,7 @@ const formRef = ref()
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
id: undefined as number | undefined,
|
id: undefined as number | undefined,
|
||||||
lineId: undefined as number | undefined,
|
lineId: undefined as number | undefined,
|
||||||
recptId: undefined as number | undefined,
|
receiptId: undefined as number | undefined,
|
||||||
itemId: undefined as number | undefined,
|
itemId: undefined as number | undefined,
|
||||||
quantity: undefined as number | undefined,
|
quantity: undefined as number | undefined,
|
||||||
warehouseId: undefined as number | undefined,
|
warehouseId: undefined as number | undefined,
|
||||||
|
|
@ -92,7 +92,7 @@ const open = async (type: string, lineId: number, itemId?: number, detailId?: nu
|
||||||
if (detailId) {
|
if (detailId) {
|
||||||
formLoading.value = true
|
formLoading.value = true
|
||||||
try {
|
try {
|
||||||
formData.value = await WmProductRecptDetailApi.getProductRecptDetail(detailId)
|
formData.value = await WmProductReceiptDetailApi.getProductReceiptDetail(detailId)
|
||||||
} finally {
|
} finally {
|
||||||
formLoading.value = false
|
formLoading.value = false
|
||||||
}
|
}
|
||||||
|
|
@ -109,14 +109,14 @@ const submitForm = async () => {
|
||||||
try {
|
try {
|
||||||
const data = {
|
const data = {
|
||||||
...formData.value,
|
...formData.value,
|
||||||
recptId: props.recptId,
|
receiptId: props.receiptId,
|
||||||
lineId: currentLineId.value
|
lineId: currentLineId.value
|
||||||
} as unknown as WmProductRecptDetailVO
|
} as unknown as WmProductReceiptDetailVO
|
||||||
if (formType.value === 'create') {
|
if (formType.value === 'create') {
|
||||||
await WmProductRecptDetailApi.createProductRecptDetail(data)
|
await WmProductReceiptDetailApi.createProductReceiptDetail(data)
|
||||||
message.success(t('common.createSuccess'))
|
message.success(t('common.createSuccess'))
|
||||||
} else {
|
} else {
|
||||||
await WmProductRecptDetailApi.updateProductRecptDetail(data)
|
await WmProductReceiptDetailApi.updateProductReceiptDetail(data)
|
||||||
message.success(t('common.updateSuccess'))
|
message.success(t('common.updateSuccess'))
|
||||||
}
|
}
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
|
|
@ -131,7 +131,7 @@ const resetForm = () => {
|
||||||
formData.value = {
|
formData.value = {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
lineId: undefined,
|
lineId: undefined,
|
||||||
recptId: undefined,
|
receiptId: undefined,
|
||||||
itemId: undefined,
|
itemId: undefined,
|
||||||
quantity: undefined,
|
quantity: undefined,
|
||||||
warehouseId: undefined,
|
warehouseId: undefined,
|
||||||
|
|
@ -25,12 +25,12 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { WmProductRecptDetailApi, WmProductRecptDetailVO } from '@/api/mes/wm/productrecpt/detail'
|
import { WmProductReceiptDetailApi, WmProductReceiptDetailVO } from '@/api/mes/wm/productreceipt/detail'
|
||||||
|
|
||||||
defineOptions({ name: 'ProductRecptDetailList' })
|
defineOptions({ name: 'ProductReceiptDetailList' })
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
recptId: number
|
receiptId: number
|
||||||
lineId: number
|
lineId: number
|
||||||
itemId: number
|
itemId: number
|
||||||
formType: string
|
formType: string
|
||||||
|
|
@ -42,13 +42,13 @@ const { t } = useI18n()
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
|
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const list = ref<WmProductRecptDetailVO[]>([])
|
const list = ref<WmProductReceiptDetailVO[]>([])
|
||||||
|
|
||||||
/** 查询明细列表 */
|
/** 查询明细列表 */
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
list.value = await WmProductRecptDetailApi.getProductRecptDetailListByLineId(props.lineId)
|
list.value = await WmProductReceiptDetailApi.getProductReceiptDetailListByLineId(props.lineId)
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
|
|
@ -59,7 +59,7 @@ defineExpose({ getList })
|
||||||
const handleDelete = async (detailId: number) => {
|
const handleDelete = async (detailId: number) => {
|
||||||
try {
|
try {
|
||||||
await message.delConfirm()
|
await message.delConfirm()
|
||||||
await WmProductRecptDetailApi.deleteProductRecptDetail(detailId)
|
await WmProductReceiptDetailApi.deleteProductReceiptDetail(detailId)
|
||||||
message.success(t('common.delSuccess'))
|
message.success(t('common.delSuccess'))
|
||||||
await getList()
|
await getList()
|
||||||
} catch {}
|
} catch {}
|
||||||
|
|
@ -71,7 +71,7 @@
|
||||||
<!-- 非新建模式展示行项目信息(收货物料) -->
|
<!-- 非新建模式展示行项目信息(收货物料) -->
|
||||||
<template v-if="formData.id">
|
<template v-if="formData.id">
|
||||||
<el-divider content-position="center">物料信息</el-divider>
|
<el-divider content-position="center">物料信息</el-divider>
|
||||||
<ProductRecptLineList :recpt-id="formData.id" :form-type="formType" />
|
<ProductReceiptLineList :receipt-id="formData.id" :form-type="formType" />
|
||||||
</template>
|
</template>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button v-if="isUpdate" @click="submitForm" type="primary" :disabled="formLoading">
|
<el-button v-if="isUpdate" @click="submitForm" type="primary" :disabled="formLoading">
|
||||||
|
|
@ -87,11 +87,11 @@
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { generateRandomStr } from '@/utils'
|
import { generateRandomStr } from '@/utils'
|
||||||
import { WmProductRecptApi, WmProductRecptVO } from '@/api/mes/wm/productrecpt'
|
import { WmProductReceiptApi, WmProductReceiptVO } from '@/api/mes/wm/productreceipt'
|
||||||
import ProWorkOrderSelect from '@/views/mes/pro/workorder/components/ProWorkOrderSelect.vue'
|
import ProWorkOrderSelect from '@/views/mes/pro/workorder/components/ProWorkOrderSelect.vue'
|
||||||
import ProductRecptLineList from './ProductRecptLineList.vue'
|
import ProductReceiptLineList from './ProductReceiptLineList.vue'
|
||||||
|
|
||||||
defineOptions({ name: 'ProductRecptForm' })
|
defineOptions({ name: 'ProductReceiptForm' })
|
||||||
|
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
|
|
||||||
|
|
@ -139,7 +139,7 @@ const open = async (type: string, id?: number) => {
|
||||||
if (id) {
|
if (id) {
|
||||||
formLoading.value = true
|
formLoading.value = true
|
||||||
try {
|
try {
|
||||||
formData.value = await WmProductRecptApi.getProductRecpt(id)
|
formData.value = await WmProductReceiptApi.getProductReceipt(id)
|
||||||
} finally {
|
} finally {
|
||||||
formLoading.value = false
|
formLoading.value = false
|
||||||
}
|
}
|
||||||
|
|
@ -153,14 +153,14 @@ const submitForm = async () => {
|
||||||
await formRef.value.validate()
|
await formRef.value.validate()
|
||||||
formLoading.value = true
|
formLoading.value = true
|
||||||
try {
|
try {
|
||||||
const data = formData.value as unknown as WmProductRecptVO
|
const data = formData.value as unknown as WmProductReceiptVO
|
||||||
if (formType.value === 'create') {
|
if (formType.value === 'create') {
|
||||||
const res = await WmProductRecptApi.createProductRecpt(data)
|
const res = await WmProductReceiptApi.createProductReceipt(data)
|
||||||
message.success('新增成功')
|
message.success('新增成功')
|
||||||
formData.value.id = res
|
formData.value.id = res
|
||||||
formType.value = 'update'
|
formType.value = 'update'
|
||||||
} else {
|
} else {
|
||||||
await WmProductRecptApi.updateProductRecpt(data)
|
await WmProductReceiptApi.updateProductReceipt(data)
|
||||||
message.success('修改成功')
|
message.success('修改成功')
|
||||||
}
|
}
|
||||||
emit('success')
|
emit('success')
|
||||||
|
|
@ -175,12 +175,12 @@ const handleStock = async () => {
|
||||||
await message.confirm('确认执行上架?')
|
await message.confirm('确认执行上架?')
|
||||||
formLoading.value = true
|
formLoading.value = true
|
||||||
// 校验明细数量与行收货数量是否一致
|
// 校验明细数量与行收货数量是否一致
|
||||||
const quantityMatch = await WmProductRecptApi.checkProductRecptQuantity(formData.value.id!)
|
const quantityMatch = await WmProductReceiptApi.checkProductReceiptQuantity(formData.value.id!)
|
||||||
if (!quantityMatch) {
|
if (!quantityMatch) {
|
||||||
await message.confirm('明细数量与行收货数量不一致,确认执行上架?')
|
await message.confirm('明细数量与行收货数量不一致,确认执行上架?')
|
||||||
}
|
}
|
||||||
// 执行上架
|
// 执行上架
|
||||||
await WmProductRecptApi.stockProductRecpt(formData.value.id!)
|
await WmProductReceiptApi.stockProductReceipt(formData.value.id!)
|
||||||
message.success('上架成功')
|
message.success('上架成功')
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
emit('success')
|
emit('success')
|
||||||
|
|
@ -14,9 +14,9 @@
|
||||||
>
|
>
|
||||||
<el-table-column type="expand">
|
<el-table-column type="expand">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<ProductRecptDetailList
|
<ProductReceiptDetailList
|
||||||
:ref="(el: any) => setDetailListRef(scope.row.id, el)"
|
:ref="(el: any) => setDetailListRef(scope.row.id, el)"
|
||||||
:recpt-id="props.recptId"
|
:receipt-id="props.receiptId"
|
||||||
:line-id="scope.row.id"
|
:line-id="scope.row.id"
|
||||||
:item-id="scope.row.itemId"
|
:item-id="scope.row.itemId"
|
||||||
:form-type="props.formType"
|
:form-type="props.formType"
|
||||||
|
|
@ -110,23 +110,23 @@
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|
||||||
<!-- 上架明细添加/编辑弹窗 -->
|
<!-- 上架明细添加/编辑弹窗 -->
|
||||||
<ProductRecptDetailForm
|
<ProductReceiptDetailForm
|
||||||
ref="detailFormRef"
|
ref="detailFormRef"
|
||||||
:recpt-id="props.recptId"
|
:receipt-id="props.receiptId"
|
||||||
@success="onDetailFormSuccess"
|
@success="onDetailFormSuccess"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { WmProductRecptLineApi, WmProductRecptLineVO } from '@/api/mes/wm/productrecpt/line'
|
import { WmProductReceiptLineApi, WmProductReceiptLineVO } from '@/api/mes/wm/productreceipt/line'
|
||||||
import MdItemSelect from '@/views/mes/md/item/components/MdItemSelect.vue'
|
import MdItemSelect from '@/views/mes/md/item/components/MdItemSelect.vue'
|
||||||
import ProductRecptDetailList from './ProductRecptDetailList.vue'
|
import ProductReceiptDetailList from './ProductReceiptDetailList.vue'
|
||||||
import ProductRecptDetailForm from './ProductRecptDetailForm.vue'
|
import ProductReceiptDetailForm from './ProductReceiptDetailForm.vue'
|
||||||
|
|
||||||
defineOptions({ name: 'ProductRecptLineList' })
|
defineOptions({ name: 'ProductReceiptLineList' })
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
recptId: number
|
receiptId: number
|
||||||
formType: string
|
formType: string
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
|
|
@ -138,20 +138,20 @@ const isStock = computed(() => props.formType === 'stock')
|
||||||
|
|
||||||
// ==================== 列表 ====================
|
// ==================== 列表 ====================
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const list = ref<WmProductRecptLineVO[]>([])
|
const list = ref<WmProductReceiptLineVO[]>([])
|
||||||
const total = ref(0)
|
const total = ref(0)
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
recptId: undefined as number | undefined
|
receiptId: undefined as number | undefined
|
||||||
})
|
})
|
||||||
|
|
||||||
/** 查询行列表 */
|
/** 查询行列表 */
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
queryParams.recptId = props.recptId
|
queryParams.receiptId = props.receiptId
|
||||||
const data = await WmProductRecptLineApi.getProductRecptLinePage(queryParams)
|
const data = await WmProductReceiptLineApi.getProductReceiptLinePage(queryParams)
|
||||||
list.value = data.list
|
list.value = data.list
|
||||||
total.value = data.total
|
total.value = data.total
|
||||||
} finally {
|
} finally {
|
||||||
|
|
@ -163,7 +163,7 @@ const getList = async () => {
|
||||||
const handleDelete = async (id: number) => {
|
const handleDelete = async (id: number) => {
|
||||||
try {
|
try {
|
||||||
await message.delConfirm()
|
await message.delConfirm()
|
||||||
await WmProductRecptLineApi.deleteProductRecptLine(id)
|
await WmProductReceiptLineApi.deleteProductReceiptLine(id)
|
||||||
message.success(t('common.delSuccess'))
|
message.success(t('common.delSuccess'))
|
||||||
await getList()
|
await getList()
|
||||||
} catch {}
|
} catch {}
|
||||||
|
|
@ -176,7 +176,7 @@ const formLoading = ref(false)
|
||||||
const lineFormType = ref('')
|
const lineFormType = ref('')
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
id: undefined,
|
id: undefined,
|
||||||
recptId: undefined as number | undefined,
|
receiptId: undefined as number | undefined,
|
||||||
itemId: undefined,
|
itemId: undefined,
|
||||||
quantity: undefined,
|
quantity: undefined,
|
||||||
batchId: undefined,
|
batchId: undefined,
|
||||||
|
|
@ -198,7 +198,7 @@ const openForm = async (type: string, id?: number) => {
|
||||||
if (id) {
|
if (id) {
|
||||||
formLoading.value = true
|
formLoading.value = true
|
||||||
try {
|
try {
|
||||||
formData.value = await WmProductRecptLineApi.getProductRecptLine(id)
|
formData.value = await WmProductReceiptLineApi.getProductReceiptLine(id)
|
||||||
} finally {
|
} finally {
|
||||||
formLoading.value = false
|
formLoading.value = false
|
||||||
}
|
}
|
||||||
|
|
@ -210,12 +210,12 @@ const submitForm = async () => {
|
||||||
await formRef.value.validate()
|
await formRef.value.validate()
|
||||||
formLoading.value = true
|
formLoading.value = true
|
||||||
try {
|
try {
|
||||||
const data = { ...formData.value, recptId: props.recptId } as unknown as WmProductRecptLineVO
|
const data = { ...formData.value, receiptId: props.receiptId } as unknown as WmProductReceiptLineVO
|
||||||
if (lineFormType.value === 'create') {
|
if (lineFormType.value === 'create') {
|
||||||
await WmProductRecptLineApi.createProductRecptLine(data)
|
await WmProductReceiptLineApi.createProductReceiptLine(data)
|
||||||
message.success(t('common.createSuccess'))
|
message.success(t('common.createSuccess'))
|
||||||
} else {
|
} else {
|
||||||
await WmProductRecptLineApi.updateProductRecptLine(data)
|
await WmProductReceiptLineApi.updateProductReceiptLine(data)
|
||||||
message.success(t('common.updateSuccess'))
|
message.success(t('common.updateSuccess'))
|
||||||
}
|
}
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
|
|
@ -229,7 +229,7 @@ const submitForm = async () => {
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
formData.value = {
|
formData.value = {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
recptId: undefined,
|
receiptId: undefined,
|
||||||
itemId: undefined,
|
itemId: undefined,
|
||||||
quantity: undefined,
|
quantity: undefined,
|
||||||
batchId: undefined,
|
batchId: undefined,
|
||||||
|
|
@ -240,7 +240,7 @@ const resetForm = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// ==================== 展开行:上架明细 ====================
|
// ==================== 展开行:上架明细 ====================
|
||||||
const detailListRefs = ref<Record<number, InstanceType<typeof ProductRecptDetailList>>>({})
|
const detailListRefs = ref<Record<number, InstanceType<typeof ProductReceiptDetailList>>>({})
|
||||||
|
|
||||||
/** 缓存子组件 ref */
|
/** 缓存子组件 ref */
|
||||||
const setDetailListRef = (lineId: number, el: any) => {
|
const setDetailListRef = (lineId: number, el: any) => {
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
@click="openForm('create')"
|
@click="openForm('create')"
|
||||||
v-hasPermi="['mes:wm-product-recpt:create']"
|
v-hasPermi="['mes:wm-product-receipt:create']"
|
||||||
>
|
>
|
||||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
plain
|
plain
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
:loading="exportLoading"
|
:loading="exportLoading"
|
||||||
v-hasPermi="['mes:wm-product-recpt:export']"
|
v-hasPermi="['mes:wm-product-receipt:export']"
|
||||||
>
|
>
|
||||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
<Icon icon="ep:download" class="mr-5px" /> 导出
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
@ -83,8 +83,8 @@
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="openForm('update', scope.row.id)"
|
@click="openForm('update', scope.row.id)"
|
||||||
v-hasPermi="['mes:wm-product-recpt:update']"
|
v-hasPermi="['mes:wm-product-receipt:update']"
|
||||||
v-if="scope.row.status === MesWmProductRecptStatusEnum.PREPARE"
|
v-if="scope.row.status === MesWmProductReceiptStatusEnum.PREPARE"
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
@ -92,8 +92,8 @@
|
||||||
link
|
link
|
||||||
type="warning"
|
type="warning"
|
||||||
@click="handleSubmit(scope.row.id)"
|
@click="handleSubmit(scope.row.id)"
|
||||||
v-hasPermi="['mes:wm-product-recpt:update']"
|
v-hasPermi="['mes:wm-product-receipt:update']"
|
||||||
v-if="scope.row.status === MesWmProductRecptStatusEnum.PREPARE"
|
v-if="scope.row.status === MesWmProductReceiptStatusEnum.PREPARE"
|
||||||
>
|
>
|
||||||
提交
|
提交
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
@ -101,8 +101,8 @@
|
||||||
link
|
link
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="handleDelete(scope.row.id)"
|
@click="handleDelete(scope.row.id)"
|
||||||
v-hasPermi="['mes:wm-product-recpt:delete']"
|
v-hasPermi="['mes:wm-product-receipt:delete']"
|
||||||
v-if="scope.row.status === MesWmProductRecptStatusEnum.PREPARE"
|
v-if="scope.row.status === MesWmProductReceiptStatusEnum.PREPARE"
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
@ -111,8 +111,8 @@
|
||||||
link
|
link
|
||||||
type="success"
|
type="success"
|
||||||
@click="openForm('stock', scope.row.id)"
|
@click="openForm('stock', scope.row.id)"
|
||||||
v-hasPermi="['mes:wm-product-recpt:update']"
|
v-hasPermi="['mes:wm-product-receipt:update']"
|
||||||
v-if="scope.row.status === MesWmProductRecptStatusEnum.APPROVING"
|
v-if="scope.row.status === MesWmProductReceiptStatusEnum.APPROVING"
|
||||||
>
|
>
|
||||||
执行上架
|
执行上架
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
@ -121,8 +121,8 @@
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleExecute(scope.row.id)"
|
@click="handleExecute(scope.row.id)"
|
||||||
v-hasPermi="['mes:wm-product-recpt:execute']"
|
v-hasPermi="['mes:wm-product-receipt:execute']"
|
||||||
v-if="scope.row.status === MesWmProductRecptStatusEnum.APPROVED"
|
v-if="scope.row.status === MesWmProductReceiptStatusEnum.APPROVED"
|
||||||
>
|
>
|
||||||
执行入库
|
执行入库
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
@ -131,11 +131,11 @@
|
||||||
link
|
link
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="handleCancel(scope.row.id)"
|
@click="handleCancel(scope.row.id)"
|
||||||
v-hasPermi="['mes:wm-product-recpt:update']"
|
v-hasPermi="['mes:wm-product-receipt:update']"
|
||||||
v-if="
|
v-if="
|
||||||
[
|
[
|
||||||
MesWmProductRecptStatusEnum.APPROVING,
|
MesWmProductReceiptStatusEnum.APPROVING,
|
||||||
MesWmProductRecptStatusEnum.APPROVED
|
MesWmProductReceiptStatusEnum.APPROVED
|
||||||
].includes(scope.row.status)
|
].includes(scope.row.status)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
|
@ -152,26 +152,26 @@
|
||||||
/>
|
/>
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<ProductRecptForm ref="formRef" @success="getList" />
|
<ProductReceiptForm ref="formRef" @success="getList" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { dateFormatter2 } from '@/utils/formatTime'
|
import { dateFormatter2 } from '@/utils/formatTime'
|
||||||
import { DICT_TYPE } from '@/utils/dict'
|
import { DICT_TYPE } from '@/utils/dict'
|
||||||
import download from '@/utils/download'
|
import download from '@/utils/download'
|
||||||
import { WmProductRecptApi, WmProductRecptVO } from '@/api/mes/wm/productrecpt'
|
import { WmProductReceiptApi, WmProductReceiptVO } from '@/api/mes/wm/productreceipt'
|
||||||
import MdItemSelect from '@/views/mes/md/item/components/MdItemSelect.vue'
|
import MdItemSelect from '@/views/mes/md/item/components/MdItemSelect.vue'
|
||||||
import ProWorkOrderSelect from '@/views/mes/pro/workorder/components/ProWorkOrderSelect.vue'
|
import ProWorkOrderSelect from '@/views/mes/pro/workorder/components/ProWorkOrderSelect.vue'
|
||||||
import ProductRecptForm from './ProductRecptForm.vue'
|
import ProductReceiptForm from './ProductReceiptForm.vue'
|
||||||
import { MesWmProductRecptStatusEnum } from '@/views/mes/utils/constants'
|
import { MesWmProductReceiptStatusEnum } from '@/views/mes/utils/constants'
|
||||||
|
|
||||||
defineOptions({ name: 'MesWmProductRecpt' })
|
defineOptions({ name: 'MesWmProductReceipt' })
|
||||||
|
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
|
||||||
const loading = ref(true)
|
const loading = ref(true)
|
||||||
const list = ref<WmProductRecptVO[]>([])
|
const list = ref<WmProductReceiptVO[]>([])
|
||||||
const total = ref(0)
|
const total = ref(0)
|
||||||
const exportLoading = ref(false)
|
const exportLoading = ref(false)
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
|
|
@ -189,7 +189,7 @@ const formRef = ref()
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
const data = await WmProductRecptApi.getProductRecptPage(queryParams)
|
const data = await WmProductReceiptApi.getProductReceiptPage(queryParams)
|
||||||
list.value = data.list
|
list.value = data.list
|
||||||
total.value = data.total
|
total.value = data.total
|
||||||
} finally {
|
} finally {
|
||||||
|
|
@ -218,7 +218,7 @@ const openForm = (type: string, id?: number) => {
|
||||||
const handleSubmit = async (id: number) => {
|
const handleSubmit = async (id: number) => {
|
||||||
try {
|
try {
|
||||||
await message.confirm('确认提交该产品入库单?')
|
await message.confirm('确认提交该产品入库单?')
|
||||||
await WmProductRecptApi.submitProductRecpt(id)
|
await WmProductReceiptApi.submitProductReceipt(id)
|
||||||
message.success('提交成功')
|
message.success('提交成功')
|
||||||
await getList()
|
await getList()
|
||||||
} catch {}
|
} catch {}
|
||||||
|
|
@ -228,7 +228,7 @@ const handleSubmit = async (id: number) => {
|
||||||
const handleExecute = async (id: number) => {
|
const handleExecute = async (id: number) => {
|
||||||
try {
|
try {
|
||||||
await message.confirm('确认执行入库?执行后将更新库存台账。')
|
await message.confirm('确认执行入库?执行后将更新库存台账。')
|
||||||
await WmProductRecptApi.executeProductRecpt(id)
|
await WmProductReceiptApi.executeProductReceipt(id)
|
||||||
message.success('入库成功')
|
message.success('入库成功')
|
||||||
await getList()
|
await getList()
|
||||||
} catch {}
|
} catch {}
|
||||||
|
|
@ -238,7 +238,7 @@ const handleExecute = async (id: number) => {
|
||||||
const handleCancel = async (id: number) => {
|
const handleCancel = async (id: number) => {
|
||||||
try {
|
try {
|
||||||
await message.confirm('确认取消该产品入库单?取消后不可恢复。')
|
await message.confirm('确认取消该产品入库单?取消后不可恢复。')
|
||||||
await WmProductRecptApi.cancelProductRecpt(id)
|
await WmProductReceiptApi.cancelProductReceipt(id)
|
||||||
message.success('取消成功')
|
message.success('取消成功')
|
||||||
await getList()
|
await getList()
|
||||||
} catch {}
|
} catch {}
|
||||||
|
|
@ -248,7 +248,7 @@ const handleCancel = async (id: number) => {
|
||||||
const handleDelete = async (id: number) => {
|
const handleDelete = async (id: number) => {
|
||||||
try {
|
try {
|
||||||
await message.delConfirm()
|
await message.delConfirm()
|
||||||
await WmProductRecptApi.deleteProductRecpt(id)
|
await WmProductReceiptApi.deleteProductReceipt(id)
|
||||||
message.success(t('common.delSuccess'))
|
message.success(t('common.delSuccess'))
|
||||||
await getList()
|
await getList()
|
||||||
} catch {}
|
} catch {}
|
||||||
|
|
@ -259,7 +259,7 @@ const handleExport = async () => {
|
||||||
try {
|
try {
|
||||||
await message.exportConfirm()
|
await message.exportConfirm()
|
||||||
exportLoading.value = true
|
exportLoading.value = true
|
||||||
const data = await WmProductRecptApi.exportProductRecpt(queryParams)
|
const data = await WmProductReceiptApi.exportProductReceipt(queryParams)
|
||||||
download.excel(data, '产品入库单.xls')
|
download.excel(data, '产品入库单.xls')
|
||||||
} catch {
|
} catch {
|
||||||
} finally {
|
} finally {
|
||||||
Loading…
Reference in New Issue