|
|
@ -78,6 +78,16 @@ |
|
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 处理填写备注窗口 finance_mainPlanSub --> |
|
|
|
<BasicForm |
|
|
|
ref="handleFormRef" |
|
|
|
:rules="CountadjustHandleRules" |
|
|
|
:formAllSchemas="CountadjustHandle.allSchemas" |
|
|
|
:isBusiness="false" |
|
|
|
:footButttondata="undefined" |
|
|
|
@success="submitFormHandle" |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
|
<ImportForm ref="importFormRef" url="/wms/countadjust-request-main/import" :importTemplateData="importTemplateData" |
|
|
|
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" /> |
|
|
@ -86,7 +96,7 @@ |
|
|
|
<script setup lang="ts"> |
|
|
|
import download from '@/utils/download' |
|
|
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
|
|
|
import { CountadjustRequestMain,CountadjustRequestMainRules,CountadjustRequestDetail,CountadjustRequestDetailRules } from './countadjustRequestMain.data' |
|
|
|
import { CountadjustRequestMain,CountadjustRequestMainRules,CountadjustRequestDetail,CountadjustRequestDetailRules,CountadjustHandle,CountadjustHandleRules } from './countadjustRequestMain.data' |
|
|
|
import * as CountadjustRequestMainApi from '@/api/wms/countadjustRequestMain' |
|
|
|
import * as CountadjustRequestDetailApi from '@/api/wms/countadjustRequestDetail' |
|
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
@ -200,7 +210,7 @@ const butttondata = (row,$index) => { |
|
|
|
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:countadjust-request-main:submit'}), // 提交审批 |
|
|
|
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:countadjust-request-main:refused'}), // 驳回 |
|
|
|
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:countadjust-request-main:agree'}), // 审批通过 |
|
|
|
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:countadjust-request-main:handle'}), // 处理 |
|
|
|
defaultButtons.mainListHandleBtn({hide:false,hasPermi:'wms:countadjust-request-main:handle'}), // 处理 |
|
|
|
] |
|
|
|
} |
|
|
|
// 列表-操作按钮事件 |
|
|
@ -261,27 +271,26 @@ const buttonTableClick = async (val, row) => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
} else if (val == 'mainHandle') { // 处理 |
|
|
|
await message.confirm('确认要处理吗?') |
|
|
|
let getLoading = ElLoading.service({ |
|
|
|
lock: true, |
|
|
|
text: 'loading...', |
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
}) |
|
|
|
|
|
|
|
CountadjustRequestMainApi.handle(row.id).then(() => { |
|
|
|
message.success(t('处理成功')) |
|
|
|
getLoading?.close() |
|
|
|
buttonBaseClick('refresh',null) |
|
|
|
}).catch(err => { |
|
|
|
getLoading?.close() |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
handleRow.value = row |
|
|
|
handleFormRef.value.open('update', row, null, '盘点调整申请-处理', '盘点调整申请-处理') |
|
|
|
} else if (val == 'edit') { // 编辑 |
|
|
|
openForm('update', row) |
|
|
|
} else if (val == 'delete') { // 删除 |
|
|
|
handleDelete(row.id) |
|
|
|
} |
|
|
|
} |
|
|
|
const handleRow = ref({}) |
|
|
|
const handleFormRef = ref() |
|
|
|
const submitFormHandle = async (formType, data) => { |
|
|
|
handleFormRef.value.formLoading = true |
|
|
|
try { |
|
|
|
await CountadjustRequestMainApi.handle({id:handleRow?.value?.id,remark:data.remark}) |
|
|
|
message.success(t('处理成功')) |
|
|
|
buttonBaseClick('refresh',null) |
|
|
|
} finally { |
|
|
|
handleFormRef.value.formLoading = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 添加/修改操作 */ |
|
|
|