陈薪名 12 months ago
parent
commit
7eee069a13
  1. 32
      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. 71
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts

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

@ -65,4 +65,34 @@ export const exportScrapRequestMain = async (params) => {
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/scrap-request-main/get-import-template' }) 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) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // // defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), // // defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // // defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobExeBtn({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) => { 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:scrap-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), // defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:scrap-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), // defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:scrap-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:scrap-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:scrap-request-main:agree'}), //
defaultButtons.mainListEditBtn({hasPermi:'wms:scrap-request-main:update'}), // defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:scrap-request-main:handle'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:scrap-request-main:delete'}), // 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) => { const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { // if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭') console.log('列表-操作按钮事件-关闭')
handleClose(row.id)
} else if (val == 'mainReAdd') { // } else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加') console.log('列表-操作按钮事件-重新添加')
handleReAdd(row.id)
} else if (val == 'mainSubmit') { // } else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批') console.log('列表-操作按钮事件-提交审批')
handleSubmit(row.id)
} else if (val == 'mainTurnDown') { // } else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回') console.log('列表-操作按钮事件-驳回')
handleRefused(row.id)
} else if (val == 'mainApprove') { // } else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过') console.log('列表-操作按钮事件-审批通过')
handleAgree(row.id)
} else if (val == 'mainHandle') { //
handleHandle(row.id)
} else if (val == 'edit') { // } else if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } 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 formRef = ref()
const openForm =async (type: string, row?: number) => { const openForm =async (type: string, row?: number) => {

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

@ -18,6 +18,8 @@ const queryParams = {
// 获取当前操作人的部门 // 获取当前操作人的部门
import { useUserStore } from '@/store/modules/user' 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 userStore = useUserStore()
const userDept = userStore.userSelfInfo.dept const userDept = userStore.userSelfInfo.dept
@ -105,7 +107,35 @@ export const ScrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
isSearch: true, 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: '从库位类型范围', label: '从库位类型范围',
@ -377,6 +407,9 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
tableForm: {
disabled: true
}
}, },
{ {
label: '物品名称', label: '物品名称',
@ -387,6 +420,9 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isTableForm: false, isTableForm: false,
isForm: false, isForm: false,
tableForm: {
disabled: true
}
}, },
{ {
label: '物品描述1', label: '物品描述1',
@ -415,6 +451,9 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
tableForm: {
disabled: true
}
}, },
{ {
label: '包装号', label: '包装号',
@ -429,7 +468,16 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'packingNumber', searchField: 'packingNumber',
searchTitle: '库存余额信息', searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas, searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePage searchPage: BalanceApi.getBalancePage,
searchCondition: [{
key: 'warehouseCode',
value: 'fromWarehouseCode',
isMainValue: true
},{
key: 'inventoryStatus',
value: 'SCRAP',
isMainValue: false
}]
}, },
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
@ -439,7 +487,16 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'packingNumber', searchField: 'packingNumber',
searchTitle: '库存余额信息', searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas, 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: { table: {
width: 150 width: 150
}, },
tableForm: {
disabled: true
}
}, },
{ {
label: '数量', label: '数量',
@ -492,6 +552,9 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
tableForm: {
disabled: true
}
}, },
{ {
label: '库存状态', label: '库存状态',
@ -647,4 +710,4 @@ export const ScrapRequestDetailRules = reactive({
itemCode: [ itemCode: [
{ required: true, message: '请选择物品代码', trigger: 'change' } { required: true, message: '请选择物品代码', trigger: 'change' }
], ],
}) })

Loading…
Cancel
Save