Browse Source

制品上架申请

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

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

@ -59,10 +59,46 @@ export const deleteProductputawayRequestMain = async (id: number) => {
// 导出制品上架申请主 Excel // 导出制品上架申请主 Excel
export const exportProductputawayRequestMain = async (params) => { export const exportProductputawayRequestMain = async (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 }) return await request.download({ url: `/wms/productputaway-request-main/export-excel`, params })
} }
}
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/productputaway-request-main/get-import-template' }) 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 })
}

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

@ -191,30 +191,66 @@ 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:productputaway-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), // defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:productputaway-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), // defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:productputaway-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:productputaway-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:productputaway-request-main:agree'}), //
defaultButtons.mainListEditBtn({hasPermi:'wms:productputaway-request-main:update'}), // defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']), hasPermi:'wms:productputaway-request-main:handle'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:productputaway-request-main:delete'}), // defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:productputaway-request-main:update'}), //
] ]
} }
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { // 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') { // } 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') { // } 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') { // } 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') { // } 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') { // } else if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
@ -256,7 +292,7 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const data = await ProductputawayRequestMainApi.exportProductputawayRequestMain(setSearchParams) const data = await ProductputawayRequestMainApi.exportProductputawayRequestMain(tableObject.params)
download.excel(data, '制品上架申请主.xlsx') download.excel(data, '制品上架申请主.xlsx')
} catch { } catch {
} finally { } finally {

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

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

Loading…
Cancel
Save