Browse Source

盘点任务修改

master_hella_20240701
zhaoxuebing 6 months ago
parent
commit
a2c533ee00
  1. 10
      src/api/wms/countJobMain/index.ts
  2. 2
      src/views/wms/countManage/count/countJobMain/countJobMain.data.ts
  3. 35
      src/views/wms/countManage/count/countJobMain/index.vue

10
src/api/wms/countJobMain/index.ts

@ -89,5 +89,13 @@ export const importTemplate = () => {
// 关闭盘点任务主 // 关闭盘点任务主
export const closeCountJobMain = (id: number) => { export const closeCountJobMain = (id: number) => {
return request.download({ url: '/wms/count-job-main/close?id=' + id }) return request.put({ url: '/wms/count-job-main/close?id=' + id })
} }
// 关闭盘点任务主
export const handleExportCountJob = async (id: number) => {
let params = {
masterId:id
}
return await request.download({ url: `/wms/count-job-main/export-excel-single`, params })
}

2
src/views/wms/countManage/count/countJobMain/countJobMain.data.ts

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

35
src/views/wms/countManage/count/countJobMain/index.vue

@ -186,7 +186,25 @@ const butttondata = (row,$index) => {
} }
return [ return [
// defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // // defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:count-job-main:close'}), // defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1','2']),hasPermi:'wms:count-job-main:close'}), //
{
label: '导出',
name: 'exportCountJob',
hide: isShowMainButton(row,['1','2']),
type: 'success',
color: '',
link: true, //
hasPermi: '' // wms:count-job-main:exportCountJob
},
{
label: '导入',
name: 'importCountJob',
hide: isShowMainButton(row,['1','2']),
type: 'success',
color: '',
link: true, //
hasPermi: '' // wms:count-job-main:importCountJob
}
// defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // // defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), // // defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
] ]
@ -202,6 +220,8 @@ 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 == 'exportCountJob'){//
handleExportCountJob(row.masterId,row.number)
} }
} }
@ -240,6 +260,19 @@ const handleExport = async () => {
} }
} }
/** 单条任务导出 */
const handleExportCountJob = async (id: number,number: string) => {
try {
await message.exportConfirm()
exportLoading.value = true
const data = await CountJobMainApi.handleExportCountJob(id)
download.excel(data, '盘点任务主'+number+'.xlsx')
} catch {
}finally {
exportLoading.value = false
}
}
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
tableObject.params = { tableObject.params = {

Loading…
Cancel
Save