Browse Source

制品上架申请

master
陈薪名 11 months ago
parent
commit
edcbdfe73b
  1. 38
      src/api/wms/productputawayRequestMain/index.ts
  2. 70
      src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue
  3. 67
      src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts

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

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

70
src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue

@ -190,31 +190,67 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListEditBtn({hasPermi:'wms:productputaway-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:productputaway-request-main:delete'}), //
]
return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']), hasPermi:'wms:productputaway-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:productputaway-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:productputaway-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:productputaway-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:productputaway-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']), hasPermi:'wms:productputaway-request-main:handle'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:productputaway-request-main:update'}), //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
await message.confirm('确认要关闭吗?')
ProductputawayRequestMainApi.close(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
await message.confirm('确认要重新添加吗?')
ProductputawayRequestMainApi.reAdd(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
await message.confirm('确认要重新添加吗?')
ProductputawayRequestMainApi.submit(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
await message.confirm('确认要重新添加吗?')
ProductputawayRequestMainApi.refused(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
await message.confirm('确认要审批通过吗?')
ProductputawayRequestMainApi.agree(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainHandle') { //
await message.confirm('确认要处理吗?')
ProductputawayRequestMainApi.handle(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
@ -256,7 +292,7 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await ProductputawayRequestMainApi.exportProductputawayRequestMain(setSearchParams)
const data = await ProductputawayRequestMainApi.exportProductputawayRequestMain(tableObject.params)
download.excel(data, '制品上架申请主.xlsx')
} catch {
} finally {

67
src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts

@ -25,16 +25,16 @@ const userDept = userStore.userSelfInfo.dept
* @returns {Array}
*/
export const ProductputawayRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
isForm: false,
},
// {
// label: '供应商代码',
// field: 'supplierCode',
// sort: 'custom',
// table: {
// width: 150
// },
// isSearch: true,
// isForm: false,
// },
{
label: '从仓库代码',
field: 'fromWarehouseCode',
@ -165,6 +165,7 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -429,6 +430,11 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true
}
@ -440,6 +446,11 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true
}
@ -451,6 +462,11 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true
}
@ -465,6 +481,11 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm: {
type: 'Select',
disabled: true
@ -497,6 +518,11 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true
}
@ -515,14 +541,6 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}
}
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
},
{
label: '创建时间',
field: 'createTime',
@ -625,6 +643,11 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm:{
type: 'Select',
disabled: true
@ -650,6 +673,14 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
isTableForm: false,
isForm: false
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
},
{
label: '最后更新时间',
field: 'updateTime',

Loading…
Cancel
Save