diff --git a/src/views/wms/basicDataManage/documentSetting/businesstype/businesstype.data.ts b/src/views/wms/basicDataManage/documentSetting/businesstype/businesstype.data.ts index 3826ae098..a848a4978 100644 --- a/src/views/wms/basicDataManage/documentSetting/businesstype/businesstype.data.ts +++ b/src/views/wms/basicDataManage/documentSetting/businesstype/businesstype.data.ts @@ -19,15 +19,24 @@ export const Businesstype = useCrudSchemas(reactive([ fixed: 'left' }, isSearch: true, + form: { + componentProps: { + disabled: true + } + } }, { label: '名称', field: 'name', sort: 'custom', - isSearch: true, table: { width: 150 }, + form: { + componentProps: { + disabled: true + } + } }, { label: '描述', @@ -47,6 +56,12 @@ export const Businesstype = useCrudSchemas(reactive([ table: { width: 180 }, + form: { + component:'Select', + componentProps: { + multiple: true, + }, + } }, { label: '可用物品状态范围', @@ -58,12 +73,6 @@ export const Businesstype = useCrudSchemas(reactive([ table: { width: 180 }, - form: { - component: 'SelectV2', - componentProps: { - multiple: true - } - } }, { label: '出库库位类型范围', @@ -75,6 +84,12 @@ export const Businesstype = useCrudSchemas(reactive([ table: { width: 180 }, + form: { + component:'Select', + componentProps: { + multiple: true, + }, + } }, { label: '入库库位类型范围', @@ -86,6 +101,12 @@ export const Businesstype = useCrudSchemas(reactive([ table: { width: 180 }, + form: { + component:'Select', + componentProps: { + multiple: true, + }, + } }, { label: '出库库区范围', @@ -135,6 +156,12 @@ export const Businesstype = useCrudSchemas(reactive([ table: { width: 180 }, + form: { + component:'Select', + componentProps: { + multiple: true, + }, + } }, { label: '入库库存状态范围', @@ -146,6 +173,12 @@ export const Businesstype = useCrudSchemas(reactive([ table: { width: 180 }, + form: { + component:'Select', + componentProps: { + multiple: true, + }, + } }, { label: '出库事务类型', diff --git a/src/views/wms/basicDataManage/documentSetting/businesstype/index.vue b/src/views/wms/basicDataManage/documentSetting/businesstype/index.vue index 5c7331631..7e8b5794e 100644 --- a/src/views/wms/basicDataManage/documentSetting/businesstype/index.vue +++ b/src/views/wms/basicDataManage/documentSetting/businesstype/index.vue @@ -35,13 +35,28 @@ + + + + + import download from '@/utils/download' +import { getDictLabel,DICT_TYPE } from '@/utils/dict' import * as BusinesstypeApi from '@/api/wms/businesstype' import BasicForm from '@/components/BasicForm/src/BasicForm.vue' import { Businesstype, BusinesstypeRules } from './businesstype.data' @@ -70,6 +86,23 @@ import Detail from '@/components/Detail/src/Detail.vue' // 业务类型 defineOptions({ name: 'Businesstype' }) +const strFor = (str,type)=> { + let stradd = '' + if(typeof(str)=='string'){ + str.split(',').forEach(element => { + let str1=getDictLabel(type,element) + stradd = stradd+str1+',' + }) + return stradd.substring(0,stradd.length-1) + }else{ + str.join(',').split(',').forEach(element => { + let str2=getDictLabel(type,element) + stradd = stradd+str2+',' + }) + return stradd.substring(0,stradd.length-1) + } +} + const message = useMessage() // 消息弹窗 const { t } = useI18n() // 国际化 @@ -92,7 +125,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:businesstype:create'}), // 新增 + // defaultButtons.defaultAddBtn({hasPermi:'wms:businesstype:create'}), // 新增 // defaultButtons.defaultImportBtn({hasPermi:'wms:businesstype:import'}), // 导入 // defaultButtons.defaultExportBtn({hasPermi:'wms:businesstype:export'}), // 导出 defaultButtons.defaultFreshBtn(null),//刷新 @@ -127,13 +160,18 @@ const buttonBaseClick = (val, item) => { // 列表-操作按钮 const butttondata = [ defaultButtons.mainListEditBtn({hasPermi:'wms:businesstype:update'}), // 编辑 - defaultButtons.mainListDeleteBtn({hasPermi:'wms:businesstype:delete'}), // 删除 + // defaultButtons.mainListDeleteBtn({hasPermi:'wms:businesstype:delete'}), // 删除 ] // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { if (val == 'edit') { // 编辑 // const res = await BusinesstypeApi.getItempackaging(row.id) + row.itemTypes=row.itemTypes.split(',') + row.outLocationTypes = row.outLocationTypes.split(',') + row.inLocationTypes = row.inLocationTypes.split(',') + row.outInventoryStatuses = row.outInventoryStatuses.split(',') + row.inInventoryStatuses = row.inInventoryStatuses.split(',') openForm('update', row) } else if (val == 'delete') { // 删除 handleDelete(row.id) @@ -159,6 +197,11 @@ const formsSuccess = async (formType,data) => { } if(data.activeTime==0)data.activeTime = null; if(data.expireTime==0)data.expireTime = null; + data.itemTypes = data.itemTypes.join(',') + data.outLocationTypes = data.outLocationTypes.join(',') + data.inLocationTypes = data.inLocationTypes.join(',') + data.outInventoryStatuses = data.outInventoryStatuses.join(',') + data.inInventoryStatuses = data.inInventoryStatuses.join(',') if (formType === 'create') { await BusinesstypeApi.createBusinesstype(data) message.success(t('common.createSuccess'))