Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into master_hella

master_hella_20240701
zhaoxuebing 6 months ago
parent
commit
87d8a9e387
  1. 2
      src/components/Table/src/Table.vue
  2. 53
      src/views/wms/purchasereceiptManage/putaway/putawayJobMain/index.vue
  3. 2
      src/views/wms/purchasereceiptManage/putaway/putawayJobMain/putawayJobMain.data.ts

2
src/components/Table/src/Table.vue

@ -200,7 +200,7 @@ export default defineComponent({
const { selection, reserveSelection, align, headerAlign,border } = unref(getProps)
//
return selection ? (
<ElTableColumn
<ElTableColumn fixed="left"
type="selection"
reserveSelection={reserveSelection}
align={align}

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

@ -17,7 +17,8 @@
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
<Table ref="tableRef" v-clientTable
:selection="true"
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
@ -27,6 +28,7 @@
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
@getSelectionRows="getSelectionRows"
>
<template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
@ -54,6 +56,7 @@
@searchTableSuccess="searchTableSuccess"
/>
<!-- 详情 -->
<Detail
ref="detailRef"
@ -161,6 +164,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultExportBtn({hasPermi:'wms:putaway-job-main:export'}), //
defaultButtons.mainLisSelectiontPointBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -186,12 +190,51 @@ const buttonBaseClick = (val, item) => {
} else {
getList()
}
} else if (val=='selection_point'){//
handleSelectionPoint()
} else if (val == 'filtrate') { //
} else { //
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) => {
if (val.indexOf(row.status) > -1) {
@ -208,6 +251,7 @@ const butttondata = (row,$index) => {
return []
}
return [
defaultButtons.mainListDocumentPrintBtn(null), //
// defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:close'}), //
// defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
@ -225,9 +269,14 @@ const buttonTableClick = async (val, row) => {
handleClose(row.masterId)
} else if (val == 'mainJobAcc') { //
console.log('列表-操作按钮事件-承接')
} else if (val == 'documentPrint') {
//
handleDocumentPrint(row.masterId)
}
}
const handleDocumentPrint = async (id) => {
alert('单据打印')
}
//
const detailParenPackingRef = ref()
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,
isForm: false,
table: {
width: 120,
width: 180,
fixed: 'right'
},
}

Loading…
Cancel
Save