| | |
| | | updateCheckData() |
| | | disabled.value = true |
| | | } else { |
| | | formData.value = {} |
| | | formData.value = { |
| | | containerType: 1, |
| | | containerStatus: 1, |
| | | specLength: 1200, |
| | | specWidth: 1200, |
| | | specHeight: 1200, |
| | | limitLength: 1200, |
| | | limitWidth: 1200, |
| | | limitHeight: 1200, |
| | | maxWeight: 400, |
| | | } |
| | | disabled.value = false |
| | | updateCheckData() |
| | | } |
| | |
| | | 导出 |
| | | </IconButton> |
| | | </div> |
| | | <Search |
| | | {/* <Search |
| | | placeholder="请输入关键字" |
| | | v-model={search.value} |
| | | onConfirm={onSearch} |
| | | style={{ marginTop: '-1px' }} |
| | | /> |
| | | /> */} |
| | | </div> |
| | | <RenderBaseTable |
| | | url="/api/v1/HIAWms/wmsContainer" |
| | |
| | | rules: [{ required: true, message: '库区名称不能为空', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '描述', |
| | | prop: 'areaDesc', |
| | | el: 'input', |
| | | placeholder: '请输入描述', |
| | | }, |
| | | { |
| | | label: '库区状态', |
| | | prop: 'areaStatus', |
| | | el: 'select', |
| | |
| | | // storeValueAndLabel: true, |
| | | placeholder: '请输入仓库代码', |
| | | }, |
| | | // { |
| | | // label: '仓库名称', |
| | | // prop: 'storeName', |
| | | // el: 'input', |
| | | // placeholder: '请输入仓库名称', |
| | | // }, |
| | | // { |
| | | // label: '排序', |
| | | // prop: 'sort', |
| | | // el: 'input-number', |
| | | // placeholder: '请输入排序', |
| | | // rules: [{ required: true, message: '排序不能为空', trigger: 'blur' }], |
| | | // }, |
| | | { |
| | | label: '仓库名称', |
| | | prop: 'storeName', |
| | | label: '描述', |
| | | prop: 'areaDesc', |
| | | el: 'input', |
| | | placeholder: '请输入仓库名称', |
| | | }, |
| | | { |
| | | label: '排序', |
| | | prop: 'sort', |
| | | el: 'input-number', |
| | | placeholder: '请输入排序', |
| | | rules: [{ required: true, message: '排序不能为空', trigger: 'blur' }], |
| | | placeholder: '请输入描述', |
| | | }, |
| | | { |
| | | label: '备注', |
| | | prop: 'remark', |
| | | el: 'input', |
| | | placeholder: '请输入备注', |
| | | }, |
| | | { |
| | | label: '是否禁用', |
| | | prop: 'isDisabled', |
| | | el: 'switch', |
| | | rules: [ |
| | | { required: true, message: '是否禁用不能为空', trigger: 'change' }, |
| | | ], |
| | | }, |
| | | ]) |
| | | /** |
| | |
| | | // storeName: formData.value.storeName, // 仓库名称 |
| | | remark: formData.value.remark, // 备注 |
| | | } |
| | | console.log(data) |
| | | if (!current.value) { |
| | | await wmsAreaDrawer.addWmsArea(data) |
| | | } else { |
| | |
| | | updateCheckData() |
| | | } else { |
| | | disabled.value = false |
| | | formData.value = {} |
| | | formData.value = { |
| | | areaStatus: 1, // 库区状态 |
| | | areaType: 1, // 库区类型 |
| | | storeCode: storeList[0], |
| | | } |
| | | updateCheckData() |
| | | } |
| | | } |
| | |
| | | import isEqual from 'lodash/isEqual' |
| | | import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox' |
| | | import { cloneDeep } from 'lodash' |
| | | import { |
| | | getAreaAreaDataList, |
| | | getWmsEnumData, |
| | | } from '@/widgets/HIAWms/Models/Service/WmsMaterialDrawer' |
| | | |
| | | export const useWmsPlaceDrawer = (props: any, ctx?: any) => { |
| | | const wmsPlaceDrawer = injectModel<WmsPlaceDrawer>('wmsPlaceDrawer') |
| | |
| | | label: '货位类型', |
| | | prop: 'storageTypeNo', |
| | | el: 'select', |
| | | options: [ |
| | | { label: '类型1', value: 1 }, |
| | | { label: '类型2', value: 2 }, |
| | | // 根据实际的 PlaceTypeEnum 添加更多选项 |
| | | ], |
| | | options: [], |
| | | placeholder: '请选择货位类型', |
| | | rules: [ |
| | | { required: true, message: '货位类型不能为空', trigger: 'change' }, |
| | |
| | | label: '货位状态', |
| | | prop: 'placeStatus', |
| | | el: 'select', |
| | | options: [ |
| | | { label: '状态1', value: 1 }, |
| | | { label: '状态2', value: 2 }, |
| | | // 根据实际的 PlaceStatusEnum 添加更多选项 |
| | | ], |
| | | options: [], |
| | | placeholder: '请选择货位状态', |
| | | rules: [ |
| | | { required: true, message: '货位状态不能为空', trigger: 'change' }, |
| | |
| | | { |
| | | label: '所在库区', |
| | | prop: 'areaCode', |
| | | el: 'input', |
| | | placeholder: '请输入所在库区', |
| | | el: 'select', |
| | | options: [], |
| | | placeholder: '请选择所在库区', |
| | | rules: [{ required: true, message: '所在库区不能为空', trigger: 'blur' }], |
| | | }, |
| | | { |
| | |
| | | label: '是否锁定', |
| | | prop: 'islock', |
| | | el: 'select', |
| | | options: [ |
| | | { label: '是', value: 1 }, |
| | | { label: '否', value: 2 }, |
| | | ], |
| | | options: [], |
| | | placeholder: '请选择是否锁定', |
| | | rules: [ |
| | | { required: true, message: '是否锁定不能为空', trigger: 'change' }, |
| | |
| | | label: '是否空托', |
| | | prop: 'emptyContainer', |
| | | el: 'select', |
| | | options: [ |
| | | { label: '是', value: 1 }, |
| | | { label: '否', value: 2 }, |
| | | ], |
| | | options: [], |
| | | placeholder: '请选择是否空托', |
| | | rules: [ |
| | | { required: true, message: '是否空托不能为空', trigger: 'change' }, |
| | |
| | | }, |
| | | } |
| | | } |
| | | |
| | | const updateFormItemOptions = (propName: string, enumData: any[]) => { |
| | | const item = formItems.find((item) => item.prop === propName) |
| | | if (item && enumData) { |
| | | item.options = enumData.map((item) => ({ |
| | | label: item.description, |
| | | value: item.value, |
| | | })) |
| | | } |
| | | } |
| | | |
| | | const updateFormAreaOptions = (propName: string, enumData: any[]) => { |
| | | const item = formItems.find((item) => item.prop === propName) |
| | | if (item && enumData) { |
| | | item.options = enumData.map((item) => ({ |
| | | label: item.areaName, |
| | | value: item.areaNo, |
| | | })) |
| | | } |
| | | } |
| | | /** |
| | | * 弹窗打开获取详情 |
| | | */ |
| | | const onOpen = async () => { |
| | | const storageTypeNoData = await getWmsEnumData({ |
| | | EnumName: 'PlaceTypeEnum', |
| | | }) |
| | | updateFormItemOptions('storageTypeNo', storageTypeNoData) |
| | | |
| | | const placeStatusData = await getWmsEnumData({ |
| | | EnumName: 'PlaceStatusEnum', |
| | | }) |
| | | updateFormItemOptions('placeStatus', placeStatusData) |
| | | const yesNoData = await getWmsEnumData({ |
| | | EnumName: 'YesNoEnum', |
| | | }) |
| | | updateFormItemOptions('islock', yesNoData) |
| | | updateFormItemOptions('emptyContainer', yesNoData) |
| | | |
| | | const areaList = await getAreaAreaDataList() |
| | | updateFormAreaOptions('areaCode', areaList) |
| | | |
| | | if (current.value) { |
| | | const res = await wmsPlaceDrawer.getWmsPlaceDetail(current.value) |
| | | |
| | |
| | | } |
| | | updateCheckData() |
| | | } else { |
| | | formData.value = {} |
| | | formData.value = { |
| | | storageTypeNo: 1, // 货位类型 |
| | | placeStatus: 1, // 货位状态 |
| | | areaCode: areaList[0], // 所在库区 |
| | | aisle: 1, // 巷道 |
| | | layerNo: 1, // 层 |
| | | islock: 2, // 是否锁定 |
| | | emptyContainer: 2, // 是否空托 |
| | | } |
| | | updateCheckData() |
| | | } |
| | | } |
| | |
| | | ...queryForm.value, |
| | | storageTypeNo: queryForm.value.storageTypeNo || '', // 处理下拉 |
| | | placeStatus: queryForm.value.placeStatus || '', |
| | | islock: queryForm.value.islock || '', |
| | | aisle: queryForm.value.aisle || '', |
| | | areaCode: queryForm.value.areaCode || '', |
| | | emptyContainer: queryForm.value.emptyContainer || '', |
| | | })) |
| | | |
| | | // 动态枚举选项 |
| | |
| | | 导出 |
| | | </IconButton> |
| | | </div> |
| | | <Search |
| | | {/* <Search |
| | | placeholder="请输入关键字" |
| | | v-model={search.value} |
| | | onConfirm={onSearch} |
| | | style={{ marginTop: '-1px' }} |
| | | /> |
| | | /> */} |
| | | </div> |
| | | <RenderBaseTable |
| | | url="/api/v1/HIAWms/wmsPlace" |
| | |
| | | 导出 |
| | | </IconButton> |
| | | </div> |
| | | <Search |
| | | {/* <Search |
| | | placeholder="请输入关键字" |
| | | v-model={search.value} |
| | | onConfirm={onSearch} |
| | | style={{ marginTop: '-1px' }} |
| | | /> |
| | | /> */} |
| | | </div> |
| | | <RenderBaseTable |
| | | url="/api/v1/HIAWms/wmsStore" |