Browse Source

补料申请

master
陈薪名 1 year ago
parent
commit
e3bf19bb6d
  1. 38
      src/api/wms/repleinshRequestMain/index.ts
  2. 12
      src/views/wms/issueManage/issue/issueRequestMain/index.vue
  3. 84
      src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue

38
src/api/wms/repleinshRequestMain/index.ts

@ -57,10 +57,46 @@ export const deleteRepleinshRequestMain = async (id: number) => {
// 导出补料申请主 Excel // 导出补料申请主 Excel
export const exportRepleinshRequestMain = async (params) => { export const exportRepleinshRequestMain = async (params) => {
return await request.download({ url: `/wms/repleinsh-request-main/export-excel`, params }) if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/repleinsh-request-main/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/repleinsh-request-main/export-excel`, params })
}
} }
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/repleinsh-request-main/get-import-template' }) return request.download({ url: '/wms/repleinsh-request-main/get-import-template' })
}
// 关闭
export const close = (id) => {
return request.put({ url: '/wms/repleinsh-request-main/close?id=' + id })
}
// 重新添加
export const reAdd = (id) => {
return request.put({ url: '/wms/repleinsh-request-main/reAdd?id=' + id })
}
// 提交审批
export const submit = (id) => {
return request.put({ url: '/wms/repleinsh-request-main/submit?id=' + id })
}
// 驳回
export const refused = (id) => {
return request.put({ url: '/wms/repleinsh-request-main/refused?id=' + id })
}
// 审批通过
export const agree = (id) => {
return request.put({ url: '/wms/repleinsh-request-main/agree?id=' + id })
}
// 处理
export const handle = (id) => {
return request.put({ url: '/wms/repleinsh-request-main/handle?id=' + id })
} }

12
src/views/wms/issueManage/issue/issueRequestMain/index.vue

@ -172,12 +172,12 @@ const isShowMainButton = (row,val) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4'])}), // defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']), hasPermi:'wms:issue-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), // defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:issue-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), // defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:issue-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:issue-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:issue-request-main:handle'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3'])}), // defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']), hasPermi:'wms:issue-request-main:update'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:issue-request-main:update'}), // defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:issue-request-main:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:issue-request-main:delete'}), // // defaultButtons.mainListDeleteBtn({hasPermi:'wms:issue-request-main:delete'}), //
] ]

84
src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue

@ -67,7 +67,6 @@
:apiUpdate="RepleinshRequestDetailApi.updateRepleinshRequestDetail" :apiUpdate="RepleinshRequestDetailApi.updateRepleinshRequestDetail"
:apiPage="RepleinshRequestDetailApi.getRepleinshRequestDetailPage" :apiPage="RepleinshRequestDetailApi.getRepleinshRequestDetailPage"
:apiDelete="RepleinshRequestDetailApi.deleteRepleinshRequestDetail" :apiDelete="RepleinshRequestDetailApi.deleteRepleinshRequestDetail"
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
/> />
@ -104,21 +103,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if (type == 'tableForm') { if (type == 'tableForm') {
// //
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
//row['poLine'] = val[0]['poLine']
//row['batch'] = val[0]['toBatch']
//row['altBatch'] = val[0]['altBatch']
//row['itemCode'] = val[0]['itemCode']
//row['itemName'] = val[0]['itemName']
//row['itemDesc1'] = val[0]['itemDesc1']
//row['itemDesc2'] = val[0]['itemDesc2']
//row['projectCode'] = val[0]['projectCode']
//row['qty'] = val[0]['qty']
//row['uom'] = val[0]['uom']
} else { } else {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
//setV['ppNumber'] = val[0]['ppNumber']
//setV['supplierCode'] = val[0]['supplierCode']
formRef.setValues(setV) formRef.setValues(setV)
} }
}) })
@ -132,10 +119,6 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
}) })
} }
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: RepleinshRequestMainApi.getRepleinshRequestMainPage // getListApi: RepleinshRequestMainApi.getRepleinshRequestMainPage //
}) })
@ -145,7 +128,7 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:repleinsh-request-main:create'}), // defaultButtons.defaultAddBtn({hasPermi:'wms:repleinsh-request-main:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:repleinsh-request-main:import'}), // defaultButtons.defaultImportBtn({hasPermi:'wms:repleinsh-request-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:repleinsh-request-main:export'}), // defaultButtons.defaultExportBtn({hasPermi:'wms:repleinsh-request-main:export'}), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
@ -189,13 +172,14 @@ 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']), hasPermi:'wms:repleinsh-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), // defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:repleinsh-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), // defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:repleinsh-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:repleinsh-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:repleinsh-request-main:handle'}), //
defaultButtons.mainListEditBtn({hasPermi:'wms:repleinsh-request-main:update'}), // defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']), hasPermi:'wms:repleinsh-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:repleinsh-request-main:delete'}), // defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:repleinsh-request-main:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:repleinsh-request-main:delete'}), //
] ]
} }
@ -204,15 +188,51 @@ const butttondata = (row) => {
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { // if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭') await message.confirm('确认要关闭吗?')
RepleinshRequestMainApi.close(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainReAdd') { // } else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加') await message.confirm('确认要重新添加吗?')
RepleinshRequestMainApi.reAdd(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainSubmit') { // } else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批') await message.confirm('确认要重新添加吗?')
RepleinshRequestMainApi.submit(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainTurnDown') { // } else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回') await message.confirm('确认要重新添加吗?')
RepleinshRequestMainApi.refused(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainApprove') { // } else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过') RepleinshRequestMainApi.agree(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainHandle') { //
RepleinshRequestMainApi.handle(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'edit') { // } else if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
@ -255,7 +275,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await RepleinshRequestMainApi.exportRepleinshRequestMain(setSearchParams) const data = await RepleinshRequestMainApi.exportRepleinshRequestMain(setSearchParams)
download.excel(data, '补料申请.xlsx') download.excel(data, '补料申请.xlsx')
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -308,7 +328,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '补料申请导入模版.xlsx' templateTitle: '补料申请导入模版.xlsx'
}) })
// //

Loading…
Cancel
Save