ljlong_2630
6 months ago
50 changed files with 1620 additions and 1166 deletions
@ -0,0 +1,60 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface MaintenanceItemSelectSetVO { |
|||
id: number |
|||
name: string |
|||
itemCode: string |
|||
departmentCode: string |
|||
remark: string |
|||
siteId: string |
|||
available: string |
|||
deletionTime: Date |
|||
deleterId: byte[] |
|||
concurrencyStamp: number |
|||
} |
|||
|
|||
// 查询保养项选择集列表
|
|||
export const getBasicMaintenanceItemSelectSetPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/eam/basic/maintenance-item-select-set/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/eam/basic/maintenance-item-select-set/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询保养项选择集详情
|
|||
export const getBasicMaintenanceItemSelectSet = async (id: number) => { |
|||
return await request.get({ url: `/eam/basic/maintenance-item-select-set/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增保养项选择集
|
|||
export const createBasicMaintenanceItemSelectSet = async (data: MaintenanceItemSelectSetVO) => { |
|||
return await request.post({ url: `/eam/basic/maintenance-item-select-set/create`, data }) |
|||
} |
|||
|
|||
// 修改保养项选择集
|
|||
export const updateBasicMaintenanceItemSelectSet = async (data: MaintenanceItemSelectSetVO) => { |
|||
return await request.put({ url: `/eam/basic/maintenance-item-select-set/update`, data }) |
|||
} |
|||
|
|||
// 删除保养项选择集
|
|||
export const deleteBasicMaintenanceItemSelectSet = async (id: number) => { |
|||
return await request.delete({ url: `/eam/basic/maintenance-item-select-set/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出保养项选择集 Excel
|
|||
export const exportBasicMaintenanceItemSelectSet = async (params) => { |
|||
return await request.download({ url: `/eam/basic/maintenance-item-select-set/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/eam/basic/maintenance-item-select-set/get-import-template' }) |
|||
} |
|||
|
|||
// 启用 / 禁用
|
|||
export const updateEnableCode = async (data: MaintenanceItemSelectSetVO) => { |
|||
return await request.post({ url: `/eam/basic/inspection-item-select-set/ables` , data }) |
|||
} |
@ -0,0 +1,280 @@ |
|||
<template> |
|||
<Dialog v-model="dialogVisible" :title="dialogTitle"> |
|||
<el-form |
|||
ref="basicFormRef" |
|||
v-loading="formLoading" |
|||
:model="formData" |
|||
:rules="formRules" |
|||
label-width="100px" |
|||
> |
|||
<el-row> |
|||
<el-col :span="12"> |
|||
<el-form-item label="选择集名称" prop="name"> |
|||
<el-input v-model="formData.name" placeholder="选择集名称" :disabled="isDisabled"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="备注" prop="remark"> |
|||
<el-input v-model="formData.remark" placeholder="请输入备注名称" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<el-form-item label="保养项" prop="items"> |
|||
<div class="tag-container flex gap-2"> |
|||
<el-tag v-for="ent in tags" :key="ent.content" closable :disable-transitions="false" @close="handleClose(ent.id)"> |
|||
{{ ent.content}} |
|||
</el-tag> |
|||
<el-input v-if="inputVisible" ref="InputRef" v-model="inputValue" class="w-20" size="small"/> |
|||
<el-button v-else class="button-new-tag" size="small" @click="addItem"> |
|||
添加保养项 + |
|||
</el-button> |
|||
</div> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<template #footer> |
|||
<el-button :disabled="formLoading" type="primary" @click="submitForm">确 定</el-button> |
|||
<el-button @click="dialogVisible = false">取 消</el-button> |
|||
</template> |
|||
</Dialog> |
|||
|
|||
<!--添加保养项弹窗--> |
|||
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" /> |
|||
|
|||
</template> |
|||
<script lang="ts" setup> |
|||
import * as SelectSetApi from '@/api/eam/maintenanceItemSelectSet' |
|||
import request from "@/config/axios"; |
|||
import { SearchTable } from '@/components/SearchTable' |
|||
import { MaintenanceItem} from "@/views/eam/maintenanceItem/maintenanceItem.data"; |
|||
import * as maintenanceItemApi from "@/api/eam/maintenanceItem"; |
|||
import {ElInput} from "element-plus"; |
|||
|
|||
defineOptions({ name: 'TeamForm' }) |
|||
|
|||
const { t } = useI18n() // 国际化 |
|||
const message = useMessage() // 消息弹窗 |
|||
|
|||
const dialogVisible = ref(false) // 弹窗的是否展示 |
|||
const dialogTitle = ref('') // 弹窗的标题 |
|||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 |
|||
const formType = ref('') // 表单的类型:create - 新增;update - 修改 |
|||
const tags=ref([]) |
|||
|
|||
const inputValue = ref('') |
|||
const inputVisible = ref(false) |
|||
const isDisabled = ref(false) |
|||
const InputRef = ref<InstanceType<typeof ElInput>>() |
|||
|
|||
const itemData = ref({ |
|||
id: '', |
|||
content: '' |
|||
}) |
|||
|
|||
const formData = ref({ |
|||
id: '', |
|||
name: '', |
|||
itemCode: '', |
|||
available: 'TRUE', |
|||
remark: '', |
|||
createTime: '' |
|||
}) |
|||
const formRules = reactive({ |
|||
name: [ |
|||
{ required: true, message: '选择集名称不能为空', trigger: 'blur' }, |
|||
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } |
|||
], |
|||
remark: [ |
|||
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } |
|||
], |
|||
}) |
|||
const basicFormRef = ref() // 表单 Ref |
|||
|
|||
/** 删除保养项 */ |
|||
const handleClose = (id: string) => { |
|||
const index = tags.value.findIndex(tag => tag.id === id); |
|||
if (index !== -1) { |
|||
tags.value.splice(index, 1); |
|||
} |
|||
} |
|||
|
|||
/** 弹窗相关参数 */ |
|||
const searchTableRef = ref(); |
|||
const _searchTableTitle = ref(); |
|||
const _searchTableAllSchemas = ref(); |
|||
const _searchTablePage = ref(); |
|||
const _formField = ref(); |
|||
const _searchField = ref(); |
|||
const _multiple = ref(); |
|||
const _type = ref(); |
|||
const _row = ref(); |
|||
const _searchCondition = ref({}) |
|||
|
|||
|
|||
const addItem = () =>{ |
|||
addItemCommon(true,'baoYangItem') |
|||
} |
|||
|
|||
/** 选择保养项弹窗 */ |
|||
const addItemCommon = (multiple,field) => { |
|||
_searchCondition.value = {} |
|||
const filters: any[] = [] |
|||
filters.push({ |
|||
action: "==", |
|||
column: 'available', |
|||
value: 'TRUE' |
|||
}) |
|||
// 参数整理 |
|||
_searchCondition.value.isSearch = true |
|||
_searchCondition.value.filters = filters |
|||
_searchTableTitle.value = '选择保养项' |
|||
_multiple.value = multiple |
|||
_formField.value = field |
|||
_searchField.value = field |
|||
_searchTablePage.value = maintenanceItemApi.getMaintenanceItemPage |
|||
_searchTableAllSchemas.value = MaintenanceItem.allSchemas |
|||
openCommon() |
|||
} |
|||
|
|||
/** 弹窗选择之后 回调函数 添加选择集 */ |
|||
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { |
|||
nextTick?.(() => { |
|||
if (formField === 'baoYangItem') { |
|||
val.forEach(item => { |
|||
const isExist = tags.value.some(tag => tag.content === item.content); |
|||
if (!isExist){ |
|||
const newItem = {}; |
|||
newItem['content'] = item.content; |
|||
newItem['id'] = item.id; |
|||
tags.value.push(newItem); |
|||
} |
|||
}); |
|||
} |
|||
}) |
|||
} |
|||
/*打开弹窗*/ |
|||
const openCommon = () => { |
|||
searchTableRef.value.open( |
|||
_searchTableTitle.value, |
|||
_searchTableAllSchemas.value, |
|||
_searchTablePage.value, |
|||
_formField.value, |
|||
_searchField.value, |
|||
_multiple.value, |
|||
_type.value, |
|||
_row.value, |
|||
_searchCondition.value |
|||
) |
|||
} |
|||
/** 初始化弹窗 */ |
|||
const open = async (type: string, row?: object) => { |
|||
dialogVisible.value = true |
|||
dialogTitle.value = t('action.' + type) |
|||
formType.value = type |
|||
// 修改时,设置数据 |
|||
if (row) { |
|||
tags.value=[]; |
|||
isDisabled.value = true; |
|||
formLoading.value = true |
|||
formData.value = row; |
|||
let item = (row.itemCode).split(",") |
|||
try { |
|||
for (var i = 0; i < item.length; i++) { |
|||
itemData.value = await request.get({ url: `/eam/basic/maintenance-item/get?id=` + item[i] }); |
|||
tags.value.push(itemData.value); |
|||
} |
|||
} finally { |
|||
formLoading.value = false |
|||
} |
|||
} |
|||
// 新增时 |
|||
else { |
|||
resetForm() |
|||
isDisabled.value = false; |
|||
} |
|||
} |
|||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗 |
|||
|
|||
/** 提交表单 */ |
|||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调 |
|||
const submitForm = async () => { |
|||
// 校验表单 |
|||
if (!basicFormRef) return |
|||
const valid = await basicFormRef.value.validate() |
|||
if (!valid) return |
|||
if (tags.value.length > 10 ){ |
|||
message.warning('保养项最多10个'); |
|||
return |
|||
} |
|||
|
|||
let result = ''; |
|||
for (var i = 0; i < tags.value.length; i++) { |
|||
result += tags.value[i].id + ','; |
|||
} |
|||
if(result.endsWith(',')){ |
|||
result = result.substring(0,result.length -1) |
|||
} |
|||
formData.value.itemCode = result |
|||
// 提交请求 |
|||
formLoading.value = true |
|||
//formData.value.members = JSON.stringify(tags.value) |
|||
try { |
|||
const data = formData.value as unknown as SelectSetApi.MaintenanceItemSelectSetVO |
|||
if (formType.value === 'create') { |
|||
await SelectSetApi.createBasicMaintenanceItemSelectSet(data) |
|||
message.success(t('common.createSuccess')) |
|||
} else { |
|||
await SelectSetApi.updateBasicMaintenanceItemSelectSet(data) |
|||
message.success(t('common.updateSuccess')) |
|||
} |
|||
dialogVisible.value = false |
|||
// 发送操作成功的事件 |
|||
emit('success') |
|||
} finally { |
|||
formLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 重置表单 */ |
|||
const resetForm = () => { |
|||
formData.value = { |
|||
id: '', |
|||
name: '', |
|||
itemCode: '', |
|||
available: 'TRUE', |
|||
remark: '', |
|||
createTime: '' |
|||
} |
|||
tags.value=[]; |
|||
basicFormRef.value?.resetFields() |
|||
} |
|||
|
|||
</script> |
|||
|
|||
<style scoped> |
|||
.tag-container { |
|||
margin-top: 10px; /* 可根据需要调整标签容器与表单项之间的间距 */ |
|||
border: 1px solid #ccc; /* 添加边框样式 */ |
|||
padding: 10px; /* 可根据需要调整容器内边距 */ |
|||
width: 950px; /* 设置固定宽度为 950px */ |
|||
overflow-y: auto; /* 当内容溢出容器高度时显示滚动条 */ |
|||
word-wrap: break-word; /* 使用 word-wrap 属性实现超出范围换行 */ |
|||
overflow-wrap: break-word; /* 兼容性更好的写法 */ |
|||
flex-wrap: wrap; |
|||
} |
|||
.input-with-button { |
|||
display: flex; |
|||
align-items: center; |
|||
width: 100%; |
|||
} |
|||
|
|||
.input-with-button > .el-input { |
|||
flex: 1; |
|||
/*margin-right: 10px;*/ |
|||
} |
|||
|
|||
</style> |
@ -0,0 +1,141 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const BasicMaintenanceItemSelectSetRules = reactive({ |
|||
name: [required], |
|||
itemCode: [required], |
|||
concurrencyStamp: [required], |
|||
}) |
|||
|
|||
export const BasicMaintenanceItemSelectSet = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
{ |
|||
label: 'id', |
|||
field: 'id', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
}, |
|||
{ |
|||
label: '选择集名称', |
|||
field: 'name', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '项编号', |
|||
field: 'itemCode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '创建时间', |
|||
field: 'createTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
isSearch: true, |
|||
search: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
type: 'daterange', |
|||
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] |
|||
} |
|||
}, |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '部门id', |
|||
field: 'departmentCode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
}, |
|||
{ |
|||
label: '备注', |
|||
field: 'remark', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '地点ID', |
|||
field: 'siteId', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
}, |
|||
{ |
|||
label: '是否可用', |
|||
field: 'available', |
|||
sort: 'custom', |
|||
dictType: DICT_TYPE.TRUE_FALSE, |
|||
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|||
isTable: true, |
|||
isDetail: false, |
|||
isSearch: true, |
|||
isTableForm: false, |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '删除时间', |
|||
field: 'deletionTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
search: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
type: 'daterange', |
|||
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] |
|||
} |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
valueFormat: 'x' |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '删除人id', |
|||
field: 'deleterId', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
}, |
|||
{ |
|||
label: '并发乐观锁', |
|||
field: 'concurrencyStamp', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isTable: false, |
|||
isForm: false, |
|||
isDetail:false, |
|||
form: { |
|||
component: 'InputNumber', |
|||
value: 0 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '操作', |
|||
field: 'action', |
|||
isForm: false, |
|||
table: { |
|||
width: 150, |
|||
fixed: 'right' |
|||
} |
|||
} |
|||
])) |
@ -1,553 +0,0 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
import * as getRequestsettingApi from '@/api/wms/requestsetting/index' |
|||
|
|||
import * as ItembasicApi from "@/api/wms/itembasic"; |
|||
|
|||
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' |
|||
|
|||
import {Warehouse} from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data"; |
|||
import * as WarehouseApi from "@/api/wms/warehouse"; |
|||
|
|||
import * as BalanceApi from '@/api/wms/balance' |
|||
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' |
|||
|
|||
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
|
|||
const queryParams = { |
|||
pageSize:10, |
|||
pageNo:1, |
|||
code:'RelegateRequest' |
|||
} |
|||
const data = await getRequestsettingApi.getRequestsettingPage(queryParams) |
|||
const requestsettingData =data?.list[0]||{} |
|||
// 表单校验
|
|||
export const RelegateRequestMainRules = reactive({ |
|||
fromWarehouseCode: [required], |
|||
number: [required], |
|||
businessType: [required], |
|||
autoCommit: [required], |
|||
autoAgree: [required], |
|||
autoExecute: [required], |
|||
directCreateRecord: [required], |
|||
concurrencyStamp: [required], |
|||
fromAreaTypes: [required], |
|||
fromAreaCodes: [required], |
|||
}) |
|||
|
|||
export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
{ |
|||
label: '单据号', |
|||
field: 'number', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
isForm: false |
|||
}, |
|||
{ |
|||
label: '从仓库代码', |
|||
field: 'fromWarehouseCode', |
|||
sort: 'custom', |
|||
form: { |
|||
// labelMessage: '信息提示说明!!!',
|
|||
componentProps: { |
|||
isSearchList: true, // 开启查询弹窗
|
|||
searchListPlaceholder: '请选择仓库代码', // 输入框占位文本
|
|||
searchField: 'code', // 查询弹窗赋值字段
|
|||
searchTitle: '仓库信息', // 查询弹窗标题
|
|||
searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
|
|||
searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法
|
|||
searchCondition: [{ |
|||
key: 'available', |
|||
value: 'TRUE', |
|||
isMainValue: false |
|||
}] |
|||
} |
|||
} |
|||
}, |
|||
|
|||
{ |
|||
label: '业务类型', |
|||
field: 'businessType', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
isForm: false, |
|||
isTable: false |
|||
}, |
|||
{ |
|||
label: '备注', |
|||
field: 'remark', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
isForm: false, |
|||
isTable: false |
|||
}, |
|||
{ |
|||
label: '创建时间', |
|||
field: 'createTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
search: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
type: 'daterange', |
|||
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] |
|||
} |
|||
}, |
|||
isForm: false, |
|||
isTable: false |
|||
}, |
|||
{ |
|||
label: '扩展属性', |
|||
field: 'extraProperties', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
isTable: false |
|||
}, |
|||
{ |
|||
label: '地点ID', |
|||
field: 'siteId', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
isTable: false |
|||
}, |
|||
{ |
|||
label: '申请时间', |
|||
field: 'requestTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
search: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
type: 'daterange', |
|||
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] |
|||
} |
|||
}, |
|||
isForm: false, |
|||
isTable: false |
|||
}, |
|||
{ |
|||
label: '截止时间', |
|||
field: 'dueTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
search: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
type: 'daterange', |
|||
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] |
|||
} |
|||
}, |
|||
isForm: false, |
|||
isTable: false |
|||
}, |
|||
{ |
|||
label: '部门', |
|||
field: 'departmentCode', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '状态', |
|||
field: 'status', |
|||
dictType: DICT_TYPE.REQUEST_STATUS, |
|||
dictClass: 'string', |
|||
isSearch: true, |
|||
isForm: false, |
|||
isTable: true, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '自动提交', |
|||
field: 'autoCommit', |
|||
dictType: DICT_TYPE.TRUE_FALSE, |
|||
dictClass: 'string', |
|||
isTable: false, |
|||
isForm: false, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
form: { |
|||
component: 'Switch', |
|||
value: requestsettingData.autoCommit, |
|||
componentProps: { |
|||
inactiveValue: 'FALSE', |
|||
activeValue: 'TRUE', |
|||
disabled: true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '自动通过', |
|||
field: 'autoAgree', |
|||
dictType: DICT_TYPE.TRUE_FALSE, |
|||
dictClass: 'string', |
|||
isTable: false, |
|||
isForm: false, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
form: { |
|||
component: 'Switch', |
|||
value: requestsettingData.autoCommit, |
|||
componentProps: { |
|||
inactiveValue: 'FALSE', |
|||
activeValue: 'TRUE', |
|||
disabled: true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '自动执行', |
|||
field: 'autoExecute', |
|||
dictType: DICT_TYPE.TRUE_FALSE, |
|||
dictClass: 'string', |
|||
isTable: false, |
|||
isForm: false, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
form: { |
|||
component: 'Switch', |
|||
value: requestsettingData.autoCommit, |
|||
componentProps: { |
|||
inactiveValue: 'FALSE', |
|||
activeValue: 'TRUE', |
|||
disabled: true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '直接生成记录', |
|||
field: 'directCreateRecord', |
|||
dictType: DICT_TYPE.TRUE_FALSE, |
|||
dictClass: 'string', |
|||
isTable: false, |
|||
isForm: false, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
form: { |
|||
component: 'Switch', |
|||
value: requestsettingData.autoCommit, |
|||
componentProps: { |
|||
inactiveValue: 'FALSE', |
|||
activeValue: 'TRUE', |
|||
disabled: true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '并发乐观锁', |
|||
field: 'concurrencyStamp', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
isTable: false |
|||
}, |
|||
{ |
|||
label: '权限所属人员id', |
|||
field: 'ruleUserId', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
isTable: false |
|||
}, |
|||
{ |
|||
label: '工作流流水号', |
|||
field: 'serialNumber', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
isTable: false |
|||
}, |
|||
{ |
|||
label: '原因', |
|||
field: 'reason', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '操作', |
|||
field: 'action', |
|||
isForm: false, |
|||
table: { |
|||
width: 150, |
|||
fixed: 'right' |
|||
} |
|||
} |
|||
])) |
|||
|
|||
// 表单校验
|
|||
export const RelegateRequestDetailRules = reactive({ |
|||
itemCode: [required], |
|||
downItemCode: [required], |
|||
businessType: [required], |
|||
available: [required], |
|||
departmentCode: [required], |
|||
concurrencyStamp: [required], |
|||
}) |
|||
|
|||
export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
{ |
|||
label: '物料代码', |
|||
field: 'itemCode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
tableForm:{ |
|||
isInpuFocusShow: false, // 开启查询弹窗
|
|||
searchListPlaceholder: '请选择物料代码', |
|||
searchField: 'code', |
|||
searchTitle: '物料基础信息', |
|||
searchAllSchemas: Itembasic.allSchemas, |
|||
searchPage: ItembasicApi.getItembasicPage, |
|||
searchCondition: [{ |
|||
key: 'available', |
|||
value: 'TRUE', |
|||
isMainValue: false |
|||
}] |
|||
}, |
|||
form: { |
|||
componentProps: { |
|||
isSearchList: true, |
|||
searchListPlaceholder: '请选择物料代码', |
|||
searchField: 'itemCode', |
|||
searchTitle: '物料基础信息', |
|||
searchAllSchemas: Itembasic.allSchemas, |
|||
searchPage: ItembasicApi.getItembasicPage, |
|||
searchCondition: [{ |
|||
key: 'available', |
|||
value: 'TRUE', |
|||
isMainValue: false |
|||
}] |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '降级物料代码', |
|||
field: 'downItemCode', |
|||
sort: 'custom', |
|||
form: { |
|||
componentProps: { |
|||
isSearchList: true, |
|||
searchListPlaceholder: '请选择降级物料代码', |
|||
searchField: 'itemCode', |
|||
searchTitle: '物料基础信息', |
|||
searchAllSchemas: Itembasic.allSchemas, |
|||
searchPage: ItembasicApi.getItembasicPage, |
|||
searchCondition: [{ |
|||
key: 'available', |
|||
value: 'TRUE', |
|||
isMainValue: false |
|||
}] |
|||
} |
|||
}, |
|||
isSearch: true |
|||
}, |
|||
{ |
|||
label: '计量单位', |
|||
field: 'uom', |
|||
dictType: DICT_TYPE.UOM, |
|||
dictClass: 'string', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
tableForm: { |
|||
type: 'Select', |
|||
disabled: true |
|||
}, |
|||
form: { |
|||
componentProps: { |
|||
disabled: true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '数量', |
|||
field: 'qty', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '从批次', |
|||
field: 'fromBatch', |
|||
sort: 'custom', |
|||
form: { |
|||
componentProps: { |
|||
disabled: true, |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '从包装号', |
|||
field: 'fromPackingNumber', |
|||
sort: 'custom', |
|||
form: { |
|||
componentProps: { |
|||
disabled: true, |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '从库位代码', |
|||
field: 'fromLocationCode', |
|||
sort: 'custom', |
|||
form: { |
|||
componentProps: { |
|||
disabled: true, |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '从库区类型', |
|||
field: 'fromAreaTypes', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '从库区代码', |
|||
field: 'fromAreaCodes', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '从仓库代码', |
|||
field: 'fromWarehouseCode', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '到包装号', |
|||
field: 'toPackingNumber', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '到批次', |
|||
field: 'toBatch', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '到库位代码', |
|||
field: 'toLocationCode', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '到仓库代码', |
|||
field: 'toWarehouseCode', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '到库区类型', |
|||
field: 'toAreaTypes', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '到库区代码', |
|||
field: 'toAreaCodes', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '是否可用', |
|||
field: 'available', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '备注', |
|||
field: 'remark', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '部门', |
|||
field: 'departmentCode', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '地点ID', |
|||
field: 'siteId', |
|||
sort: 'custom', |
|||
form: { |
|||
component: 'InputNumber', |
|||
value: 0 |
|||
}, |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '扩展属性', |
|||
field: 'extraProperties', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '创建时间', |
|||
field: 'createTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
search: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
type: 'daterange', |
|||
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] |
|||
} |
|||
}, |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '状态', |
|||
field: 'status', |
|||
dictType: DICT_TYPE.REQUEST_STATUS, |
|||
dictClass: 'string', |
|||
isSearch: true, |
|||
isForm: false, |
|||
isTable: true, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '并发乐观锁', |
|||
field: 'concurrencyStamp', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
form: { |
|||
component: 'InputNumber', |
|||
value: 0 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '工作流流水号', |
|||
field: 'serialNumber', |
|||
isForm:false, |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '权限所属人员id', |
|||
field: 'ruleUserId', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
form: { |
|||
component: 'InputNumber', |
|||
value: 0 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '操作', |
|||
field: 'action', |
|||
isForm: false, |
|||
table: { |
|||
width: 150, |
|||
fixed: 'right' |
|||
} |
|||
} |
|||
])) |
@ -1,244 +0,0 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
import * as ItembasicApi from '@/api/wms/itembasic' |
|||
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' |
|||
|
|||
// 表单校验
|
|||
export const RelegateRequestRules = reactive({ |
|||
itemCode: [required], |
|||
downItemCode: [required], |
|||
businessType: [required], |
|||
available: [required], |
|||
departmentCode: [required], |
|||
concurrencyStamp: [required], |
|||
}) |
|||
|
|||
export const RelegateRequest = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
{ |
|||
label: '单据号', |
|||
field: 'number', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '物料代码', |
|||
field: 'itemCode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
form: { |
|||
componentProps: { |
|||
isSearchList: true, |
|||
searchListPlaceholder: '请选择物料代码', |
|||
searchField: 'itemCode', |
|||
searchTitle: '物料基础信息', |
|||
searchAllSchemas: Itembasic.allSchemas, |
|||
searchPage: ItembasicApi.getItembasicPage, |
|||
searchCondition: [{ |
|||
key: 'available', |
|||
value: 'TRUE', |
|||
isMainValue: false |
|||
}] |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '降级后物料代码', |
|||
field: 'downItemCode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '计量单位', |
|||
field: 'uom', |
|||
sort: 'custom', |
|||
form: { |
|||
componentProps: { |
|||
disabled: true, |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '数量', |
|||
field: 'qty', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '从批次', |
|||
field: 'fromBatch', |
|||
sort: 'custom', |
|||
form: { |
|||
componentProps: { |
|||
disabled: true, |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '从包装号', |
|||
field: 'fromPackingNumber', |
|||
sort: 'custom', |
|||
form: { |
|||
componentProps: { |
|||
disabled: true, |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '从库位代码', |
|||
field: 'fromLocationCode', |
|||
sort: 'custom', |
|||
form: { |
|||
componentProps: { |
|||
disabled: true, |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '从库区类型', |
|||
field: 'fromAreaTypes', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '从库区代码', |
|||
field: 'fromAreaCodes', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '从仓库代码', |
|||
field: 'fromWarehouseCode', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '到包装号', |
|||
field: 'toPackingNumber', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '到批次', |
|||
field: 'toBatch', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '到库位代码', |
|||
field: 'toLocationCode', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '到仓库代码', |
|||
field: 'toWarehouseCode', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '到库区类型', |
|||
field: 'toAreaTypes', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '到库区代码', |
|||
field: 'toAreaCodes', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '是否可用', |
|||
field: 'available', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '备注', |
|||
field: 'remark', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '部门', |
|||
field: 'departmentCode', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '地点ID', |
|||
field: 'siteId', |
|||
sort: 'custom', |
|||
form: { |
|||
component: 'InputNumber', |
|||
value: 0 |
|||
}, |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '扩展属性', |
|||
field: 'extraProperties', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '创建时间', |
|||
field: 'createTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
search: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
type: 'daterange', |
|||
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] |
|||
} |
|||
}, |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '状态', |
|||
field: 'status', |
|||
dictType: DICT_TYPE.REQUEST_STATUS, |
|||
dictClass: 'string', |
|||
isSearch: true, |
|||
isForm: false, |
|||
isTable: true, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '并发乐观锁', |
|||
field: 'concurrencyStamp', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
form: { |
|||
component: 'InputNumber', |
|||
value: 0 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '工作流流水号', |
|||
field: 'serialNumber', |
|||
isForm:false, |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '权限所属人员id', |
|||
field: 'ruleUserId', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
form: { |
|||
component: 'InputNumber', |
|||
value: 0 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '操作', |
|||
field: 'action', |
|||
isForm: false, |
|||
table: { |
|||
width: 150, |
|||
fixed: 'right' |
|||
} |
|||
} |
|||
])) |
Loading…
Reference in new issue