From 89eafccec3d8ba2ad52f062854f3dcd5c21c6e04 Mon Sep 17 00:00:00 2001 From: kkk-ops <1050738955@qq.com> Date: Wed, 14 Jan 2026 19:10:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E5=85=B7=E5=85=A5=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mes/moldget/MoldGetForm.vue | 2 +- .../moldget/components/StockOutItemForm.vue | 4 +- src/views/mes/moldget/index.vue | 15 +- src/views/mes/moldreturn/MoldReturnForm.vue | 180 ++++++++++++------ src/views/mes/moldreturn/index.vue | 34 ++-- 5 files changed, 143 insertions(+), 92 deletions(-) diff --git a/src/views/mes/moldget/MoldGetForm.vue b/src/views/mes/moldget/MoldGetForm.vue index 15a5e2df..ac43b22a 100644 --- a/src/views/mes/moldget/MoldGetForm.vue +++ b/src/views/mes/moldget/MoldGetForm.vue @@ -84,7 +84,7 @@ - + diff --git a/src/views/mes/moldget/components/StockOutItemForm.vue b/src/views/mes/moldget/components/StockOutItemForm.vue index a8d0835d..56c7d212 100644 --- a/src/views/mes/moldget/components/StockOutItemForm.vue +++ b/src/views/mes/moldget/components/StockOutItemForm.vue @@ -149,8 +149,8 @@ const formData = ref([]) const formRules = reactive({ inId: [{ required: true, message: '出库编号不能为空', trigger: 'blur' }], warehouseId: [{ required: true, message: '仓库不能为空', trigger: 'blur' }], - productId: [{ required: true, message: '备件不能为空', trigger: 'blur' }], - count: [{ required: true, message: '备件数量不能为空', trigger: 'blur' }] + productId: [{ required: true, message: '模具不能为空', trigger: 'blur' }], + count: [{ required: true, message: '数量不能为空', trigger: 'blur' }] }) const formRef = ref([]) // 表单 Ref const productList = ref([]) // 产品列表 diff --git a/src/views/mes/moldget/index.vue b/src/views/mes/moldget/index.vue index e9f92a3a..21e7de35 100644 --- a/src/views/mes/moldget/index.vue +++ b/src/views/mes/moldget/index.vue @@ -283,7 +283,7 @@ const queryParams = reactive({ no: undefined, productId: undefined, customerId: undefined, - outType: '领模出库', + outType: '模具出库', warehouseId: undefined, outTime: [], status: 10, @@ -363,7 +363,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await StockOutApi.exportStockOut(queryParams) - download.excel(data, '其它出库单.xls') + download.excel(data, '模具出库单.xls') } catch { } finally { exportLoading.value = false @@ -381,7 +381,7 @@ const query = reactive({ }) /** 初始化 **/ onMounted(async () => { - queryParams.outType ='领模出库' + queryParams.outType ='模具出库' await getList() // 加载产品、仓库列表、客户 // productList.value = await ProductApi.getProductSimpleList() @@ -390,12 +390,5 @@ onMounted(async () => { customerList.value = await CustomerApi.getCustomerSimpleList() userList.value = await UserApi.getSimpleUserList() }) -// TODO 芋艿:可优化功能:列表界面,支持导入 -// TODO 芋艿:可优化功能:详情界面,支持打印 -/** tab 切换 */ -let activeName = '产品出库' -const handleTabClick = (tab: TabsPaneContext) => { - queryParams.outType = tab.paneName - handleQuery() -} + diff --git a/src/views/mes/moldreturn/MoldReturnForm.vue b/src/views/mes/moldreturn/MoldReturnForm.vue index 06aa93e4..5b66c60b 100644 --- a/src/views/mes/moldreturn/MoldReturnForm.vue +++ b/src/views/mes/moldreturn/MoldReturnForm.vue @@ -1,52 +1,109 @@ \ No newline at end of file + diff --git a/src/views/mes/moldreturn/index.vue b/src/views/mes/moldreturn/index.vue index 1b256a82..08cfb72e 100644 --- a/src/views/mes/moldreturn/index.vue +++ b/src/views/mes/moldreturn/index.vue @@ -257,7 +257,7 @@ import { getIntDictOptions, DICT_TYPE } from '@/utils/dict' import { dateFormatter2 } from '@/utils/formatTime' import download from '@/utils/download' -import { StockOutApi, StockOutVO } from '@/api/erp/stock/out' +import { StockInApi, StockInVO } from '@/api/erp/stock/in' import MoldReturnForm from './MoldReturnForm.vue' import { ProductApi, ProductVO } from '@/api/erp/product/product' import { MoldBrandApi, MoldVO } from '@/api/erp/mold' @@ -267,13 +267,13 @@ import * as UserApi from '@/api/system/user' import { CustomerApi, CustomerVO } from '@/api/erp/sale/customer' /** ERP 其它出库单列表 */ -defineOptions({ name: 'MoldGet' }) +defineOptions({ name: 'MoldReturn' }) const message = useMessage() // 消息弹窗 const { t } = useI18n() // 国际化 const loading = ref(true) // 列表的加载中 -const list = ref([]) // 列表的数据 +const list = ref([]) // 列表的数据 const total = ref(0) // 列表的总页数 const queryParams = reactive({ pageNo: 1, @@ -281,7 +281,7 @@ const queryParams = reactive({ no: undefined, productId: undefined, customerId: undefined, - outType: '领模出库', + inType: '模具入库', warehouseId: undefined, outTime: [], status: 10, @@ -300,7 +300,7 @@ const moldList = ref([]) // 模具列表 const getList = async () => { loading.value = true try { - const data = await StockOutApi.getStockOutPage(queryParams) + const data = await StockInApi.getStockInPage(queryParams) list.value = data.list total.value = data.total } finally { @@ -332,7 +332,7 @@ const handleDelete = async (ids: number[]) => { // 删除的二次确认 await message.delConfirm() // 发起删除 - await StockOutApi.deleteStockOut(ids) + await StockInApi.deleteStockIn(ids) message.success(t('common.delSuccess')) // 刷新列表 await getList() @@ -344,9 +344,9 @@ const handleDelete = async (ids: number[]) => { const handleUpdateStatus = async (id: number, status: number) => { try { // 审批的二次确认 - await message.confirm(`确定${status === 20 ? '审批' : '反审批'}该出库单吗?`) + await message.confirm(`确定${status === 20 ? '审批' : '反审批'}该入库单吗?`) // 发起审批 - await StockOutApi.updateStockOutStatus(id, status) + await StockInApi.updateStockInStatus(id, status) message.success(`${status === 20 ? '审批' : '反审批'}成功`) // 刷新列表 await getList() @@ -360,8 +360,8 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true - const data = await StockOutApi.exportStockOut(queryParams) - download.excel(data, '其它出库单.xls') + const data = await StockInApi.exportStockIn(queryParams) + download.excel(data, '模具入库单.xls') } catch { } finally { exportLoading.value = false @@ -369,8 +369,8 @@ const handleExport = async () => { } /** 选中操作 */ -const selectionList = ref([]) -const handleSelectionChange = (rows: StockOutVO[]) => { +const selectionList = ref([]) +const handleSelectionChange = (rows: StockInVO[]) => { selectionList.value = rows } @@ -379,7 +379,7 @@ const query = reactive({ }) /** 初始化 **/ onMounted(async () => { - queryParams.outType ='领模出库' + queryParams.inType ='模具入库' await getList() // 加载产品、仓库列表、客户 // productList.value = await ProductApi.getProductSimpleList() @@ -388,12 +388,4 @@ onMounted(async () => { customerList.value = await CustomerApi.getCustomerSimpleList() userList.value = await UserApi.getSimpleUserList() }) -// TODO 芋艿:可优化功能:列表界面,支持导入 -// TODO 芋艿:可优化功能:详情界面,支持打印 -/** tab 切换 */ -let activeName = '产品出库' -const handleTabClick = (tab: TabsPaneContext) => { - queryParams.outType = tab.paneName - handleQuery() -}