|
@ -55,6 +55,7 @@ |
|
|
import { getAccessToken } from '@/utils/auth' |
|
|
import { getAccessToken } from '@/utils/auth' |
|
|
import download from '@/utils/download' |
|
|
import download from '@/utils/download' |
|
|
import * as PurchaseclaimRequestMainApi from '@/api/wms/purchaseclaimRequestMain' |
|
|
import * as PurchaseclaimRequestMainApi from '@/api/wms/purchaseclaimRequestMain' |
|
|
|
|
|
import * as SupplierdeliverRecordDetailApi from '@/api/wms/supplierdeliverRecordDetail' |
|
|
import * as PurchaseclaimRequestDetailApi from '@/api/wms/purchaseclaimRequestDetail' |
|
|
import * as PurchaseclaimRequestDetailApi from '@/api/wms/purchaseclaimRequestDetail' |
|
|
import { PurchaseclaimRequestMain, PurchaseclaimRequestMainRules, PurchaseclaimRequestDetail, PurchaseclaimRequestDetailRules } from './purchaseclaimRequestMain.data' |
|
|
import { PurchaseclaimRequestMain, PurchaseclaimRequestMainRules, PurchaseclaimRequestDetail, PurchaseclaimRequestDetailRules } from './purchaseclaimRequestMain.data' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
@ -79,10 +80,10 @@ |
|
|
|
|
|
|
|
|
// 查询页面返回 |
|
|
// 查询页面返回 |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { |
|
|
|
|
|
|
|
|
nextTick(() => { |
|
|
nextTick(() => { |
|
|
if (type == 'tableForm') { |
|
|
if (type == 'tableForm') { |
|
|
|
|
|
|
|
|
// 子表查询页赋值 |
|
|
// 子表查询页赋值 |
|
|
row[formField] = val[0][searchField] |
|
|
row[formField] = val[0][searchField] |
|
|
row['poLine'] = val[0]['poLine'] |
|
|
row['poLine'] = val[0]['poLine'] |
|
@ -99,11 +100,10 @@ |
|
|
// 主表查询页赋值 |
|
|
// 主表查询页赋值 |
|
|
const setV = {} |
|
|
const setV = {} |
|
|
setV[formField] = val[0][searchField] |
|
|
setV[formField] = val[0][searchField] |
|
|
|
|
|
|
|
|
if(formField=='asnNumber'){ |
|
|
if(formField=='asnNumber'){ |
|
|
// 获取子表数据 getBomDisassemble |
|
|
// 获取子表数据 getSupplierdeliverRecordDetailList |
|
|
PurchasePlanDetailApi.getPurchasePlanDetailList({ |
|
|
SupplierdeliverRecordDetailApi.getSupplierdeliverRecordDetailList({ |
|
|
number: val[0]['asnNumber']}).then(res => { |
|
|
asnNumber: val[0]['asnNumber']}).then(res => { |
|
|
if (res) tableData.value = res; |
|
|
if (res) tableData.value = res; |
|
|
tableData.value.forEach(item=>{ |
|
|
tableData.value.forEach(item=>{ |
|
|
item.batch = item.toBatch |
|
|
item.batch = item.toBatch |
|
@ -113,11 +113,6 @@ |
|
|
console.log(err) |
|
|
console.log(err) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setV['ppNumber'] = val[0]['ppNumber'] |
|
|
setV['ppNumber'] = val[0]['ppNumber'] |
|
|
setV['supplierCode'] = val[0]['supplierCode'] |
|
|
setV['supplierCode'] = val[0]['supplierCode'] |
|
|
formRef.setValues(setV) |
|
|
formRef.setValues(setV) |
|
@ -128,7 +123,7 @@ |
|
|
const searchTableSuccessDetail = (formField, searchField, val, formRef) => { |
|
|
const searchTableSuccessDetail = (formField, searchField, val, formRef) => { |
|
|
console.log(456) |
|
|
console.log(456) |
|
|
nextTick(() => { |
|
|
nextTick(() => { |
|
|
|
|
|
|
|
|
const setV = {} |
|
|
const setV = {} |
|
|
setV[formField] = val[0][searchField] |
|
|
setV[formField] = val[0][searchField] |
|
|
setV['poLine'] = val[0]['poLine'] |
|
|
setV['poLine'] = val[0]['poLine'] |
|
@ -189,14 +184,25 @@ |
|
|
// 列表-操作按钮 |
|
|
// 列表-操作按钮 |
|
|
const buttondata = (row) => { |
|
|
const buttondata = (row) => { |
|
|
return [ |
|
|
return [ |
|
|
defaultButtons.mainListCloseBtn({ hide: isShowMainButton(row, ['1', '2', '3', '4', '6']) }), // 关闭 |
|
|
defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), // 打开 |
|
|
defaultButtons.mainListReAddBtn({ hide: isShowMainButton(row, ['4', '5']) }), // 重新添加 |
|
|
defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1', '2', '4']) }), // 关闭 |
|
|
defaultButtons.mainListSubmitBtn({ hide: isShowMainButton(row, ['1']) }), // 提交审批 |
|
|
defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), // 提交审批 |
|
|
defaultButtons.mainListTurnDownBtn({ hide: isShowMainButton(row, ['2']) }), // 驳回 |
|
|
defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), // 审批通过 |
|
|
defaultButtons.mainListApproveBtn({ hide: isShowMainButton(row, ['2']) }), // 审批通过 |
|
|
defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), // 驳回按钮 |
|
|
defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchaseclaim-request-main:update' }), // 编辑 |
|
|
defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchaseclaim-request-main:update' }), // 编辑 |
|
|
defaultButtons.mainListDeleteBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchaseclaim-request-main:delete' }), // 删除 |
|
|
defaultButtons.mainListDeleteBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchaseclaim-request-main:delete' }), // 删除 |
|
|
defaultButtons.mainListPointBtn(null), // 打印 |
|
|
defaultButtons.mainListPointBtn(null), // 打印 |
|
|
|
|
|
// 生成记录 |
|
|
|
|
|
{ |
|
|
|
|
|
label: '处理', |
|
|
|
|
|
name: 'genRecords', |
|
|
|
|
|
hide: isShowMainButton(row, ['3']), |
|
|
|
|
|
type: 'primary', |
|
|
|
|
|
icon: '', |
|
|
|
|
|
color: '', |
|
|
|
|
|
hasPermi: '', |
|
|
|
|
|
link: true, // 文本展现按钮 |
|
|
|
|
|
}, |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -211,17 +217,19 @@ |
|
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
// 列表-操作按钮事件 |
|
|
const buttonTableClick = async (val, row) => { |
|
|
const buttonTableClick = async (val, row) => { |
|
|
if (val == 'mainClose') { // 关闭 |
|
|
if (val == 'mainPurPlanOpe') { // 打开 |
|
|
console.log('列表-操作按钮事件-关闭') |
|
|
handleOpe(row.id) |
|
|
} else if (val == 'mainReAdd') { // 重新添加 |
|
|
} else if (val == 'mainPurPlanClo') {// 关闭 |
|
|
console.log('列表-操作按钮事件-重新添加') |
|
|
handleClo(row.id) |
|
|
} else if (val == 'mainSubmit') { // 提交审批 |
|
|
} else if (val == 'mainPlanSub') { // 提交审批 |
|
|
console.log('列表-操作按钮事件-提交审批') |
|
|
handleSub(row.id) |
|
|
} else if (val == 'mainTurnDown') { // 驳回 |
|
|
} else if (val == 'mainPlanApp') { // 审批通过 |
|
|
console.log('列表-操作按钮事件-驳回') |
|
|
handleApp(row.id) |
|
|
} else if (val == 'mainApprove') { // 审批通过 |
|
|
} else if (val == 'mainPlanTur') { // 驳回按钮 |
|
|
console.log('列表-操作按钮事件-审批通过') |
|
|
handleTur(row.id) |
|
|
} else if (val == 'edit') { // 编辑 |
|
|
}else if (val == 'genRecords') { // 驳回按钮 |
|
|
|
|
|
genRecords(row.id) |
|
|
|
|
|
}else if (val == 'edit') { // 编辑 |
|
|
// const res = await ItempackagingApi.getItempackaging(row.id) |
|
|
// const res = await ItempackagingApi.getItempackaging(row.id) |
|
|
openForm('update', row) |
|
|
openForm('update', row) |
|
|
} else if (val == 'delete') { // 删除 |
|
|
} else if (val == 'delete') { // 删除 |
|
@ -260,6 +268,85 @@ |
|
|
await getList() |
|
|
await getList() |
|
|
} catch { } |
|
|
} catch { } |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 关闭按钮操作 */ |
|
|
|
|
|
const handleClo = async (id : number) => { |
|
|
|
|
|
try { |
|
|
|
|
|
// 关闭的二次确认 |
|
|
|
|
|
await message.confirm('是否关闭所选中数据?') |
|
|
|
|
|
// 发起关闭 |
|
|
|
|
|
await PurchaseclaimRequestMainApi.cloPurchaseclaimRequestMain(id) |
|
|
|
|
|
message.success(t('关闭成功!')) |
|
|
|
|
|
// 刷新列表 |
|
|
|
|
|
await getList() |
|
|
|
|
|
} catch { } |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 打开按钮操作 */ |
|
|
|
|
|
const handleOpe = async (id : number) => { |
|
|
|
|
|
try { |
|
|
|
|
|
// 打开的二次确认 |
|
|
|
|
|
await message.confirm('是否打开所选中数据?') |
|
|
|
|
|
// 发起打开 |
|
|
|
|
|
await PurchaseclaimRequestMainApi.opePurchaseclaimRequestMain(id) |
|
|
|
|
|
message.success(t('打开成功!')) |
|
|
|
|
|
// 刷新列表 |
|
|
|
|
|
await getList() |
|
|
|
|
|
} catch { } |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 提交审批按钮操作 */ |
|
|
|
|
|
const handleSub = async (id : number) => { |
|
|
|
|
|
try { |
|
|
|
|
|
// 提交审批的二次确认 |
|
|
|
|
|
await message.confirm('是否提交审批所选中数据?') |
|
|
|
|
|
// 发起提交审批 |
|
|
|
|
|
await PurchaseclaimRequestMainApi.subPurchaseclaimRequestMain(id) |
|
|
|
|
|
message.success(t('提交审批成功!')) |
|
|
|
|
|
// 刷新列表 |
|
|
|
|
|
await getList() |
|
|
|
|
|
} catch { } |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 审批通过按钮操作 */ |
|
|
|
|
|
const handleApp = async (id : number) => { |
|
|
|
|
|
try { |
|
|
|
|
|
// 审批通过的二次确认 |
|
|
|
|
|
await message.confirm('是否审批通过所选中数据?') |
|
|
|
|
|
// 发起审批通过 |
|
|
|
|
|
await PurchaseclaimRequestMainApi.appPurchaseclaimRequestMain(id) |
|
|
|
|
|
message.success(t('审批通过成功!')) |
|
|
|
|
|
// 刷新列表 |
|
|
|
|
|
await getList() |
|
|
|
|
|
} catch { } |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 驳回按钮操作 */ |
|
|
|
|
|
const handleTur = async (id : number) => { |
|
|
|
|
|
try { |
|
|
|
|
|
// 驳回的二次确认 |
|
|
|
|
|
await message.confirm('是否驳回所选中数据?') |
|
|
|
|
|
// 发起驳回 |
|
|
|
|
|
await PurchaseclaimRequestMainApi.rejPurchaseclaimRequestMain(id) |
|
|
|
|
|
message.success(t('驳回成功!')) |
|
|
|
|
|
// 刷新列表 |
|
|
|
|
|
await getList() |
|
|
|
|
|
} catch { } |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 处理按钮操作 */ |
|
|
|
|
|
const genRecords = async (id : number) => { |
|
|
|
|
|
try { |
|
|
|
|
|
// 处理的二次确认 |
|
|
|
|
|
await message.confirm('是否处理所选中数据?') |
|
|
|
|
|
// 发起处理 |
|
|
|
|
|
await PurchaseclaimRequestMainApi.genRecordsPurchaseclaimRequestMain(id) |
|
|
|
|
|
message.success(t('处理成功!')) |
|
|
|
|
|
// 刷新列表 |
|
|
|
|
|
await getList() |
|
|
|
|
|
} catch { } |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** 导出按钮操作 */ |
|
|
/** 导出按钮操作 */ |
|
|
const handleExport = async () => { |
|
|
const handleExport = async () => { |
|
|