|
@ -35,12 +35,17 @@ |
|
|
@searchTableSuccess="searchTableSuccess" @submitForm="submitForm" /> |
|
|
@searchTableSuccess="searchTableSuccess" @submitForm="submitForm" /> |
|
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
<!-- 详情 --> |
|
|
<Detail ref="detailRef" :isBasic="false" :allSchemas="PurchasePlanMain.allSchemas" |
|
|
<Detail |
|
|
:detailAllSchemas="PurchasePlanDetail.allSchemas" :detailAllSchemasRules="PurchasePlanDetailRules" |
|
|
ref="detailRef" |
|
|
|
|
|
:isBasic="false" |
|
|
|
|
|
:allSchemas="PurchasePlanMain.allSchemas" |
|
|
|
|
|
:detailAllSchemas="PurchasePlanDetail.allSchemas" |
|
|
|
|
|
:detailAllSchemasRules="PurchasePlanDetailRules" |
|
|
:apiCreate="PurchasePlanDetailApi.createPurchasePlanDetail" |
|
|
:apiCreate="PurchasePlanDetailApi.createPurchasePlanDetail" |
|
|
:apiUpdate="PurchasePlanDetailApi.updatePurchasePlanDetail" |
|
|
:apiUpdate="PurchasePlanDetailApi.updatePurchasePlanDetail" |
|
|
:apiPage="PurchasePlanDetailApi.getPurchasePlanDetailPage" |
|
|
:apiPage="PurchasePlanDetailApi.getPurchasePlanDetailPage" |
|
|
:apiDelete="PurchasePlanDetailApi.deletePurchasePlanDetail" @searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
:apiDelete="PurchasePlanDetailApi.deletePurchasePlanDetail" |
|
|
|
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
:detailValidate="detailValidate" /> |
|
|
:detailValidate="detailValidate" /> |
|
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
<!-- 导入 --> |
|
@ -55,6 +60,7 @@ |
|
|
import * as PurchasePlanDetailApi from '@/api/wms/purchasePlanDetail' |
|
|
import * as PurchasePlanDetailApi from '@/api/wms/purchasePlanDetail' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import * as PurchaseDetailApi from '@/api/wms/purchaseDetail' |
|
|
import * as PurchaseDetailApi from '@/api/wms/purchaseDetail' |
|
|
|
|
|
import {mainListPurchasePlanModBtn} from "@/utils/disposition/defaultButtons"; |
|
|
|
|
|
|
|
|
// 要货计划 |
|
|
// 要货计划 |
|
|
defineOptions({ name: 'PurchasePlanMain' }) |
|
|
defineOptions({ name: 'PurchasePlanMain' }) |
|
@ -191,6 +197,7 @@ |
|
|
defaultButtons.mainListPurchasePlanAccBtn({ hide: isShowMainButton(row, ['3']) }), // 接受 |
|
|
defaultButtons.mainListPurchasePlanAccBtn({ hide: isShowMainButton(row, ['3']) }), // 接受 |
|
|
defaultButtons.mainListPurchasePlanRejBtn({ hide: isShowMainButton(row, ['3']) }), // 不接受 |
|
|
defaultButtons.mainListPurchasePlanRejBtn({ hide: isShowMainButton(row, ['3']) }), // 不接受 |
|
|
defaultButtons.mainListPurchasePlanWitBtn({ hide: isShowMainButton(row, ['3']) }), // 下架 |
|
|
defaultButtons.mainListPurchasePlanWitBtn({ hide: isShowMainButton(row, ['3']) }), // 下架 |
|
|
|
|
|
defaultButtons.mainListPurchasePlanModBtn({ hide: isShowMainButton(row, ['5']) }), // 修改 |
|
|
// defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchase-plan-main:update' }), // 编辑 |
|
|
// defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchase-plan-main:update' }), // 编辑 |
|
|
// defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchase-plan-main:delete'}), // 删除 |
|
|
// defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchase-plan-main:delete'}), // 删除 |
|
|
] |
|
|
] |
|
@ -210,6 +217,8 @@ |
|
|
handleRej(row.id) |
|
|
handleRej(row.id) |
|
|
} else if (val == 'mainPurPlanWit') { // 下架 |
|
|
} else if (val == 'mainPurPlanWit') { // 下架 |
|
|
handleWit(row.id) |
|
|
handleWit(row.id) |
|
|
|
|
|
} else if(val == 'mainPurPlanMod'){ // 修改 |
|
|
|
|
|
handleReOpen(row.id) |
|
|
}else if (val == 'edit') { // 编辑 |
|
|
}else if (val == 'edit') { // 编辑 |
|
|
openForm('update', row) |
|
|
openForm('update', row) |
|
|
} else if (val == 'delete') { // 删除 |
|
|
} else if (val == 'delete') { // 删除 |
|
@ -269,6 +278,20 @@ |
|
|
} catch { } |
|
|
} catch { } |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 打开按钮操作 */ |
|
|
|
|
|
const handleReOpen = async (id : number) => { |
|
|
|
|
|
try { |
|
|
|
|
|
// 打开的二次确认 |
|
|
|
|
|
await message.confirm('是否重新打开所选中数据?') |
|
|
|
|
|
// 发起打开 |
|
|
|
|
|
await PurchasePlanMainApi.openPurchasePlanMain(id) |
|
|
|
|
|
message.success(t('打开成功!')) |
|
|
|
|
|
// 刷新列表 |
|
|
|
|
|
await getList() |
|
|
|
|
|
} catch { } |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** 发布按钮操作 */ |
|
|
/** 发布按钮操作 */ |
|
|
const handlePublish = async (id : number) => { |
|
|
const handlePublish = async (id : number) => { |
|
|
try { |
|
|
try { |
|
@ -391,9 +414,9 @@ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 子表新增/编辑校验 |
|
|
// 子表新增/编辑校验 |
|
|
const detailValidate = (data) => { |
|
|
const detailValidate = async (data) => { |
|
|
let tag = false |
|
|
let tag = false |
|
|
PurchaseDetailApi.getPurchaseDetailPage({ |
|
|
await PurchaseDetailApi.getPurchaseDetailPage({ |
|
|
number: data.poNumber, |
|
|
number: data.poNumber, |
|
|
lineNumber: data.poLine |
|
|
lineNumber: data.poLine |
|
|
}).then(res => { |
|
|
}).then(res => { |
|
@ -403,6 +426,8 @@ |
|
|
} else { |
|
|
} else { |
|
|
tag = true |
|
|
tag = true |
|
|
} |
|
|
} |
|
|
|
|
|
}).catch(err =>{ |
|
|
|
|
|
console.log(err); |
|
|
}) |
|
|
}) |
|
|
return tag |
|
|
return tag |
|
|
} |
|
|
} |
|
|