|
|
@ -174,6 +174,7 @@ defaultButtons.defaultExportBtn({hasPermi:'wms:demandforecasting-main:export'}), |
|
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
|
// defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
|
|
defaultButtons.mainListSelectionOrderPubBtn(null), // 批量发布按钮 |
|
|
|
] |
|
|
|
|
|
|
|
// 头部按钮事件 |
|
|
@ -195,6 +196,8 @@ const buttonBaseClick = async (val, item) => { |
|
|
|
} else if (val == 'filtrate') { // 筛选 |
|
|
|
} else if (val == 'selectionPlan') { // 批量生成要货计划 |
|
|
|
selectionPlan() |
|
|
|
} else if (val == 'mainOrderSelectionPub') { // 批量发布要货计划 |
|
|
|
handleSelectionPublish() |
|
|
|
} else { // 其他按钮 |
|
|
|
console.log('其他按钮', item) |
|
|
|
} |
|
|
@ -357,6 +360,41 @@ const getSelectionRowsPlan = (currentPage, currentPageSelectionRows) => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 批量发布 |
|
|
|
const handleSelectionPublish = async ()=>{ |
|
|
|
tableObject.loading = true |
|
|
|
let rows: any = [] |
|
|
|
selectionRows.value.forEach((item) => { |
|
|
|
rows = [...rows, ...item.selectionRows.map((item1) => item1.mainId)] |
|
|
|
}) |
|
|
|
console.log('批量生成要货计划', rows.join(',')) |
|
|
|
let ids = rows.join(',') |
|
|
|
await DemandforecastingMainApi.batchPublish(ids) |
|
|
|
.then((res) => { |
|
|
|
// if (res?.status == '2') { |
|
|
|
// message.error(res.message) |
|
|
|
// } else { |
|
|
|
// message.success(res.message) |
|
|
|
// } |
|
|
|
console.log('获取到的数据',res); |
|
|
|
message.success(res.message) |
|
|
|
tableObject.loading = false |
|
|
|
buttonBaseClick('refresh', null) |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
tableObject.loading = false |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
// await PackageApi.batchPrintingLable(rows.join(',')).then(res => { |
|
|
|
// console.log(res) |
|
|
|
// window.open(srcPoint.value+'&relateNumber='+res) |
|
|
|
// message.success('创建标签成功') |
|
|
|
// }).catch(err => { |
|
|
|
// console.log(err) |
|
|
|
// message.error('创建标签失败') |
|
|
|
// }) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|