|
|
@ -82,6 +82,9 @@ import { TransferissueRequestMain,TransferissueRequestMainRules,TransferissueReq |
|
|
|
import * as TransferissueRequestMainApi from '@/api/wms/transferissueRequestMain' |
|
|
|
import * as TransferissueRequestDetailApi from '@/api/wms/transferissueRequestDetail' |
|
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
import * as PurchasereturnRequestMainApi from "@/api/wms/purchasereturnRequestMain"; |
|
|
|
import {closeTransferissueRequestMain} from "@/api/wms/transferissueRequestMain"; |
|
|
|
import * as PurchasereceiptRequestMainApi from "@/api/wms/purchasereceiptRequestMain"; |
|
|
|
|
|
|
|
// 调拨出库申请 |
|
|
|
defineOptions({ name: 'TransferissueRequestMain' }) |
|
|
@ -104,13 +107,16 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
nextTick(() => { |
|
|
|
if (type == 'tableForm') { |
|
|
|
// 明细查询页赋值 |
|
|
|
row[formField] = val[0][searchField] |
|
|
|
row['packingNumber'] = val[0]['packingNumber'] |
|
|
|
row['containerNumber'] = val[0]['containerNumber'] |
|
|
|
row['batch'] = val[0]['batch'] |
|
|
|
row['inventoryStatus'] = val[0]['inventoryStatus'] |
|
|
|
row['toLocationCode'] = val[0]['locationCode'] |
|
|
|
row['itemCode'] = val[0]['itemCode'] |
|
|
|
if (formField == 'packingNumber') { |
|
|
|
row['packingNumber'] = val[0]['packingNumber'] |
|
|
|
row['containerNumber'] = val[0]['containerNumber'] |
|
|
|
row['batch'] = val[0]['batch'] |
|
|
|
row['inventoryStatus'] = val[0]['inventoryStatus'] |
|
|
|
row['fromLocationCode'] = val[0]['locationCode'] |
|
|
|
row['itemCode'] = val[0]['itemCode'] |
|
|
|
} else { |
|
|
|
row[formField] = val[0][searchField] |
|
|
|
} |
|
|
|
} else { |
|
|
|
const setV = {} |
|
|
|
setV[formField] = val[0][searchField] |
|
|
@ -122,13 +128,16 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { |
|
|
|
nextTick(() => { |
|
|
|
const setV = {} |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
setV['packingNumber'] = val[0]['packingNumber'] |
|
|
|
setV['containerNumber'] = val[0]['containerNumber'] |
|
|
|
setV['batch'] = val[0]['batch'] |
|
|
|
setV['inventoryStatus'] = val[0]['inventoryStatus'] |
|
|
|
setV['toLocationCode'] = val[0]['locationCode'] |
|
|
|
setV['itemCode'] = val[0]['itemCode'] |
|
|
|
if(formField == 'packingNumber'){ |
|
|
|
setV['packingNumber'] = val[0]['packingNumber'] |
|
|
|
setV['containerNumber'] = val[0]['containerNumber'] |
|
|
|
setV['batch'] = val[0]['batch'] |
|
|
|
setV['inventoryStatus'] = val[0]['inventoryStatus'] |
|
|
|
setV['fromLocationCode'] = val[0]['locationCode'] |
|
|
|
setV['itemCode'] = val[0]['itemCode'] |
|
|
|
}else { |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
} |
|
|
|
formRef.setValues(setV) |
|
|
|
}) |
|
|
|
} |
|
|
@ -190,13 +199,13 @@ const isShowMainButton = (row,val) => { |
|
|
|
// 列表-操作按钮 |
|
|
|
const butttondata = (row) => { |
|
|
|
return [ |
|
|
|
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), // 关闭 |
|
|
|
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), // 重新添加 |
|
|
|
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), // 提交审批 |
|
|
|
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), // 驳回 |
|
|
|
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // 审批通过 |
|
|
|
defaultButtons.mainListEditBtn({hasPermi:'wms:transferissue-request-main:update'}), // 编辑 |
|
|
|
defaultButtons.mainListDeleteBtn({hasPermi:'wms:transferissue-request-main:delete'}), // 删除 |
|
|
|
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:transferissue-request-main:close'}), // 关闭 |
|
|
|
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:transferissue-request-main:reAdd'}), // 重新添加 |
|
|
|
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:transferissue-request-main:submit'}), // 提交审批 |
|
|
|
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:transferissue-request-main:refused'}), // 驳回 |
|
|
|
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:transferissue-request-main:agree'}), // 审批通过 |
|
|
|
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:transferissue-request-main:handle'}), // 处理 |
|
|
|
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:transferissue-request-main:update'}), // 编辑 |
|
|
|
] |
|
|
|
} |
|
|
|
|
|
|
@ -206,14 +215,21 @@ const butttondata = (row) => { |
|
|
|
const buttonTableClick = async (val, row) => { |
|
|
|
if (val == 'mainClose') { // 关闭 |
|
|
|
console.log('列表-操作按钮事件-关闭') |
|
|
|
handleClose(row.id) |
|
|
|
} else if (val == 'mainReAdd') { // 重新添加 |
|
|
|
console.log('列表-操作按钮事件-重新添加') |
|
|
|
handleReAdd(row.id) |
|
|
|
} else if (val == 'mainSubmit') { // 提交审批 |
|
|
|
console.log('列表-操作按钮事件-提交审批') |
|
|
|
handleSubmit(row.id) |
|
|
|
} else if (val == 'mainTurnDown') { // 驳回 |
|
|
|
console.log('列表-操作按钮事件-驳回') |
|
|
|
handleRefused(row.id) |
|
|
|
} else if (val == 'mainApprove') { // 审批通过 |
|
|
|
console.log('列表-操作按钮事件-审批通过') |
|
|
|
handleAgree(row.id) |
|
|
|
} else if (val == 'mainHandle') { // 处理 |
|
|
|
handleHandle(row.id) |
|
|
|
} else if (val == 'edit') { // 编辑 |
|
|
|
openForm('update', row) |
|
|
|
} else if (val == 'delete') { // 删除 |
|
|
@ -221,6 +237,66 @@ const buttonTableClick = async (val, row) => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 关闭按钮操作 */ |
|
|
|
const handleClose = async (id: number) => { |
|
|
|
try { |
|
|
|
await message.confirm(t('common.confirmColse')) |
|
|
|
await TransferissueRequestMainApi.closeTransferissueRequestMain(id) |
|
|
|
message.success(t('common.closeSuccess')) |
|
|
|
await getList() |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
|
/** 重新添加按钮操作 */ |
|
|
|
const handleReAdd = async (id: number) => { |
|
|
|
try { |
|
|
|
await message.confirm(t('common.confirmReAdd')) |
|
|
|
await TransferissueRequestMainApi.reAddTransferissueRequestMain(id) |
|
|
|
message.success(t('common.reAddSuccess')) |
|
|
|
await getList() |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
|
/** 提交按钮操作 */ |
|
|
|
const handleSubmit = async (id: number) => { |
|
|
|
try { |
|
|
|
await message.confirm(t('common.confirmSubmit')) |
|
|
|
await TransferissueRequestMainApi.submitTransferissueRequestMain(id) |
|
|
|
message.success(t('common.submitSuccess')) |
|
|
|
await getList() |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
|
/** 审批驳回按钮操作 */ |
|
|
|
const handleRefused = async (id: number) => { |
|
|
|
try { |
|
|
|
await message.confirm(t('common.confirmRefused')) |
|
|
|
await TransferissueRequestMainApi.refusedTransferissueRequestMain(id) |
|
|
|
message.success(t('common.refusedSuccess')) |
|
|
|
await getList() |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
|
/** 审批通过按钮操作 */ |
|
|
|
const handleAgree = async (id: number) => { |
|
|
|
try { |
|
|
|
await message.confirm(t('common.confirmAgree')) |
|
|
|
await TransferissueRequestMainApi.agreeTransferissueRequestMain(id) |
|
|
|
message.success(t('common.agreeSuccess')) |
|
|
|
await getList() |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
|
/** 处理按钮操作 */ |
|
|
|
const handleHandle = async (id: number) => { |
|
|
|
try { |
|
|
|
await message.confirm(t('common.confirmHandle')) |
|
|
|
await TransferissueRequestMainApi.handleTransferissueRequestMain(id) |
|
|
|
message.success(t('common.handleSuccess')) |
|
|
|
await getList() |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
|
/** 添加/修改操作 */ |
|
|
|
const formRef = ref() |
|
|
|
const openForm =async (type: string, row?: number) => { |
|
|
|