diff --git a/src/api/eam/item/applicationRecordMain/index.ts b/src/api/eam/item/applicationRecordMain/index.ts index f6f43a1..207b15a 100644 --- a/src/api/eam/item/applicationRecordMain/index.ts +++ b/src/api/eam/item/applicationRecordMain/index.ts @@ -48,12 +48,12 @@ export const deleteApplicationRecordMain = async (id: number) => { // 审批通过备件申领记录主 export const agreeApplicationRecordMain = async (id: number) => { - return await request.delete({ url: `/eam/item-apply-request-main/agree?id=` + id }) + return await request.get({ url: `/eam/item-apply-request-main/agree?id=` + id }) } // 审批驳回备件申领记录主 export const disAgreeApplicationRecordMain = async (id: number) => { - return await request.delete({ url: `/eam/item-apply-request-main/disAgree?id=` + id }) + return await request.get({ url: `/eam/item-apply-request-main/disAgree?id=` + id }) } // 导出备件申领记录主 Excel diff --git a/src/components/Detail/src/approveDetail.vue b/src/components/Detail/src/approveDetail.vue index 607a6b6..9ed46db 100644 --- a/src/components/Detail/src/approveDetail.vue +++ b/src/components/Detail/src/approveDetail.vue @@ -373,12 +373,12 @@ } else if (val == 'agree') { // 同意按钮 - agree() + agree(detailData.value.id) } else if (val == 'disAgree') { // 同意按钮 - disAgree() + disAgree(detailData.value.id) } // else if (val == 'disagree') { // // 驳回按钮 @@ -399,9 +399,10 @@ await props.apiAgree(id) message.success(t('common.success')) // 刷新列表 - await getList() + isShowDrawer.value = false updateKey.value += 1 setBeiJian() + emit('agree') } catch { } } @@ -415,9 +416,10 @@ await props.apiDisAgree(id) message.success(t('common.success')) // 刷新列表 - await getList() + isShowDrawer.value = false updateKey.value += 1 setBeiJian() + emit('agree') } catch { } } diff --git a/src/views/eam/basic/locationArea/locationArea.data.ts b/src/views/eam/basic/locationArea/locationArea.data.ts index fcd7ed6..043b8aa 100644 --- a/src/views/eam/basic/locationArea/locationArea.data.ts +++ b/src/views/eam/basic/locationArea/locationArea.data.ts @@ -3,6 +3,10 @@ import { dateFormatter } from '@/utils/formatTime' // 表单校验 export const LocationAreaRules = reactive({ + number: [ + { required: true, message: '请输入库区编号', trigger: 'blur' }, + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], name: [ { required: true, message: '请输入库区名称', trigger: 'blur' }, { max: 50, message: '不得超过50个字符', trigger: 'blur' } @@ -15,7 +19,7 @@ export const LocationArea = useCrudSchemas(reactive([ field: 'number', sort: 'custom', isSearch: true, - isForm: false, + isForm: true, table: { width: 180, fixed: 'left' diff --git a/src/views/eam/item/applicationRecord/index.vue b/src/views/eam/item/applicationRecord/index.vue index 9452918..6ed87e2 100644 --- a/src/views/eam/item/applicationRecord/index.vue +++ b/src/views/eam/item/applicationRecord/index.vue @@ -50,7 +50,8 @@ :apiAgree="ApplicationRecordMainApi.agreeApplicationRecordMain" :apiDisAgree="ApplicationRecordMainApi.disAgreeApplicationRecordMain" :apiPage="ApplicationRecordDetailApi.getApplicationRecordDetailPage" - @searchTableSuccessDetail="searchTableSuccessDetail" /> + @searchTableSuccessDetail="searchTableSuccessDetail" + @agree="getList"/> @@ -180,7 +181,7 @@ const buttonTableClick = async (val, row) => { if (val == 'edit') { // 编辑 openForm('update', row) - } else if (val == 'approve') { // 删除 + } else if (val == 'approve') { // 审批 handleApprove(row, '单据号', row.number) } else if (val == 'delete') { // 删除 handleDelete(row.id) @@ -202,6 +203,8 @@ const detailRef1 = ref() const handleApprove = (row : any, titleName : any, titleValue : any) => { detailRef1.value.openDetail(row, titleName, titleValue, 'basicApplicationRecordMain') + // 刷新列表 + getList() } /** 删除按钮操作 */ diff --git a/src/views/eam/item/itemAccounts/index.vue b/src/views/eam/item/itemAccounts/index.vue index 9efea87..a1669bc 100644 --- a/src/views/eam/item/itemAccounts/index.vue +++ b/src/views/eam/item/itemAccounts/index.vue @@ -181,13 +181,18 @@ const submitItem = async (formFieldRef, searchFieldRef, selections, typeRef, row })) ItemAccountsApi.replaceLocation(deviceItemRelList).then((res) => { + message.success(t('更换成功')) + // 刷新列表 + getList() }) } const getItemWithOutBind = async () => { try { const res = await ItemApi.getItemPage({ - ...Item.allSchemas.searchSchema + ...Item.allSchemas.searchSchema, + available:"TRUE" + }) if (res.list?.length > 0) { // const response = await getDeviceItemPage(DeviceAccounts.allSchemas.searchSchema); diff --git a/src/views/eam/item/itemApplyMain/index.vue b/src/views/eam/item/itemApplyMain/index.vue index bb1ec5c..28798d6 100644 --- a/src/views/eam/item/itemApplyMain/index.vue +++ b/src/views/eam/item/itemApplyMain/index.vue @@ -73,12 +73,18 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { nextTick(async () => { if (type == 'tableForm') { + console.log(formField); // 明细查询页赋值 - row[formField] = val[0][searchField] - row['itemNumber'] = val[0]['itemNumber'] - row['isRadeIn'] = val[0]['isRadeIn'] - row['currentQty'] = val[0]['qty'] - row['available'] = val[0]['available'] + if (formField == 'itemNumber') { + row[formField] = val[0][searchField] + row['itemNumber'] = val[0]['itemNumber'] + row['isRadeIn'] = val[0]['isInAccount'] + row['currentQty'] = val[0]['qty'] + row['available'] = val[0]['available'] + } + if (formField == 'deviceNumber') { + row['deviceNumber'] = val[0]['number'] + } } else { const setV = {} setV[formField] = val[0][searchField]