diff --git a/src/views/wms/inventoryjobManage/containermanage/createContainerRecordMain/createContainerRecordMain.data.ts b/src/views/wms/inventoryjobManage/containermanage/createContainerRecordMain/createContainerRecordMain.data.ts index 8b65a711b..fced84e20 100644 --- a/src/views/wms/inventoryjobManage/containermanage/createContainerRecordMain/createContainerRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/containermanage/createContainerRecordMain/createContainerRecordMain.data.ts @@ -39,7 +39,6 @@ export const ContainerRecordMain = useCrudSchemas(reactive([ sort: 'custom', dictType: DICT_TYPE.CONTAIN_MANAGE_TYPE, dictClass: 'string', - isSearch: true, isTable: true, table: { width: 120 diff --git a/src/views/wms/inventoryjobManage/containermanage/createContainerRecordMain/index.vue b/src/views/wms/inventoryjobManage/containermanage/createContainerRecordMain/index.vue index c3885d7de..571136246 100644 --- a/src/views/wms/inventoryjobManage/containermanage/createContainerRecordMain/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/createContainerRecordMain/index.vue @@ -1,7 +1,11 @@ - - - - - item.field != "fromLocationCode") -// ContainerRecordDetailAllSchemas.value.tableMainColumns = array -// tableColumns.value = [...ContainerRecordMain.allSchemas.tableColumns,...ContainerRecordDetailAllSchemas.value.tableMainColumns] -// } -// else { -// ContainerRecordDetail.allSchemas.tableMainColumns =JSON.parse(JSON.stringify(ContainerRecordDetail.allSchemas.tableMainColumns)) -// tableColumns.value = [...ContainerRecordMain.allSchemas.tableColumns,...ContainerRecordDetail.allSchemas.tableMainColumns] -// } - +tableObject.params = { + type:'CREATE' +} +importFileName.value = '器具新增记录' // 字段设置 更新主列表字段 @@ -135,26 +101,11 @@ const HeadButttondata = [ defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 - // { - // label: '自定义扩展按钮', - // name: 'zdy', - // hide: false, - // type: 'primary', - // icon: 'Select', - // color: '' - // }, ] -const searchList = (model)=>{ - model.type = searchType.value - setSearchParams(model) -} - // 头部按钮事件 const buttonBaseClick = (val, item) => { - if (val == 'add') { // 新增 - openForm('create') - } else if (val == 'export') { // 导出 + if (val == 'export') { // 导出 handleExport() } else if (val == 'refresh') { // 刷新 if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { @@ -169,28 +120,6 @@ const buttonBaseClick = (val, item) => { console.log('其他按钮', item) } } - -// 列表-操作按钮 -const butttondata = (row,$index) => { -const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 - if(findIndex>-1&&findIndex<$index){ - return [] - } - return [ - // defaultButtons.mainListEditBtn({hasPermi:`wms:{routeName.value}:update`}), // 编辑 - // defaultButtons.mainListDeleteBtn({hasPermi:`wms:{routeName.value}:delete`}), // 删除 - ] -} - -// 列表-操作按钮事件 -const buttonTableClick = async (val, row) => { - if (val == 'edit') { // 编辑 - openForm('update', row) - } else if (val == 'delete') { // 删除 - handleDelete(row.id) - } -} - // 获取部门 用于详情 部门回显 const { wsCache } = useCache() /** 详情操作 */ @@ -201,24 +130,8 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { detailRef.value.openDetail(row, titleName, titleValue,"recordContainerMain") } -/** 添加/修改操作 */ -const basicFormRef = ref() -const openForm = (type: string, row?: any) => { - basicFormRef.value.open(type, row) -} -/** 删除按钮操作 */ -const handleDelete = async (id: number) => { - try { - // 删除的二次确认 - await message.delConfirm() - // 发起删除 - await ContainerRecordMainApi.deleteContainerRecordMain(id) - message.success(t('common.delSuccess')) - // 刷新列表 - buttonBaseClick('refresh',null) - } catch {} -} + /** 导出按钮操作 */ const handleExport = async () => { @@ -241,7 +154,7 @@ const searchFormClick = (searchData) => { const cmd = { 'column':'type', 'action':'==', - 'value': 'CREATE' + 'value':'CREATE' } if (!Array.isArray(searchData.filters)) { searchData.filters = []; diff --git a/src/views/wms/inventoryjobManage/containermanage/initialContainerRecordMain/index.vue b/src/views/wms/inventoryjobManage/containermanage/initialContainerRecordMain/index.vue index 4c4d90738..c8a01b99a 100644 --- a/src/views/wms/inventoryjobManage/containermanage/initialContainerRecordMain/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/initialContainerRecordMain/index.vue @@ -142,7 +142,7 @@ const handleExport = async () => { loadStart() const excelTitle = ref(route.meta.title) const data = await ContainerRecordMainApi.exportContainerInitRecordMain(tableObject.params) - download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { loadDone() diff --git a/src/views/wms/inventoryjobManage/containermanage/moveContainerRecordMain/index.vue b/src/views/wms/inventoryjobManage/containermanage/moveContainerRecordMain/index.vue index 0d04831a3..922e87f07 100644 --- a/src/views/wms/inventoryjobManage/containermanage/moveContainerRecordMain/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/moveContainerRecordMain/index.vue @@ -1,7 +1,11 @@ - - - - - item.field != "fromLocationCode") - ContainerRecordDetailAllSchemas.value.tableMainColumns = array - tableColumns.value = [...ContainerRecordMain.allSchemas.tableColumns,...ContainerRecordDetailAllSchemas.value.tableMainColumns] - } - else { - ContainerRecordDetail.allSchemas.tableMainColumns =JSON.parse(JSON.stringify(ContainerRecordDetail.allSchemas.tableMainColumns)) - tableColumns.value = [...ContainerRecordMain.allSchemas.tableColumns,...ContainerRecordDetail.allSchemas.tableMainColumns] -} - +importFileName.value = '器具移动记录' // 字段设置 更新主列表字段 @@ -167,26 +101,11 @@ const HeadButttondata = [ defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 - // { - // label: '自定义扩展按钮', - // name: 'zdy', - // hide: false, - // type: 'primary', - // icon: 'Select', - // color: '' - // }, ] -const searchList = (model)=>{ - model.type = searchType.value - setSearchParams(model) -} - // 头部按钮事件 const buttonBaseClick = (val, item) => { - if (val == 'add') { // 新增 - openForm('create') - } else if (val == 'export') { // 导出 + if (val == 'export') { // 导出 handleExport() } else if (val == 'refresh') { // 刷新 if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { @@ -201,28 +120,6 @@ const buttonBaseClick = (val, item) => { console.log('其他按钮', item) } } - -// 列表-操作按钮 -const butttondata = (row,$index) => { -const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 - if(findIndex>-1&&findIndex<$index){ - return [] - } - return [ - // defaultButtons.mainListEditBtn({hasPermi:`wms:{routeName.value}:update`}), // 编辑 - // defaultButtons.mainListDeleteBtn({hasPermi:`wms:{routeName.value}:delete`}), // 删除 - ] -} - -// 列表-操作按钮事件 -const buttonTableClick = async (val, row) => { - if (val == 'edit') { // 编辑 - openForm('update', row) - } else if (val == 'delete') { // 删除 - handleDelete(row.id) - } -} - // 获取部门 用于详情 部门回显 const { wsCache } = useCache() /** 详情操作 */ @@ -233,24 +130,8 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { detailRef.value.openDetail(row, titleName, titleValue,"recordContainerMain") } -/** 添加/修改操作 */ -const basicFormRef = ref() -const openForm = (type: string, row?: any) => { - basicFormRef.value.open(type, row) -} -/** 删除按钮操作 */ -const handleDelete = async (id: number) => { - try { - // 删除的二次确认 - await message.delConfirm() - // 发起删除 - await ContainerRecordMainApi.deleteContainerRecordMain(id) - message.success(t('common.delSuccess')) - // 刷新列表 - buttonBaseClick('refresh',null) - } catch {} -} + /** 导出按钮操作 */ const handleExport = async () => { @@ -260,13 +141,8 @@ const handleExport = async () => { // 发起导出 loadStart() const excelTitle = ref(route.meta.title) - if(businessType.value = 'InitialContainerManage'){ - const data = await ContainerRecordMainApi.exportContainerInitRecordMain(tableObject.params) - download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) - }else { - const data = await ContainerRecordMainApi.exportContainerRecordMain(tableObject.params) - download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) - } + const data = await ContainerRecordMainApi.exportContainerInitRecordMain(tableObject.params) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { loadDone() @@ -278,7 +154,7 @@ const searchFormClick = (searchData) => { const cmd = { 'column':'type', 'action':'==', - 'value':searchType.value + 'value':'MOVE' } if (!Array.isArray(searchData.filters)) { searchData.filters = []; diff --git a/src/views/wms/inventoryjobManage/containermanage/moveContainerRecordMain/moveContainerRecordMain.data.ts b/src/views/wms/inventoryjobManage/containermanage/moveContainerRecordMain/moveContainerRecordMain.data.ts index 8b65a711b..b1c978291 100644 --- a/src/views/wms/inventoryjobManage/containermanage/moveContainerRecordMain/moveContainerRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/containermanage/moveContainerRecordMain/moveContainerRecordMain.data.ts @@ -39,7 +39,6 @@ export const ContainerRecordMain = useCrudSchemas(reactive([ sort: 'custom', dictType: DICT_TYPE.CONTAIN_MANAGE_TYPE, dictClass: 'string', - isSearch: true, isTable: true, table: { width: 120 @@ -180,15 +179,6 @@ export const ContainerRecordMain = useCrudSchemas(reactive([ table: { width: 150 } - }, - { - label: '操作', - field: 'action', - isForm: false, - table: { - width: 150, - fixed: 'right' - } } ])) diff --git a/src/views/wms/inventoryjobManage/containermanage/returnContainerRecordMain/index.vue b/src/views/wms/inventoryjobManage/containermanage/returnContainerRecordMain/index.vue index 0d04831a3..8513b0510 100644 --- a/src/views/wms/inventoryjobManage/containermanage/returnContainerRecordMain/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/returnContainerRecordMain/index.vue @@ -1,7 +1,11 @@ - - - - - import download from '@/utils/download' -import { ContainerRecordMain, ContainerRecordMainRules, ContainerRecordDetail, ContainerRecordDetailRules } from './moveContainerRecordMain.data' +import { ContainerRecordMain, ContainerRecordMainRules, ContainerRecordDetail, ContainerRecordDetailRules } from './returnContainerRecordMain.data' console.log(3444,ContainerRecordDetail) import * as ContainerRecordMainApi from '@/api/wms/containerRecordMain' @@ -86,71 +75,16 @@ const { t } = useI18n() // 国际化 const route = useRoute() // 路由信息 const routeName = ref() routeName.value = route.name -const businessType = ref() const importFileName = ref() -const tableColumns = ref([...ContainerRecordMain.allSchemas.tableColumns, ...ContainerRecordDetail.allSchemas.tableMainColumns]) -// const ContainerRecordDetailTableColumns = ref(JSON.parse(JSON.stringify(ContainerRecordDetail.allSchemas.tableMainColumns))) -const ContainerRecordDetailAllSchemas = ref(JSON.parse(JSON.stringify(ContainerRecordDetail.allSchemas))) -console.log(2233,ContainerRecordDetail.allSchemas.tableMainColumns) -const searchType = ref() +const tableColumns = +ref([ ...ContainerRecordMain.allSchemas.tableColumns,...ContainerRecordDetail.allSchemas.tableMainColumns]) const { tableObject, tableMethods } = useTable({ getListApi: ContainerRecordDetailApi.getContainerRecordDetailPage // 分页接口 }) - -// 判断 路由名称 进行条件过滤 -/** - * - */ - if ( routeName.value == 'ReturnContainerManageRecord') { - tableObject.params = { +tableObject.params = { type:'RETURN' - } - searchType.value = 'RETURN' - businessType.value = 'ReturnContainerManage' - importFileName.value = '器具返回记录' -} else if ( routeName.value == 'MoveContainerManageRecord') { - tableObject.params = { - type:'MOVE' - } - searchType.value = 'MOVE' - businessType.value = 'MoveContainerManage' - importFileName.value = '器具转移记录' -} else if ( routeName.value == 'InitialContainerManageRecord') { - tableObject.params = { - type:'INITIAL', - } - searchType.value = 'INITIAL' - businessType.value = 'InitialContainerManage' - importFileName.value = '器具初始化记录' -} -else if ( routeName.value == 'ScrapContainerManageRecord') { - tableObject.params = { - type:'SCRAP' - } - searchType.value = 'SCRAP' - businessType.value = 'ScrapContainerManage' - importFileName.value = '器具报废记录' -} else if ( routeName.value == 'DeliverContainerManageRecord') { - tableObject.params = { - type: 'DELIVER', - } - searchType.value = 'DELIVER' - businessType.value = 'DeliverContainerManage' - importFileName.value = '器具发运记录' -} else if( routeName.value == 'ContainerManageRecord'){ - businessType.value = 'ContainerManage' - importFileName.value = '器具管理记录' } - if ( routeName.value == 'InitialContainerManageRecord') { - const array = ContainerRecordDetail.allSchemas.tableMainColumns.filter(item=>item.field != "fromLocationCode") - ContainerRecordDetailAllSchemas.value.tableMainColumns = array - tableColumns.value = [...ContainerRecordMain.allSchemas.tableColumns,...ContainerRecordDetailAllSchemas.value.tableMainColumns] - } - else { - ContainerRecordDetail.allSchemas.tableMainColumns =JSON.parse(JSON.stringify(ContainerRecordDetail.allSchemas.tableMainColumns)) - tableColumns.value = [...ContainerRecordMain.allSchemas.tableColumns,...ContainerRecordDetail.allSchemas.tableMainColumns] -} - +importFileName.value = '器具返回记录' // 字段设置 更新主列表字段 @@ -167,26 +101,11 @@ const HeadButttondata = [ defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 - // { - // label: '自定义扩展按钮', - // name: 'zdy', - // hide: false, - // type: 'primary', - // icon: 'Select', - // color: '' - // }, ] -const searchList = (model)=>{ - model.type = searchType.value - setSearchParams(model) -} - // 头部按钮事件 const buttonBaseClick = (val, item) => { - if (val == 'add') { // 新增 - openForm('create') - } else if (val == 'export') { // 导出 + if (val == 'export') { // 导出 handleExport() } else if (val == 'refresh') { // 刷新 if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { @@ -201,28 +120,6 @@ const buttonBaseClick = (val, item) => { console.log('其他按钮', item) } } - -// 列表-操作按钮 -const butttondata = (row,$index) => { -const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 - if(findIndex>-1&&findIndex<$index){ - return [] - } - return [ - // defaultButtons.mainListEditBtn({hasPermi:`wms:{routeName.value}:update`}), // 编辑 - // defaultButtons.mainListDeleteBtn({hasPermi:`wms:{routeName.value}:delete`}), // 删除 - ] -} - -// 列表-操作按钮事件 -const buttonTableClick = async (val, row) => { - if (val == 'edit') { // 编辑 - openForm('update', row) - } else if (val == 'delete') { // 删除 - handleDelete(row.id) - } -} - // 获取部门 用于详情 部门回显 const { wsCache } = useCache() /** 详情操作 */ @@ -233,24 +130,8 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { detailRef.value.openDetail(row, titleName, titleValue,"recordContainerMain") } -/** 添加/修改操作 */ -const basicFormRef = ref() -const openForm = (type: string, row?: any) => { - basicFormRef.value.open(type, row) -} -/** 删除按钮操作 */ -const handleDelete = async (id: number) => { - try { - // 删除的二次确认 - await message.delConfirm() - // 发起删除 - await ContainerRecordMainApi.deleteContainerRecordMain(id) - message.success(t('common.delSuccess')) - // 刷新列表 - buttonBaseClick('refresh',null) - } catch {} -} + /** 导出按钮操作 */ const handleExport = async () => { @@ -260,13 +141,8 @@ const handleExport = async () => { // 发起导出 loadStart() const excelTitle = ref(route.meta.title) - if(businessType.value = 'InitialContainerManage'){ - const data = await ContainerRecordMainApi.exportContainerInitRecordMain(tableObject.params) - download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) - }else { - const data = await ContainerRecordMainApi.exportContainerRecordMain(tableObject.params) - download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) - } + const data = await ContainerRecordMainApi.exportContainerInitRecordMain(tableObject.params) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { loadDone() @@ -278,7 +154,7 @@ const searchFormClick = (searchData) => { const cmd = { 'column':'type', 'action':'==', - 'value':searchType.value + 'value':'RETURN' } if (!Array.isArray(searchData.filters)) { searchData.filters = []; diff --git a/src/views/wms/inventoryjobManage/containermanage/returnContainerRecordMain/moveContainerRecordMain.data.ts b/src/views/wms/inventoryjobManage/containermanage/returnContainerRecordMain/returnContainerRecordMain.data.ts similarity index 97% rename from src/views/wms/inventoryjobManage/containermanage/returnContainerRecordMain/moveContainerRecordMain.data.ts rename to src/views/wms/inventoryjobManage/containermanage/returnContainerRecordMain/returnContainerRecordMain.data.ts index 8b65a711b..b1c978291 100644 --- a/src/views/wms/inventoryjobManage/containermanage/returnContainerRecordMain/moveContainerRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/containermanage/returnContainerRecordMain/returnContainerRecordMain.data.ts @@ -39,7 +39,6 @@ export const ContainerRecordMain = useCrudSchemas(reactive([ sort: 'custom', dictType: DICT_TYPE.CONTAIN_MANAGE_TYPE, dictClass: 'string', - isSearch: true, isTable: true, table: { width: 120 @@ -180,15 +179,6 @@ export const ContainerRecordMain = useCrudSchemas(reactive([ table: { width: 150 } - }, - { - label: '操作', - field: 'action', - isForm: false, - table: { - width: 150, - fixed: 'right' - } } ])) diff --git a/src/views/wms/inventoryjobManage/containermanage/scrapContainerRecordMain/index.vue b/src/views/wms/inventoryjobManage/containermanage/scrapContainerRecordMain/index.vue index 91abaf844..8602f94c8 100644 --- a/src/views/wms/inventoryjobManage/containermanage/scrapContainerRecordMain/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/scrapContainerRecordMain/index.vue @@ -1,7 +1,11 @@ - - - - - import download from '@/utils/download' -import { ContainerRecordMain, ContainerRecordMainRules, ContainerRecordDetail, ContainerRecordDetailRules } from './initialContainerRecordMain.data' +import { ContainerRecordMain, ContainerRecordMainRules, ContainerRecordDetail, ContainerRecordDetailRules } from './scrapContainerRecordMain.data' console.log(3444,ContainerRecordDetail) import * as ContainerRecordMainApi from '@/api/wms/containerRecordMain' @@ -80,77 +69,22 @@ import { formatDate } from '@/utils/formatTime' import { usePageLoading } from '@/hooks/web/usePageLoading' import { json } from 'stream/consumers' const { loadStart, loadDone } = usePageLoading() -defineOptions({ name: 'ContainerRecordMain' }) +defineOptions({ name: 'ScrapContainerManageRecord' }) const message = useMessage() // 消息弹窗 const { t } = useI18n() // 国际化 const route = useRoute() // 路由信息 const routeName = ref() routeName.value = route.name -const businessType = ref() const importFileName = ref() -const tableColumns = ref([...ContainerRecordMain.allSchemas.tableColumns, ...ContainerRecordDetail.allSchemas.tableMainColumns]) -// const ContainerRecordDetailTableColumns = ref(JSON.parse(JSON.stringify(ContainerRecordDetail.allSchemas.tableMainColumns))) -const ContainerRecordDetailAllSchemas = ref(JSON.parse(JSON.stringify(ContainerRecordDetail.allSchemas))) -console.log(2233,ContainerRecordDetail.allSchemas.tableMainColumns) -const searchType = ref() +const tableColumns = +ref([ ...ContainerRecordMain.allSchemas.tableColumns,...ContainerRecordDetail.allSchemas.tableMainColumns]) const { tableObject, tableMethods } = useTable({ getListApi: ContainerRecordDetailApi.getContainerRecordDetailPage // 分页接口 }) - -// 判断 路由名称 进行条件过滤 -/** - * - */ - if ( routeName.value == 'ReturnContainerManageRecord') { - tableObject.params = { - type:'RETURN' - } - searchType.value = 'RETURN' - businessType.value = 'ReturnContainerManage' - importFileName.value = '器具返回记录' -} else if ( routeName.value == 'MoveContainerManageRecord') { - tableObject.params = { - type:'MOVE' - } - searchType.value = 'MOVE' - businessType.value = 'MoveContainerManage' - importFileName.value = '器具转移记录' -} else if ( routeName.value == 'InitialContainerManageRecord') { - tableObject.params = { - type:'INITIAL', - } - searchType.value = 'INITIAL' - businessType.value = 'InitialContainerManage' - importFileName.value = '器具初始化记录' -} -else if ( routeName.value == 'ScrapContainerManageRecord') { - tableObject.params = { +tableObject.params = { type:'SCRAP' - } - searchType.value = 'SCRAP' - businessType.value = 'ScrapContainerManage' - importFileName.value = '器具报废记录' -} else if ( routeName.value == 'DeliverContainerManageRecord') { - tableObject.params = { - type: 'DELIVER', - } - searchType.value = 'DELIVER' - businessType.value = 'DeliverContainerManage' - importFileName.value = '器具发运记录' -} else if( routeName.value == 'ContainerManageRecord'){ - businessType.value = 'ContainerManage' - importFileName.value = '器具管理记录' } - if ( routeName.value == 'InitialContainerManageRecord') { - const array = ContainerRecordDetail.allSchemas.tableMainColumns.filter(item=>item.field != "fromLocationCode") - ContainerRecordDetailAllSchemas.value.tableMainColumns = array - tableColumns.value = [...ContainerRecordMain.allSchemas.tableColumns,...ContainerRecordDetailAllSchemas.value.tableMainColumns] - } - else { - ContainerRecordDetail.allSchemas.tableMainColumns =JSON.parse(JSON.stringify(ContainerRecordDetail.allSchemas.tableMainColumns)) - tableColumns.value = [...ContainerRecordMain.allSchemas.tableColumns,...ContainerRecordDetail.allSchemas.tableMainColumns] -} - +importFileName.value = '器具报废记录' // 字段设置 更新主列表字段 @@ -162,31 +96,15 @@ const updataTableColumns = (val) => { const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - // defaultButtons.defaultAddBtn({hasPermi:`wms:{routeName.value}:create`}), // 新增 defaultButtons.defaultExportBtn({hasPermi:`wms:${routeName.value}:export`}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 - // { - // label: '自定义扩展按钮', - // name: 'zdy', - // hide: false, - // type: 'primary', - // icon: 'Select', - // color: '' - // }, ] -const searchList = (model)=>{ - model.type = searchType.value - setSearchParams(model) -} - // 头部按钮事件 const buttonBaseClick = (val, item) => { - if (val == 'add') { // 新增 - openForm('create') - } else if (val == 'export') { // 导出 + if (val == 'export') { // 导出 handleExport() } else if (val == 'refresh') { // 刷新 if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { @@ -201,28 +119,6 @@ const buttonBaseClick = (val, item) => { console.log('其他按钮', item) } } - -// 列表-操作按钮 -const butttondata = (row,$index) => { -const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 - if(findIndex>-1&&findIndex<$index){ - return [] - } - return [ - // defaultButtons.mainListEditBtn({hasPermi:`wms:{routeName.value}:update`}), // 编辑 - // defaultButtons.mainListDeleteBtn({hasPermi:`wms:{routeName.value}:delete`}), // 删除 - ] -} - -// 列表-操作按钮事件 -const buttonTableClick = async (val, row) => { - if (val == 'edit') { // 编辑 - openForm('update', row) - } else if (val == 'delete') { // 删除 - handleDelete(row.id) - } -} - // 获取部门 用于详情 部门回显 const { wsCache } = useCache() /** 详情操作 */ @@ -233,24 +129,8 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { detailRef.value.openDetail(row, titleName, titleValue,"recordContainerMain") } -/** 添加/修改操作 */ -const basicFormRef = ref() -const openForm = (type: string, row?: any) => { - basicFormRef.value.open(type, row) -} -/** 删除按钮操作 */ -const handleDelete = async (id: number) => { - try { - // 删除的二次确认 - await message.delConfirm() - // 发起删除 - await ContainerRecordMainApi.deleteContainerRecordMain(id) - message.success(t('common.delSuccess')) - // 刷新列表 - buttonBaseClick('refresh',null) - } catch {} -} + /** 导出按钮操作 */ const handleExport = async () => { @@ -260,13 +140,8 @@ const handleExport = async () => { // 发起导出 loadStart() const excelTitle = ref(route.meta.title) - if(businessType.value = 'InitialContainerManage'){ - const data = await ContainerRecordMainApi.exportContainerInitRecordMain(tableObject.params) - download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) - }else { - const data = await ContainerRecordMainApi.exportContainerRecordMain(tableObject.params) - download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) - } + const data = await ContainerRecordMainApi.exportContainerInitRecordMain(tableObject.params) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { loadDone() @@ -278,7 +153,7 @@ const searchFormClick = (searchData) => { const cmd = { 'column':'type', 'action':'==', - 'value':searchType.value + 'value':'SCRAP' } if (!Array.isArray(searchData.filters)) { searchData.filters = []; diff --git a/src/views/wms/inventoryjobManage/containermanage/scrapContainerRecordMain/scrapContainerRecordMain.data.ts b/src/views/wms/inventoryjobManage/containermanage/scrapContainerRecordMain/scrapContainerRecordMain.data.ts index 8b65a711b..b1c978291 100644 --- a/src/views/wms/inventoryjobManage/containermanage/scrapContainerRecordMain/scrapContainerRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/containermanage/scrapContainerRecordMain/scrapContainerRecordMain.data.ts @@ -39,7 +39,6 @@ export const ContainerRecordMain = useCrudSchemas(reactive([ sort: 'custom', dictType: DICT_TYPE.CONTAIN_MANAGE_TYPE, dictClass: 'string', - isSearch: true, isTable: true, table: { width: 120 @@ -180,15 +179,6 @@ export const ContainerRecordMain = useCrudSchemas(reactive([ table: { width: 150 } - }, - { - label: '操作', - field: 'action', - isForm: false, - table: { - width: 150, - fixed: 'right' - } } ]))