From 96523854f9a016447be47ecedb33d364103e2af4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Mon, 11 Dec 2023 07:52:10 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E9=80=80=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productionreturnRequestMain.data.ts | 104 +++---- .../productionreturnRequestMainNo/index.vue | 18 +- .../productionreturnRequestMainNo.data.ts | 272 ++++++++++++++++++ 3 files changed, 334 insertions(+), 60 deletions(-) diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts index a969e17bd..81ccad349 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts @@ -939,14 +939,14 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive import download from '@/utils/download' -import { ProductionreturnRequestMain,ProductionreturnRequestMainRules,ProductionreturnRequestDetail,ProductionreturnRequestDetailRules,ProductionreturnRequestDetailLabel,ProductionreturnRequestDetailLabelRules } from '../productionreturnRequestMain/productionreturnRequestMain.data' +import { ProductionreturnRequestMain,ProductionreturnRequestMainRules,ProductionreturnRequestDetail,ProductionreturnRequestDetailRules } from '../productionreturnRequestMain/productionreturnRequestMain.data' +import { ProductionreturnRequestDetailNoLabel, ProductionreturnRequestDetailNoLabelRules } from './productionreturnRequestMainNo.data' + import * as ProductionreturnRequestMainNoApi from '@/api/wms/productionreturnRequestMainNo' import * as ProductionreturnRequestDetailNoApi from '@/api/wms/productionreturnRequestDetailNo' import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as ItembasicApi from '@/api/wms/itembasic' import * as PackageApi from '@/api/wms/package' -// 不合格生产退料申请 +// 隔离退料申请 defineOptions({ name: 'ProductionreturnRequestMainNo' }) const message = useMessage() // 消息弹窗 @@ -107,7 +109,7 @@ routeName.value = route.name const tableColumns = ref(ProductionreturnRequestMain.allSchemas.tableColumns) //创建标签 -const detailListTableColumns = ProductionreturnRequestDetailLabel.allSchemas +const detailListTableColumns = ProductionreturnRequestDetailNoLabel.allSchemas const isCreateLabel = ref(false) const formLabelRef = ref() const { tableObject: detatableData, tableMethods: detatableMethods } =useTable({ @@ -317,12 +319,12 @@ const buttonTableClick = async (val, row) => { if(item.field == 'productionLineCodePackage') { item.tableForm.isInpuFocusShow = false item.tableForm.disabled = true - ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = false + ProductionreturnRequestDetailNoLabelRules.productionLineCodePackage[0].required = false } if(item.field == 'supplierItemCode') { item.tableForm.isInpuFocusShow = true item.tableForm.disabled = false - ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = true + ProductionreturnRequestDetailNoLabelRules.supplierItemCode[0].required = true } }) } else { @@ -331,12 +333,12 @@ const buttonTableClick = async (val, row) => { if(item.field == 'supplierItemCode') { item.tableForm.isInpuFocusShow = false item.tableForm.disabled = true - ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = false + ProductionreturnRequestDetailNoLabelRules.supplierItemCode[0].required = false } if(item.field == 'productionLineCodePackage') { item.tableForm.isInpuFocusShow = true item.tableForm.disabled = false - ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = true + ProductionreturnRequestDetailNoLabelRules.productionLineCodePackage[0].required = true } }) } diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts index 87c4af95b..78b219bf7 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts @@ -14,6 +14,12 @@ import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/worksta import * as BalanceApi from '@/api/wms/balance' import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' +import * as ProductionlineitemApi from '@/api/wms/productionlineitem' +import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data' + +import * as SupplieritemApi from '@/api/wms/supplieritem' +import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data' + const { t } = useI18n() // 国际化 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 @@ -801,4 +807,270 @@ export const ProductionreturnRequestDetailRules = reactive({ itemCode: [ { required: true, message: '请输入物品代码', trigger: 'blur' } ], +}) + +/** + * @returns {Array} 隔离退料申请子表创建标签 + */ +export const ProductionreturnRequestDetailNoLabel = useCrudSchemas(reactive([ + { + label: '生产线代码', + field: 'productionLineCodePackage', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + searchField: 'productionLineCode', // 查询弹窗赋值字段 + searchTitle: '生产线物品关系信息', // 查询弹窗标题 + searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类 + searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法 + searchCondition:[{ + key: 'itemCode', + value: 'itemCode', + isMainValue: true + }] + } + }, + { + label: '供应商代码', + field: 'supplierItemCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择供应商代码', // 输入框占位文本 + searchField: 'supplierCode', // 查询弹窗赋值字段 + searchTitle: '供应商信息', // 查询弹窗标题 + searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 + searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法 + searchCondition:[{ + key: 'itemCode', + value: 'itemCode', + isMainValue: true + }] + } + }, + { + label: '物品代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: false, + }, + form: { + componentProps: { + disabled: false + } + } + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select', + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '来源生产线代码', + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '来源生产线代码', + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '来源工位代码', + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '来源库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '物品名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '物品描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '物品描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + form: { + componentProps: { + disabled: true + } + } + }, +])) + +//表单校验 +export const ProductionreturnRequestDetailNoLabelRules = reactive({ + supplierItemCode: [ + { required: true, message: '请选择供应商', trigger: 'change' } + ], + productionLineCodePackage: [ + { required: true, message: '请选择生产线', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ] }) \ No newline at end of file