diff --git a/src/api/erp/product/unit/index.ts b/src/api/erp/product/unit/index.ts index bb414680..58cc54ec 100644 --- a/src/api/erp/product/unit/index.ts +++ b/src/api/erp/product/unit/index.ts @@ -47,8 +47,13 @@ export const ProductUnitApi = { return await request.download({ url: `/erp/product-unit/export-excel`, params }) }, - // 获得产品单位列表 - getProductUnitList: async () => { - return await request.get({ url: `/erp/product-unit/list`}) - }, + // 获得产品单位列表 + getProductUnitList: async () => { + return await request.get({ url: `/erp/product-unit/list`}) + }, + + // 获得产品主单位列表 + getProductUnitListByFlag: async () => { + return await request.get({ url: `/erp/product-unit/flag-list`}) + }, } diff --git a/src/components/Crontab/src/Crontab.vue b/src/components/Crontab/src/Crontab.vue index 0914bb71..8335a324 100644 --- a/src/components/Crontab/src/Crontab.vue +++ b/src/components/Crontab/src/Crontab.vue @@ -12,7 +12,7 @@ interface shortcutsType { const props = defineProps({ modelValue: { type: String, - default: '* * * * * ?' + default: '' }, shortcuts: { type: Array as PropType, default: () => [] } }) @@ -512,7 +512,7 @@ const inputChange = () => { diff --git a/src/views/erp/product/unit/index.vue b/src/views/erp/product/unit/index.vue index d8fd7b71..abfacfed 100644 --- a/src/views/erp/product/unit/index.vue +++ b/src/views/erp/product/unit/index.vue @@ -6,7 +6,7 @@ :model="queryParams" ref="queryFormRef" :inline="true" - label-width="120px" + label-width="68px" > - {{ t('DataCollection.Device.deviceName') + t('common.colon') + formData.deviceName }} + diff --git a/src/views/iot/device/components/DeviceAttributeForm.vue b/src/views/iot/device/components/DeviceAttributeForm.vue index 78fe19ca..8534095d 100644 --- a/src/views/iot/device/components/DeviceAttributeForm.vue +++ b/src/views/iot/device/components/DeviceAttributeForm.vue @@ -52,24 +52,30 @@ /> - + + + @@ -85,6 +91,7 @@ import { getStrDictOptions, DICT_TYPE } from '@/utils/dict' import { DeviceApi } from '@/api/iot/device' import { DeviceAttributeTypeApi, DeviceAttributeTypeVO } from '@/api/iot/deviceattributetype' +import { ProductUnitApi, ProductUnitVO } from '@/api/erp/product/unit' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 @@ -93,7 +100,7 @@ const dialogVisible = ref(false) // 弹窗的是否展示 const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 - +const unitList = ref([]) // 产品单位列表 const typeList = ref([]) const loadTypeList = async () => { if (typeList.value.length > 0) { @@ -233,6 +240,8 @@ const open = async (type: string, id?: number, deviceId: number) => { dialogTitle.value = t('action.' + type) formType.value = type resetForm() + // 产品单位 + unitList.value = await ProductUnitApi.getProductUnitSimpleList() formData.value.deviceId = deviceId await loadTypeList() // 修改时,设置数据 diff --git a/src/views/iot/device/index.vue b/src/views/iot/device/index.vue index 45643aa9..d4157246 100644 --- a/src/views/iot/device/index.vue +++ b/src/views/iot/device/index.vue @@ -643,6 +643,8 @@ const handleBatchDelete = async () => { } const handleCopy = async (id: number) => { + // 二次确认 + await message.confirm('是否复制设备?') try { await DeviceApi.copyDevice(id) message.success(t('common.copySuccess')) diff --git a/src/views/iot/deviceattributetype/DeviceAttributeTypeForm.vue b/src/views/iot/deviceattributetype/DeviceAttributeTypeForm.vue index 43931202..2fc2226c 100644 --- a/src/views/iot/deviceattributetype/DeviceAttributeTypeForm.vue +++ b/src/views/iot/deviceattributetype/DeviceAttributeTypeForm.vue @@ -14,10 +14,10 @@ - + - +