Browse Source

上架任务,批量打印

master_hella_20240701
yufei0306 6 months ago
parent
commit
a1fc7da56f
  1. 53
      src/views/wms/purchasereceiptManage/putaway/putawayJobMain/index.vue
  2. 2
      src/views/wms/purchasereceiptManage/putaway/putawayJobMain/putawayJobMain.data.ts

53
src/views/wms/purchasereceiptManage/putaway/putawayJobMain/index.vue

@ -17,7 +17,8 @@
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<Table v-clientTable <Table ref="tableRef" v-clientTable
:selection="true"
:columns="tableColumns" :columns="tableColumns"
:data="tableObject.tableList" :data="tableObject.tableList"
:loading="tableObject.loading" :loading="tableObject.loading"
@ -27,6 +28,7 @@
v-model:pageSize="tableObject.pageSize" v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
@getSelectionRows="getSelectionRows"
> >
<template #number="{row}"> <template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> <el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
@ -54,6 +56,7 @@
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
/> />
<!-- 详情 --> <!-- 详情 -->
<Detail <Detail
ref="detailRef" ref="detailRef"
@ -161,6 +164,7 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultExportBtn({hasPermi:'wms:putaway-job-main:export'}), // defaultButtons.defaultExportBtn({hasPermi:'wms:putaway-job-main:export'}), //
defaultButtons.mainLisSelectiontPointBtn(null), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
@ -186,12 +190,51 @@ const buttonBaseClick = (val, item) => {
} else { } else {
getList() getList()
} }
} else if (val=='selection_point'){//
handleSelectionPoint()
} else if (val == 'filtrate') { // } else if (val == 'filtrate') { //
} else { // } else { //
console.log('其他按钮', item) console.log('其他按钮', item)
} }
} }
watch(
() => tableObject.tableList,
() => {
const currentRows = selectionRows.value.find(item=>item.currentPage==tableObject.currentPage)
if(currentRows){
nextTick(() => {
currentRows.selectionRows.forEach(item=>{
tableRef.value.toggleRowSelection(item,true)
})
})
}
}
)
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)
if(currentRows){
currentRows.selectionRows = currentPageSelectionRows
}else{
selectionRows.value.push({
currentPage,
selectionRows:currentPageSelectionRows
})
}
}
const handleSelectionPoint = async ()=>{
let rows:any = []
selectionRows.value.forEach(item=>{
rows = [...rows,...item.selectionRows.map(item1=>item1.packingNumber)]
})
console.log('批量打印',rows.join(','))
// window.open(srcPoint.value+'&relateNumber='+rows.join(','))
}
// //
const isShowMainButton = (row,val) => { const isShowMainButton = (row,val) => {
if (val.indexOf(row.status) > -1) { if (val.indexOf(row.status) > -1) {
@ -208,6 +251,7 @@ const butttondata = (row,$index) => {
return [] return []
} }
return [ return [
defaultButtons.mainListDocumentPrintBtn(null), //
// defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // // defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:close'}), // defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:close'}), //
// defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // // defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
@ -225,9 +269,14 @@ const buttonTableClick = async (val, row) => {
handleClose(row.masterId) handleClose(row.masterId)
} else if (val == 'mainJobAcc') { // } else if (val == 'mainJobAcc') { //
console.log('列表-操作按钮事件-承接') console.log('列表-操作按钮事件-承接')
} else if (val == 'documentPrint') {
//
handleDocumentPrint(row.masterId)
} }
} }
const handleDocumentPrint = async (id) => {
alert('单据打印')
}
// //
const detailParenPackingRef = ref() const detailParenPackingRef = ref()
const { tableObject: packingDetatableData, tableMethods: packDetatableMethods } = useTable({ const { tableObject: packingDetatableData, tableMethods: packDetatableMethods } = useTable({

2
src/views/wms/purchasereceiptManage/putaway/putawayJobMain/putawayJobMain.data.ts

@ -560,7 +560,7 @@ export const PutawayJobMain = useCrudSchemas(reactive<CrudSchema[]>([
isDetail: false, isDetail: false,
isForm: false, isForm: false,
table: { table: {
width: 120, width: 180,
fixed: 'right' fixed: 'right'
}, },
} }

Loading…
Cancel
Save