Browse Source

fix: 出库流向增加校验

master
betaqi 3 weeks ago
parent
commit
d97b713137
  1. 8
      src/pages/deviceInfo/components/DeliveryInfo.vue

8
src/pages/deviceInfo/components/DeliveryInfo.vue

@ -52,7 +52,7 @@ import numberInput from '@/components/dashboard/Edfs-number-item-input.vue'
import EdfsButton from '@/components/dashboard/Edfs-button/index.vue' import EdfsButton from '@/components/dashboard/Edfs-button/index.vue'
import FormItemSelect from '@/components/dashboard/FormItemSelect.vue' import FormItemSelect from '@/components/dashboard/FormItemSelect.vue'
import { getSimpleCustomerList, type CustomerVO } from '@/api/module/eam/customer' import { getSimpleCustomerList, type CustomerVO } from '@/api/module/eam/customer'
import { isResError } from '@/hooks/useMessage' import { isResError, useMessage } from '@/hooks/useMessage'
import type { IDevice } from '@/api/module/eam/device' import type { IDevice } from '@/api/module/eam/device'
import { import {
getStorageByDeviceId, getStorageByDeviceId,
@ -73,6 +73,8 @@ const isShowSaveButton = computed(() => {
return props.info?.status === undefined ? true : props.info.status < 3 return props.info?.status === undefined ? true : props.info.status < 3
}) })
const message = useMessage()
const emit = defineEmits(['onSave']) const emit = defineEmits(['onSave'])
const params = ref<Omit<IStorageOutParam, 'deviceId'>>({ const params = ref<Omit<IStorageOutParam, 'deviceId'>>({
customerId: '', customerId: '',
@ -89,6 +91,10 @@ async function loadCustomerList() {
async function onSave() { async function onSave() {
if (!props.deviceId) return if (!props.deviceId) return
if (!params.value.customerId) {
message.error('请选择出库流向')
return
}
const options: IStorageOutParam = { const options: IStorageOutParam = {
deviceId: props.deviceId, deviceId: props.deviceId,
customerId: params.value.customerId, customerId: params.value.customerId,

Loading…
Cancel
Save