diff --git a/src/api/erp/mold/index.ts b/src/api/erp/mold/index.ts
index a3554fdb..5089ba0f 100644
--- a/src/api/erp/mold/index.ts
+++ b/src/api/erp/mold/index.ts
@@ -125,6 +125,10 @@ export const MoldBrandApi = {
getMold: async (id: number) => {
return await request.get({ url: `/erp/mold-brand/mold/get?id=` + id })
},
+ // 根据状态获得模具
+ getMoldListByStatus: async (status: number) => {
+ return await request.get({ url: `/erp/mold/getMoldListByStatus?status=` + status })
+ },
// ==================== 子表(模具产品) ====================
diff --git a/src/api/iot/device/index.ts b/src/api/iot/device/index.ts
index c9efd899..d28ebe7e 100644
--- a/src/api/iot/device/index.ts
+++ b/src/api/iot/device/index.ts
@@ -91,7 +91,12 @@ export const DeviceApi = {
getDevice: async (id: number) => {
return await request.get({ url: `/iot/device/get?id=` + id })
},
-
+ getDeviceListByNoUsed: async () => {
+ return await request.get({ url: `/iot/device/noUsedlist` })
+ },
+ getDeviceList2ByNoUsed: async (id: number) => {
+ return await request.get({ url: `/iot/device/noUsedlist2?id=` + id })
+ },
// 新增物联设备
createDevice: async (data: DeviceVO) => {
return await request.post({ url: `/iot/device/create`, data })
diff --git a/src/api/mes/deviceledger/index.ts b/src/api/mes/deviceledger/index.ts
index ad15f090..12ecc1b0 100644
--- a/src/api/mes/deviceledger/index.ts
+++ b/src/api/mes/deviceledger/index.ts
@@ -54,6 +54,10 @@ export const DeviceLedgerApi = {
return await request.get({ url: `/mes/device-ledger/noUsedlist` })
},
+ getDeviceLedgerList2ByNoUsed: async (id: number) => {
+ return await request.get({ url: `/mes/device-ledger/noUsedlist2?id=` + id })
+ },
+
// 查询设备类型详情
getDeviceLedger: async (id: number) => {
return await request.get({ url: `/mes/device-ledger/get?id=` + id })
diff --git a/src/api/mes/organization/index.ts b/src/api/mes/organization/index.ts
index 55aeb120..e61cf229 100644
--- a/src/api/mes/organization/index.ts
+++ b/src/api/mes/organization/index.ts
@@ -14,6 +14,7 @@ export interface OrganizationVO {
status: string // 组织状态
orgClass: string // 组织等级
orgType: string // 组织类型
+ dvId: number
}
export type DeviceParameterAnalysisNodeVO = {
diff --git a/src/locales/en.ts b/src/locales/en.ts
index e562124d..1abfadc4 100644
--- a/src/locales/en.ts
+++ b/src/locales/en.ts
@@ -1916,6 +1916,7 @@ export default {
placeholderUnit: 'Please select unit',
placeholderInTime: 'Select stock in time',
placeholderRemark: 'Please input remark',
+ placeholderStatus: 'Please select status',
validatorCodeRequired: 'Mold code can not be empty',
validatorNameRequired: 'Mold name can not be empty',
validatorUnitRequired: 'Unit can not be empty',
diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts
index 17fb19d7..617886ec 100644
--- a/src/locales/zh-CN.ts
+++ b/src/locales/zh-CN.ts
@@ -1499,6 +1499,7 @@ export default {
placeholderUnit: '请选择单位',
placeholderInTime: '选择入库时间',
placeholderRemark: '请输入备注',
+ placeholderStatus: '请选择状态',
validatorCodeRequired: '模具编码不能为空',
validatorNameRequired: '模具名称不能为空',
validatorUnitRequired: '单位不能为空',
diff --git a/src/views/erp/mold/MoldBrandForm.vue b/src/views/erp/mold/MoldBrandForm.vue
index 2ec68eb1..c1e3f39d 100644
--- a/src/views/erp/mold/MoldBrandForm.vue
+++ b/src/views/erp/mold/MoldBrandForm.vue
@@ -86,6 +86,7 @@
diff --git a/src/views/erp/mold/components/MoldForm.vue b/src/views/erp/mold/components/MoldForm.vue
index 9686bb23..4865cb98 100644
--- a/src/views/erp/mold/components/MoldForm.vue
+++ b/src/views/erp/mold/components/MoldForm.vue
@@ -78,6 +78,7 @@
diff --git a/src/views/erp/mold/index.vue b/src/views/erp/mold/index.vue
index 5ecddf17..4fbd9881 100644
--- a/src/views/erp/mold/index.vue
+++ b/src/views/erp/mold/index.vue
@@ -6,7 +6,7 @@
:model="queryParams"
ref="queryFormRef"
:inline="true"
- label-width="110px"
+ label-width="68px"
>
-
+
@@ -112,7 +112,6 @@
-->
-
-
+
-
-
-
+
+
-/** 删除按钮操作 */
-const handleDelete = (index) => {
- formData.value.splice(index, 1)
+
diff --git a/src/views/mes/moldget/index.vue b/src/views/mes/moldget/index.vue
index e76d7788..1ed2116e 100644
--- a/src/views/mes/moldget/index.vue
+++ b/src/views/mes/moldget/index.vue
@@ -212,7 +212,7 @@
type="primary"
@click="openForm('update', scope.row.id)"
v-hasPermi="['erp:stock-out:update']"
- :disabled="scope.row.status === 20"
+ v-if="scope.row.status === 10"
>
{{ t('MoldManagement.MoldGet.edit') }}
@@ -225,7 +225,7 @@
>
{{ t('MoldManagement.MoldGet.approve') }}
-
{{ t('MoldManagement.MoldGet.unapprove') }}
-
+ -->
{{ t('MoldManagement.MoldGet.delete') }}
diff --git a/src/views/mes/moldoperate/MoldOperateForm.vue b/src/views/mes/moldoperate/MoldOperateForm.vue
index c1ea2e52..8728352e 100644
--- a/src/views/mes/moldoperate/MoldOperateForm.vue
+++ b/src/views/mes/moldoperate/MoldOperateForm.vue
@@ -134,8 +134,8 @@ const validateLowerMoldId = (_rule: any, value: any, callback: (error?: Error) =
const formRules = reactive({
operateType: [{ required: true, message: t('MoldManagement.MoldOperate.validatorOperateTypeRequired'), trigger: 'blur' }],
deviceId: [{ required: true, message: t('MoldManagement.MoldOperate.validatorDeviceRequired'), trigger: 'blur' }],
- moldId: [{ validator: validateMoldId, trigger: 'change' }],
- lowerMoldId: [{ validator: validateLowerMoldId, trigger: 'change' }],
+ moldId: [{ required: true, validator: validateMoldId, trigger: 'change' }],
+ lowerMoldId: [{ required: true, validator: validateLowerMoldId, trigger: 'change' }],
})
const formRef = ref() // 表单 Ref
diff --git a/src/views/mes/moldreturn/MoldReturnForm.vue b/src/views/mes/moldreturn/MoldReturnForm.vue
index afb47ddf..1e440e8e 100644
--- a/src/views/mes/moldreturn/MoldReturnForm.vue
+++ b/src/views/mes/moldreturn/MoldReturnForm.vue
@@ -37,24 +37,6 @@
/>
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
@@ -105,13 +102,14 @@
import { StockInApi, StockInVO } from '@/api/erp/stock/in'
import StockInItemForm from './components/StockInItemForm.vue'
import { CustomerApi, CustomerVO } from '@/api/erp/sale/customer'
-import {DICT_TYPE, getBoolDictOptions, getStrDictOptions} from "@/utils/dict";
+import { WarehouseApi, WarehouseVO } from '@/api/erp/stock/warehouse'
/** ERP 其它出库单表单 */
defineOptions({ name: 'MoldReturnForm' })
const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗
+const warehouseList = ref([]) // 仓库列表
const dialogVisible = ref(false) // 弹窗的是否展示
const dialogTitle = ref('') // 弹窗的标题
@@ -124,7 +122,8 @@ const formData = ref({
remark: undefined,
inType: undefined,
fileUrl: '',
- items: []
+ items: [],
+ warehouseId: undefined
})
const formRules = reactive({
inTime: [
@@ -132,6 +131,9 @@ const formRules = reactive({
],
inType: [
{ required: true, message: t('MoldManagement.MoldReturn.validatorInTypeRequired'), trigger: 'blur' }
+ ],
+ warehouseId: [
+ { required: true, message: t('MoldManagement.MoldReturn.validatorInTypeRequired'), trigger: 'blur' }
]
})
const disabled = computed(() => formType.value === 'detail')
@@ -164,6 +166,7 @@ const open = async (type: string, id?: number) => {
}
// 加载客户列表
customerList.value = await CustomerApi.getCustomerSimpleList()
+ warehouseList.value = await WarehouseApi.getWarehouseSimpleList()
}
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
@@ -176,7 +179,16 @@ const submitForm = async () => {
// 提交请求
formLoading.value = true
try {
- const data = formData.value as unknown as StockInVO
+ itemFormRef.value.selectedRows.forEach((item, index) => {
+ const i = {
+ warehouseId : formData.value.warehouseId,
+ productId : item.id,
+ productPrice: 0,
+ count: 1,
+ }
+ formData.value.items.push(i)
+});
+ const data = formData.value as unknown as StockInVO
if (formType.value === 'create') {
await StockInApi.createStockIn(data)
message.success(t('common.createSuccess'))
@@ -201,7 +213,8 @@ const resetForm = () => {
remark: undefined,
fileUrl: undefined,
items: [],
- inType: "模具入库"
+ inType: "模具入库",
+ warehouseId: undefined
}
formRef.value?.resetFields()
}
diff --git a/src/views/mes/moldreturn/components/StockInItemForm.vue b/src/views/mes/moldreturn/components/StockInItemForm.vue
index dd478e5e..d2c52c67 100644
--- a/src/views/mes/moldreturn/components/StockInItemForm.vue
+++ b/src/views/mes/moldreturn/components/StockInItemForm.vue
@@ -1,272 +1,304 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
+
+
+ {{ t('common.query') }}
+
+
+ {{ t('common.reset') }}
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
- + {{ t('MoldManagement.MoldReturn.itemAddButton') }}
-
+
+
+
+
+
-/** 删除按钮操作 */
-const handleDelete = (index) => {
- formData.value.splice(index, 1)
+
diff --git a/src/views/mes/moldreturn/index.vue b/src/views/mes/moldreturn/index.vue
index c8dc68ae..00b7cc96 100644
--- a/src/views/mes/moldreturn/index.vue
+++ b/src/views/mes/moldreturn/index.vue
@@ -1,5 +1,4 @@
-
{{ t('MoldManagement.MoldReturn.approve') }}
-
{{ t('MoldManagement.MoldReturn.unapprove') }}
-
+ -->
+
+
+
+
+