Browse Source

盘点管理和盘点调整模块

master
zhang_li 12 months ago
parent
commit
7f5d8f3cb9
  1. 5
      src/api/wms/countRecordMain/index.ts
  2. 12
      src/api/wms/countRequestMain/index.ts
  3. 32
      src/api/wms/countadjustRequestMain/index.ts
  4. 12
      src/utils/disposition/defaultButtons.ts
  5. 20
      src/views/wms/countManage/count/countJobMain/countJobMain.data.ts
  6. 16
      src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts
  7. 74
      src/views/wms/countManage/count/countPlanMain/index.vue
  8. 10
      src/views/wms/countManage/count/countRecordMain/countRecordMain.data.ts
  9. 14
      src/views/wms/countManage/count/countRecordMain/index.vue
  10. 56
      src/views/wms/countManage/count/countRequestMain/index.vue
  11. 73
      src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue

5
src/api/wms/countRecordMain/index.ts

@ -62,4 +62,9 @@ export const exportCountRecordMain = async (params) => {
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/count-record-main/get-import-template' }) return request.download({ url: '/wms/count-record-main/get-import-template' })
}
// 生成盘点调整
export const generateCountRecordMain = async (id) => {
return await request.put({ url: `/wms/count-record-main/generate?id=` + id})
} }

12
src/api/wms/countRequestMain/index.ts

@ -64,31 +64,31 @@ export const importTemplate = () => {
} }
// 关闭盘点申请主 Excel // 关闭盘点申请主 Excel
export const closeCountRequestMain = async (id) => { export const close = async (id) => {
return await request.put({ url: `/wms/count-request-main/close?id=` + id }) return await request.put({ url: `/wms/count-request-main/close?id=` + id })
} }
// 重新添加盘点申请主 Excel // 重新添加盘点申请主 Excel
export const reAddCountRequestMain = async (id) => { export const reAdd = async (id) => {
return await request.put({ url: `/wms/count-request-main/reAdd?id=` + id }) return await request.put({ url: `/wms/count-request-main/reAdd?id=` + id })
} }
// 提交盘点申请主 Excel // 提交盘点申请主 Excel
export const submitCountRequestMain = async (id) => { export const submit = async (id) => {
return await request.put({ url: `/wms/count-request-main/submit?id=` + id }) return await request.put({ url: `/wms/count-request-main/submit?id=` + id })
} }
// 审批通过盘点申请主 Excel // 审批通过盘点申请主 Excel
export const agreeCountRequestMain = async (id) => { export const agree = async (id) => {
return await request.put({ url: `/wms/count-request-main/agree?id=` + id }) return await request.put({ url: `/wms/count-request-main/agree?id=` + id })
} }
// 审批驳回盘点申请主 Excel // 审批驳回盘点申请主 Excel
export const refusedCountRequestMain = async (id) => { export const refused = async (id) => {
return await request.put({ url: `/wms/count-request-main/refused?id=` + id }) return await request.put({ url: `/wms/count-request-main/refused?id=` + id })
} }
// 处理盘点申请主 Excel // 处理盘点申请主 Excel
export const handleCountRequestMain = async (id) => { export const handle = async (id) => {
return await request.put({ url: `/wms/count-request-main/handle?id=` + id }) return await request.put({ url: `/wms/count-request-main/handle?id=` + id })
} }

32
src/api/wms/countadjustRequestMain/index.ts

@ -60,4 +60,34 @@ export const exportCountadjustRequestMain = async (params) => {
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/countadjust-request-main/get-import-template' }) return request.download({ url: '/wms/countadjust-request-main/get-import-template' })
} }
// 关闭盘点申请主 Excel
export const close = async (id) => {
return await request.put({ url: `/wms/countadjust-request-main/close?id=` + id })
}
// 重新添加盘点申请主 Excel
export const reAdd = async (id) => {
return await request.put({ url: `/wms/countadjust-request-main/reAdd?id=` + id })
}
// 提交盘点申请主 Excel
export const submit = async (id) => {
return await request.put({ url: `/wms/countadjust-request-main/submit?id=` + id })
}
// 审批通过盘点申请主 Excel
export const agree = async (id) => {
return await request.put({ url: `/wms/countadjust-request-main/agree?id=` + id })
}
// 审批驳回盘点申请主 Excel
export const refused = async (id) => {
return await request.put({ url: `/wms/countadjust-request-main/refused?id=` + id })
}
// 处理盘点申请主 Excel
export const handle = async (id) => {
return await request.put({ url: `/wms/countadjust-request-main/handle?id=` + id })
}

12
src/utils/disposition/defaultButtons.ts

@ -687,6 +687,18 @@ export function mainPutawayRequestBtn(option:any) {
hasPermi: '' hasPermi: ''
}) })
} }
// 主列表-生成盘点调整申请
export function mainCountAdjustRequesttBtn(option:any) {
return __defaultBtnOption(option,{
label: '生成盘点调整申请',
name: 'countAdjustRequest',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 默认按钮规则 // 默认按钮规则
function __defaultBtnOption(option:any,specific:any){ function __defaultBtnOption(option:any,specific:any){
return { return {

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

@ -518,16 +518,16 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
// width: 150 // width: 150
// }, // },
// }, // },
{ // {
label: '操作', // label: '操作',
field: 'action', // field: 'action',
isDetail: false, // isDetail: false,
isForm: false, // isForm: false,
table: { // table: {
width: 120, // width: 120,
fixed: 'right' // fixed: 'right'
}, // },
} // }
])) ]))
//表单校验 //表单校验

16
src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts

@ -91,14 +91,14 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{ // {
label: '盘点范围列表', // label: '盘点范围列表',
field: 'scopeList', // field: 'scopeList',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ {
label: '快照盘点', label: '快照盘点',
field: 'isSnapshot', field: 'isSnapshot',

74
src/views/wms/countManage/count/countPlanMain/index.vue

@ -272,30 +272,64 @@ const butttondata = (row) => {
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { if (val == 'mainPlanOpe') { //
// CountPlanMainApi.open(row.id).then(() => {
console.log('列表-操作按钮事件-关闭') message.success(t('打开成功'))
} else if (val == 'mainReAdd') { getList()
// }).catch(err => {
console.log('列表-操作按钮事件-重新添加') console.log(err)
} else if (val == 'mainSubmit') { })
// } else if (val == 'mainPlanClo') { //
console.log('列表-操作按钮事件-提交审批') await message.confirm('确认要关闭吗?')
} else if (val == 'mainTurnDown') { CountPlanMainApi.close(row.id).then(() => {
// message.success(t('关闭成功'))
console.log('列表-操作按钮事件-驳回') getList()
} else if (val == 'mainApprove') { }).catch(err => {
// console.log(err)
console.log('列表-操作按钮事件-审批通过') })
} else if (val == 'edit') { } else if (val == 'mainPlanSub') { //
// await message.confirm(t('common.confirmSubmit'))
await CountPlanMainApi.submit(row.id)
message.success(t('提交审批成功'))
await getList()
} else if (val == 'mainPlanTur') { //
await message.confirm('确认要驳回吗?')
CountPlanMainApi.reject(row.id).then(() => {
message.success(t('驳回成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainPlanApp') { //
await message.confirm('确认要审批通过吗?')
CountPlanMainApi.agree(row.id).then(() => {
message.success(t('审批已通过'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainPlanPub') { //
await message.confirm('确认要发布吗?')
CountPlanMainApi.publish(row.id).then(() => {
message.success(t('发布成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainPlanRes') { //
await message.confirm('确认要重置吗?')
CountPlanMainApi.resetting(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { } else if (val == 'delete') { //
//
handleDelete(row.id) handleDelete(row.id)
} }
} }
/** 添加/修改操作 */ /** 添加/修改操作 */
const formRef = ref() const formRef = ref()
const openForm = async (type: string, row?: number) => { const openForm = async (type: string, row?: number) => {

10
src/views/wms/countManage/count/countRecordMain/countRecordMain.data.ts

@ -247,6 +247,16 @@ export const CountRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
}, },
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 180,
fixed: 'right'
},
}
])) ]))
//表单校验 //表单校验

14
src/views/wms/countManage/count/countRecordMain/index.vue

@ -120,11 +120,23 @@ const buttonBaseClick = (val, item) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [] return [
defaultButtons.mainCountAdjustRequesttBtn({
hasPermi: 'wms:count-record-main:generate'
}), //
]
} }
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if(val == 'countAdjustRequest'){
CountRecordMainApi.generateCountRecordMain(row.id).then(()=>{
message.success(t('生成成功'))
getList()
}).catch(err => {
console.log(err)
})
}
} }
/** 详情操作 */ /** 详情操作 */

56
src/views/wms/countManage/count/countRequestMain/index.vue

@ -148,8 +148,8 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:count-request-main:create'}), // // defaultButtons.defaultAddBtn({hasPermi:'wms:count-request-main:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:count-request-main:import'}), // // defaultButtons.defaultImportBtn({hasPermi:'wms:count-request-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:count-request-main:export'}), // defaultButtons.defaultExportBtn({hasPermi:'wms:count-request-main:export'}), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
@ -205,19 +205,57 @@ const butttondata = (row) => {
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { // if (val == 'mainClose') { //
handleClose(row.id) await message.confirm('确认要关闭吗?')
CountRequestMainApi.close(row.id).then(() => {
message.success(t('关闭成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainReAdd') { // } else if (val == 'mainReAdd') { //
handleReAdd(row.id) await message.confirm('确认要重新添加吗?')
CountRequestMainApi.reAdd(row.id).then(() => {
message.success(t('添加成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainSubmit') { // } else if (val == 'mainSubmit') { //
handleSubmit(row.id) await message.confirm('确认要提交审批吗?')
CountRequestMainApi.submit(row.id).then(() => {
message.success(t('提交审批成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainTurnDown') { // } else if (val == 'mainTurnDown') { //
handleRefused(row.id) await message.confirm('确认要驳回吗?')
CountRequestMainApi.refused(row.id).then(() => {
message.success(t('驳回成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainApprove') { // } else if (val == 'mainApprove') { //
handleAgree(row.id) await message.confirm('确认要审批通过吗?')
CountRequestMainApi.agree(row.id).then(() => {
message.success(t('审批已通过'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainHandle') { // } else if (val == 'mainHandle') { //
handleHandle(row.id) await message.confirm('确认要处理吗?')
} else if (val == 'edit') { // CountRequestMainApi.handle(row.id).then(() => {
message.success(t('处理成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} }
} }

73
src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue

@ -134,8 +134,8 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:countadjust-request-main:create'}), // // defaultButtons.defaultAddBtn({hasPermi:'wms:countadjust-request-main:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:countadjust-request-main:import'}), // // defaultButtons.defaultImportBtn({hasPermi:'wms:countadjust-request-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:countadjust-request-main:export'}), // defaultButtons.defaultExportBtn({hasPermi:'wms:countadjust-request-main:export'}), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
@ -178,37 +178,73 @@ const isShowMainButton = (row,val) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), // defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:countadjust-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), // defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:countadjust-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), // defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:countadjust-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:countadjust-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:countadjust-request-main:agree'}), //
defaultButtons.mainListEditBtn({hasPermi:'wms:countadjust-request-main:update'}), // defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:countadjust-request-main:handle'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:countadjust-request-main:delete'}), // defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:countadjust-request-main:delete'}), //
] ]
} }
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { // if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭') await message.confirm('确认要关闭吗?')
CountadjustRequestMainApi.close(row.id).then(() => {
message.success(t('关闭成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainReAdd') { // } else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加') await message.confirm('确认要重新添加吗?')
CountadjustRequestMainApi.reAdd(row.id).then(() => {
message.success(t('添加成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainSubmit') { // } else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批') await message.confirm('确认要提交审批吗?')
CountadjustRequestMainApi.submit(row.id).then(() => {
message.success(t('提交审批成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainTurnDown') { // } else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回') await message.confirm('确认要驳回吗?')
CountadjustRequestMainApi.refused(row.id).then(() => {
message.success(t('驳回成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainApprove') { // } else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过') await message.confirm('确认要审批通过吗?')
} else if (val == 'edit') { // CountadjustRequestMainApi.agree(row.id).then(() => {
message.success(t('审批已通过'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainHandle') { //
await message.confirm('确认要处理吗?')
CountadjustRequestMainApi.handle(row.id).then(() => {
message.success(t('处理成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
} }
} }
/** 添加/修改操作 */ /** 添加/修改操作 */
const formRef = ref() const formRef = ref()
const openForm =async (type: string, row?: number) => { const openForm =async (type: string, row?: number) => {
@ -317,6 +353,5 @@ const searchFormClick = (searchData) => {
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()
importTemplateData.templateUrl = await CountadjustRequestMainApi.importTemplate()
}) })
</script> </script>

Loading…
Cancel
Save