Browse Source

报废出库开发完成

master
zhaoxuebing 11 months ago
parent
commit
34e90e31a4
  1. 30
      src/api/wms/scrapRequestMain/index.ts
  2. 6
      src/views/wms/inventoryjobManage/scrap/scrapJobMain/index.vue
  3. 84
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue
  4. 69
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts

30
src/api/wms/scrapRequestMain/index.ts

@ -66,3 +66,33 @@ export const exportScrapRequestMain = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/scrap-request-main/get-import-template' })
}
// 关闭-报废出库申请
export const closeScrapRequestMain = async (id) => {
return await request.put({ url: `/wms/scrap-request-main/close?id=` + id })
}
// 重新添加-报废出库申请
export const reAddScrapRequestMain = async (id) => {
return await request.put({ url: `/wms/scrap-request-main/reAdd?id=` + id })
}
// 提交审批-报废出库申请
export const submitScrapRequestMain = async (id) => {
return await request.put({ url: `/wms/scrap-request-main/submit?id=` + id })
}
// 审批驳回-报废出库申请
export const refusedScrapRequestMain = async (id) => {
return await request.put({ url: `/wms/scrap-request-main/refused?id=` + id })
}
// 审批通过-报废出库申请
export const agreeScrapRequestMain = async (id) => {
return await request.put({ url: `/wms/scrap-request-main/agree?id=` + id })
}
// 处理-报废出库申请
export const handleScrapRequestMain = async (id) => {
return await request.put({ url: `/wms/scrap-request-main/handle?id=` + id })
}

6
src/views/wms/inventoryjobManage/scrap/scrapJobMain/index.vue

@ -174,9 +174,9 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
// defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), //
// defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
]
}

84
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue

@ -186,30 +186,36 @@ 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:scrap-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:scrap-request-main:delete'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:scrap-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:scrap-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:scrap-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:scrap-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:scrap-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:scrap-request-main:handle'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:scrap-request-main:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:scrap-request-main:delete'}), //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
handleClose(row.id)
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
handleReAdd(row.id)
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
handleSubmit(row.id)
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
handleRefused(row.id)
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
handleAgree(row.id)
} else if (val == 'mainHandle') { //
handleHandle(row.id)
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
@ -217,6 +223,66 @@ const buttonTableClick = async (val, row) => {
}
}
/** 关闭按钮操作 */
const handleClose = async (id: number) => {
try {
await message.confirm(t('common.confirmColse'))
await ScrapRequestMainApi.closeScrapRequestMain(id)
message.success(t('common.closeSuccess'))
await getList()
} catch {}
}
/** 重新添加按钮操作 */
const handleReAdd = async (id: number) => {
try {
await message.confirm(t('common.confirmReAdd'))
await ScrapRequestMainApi.reAddScrapRequestMain(id)
message.success(t('common.reAddSuccess'))
await getList()
} catch {}
}
/** 提交按钮操作 */
const handleSubmit = async (id: number) => {
try {
await message.confirm(t('common.confirmSubmit'))
await ScrapRequestMainApi.submitScrapRequestMain(id)
message.success(t('common.submitSuccess'))
await getList()
} catch {}
}
/** 审批驳回按钮操作 */
const handleRefused = async (id: number) => {
try {
await message.confirm(t('common.confirmRefused'))
await ScrapRequestMainApi.refusedScrapRequestMain(id)
message.success(t('common.refusedSuccess'))
await getList()
} catch {}
}
/** 审批通过按钮操作 */
const handleAgree = async (id: number) => {
try {
await message.confirm(t('common.confirmAgree'))
await ScrapRequestMainApi.agreeScrapRequestMain(id)
message.success(t('common.agreeSuccess'))
await getList()
} catch {}
}
/** 处理按钮操作 */
const handleHandle = async (id: number) => {
try {
await message.confirm(t('common.confirmHandle'))
await ScrapRequestMainApi.handleScrapRequestMain(id)
message.success(t('common.handleSuccess'))
await getList()
} catch {}
}
/** 添加/修改操作 */
const formRef = ref()
const openForm =async (type: string, row?: number) => {

69
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts

@ -18,6 +18,8 @@ const queryParams = {
// 获取当前操作人的部门
import { useUserStore } from '@/store/modules/user'
import {Warehouse} from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data";
import * as WarehouseApi from "@/api/wms/warehouse";
const userStore = useUserStore()
const userDept = userStore.userSelfInfo.dept
@ -105,7 +107,35 @@ export const ScrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
isSearch: true,
isForm: false,
tableForm: {
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择仓库代码',
searchField: 'code',
searchTitle: '仓库信息',
searchAllSchemas: Warehouse.allSchemas,
searchPage: WarehouseApi.getWarehousePage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择仓库代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '仓库信息', // 查询弹窗标题
searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '从库位类型范围',
@ -377,6 +407,9 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
tableForm: {
disabled: true
}
},
{
label: '物品名称',
@ -387,6 +420,9 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
isTableForm: false,
isForm: false,
tableForm: {
disabled: true
}
},
{
label: '物品描述1',
@ -415,6 +451,9 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
tableForm: {
disabled: true
}
},
{
label: '包装号',
@ -429,7 +468,16 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePage
searchPage: BalanceApi.getBalancePage,
searchCondition: [{
key: 'warehouseCode',
value: 'fromWarehouseCode',
isMainValue: true
},{
key: 'inventoryStatus',
value: 'SCRAP',
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!',
@ -439,7 +487,16 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePage
searchPage: BalanceApi.getBalancePage,
searchCondition: [{
key: 'warehouseCode',
value: 'fromWarehouseCode',
isMainValue: true
},{
key: 'inventoryStatus',
value: 'SCRAP',
isMainValue: false
}]
}
}
},
@ -450,6 +507,9 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
tableForm: {
disabled: true
}
},
{
label: '数量',
@ -492,6 +552,9 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
tableForm: {
disabled: true
}
},
{
label: '库存状态',

Loading…
Cancel
Save