|
|
@ -130,7 +130,6 @@ import * as ItembasicApi from "@/api/wms/itembasic"; |
|
|
|
import * as PackageApi from "@/api/wms/package"; |
|
|
|
import { formatTime } from '@/utils/index' |
|
|
|
import { getAccessToken } from '@/utils/auth' |
|
|
|
import * as StdcostpriceApi from '@/api/wms/stdcostprice' |
|
|
|
import { getJmreportBaseUrl } from '@/utils/systemParam' |
|
|
|
|
|
|
|
// 计划外入库申请 |
|
|
@ -384,14 +383,14 @@ const butttondata = (row,$index) => { |
|
|
|
{ |
|
|
|
label: '创建标签', |
|
|
|
name: 'cjbq', |
|
|
|
hide: isShowMainButton(row,['3']), |
|
|
|
hide: isShowMainButton(row,['1']), |
|
|
|
type: 'primary', |
|
|
|
icon: '', |
|
|
|
color: '', |
|
|
|
hasPermi: '', |
|
|
|
link: true, // 文本展现按钮 |
|
|
|
}, |
|
|
|
defaultButtons.mainListPointBtn({ hide: isShowMainButton(row, ['3','6','8']) }), // 标签打印 |
|
|
|
defaultButtons.mainListPointBtn({ hide: isShowMainButton(row, ['1','3','6','8']) }), // 标签打印 |
|
|
|
] |
|
|
|
} |
|
|
|
|
|
|
@ -503,50 +502,70 @@ const buttonTableClick = async (val, row) => { |
|
|
|
const handleClose = async (id: number) => { |
|
|
|
await message.confirm(t('common.confirmColse')) |
|
|
|
tableObject.loading = true |
|
|
|
await UnplannedreceiptRequestMainApi.closeUnplannedreceiptRequestMain(id) |
|
|
|
message.success(t('common.closeSuccess')) |
|
|
|
tableObject.loading = false |
|
|
|
await getList() |
|
|
|
try{ |
|
|
|
await UnplannedreceiptRequestMainApi.closeUnplannedreceiptRequestMain(id) |
|
|
|
message.success(t('common.closeSuccess')) |
|
|
|
tableObject.loading = false |
|
|
|
await getList() |
|
|
|
}catch{ |
|
|
|
tableObject.loading = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 重新添加按钮操作 */ |
|
|
|
const handleReAdd = async (id: number) => { |
|
|
|
await message.confirm(t('common.confirmReAdd')) |
|
|
|
tableObject.loading = true |
|
|
|
await UnplannedreceiptRequestMainApi.reAddUnplannedreceiptRequestMain(id) |
|
|
|
message.success(t('common.reAddSuccess')) |
|
|
|
tableObject.loading = false |
|
|
|
await getList() |
|
|
|
try{ |
|
|
|
await UnplannedreceiptRequestMainApi.reAddUnplannedreceiptRequestMain(id) |
|
|
|
message.success(t('common.reAddSuccess')) |
|
|
|
tableObject.loading = false |
|
|
|
await getList() |
|
|
|
}catch{ |
|
|
|
tableObject.loading = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 提交按钮操作 */ |
|
|
|
const handleSubmit = async (id: number) => { |
|
|
|
await message.confirm(t('common.confirmSubmit')) |
|
|
|
tableObject.loading = true |
|
|
|
await UnplannedreceiptRequestMainApi.submitUnplannedreceiptRequestMain(id) |
|
|
|
message.success(t('common.submitSuccess')) |
|
|
|
tableObject.loading = false |
|
|
|
await getList() |
|
|
|
try{ |
|
|
|
await UnplannedreceiptRequestMainApi.submitUnplannedreceiptRequestMain(id) |
|
|
|
message.success(t('common.submitSuccess')) |
|
|
|
tableObject.loading = false |
|
|
|
await getList() |
|
|
|
}catch{ |
|
|
|
tableObject.loading = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 审批驳回按钮操作 */ |
|
|
|
const handleRefused = async (id: number) => { |
|
|
|
await message.confirm(t('common.confirmRefused')) |
|
|
|
tableObject.loading = true |
|
|
|
await UnplannedreceiptRequestMainApi.refusedUnplannedreceiptRequestMain(id) |
|
|
|
message.success(t('common.refusedSuccess')) |
|
|
|
tableObject.loading = false |
|
|
|
await getList() |
|
|
|
try{ |
|
|
|
await UnplannedreceiptRequestMainApi.refusedUnplannedreceiptRequestMain(id) |
|
|
|
message.success(t('common.refusedSuccess')) |
|
|
|
tableObject.loading = false |
|
|
|
await getList() |
|
|
|
}catch{ |
|
|
|
tableObject.loading = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 审批通过按钮操作 */ |
|
|
|
const handleAgree = async (id: number) => { |
|
|
|
await message.confirm(t('common.confirmAgree')) |
|
|
|
tableObject.loading = true |
|
|
|
await UnplannedreceiptRequestMainApi.agreeUnplannedreceiptRequestMain(id) |
|
|
|
message.success(t('common.agreeSuccess')) |
|
|
|
tableObject.loading = false |
|
|
|
await getList() |
|
|
|
try{ |
|
|
|
await UnplannedreceiptRequestMainApi.agreeUnplannedreceiptRequestMain(id) |
|
|
|
message.success(t('common.agreeSuccess')) |
|
|
|
tableObject.loading = false |
|
|
|
await getList() |
|
|
|
}catch{ |
|
|
|
tableObject.loading = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 处理按钮操作 */ |
|
|
@ -557,7 +576,6 @@ const handleHandle = async (id: number) => { |
|
|
|
await UnplannedreceiptRequestMainApi.handleUnplannedreceiptRequestMain(id) |
|
|
|
message.success(t('common.handleSuccess')) |
|
|
|
await getList() |
|
|
|
|
|
|
|
} finally { |
|
|
|
tableObject.loading = false |
|
|
|
} |
|
|
@ -566,7 +584,6 @@ const handleHandle = async (id: number) => { |
|
|
|
/** 添加/修改操作 */ |
|
|
|
const formRef = ref() |
|
|
|
const openForm =async (type: string, row?: number) => { |
|
|
|
|
|
|
|
UnplannedreceiptRequestMain.allSchemas.formSchema.forEach((item) => { |
|
|
|
if(type == "update"){ |
|
|
|
if (item.field == 'costCenterCode') { |
|
|
|