Browse Source

任务添加承接和放弃,

master_hella_20240701
zhang_li 8 months ago
parent
commit
183860ec1d
  1. 25
      src/api/qms/inspectionJob/inspectionJobMain/index.ts
  2. 4
      src/locales/zh-CN.ts
  3. 20
      src/views/qms/inspection/inspectionJob/addForm.vue
  4. 53
      src/views/qms/inspection/inspectionJob/index.vue
  5. 31
      src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts
  6. 4
      src/views/qms/inspection/inspectionRecord/index.vue
  7. 1
      src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts

25
src/api/qms/inspectionJob/inspectionJobMain/index.ts

@ -1,7 +1,7 @@
import request from '@/config/axios'
// 查询检验申请列表
// 查询检验任务列表
export const getInspectionJobMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
@ -12,29 +12,40 @@ export const getInspectionJobMainPage = async (params) => {
}
}
// 查询检验申请详情
// 查询检验任务详情
export const getInspectionJobMain = async (id: number) => {
return await request.get({ url: `/qms/inspection-job-main/get?id=` + id })
}
// 新增检验申请
// 新增检验任务
export const createInspectionJobMain = async (data) => {
return await request.post({ url: `/qms/inspection-job-main/create`, data })
}
// 修改检验申请
// 修改检验任务
export const updateInspectionJobMain = async (data) => {
return await request.put({ url: `/qms/inspection-job-main/update`, data })
}
// 执行检验申请
// 执行检验任务
export const executeInspectionJobMain = async (data) => {
return await request.put({ url: `/qms/inspection-job-main/execute`, data })
}
// 删除检验申请
// 删除检验任务
export const deleteInspectionJobMain = async (id: number) => {
return await request.delete({ url: `/qms/inspection-job-main/delete?id=` + id })
}
// 承接检验任务
export const acceptInspectionJobMain = async (id) => {
return await request.put({ url: `/qms/inspection-job-main/accept?id=` + id })
}
// 放弃检验任务
export const abandonInspectionJobMain = async (id) => {
return await request.put({ url: `/qms/inspection-job-main/abandon?id=` + id })
}
// 关闭检验任务
export const closeInspectionJobMain = async (id) => {
return await request.put({ url: `/qms/inspection-job-main/close?id=` + id })
}
// 导出检验申请 Excel
export const exportInspectionJobMain = async (params) => {
return await request.download({ url: `/qms/inspection-job-main/export-excel`, params })

4
src/locales/zh-CN.ts

@ -61,12 +61,16 @@ export default {
agreeSuccess: '审批通过成功',
refusedSuccess: '审批驳回成功',
handleSuccess: '执行成功',
acceptSuccess: '承接成功',
giveupSuccess: '放弃成功',
confirmColse: '确认关闭吗?',
confirmReAdd: '确认重新添加吗?',
confirmAgree: '确认审批通过吗?',
confirmRefused: '确认审批驳回吗?',
confirmHandle: '确认处理吗?',
confirmSubmit: '确认提交吗?',
confirmAccept: '确认承接吗?',
confirmGiveup: '确认放弃吗?',
},
error: {
noPermission: `抱歉,您无权访问此页面。`,

20
src/views/qms/inspection/inspectionJob/addForm.vue

@ -557,16 +557,16 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
}
} else {
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = []
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false
// item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({
// inspectionValue: '', //
// qualitativeCode: '', //
// estimateCode: '', //
// defectLevel: '', //
// qualifiedQuantity: '', //
// unqualifiedQuantity: '' //
// }
// )
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({
inspectionValue: '', //
qualitativeCode: '', //
estimateCode: '', //
defectLevel: '', //
qualifiedQuantity: '', //
unqualifiedQuantity: '' //
}
)
}
//
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping) {

53
src/views/qms/inspection/inspectionJob/index.vue

@ -161,10 +161,10 @@
// -
const butttondata = (row) => {
return [
// defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:close'}), //
// defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:accept'}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:close'}), //
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2']),hasPermi:'qms:inspection-job-main:abandon'}), //
defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2']),hasPermi:'qms:inspection-job-main:execute'}), //
defaultButtons.mainListPackageBtn(null), //
]
}
@ -176,9 +176,14 @@ const listTableRef = ref()
}else if (val == 'mainPackage') { //
const list = await InspectionJobMainApi.getInspectionJobPackageList(row.id)
listTableRef.value.openPackage(row,'包装信息',InspectionJobPackage.allSchemas.tableColumns,list)
}
else if (val == 'mainJobClo') { //
handleDelete(row.id)
}else if (val == 'mainJobAba') { //
console.log('列表-操作按钮事件-放弃')
handleAbandon(row.id)
} else if (val == 'mainJobClo') { //
handleClose(row.id)
} else if (val == 'mainJobAcc') { //
console.log('列表-操作按钮事件-承接')
handleAccept(row.id)
}
}
@ -200,14 +205,38 @@ const listTableRef = ref()
const execute = async (type : string, row ?: number) => {
formRef.value.open(type, row)
}
/** 删除按钮操作 */
const handleDelete = async (id : number) => {
/** 关闭按钮操作 */
const handleClose = async (id : number) => {
try {
//
await message.delConfirm()
await message.confirm(t('common.confirmColse'))
//
await InspectionJobMainApi.deleteInspectionJobMain(id)
message.success(t('common.delSuccess'))
await InspectionJobMainApi.closeInspectionJobMain(id)
message.success(t('common.closeSuccess'))
//
await getList()
} catch { }
}
//
const handleAccept = async (id : number) => {
try {
//
await message.confirm(t('common.confirmAccept'))
//
await InspectionJobMainApi.acceptInspectionJobMain(id)
message.success(t('common.acceptSuccess'))
//
await getList()
} catch { }
}
//
const handleAbandon = async (id : number) => {
try {
//
await message.confirm(t('common.confirmGiveup'))
//
await InspectionJobMainApi.abandonInspectionJobMain(id)
message.success(t('common.giveupSuccess'))
//
await getList()
} catch { }

31
src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts

@ -61,21 +61,48 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
}
},{
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps:{
disabled:true
}
},
},
{
label: '物料编码',
field: 'materialCode',
field: 'itemCode',
sort: 'custom',
isSearch: true,
isSearch: false,
table: {
width: 150
},
form: {
componentProps:{
disabled:true
}
},
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps:{
disabled:true
}
},
},
{
label: '物料批次',
field: 'materialBatch',

4
src/views/qms/inspection/inspectionRecord/index.vue

@ -180,9 +180,9 @@
const butttondata = (row) => {
return [
// defaultButtons.mainListOrderCOMPLETEBtn({ hide: isShowMainButton(row, ['INCOMPLETE']) }), //
defaultButtons.mainListEditBtn(null), //
defaultButtons.mainListEditBtn({hasPermi:'qms:inspection-recode-main:edit'}), //
// defaultButtons.mainListDeleteBtn(null), //
defaultButtons.mainListOrderPubBtn(null), //
defaultButtons.mainListOrderPubBtn({hasPermi:'qms:inspection-recode-main:pub'}), //
defaultButtons.mainListPackageBtn(null), //
]
}

1
src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts

@ -365,6 +365,7 @@ export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: true,
tableForm:{
width:500,
disabled:true
},
table:{

Loading…
Cancel
Save