Browse Source

YT-1950批量打印备料单,取消勾选不生效,再次打印还会打印出来

intex_online20250220
张立 1 month ago
parent
commit
68f300388f
  1. 53
      src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue

53
src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue

@ -37,6 +37,8 @@
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
@getSelectionRows="getSelectionRows"
row-key="id"
:reserve-selection="true"
>
<template #number="{ row }">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
@ -283,7 +285,7 @@ const HeadButttondata = computed(()=>{
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) //
]
if(selectionRows.value.length > 0 && selectionRows.value[0]?.selectionRows.length > 0 ){
if(selectionRows.value.length > 0 ){
button.push(defaultButtons.mainLisSelectiontPointBtn(null),defaultButtons.mainLisSelectiontTrialResultBtn(null))
}else{
button.push(defaultButtons.mainLisSelectiontPointBtn({type: 'info',}),defaultButtons.mainLisSelectiontTrialResultBtn({type: 'info',}))
@ -314,8 +316,9 @@ const buttonBaseClick = (val, item) => {
} else if (val == 'filtrate') {
//
} else if (val == 'selection_point') {//
if (selectionRows.value.length > 0 && selectionRows.value[0]?.selectionRows.length > 0) {
const trialResultList = selectionRows.value[0]?.selectionRows.filter(item => item.trialResult == 0 || item.trialResult == 2)
console.log(selectionRows.value)
if (selectionRows.value.length > 0 ) {
const trialResultList = selectionRows.value.filter(item => item.trialResult == 0 || item.trialResult == 2)
let str = ''
if (trialResultList.length > 0) {
str=Array.from(new Set(trialResultList.map(item=>item.number))).join('、')
@ -324,9 +327,9 @@ const buttonBaseClick = (val, item) => {
}
handleSelectionPoint()
}
}else if (val=='trial_result'){//
if (selectionRows.value.length > 0 && selectionRows.value[0]?.selectionRows.length > 0) {
const trialResultList = selectionRows.value[0]?.selectionRows.filter(item => item.trialResult == 1)
} else if (val == 'trial_result') {//
if (selectionRows.value.length > 0) {
const trialResultList = selectionRows.value.filter(item => item.trialResult == 1)
let str = ''
if (trialResultList.length > 0) {
str=Array.from(new Set(trialResultList.map(item=>item.number))).join('、')
@ -760,15 +763,14 @@ const resetShow = async () => {
const src = ref(BASE_URL + '/jmreport/view/924811818898698240?token=' + getAccessToken())
const srcPoint = ref(BASE_URL + '/jmreport/view/940818992169918464?token=' + getAccessToken())
const masterIds = new Set();
let masterIds = new Set();
//
const handleSelectionPoint = ()=>{
selectionRows.value.forEach(item=>{
item.selectionRows.forEach(obj => {
if (obj.masterId) {
const handleSelectionPoint = () => {
masterIds = new Set();
selectionRows.value.forEach(obj=>{
if (obj.masterId) {
masterIds.add(obj.masterId);
}
});
})
// masterIds
const idsArray = Array.from(masterIds);
@ -782,9 +784,7 @@ idsArray.forEach(id => {
//
const handleSelectionTrialResult = async ()=>{
let rows:any = []
selectionRows.value.forEach(item=>{
rows = [...rows,...item.selectionRows.map(item1=>item1.number)]
})
selectionRows.value.map(item=>item.number)
console.log('批量试算',rows.join(','))
await PreparetoissueMainApi.batchGenerateIssueRequest(rows.join(','))
.then((res) => {
@ -813,17 +813,18 @@ const handleSelectionTrialResult = async ()=>{
const selectionRows = ref<any>([])
const tableRef = ref()
const 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{
selectionRows.value.push({
currentPage,
selectionRows:currentPageSelectionRows
})
}
const getSelectionRows = (currentPage, currentPageSelectionRows) => {
selectionRows.value = currentPageSelectionRows
// const currentRows = selectionRows.value.find(item => item.currentPage == currentPage)
// console.log(currentPageSelectionRows)
// if(currentRows){
// currentRows.selectionRows = currentPageSelectionRows
// }else{
// selectionRows.value.push({
// currentPage,
// selectionRows:currentPageSelectionRows
// })
// }
}
/** 初始化 **/
onMounted(async () => {

Loading…
Cancel
Save