From 70c0bbca6e237e9e67c305b46cbae8ab9890a3f4 Mon Sep 17 00:00:00 2001 From: chenshuichuan <1154693969@qq.com> Date: Tue, 18 Jun 2024 15:59:06 +0800 Subject: [PATCH] fix mes stock workshop --- src/api/erp/stock/out/index.ts | 20 +- src/utils/dict.ts | 2 +- src/views/erp/stock/out/StockOutForm.vue | 21 +- src/views/erp/stock/out/index.vue | 13 + src/views/mes/stockout/StockOutForm.vue | 158 ++++++++ .../stockout/components/StockOutItemForm.vue | 248 +++++++++++++ src/views/mes/stockout/index.vue | 339 ++++++++++++++++++ 7 files changed, 797 insertions(+), 4 deletions(-) create mode 100644 src/views/mes/stockout/StockOutForm.vue create mode 100644 src/views/mes/stockout/components/StockOutItemForm.vue create mode 100644 src/views/mes/stockout/index.vue diff --git a/src/api/erp/stock/out/index.ts b/src/api/erp/stock/out/index.ts index f0f40d34..72d0ec8b 100644 --- a/src/api/erp/stock/out/index.ts +++ b/src/api/erp/stock/out/index.ts @@ -58,5 +58,23 @@ export const StockOutApi = { // 导出其它出库单 Excel exportStockOut: async (params) => { return await request.download({ url: `/erp/stock-out/export-excel`, params }) - } + }, + // 查询其它出库单分页 + getMesStockOutPage: async (params: any) => { + return await request.get({ url: `/erp/stock-out/pageMesStockOut`, params }) + }, + // 新增其它出库单 + createMesStockOut: async (data: StockOutVO) => { + return await request.post({ url: `/erp/stock-out/createMesStockOut`, data }) + }, + // 更新生产领料出库单的状态 + updateMesStockOutStatus: async (id: number, status: number) => { + return await request.put({ + url: `/mes/stock-out/mes-update-status`, + params: { + id, + status + } + }) + }, } diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 9be180d0..763ca98f 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -245,7 +245,7 @@ export enum DICT_TYPE { MES_FEEDING_RECORD_STATUS = "mes_feeding_record_status", MES_FEEDING_PIPELINE = "mes_feeding_pipeline", MES_STOCK_WORKSHOP_DETAIL_TYPE = "mes_stock_workshop_detail_type", - + MES_STOCK_OUT_TYPE = "mes_stock_out_type", //====iot IOT_SIEMENS_TYPE = "iot_siemens_type", IOT_MODBUS_TYPE = "iot_modbus_type", diff --git a/src/views/erp/stock/out/StockOutForm.vue b/src/views/erp/stock/out/StockOutForm.vue index 8ae8d633..5a48a060 100644 --- a/src/views/erp/stock/out/StockOutForm.vue +++ b/src/views/erp/stock/out/StockOutForm.vue @@ -14,6 +14,19 @@ + + + + + {{ dict.label }} + + + + - + + @@ -80,6 +94,7 @@ import { StockOutApi, StockOutVO } from '@/api/erp/stock/out' import StockOutItemForm from './components/StockOutItemForm.vue' import { CustomerApi, CustomerVO } from '@/api/erp/sale/customer' +import {DICT_TYPE, getBoolDictOptions, getStrDictOptions} from "@/utils/dict"; /** ERP 其它出库单表单 */ defineOptions({ name: 'StockOutForm' }) @@ -96,11 +111,13 @@ const formData = ref({ customerId: undefined, outTime: undefined, remark: undefined, + outType: undefined, fileUrl: '', items: [] }) const formRules = reactive({ - outTime: [{ required: true, message: '出库时间不能为空', trigger: 'blur' }] + outTime: [{ required: true, message: '出库时间不能为空', trigger: 'blur' }], + outType: [{ required: true, message: '出库类型不能为空', trigger: 'blur' }] }) const disabled = computed(() => formType.value === 'detail') const formRef = ref() // 表单 Ref diff --git a/src/views/erp/stock/out/index.vue b/src/views/erp/stock/out/index.vue index 98fbf007..5f2bc86d 100644 --- a/src/views/erp/stock/out/index.vue +++ b/src/views/erp/stock/out/index.vue @@ -147,6 +147,13 @@ + + + + + + + { }) // TODO 芋艿:可优化功能:列表界面,支持导入 // TODO 芋艿:可优化功能:详情界面,支持打印 +/** tab 切换 */ +const handleTabClick = (tab: TabsPaneContext) => { + queryParams.outType = tab.paneName + handleQuery() +} diff --git a/src/views/mes/stockout/StockOutForm.vue b/src/views/mes/stockout/StockOutForm.vue new file mode 100644 index 00000000..f02883a7 --- /dev/null +++ b/src/views/mes/stockout/StockOutForm.vue @@ -0,0 +1,158 @@ + + diff --git a/src/views/mes/stockout/components/StockOutItemForm.vue b/src/views/mes/stockout/components/StockOutItemForm.vue new file mode 100644 index 00000000..a8422f0d --- /dev/null +++ b/src/views/mes/stockout/components/StockOutItemForm.vue @@ -0,0 +1,248 @@ + + diff --git a/src/views/mes/stockout/index.vue b/src/views/mes/stockout/index.vue new file mode 100644 index 00000000..0f06d35f --- /dev/null +++ b/src/views/mes/stockout/index.vue @@ -0,0 +1,339 @@ + + +