|
|
@ -118,6 +118,7 @@ import { usePageLoading } from '@/hooks/web/usePageLoading' |
|
|
|
import { getBaseUrl, getJmreportBaseUrl } from '@/utils/systemParam' |
|
|
|
import { getAccessToken } from '@/utils/auth' |
|
|
|
import * as PackageApi from '@/api/wms/package' |
|
|
|
import { log } from 'console' |
|
|
|
|
|
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
|
// 备料计划 |
|
|
@ -272,25 +273,23 @@ const { tableObject, tableMethods } = useTable({ |
|
|
|
const { getList, setSearchParams } = tableMethods |
|
|
|
|
|
|
|
// 列表头部按钮 |
|
|
|
const HeadButttondata = [ |
|
|
|
const HeadButttondata = computed(()=>{ |
|
|
|
const button = [ |
|
|
|
//defaultButtons.defaultAddBtn({ hasPermi: 'wms:preparetoissue-main:create' }), // 新增 |
|
|
|
defaultButtons.defaultImportBtn({ hasPermi: 'wms:preparetoissue-main:import' }), // 导入 |
|
|
|
defaultButtons.defaultExportBtn({ hasPermi: 'wms:preparetoissue-main:export' }), // 导出 |
|
|
|
defaultButtons.mainLisSelectiontTrialResultBtn(null), // 批量试算 |
|
|
|
defaultButtons.mainLisSelectiontPointBtn(null), // 批量标签打印 |
|
|
|
// 批量标签打印 |
|
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
|
defaultButtons.defaultSetBtn(null) // 设置 |
|
|
|
// { |
|
|
|
// label: '自定义扩展按钮', |
|
|
|
// name: 'zdy', |
|
|
|
// hide: false, |
|
|
|
// type: 'primary', |
|
|
|
// icon: 'Select', |
|
|
|
// color: '' |
|
|
|
// }, |
|
|
|
] |
|
|
|
|
|
|
|
] |
|
|
|
if(selectionRows.value.length > 0 && selectionRows.value[0]?.selectionRows.length > 0 ){ |
|
|
|
button.push(defaultButtons.mainLisSelectiontPointBtn(null),defaultButtons.mainLisSelectiontTrialResultBtn(null)) |
|
|
|
}else{ |
|
|
|
button.push(defaultButtons.mainLisSelectiontPointBtn({type: 'info',}),defaultButtons.mainLisSelectiontTrialResultBtn({type: 'info',})) |
|
|
|
} |
|
|
|
return button |
|
|
|
}) |
|
|
|
// 头部按钮事件 |
|
|
|
const buttonBaseClick = (val, item) => { |
|
|
|
if (val == 'add') { |
|
|
@ -315,10 +314,13 @@ const buttonBaseClick = (val, item) => { |
|
|
|
} else if (val == 'filtrate') { |
|
|
|
// 筛选 |
|
|
|
} else if (val=='selection_point'){//批量打印 |
|
|
|
if(selectionRows.value.length > 0 && selectionRows.value[0]?.selectionRows.length > 0 ){ |
|
|
|
handleSelectionPoint() |
|
|
|
} |
|
|
|
}else if (val=='trial_result'){//批量试算 |
|
|
|
debugger |
|
|
|
if(selectionRows.value.length > 0 && selectionRows.value[0]?.selectionRows.length > 0 ){ |
|
|
|
handleSelectionTrialResult() |
|
|
|
} |
|
|
|
}else { |
|
|
|
// 其他按钮 |
|
|
|
console.log('其他按钮', item) |
|
|
@ -797,8 +799,8 @@ const handleSelectionTrialResult = async ()=>{ |
|
|
|
const selectionRows = ref<any>([]) |
|
|
|
const tableRef = ref() |
|
|
|
const getSelectionRows = (currentPage,currentPageSelectionRows) => { |
|
|
|
console.log("getSelectionRows",currentPage,currentPageSelectionRows) |
|
|
|
const currentRows = selectionRows.value.find(item=>item.currentPage==currentPage) |
|
|
|
console.log("getSelectionRows",currentPage,currentPageSelectionRows,currentRows,selectionRows.value) |
|
|
|
if(currentRows){ |
|
|
|
currentRows.selectionRows = currentPageSelectionRows |
|
|
|
}else{ |
|
|
|