|
|
@ -33,7 +33,7 @@ |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
<template #action="{ row,$index }"> |
|
|
|
<ButtonBaseMore :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" /> |
|
|
|
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" /> |
|
|
|
</template> |
|
|
|
</Table> |
|
|
|
</ContentWrap> |
|
|
@ -71,10 +71,23 @@ |
|
|
|
:apiDelete="CountadjustRequestDetailApi.deleteCountadjustRequestDetail" |
|
|
|
fromeWhere="countadjustRequest" |
|
|
|
:detailButtonIsShowAdd="false" |
|
|
|
:detailButtonIsShowEdit="false" |
|
|
|
:detailButtonIsShowDelete="true" |
|
|
|
:detailButtonIsShowAddStatusArray="['1','2','3','4','6','7']" |
|
|
|
:Echo="Echo" |
|
|
|
@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" /> |
|
|
@ -83,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' |
|
|
@ -193,11 +206,11 @@ const butttondata = (row,$index) => { |
|
|
|
|
|
|
|
return [ |
|
|
|
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:countadjust-request-main:close'}), // 关闭 |
|
|
|
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:countadjust-request-main:reAdd'}), //重新添加 |
|
|
|
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.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:countadjust-request-main:reAdd'}), //重新添加 |
|
|
|
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'}), // 处理 |
|
|
|
] |
|
|
|
} |
|
|
|
// 列表-操作按钮事件 |
|
|
@ -258,27 +271,29 @@ 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) |
|
|
|
handleFormRef.value.dialogVisible = false |
|
|
|
|
|
|
|
} finally { |
|
|
|
handleFormRef.value.formLoading = false |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 添加/修改操作 */ |
|
|
|