Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into master_hella

master_hella_20240701
songguoqiang 8 months ago
parent
commit
fb60329492
  1. 25
      src/api/qms/inspectionJob/inspectionJobMain/index.ts
  2. 6
      src/api/qms/selectedProject/index.ts
  3. 4
      src/locales/zh-CN.ts
  4. 3
      src/views/qms/basicDataManage/counter/counter.data.ts
  5. 1
      src/views/qms/basicDataManage/dynamicRule/dynamicRule.data.ts
  6. 6
      src/views/qms/basicDataManage/selectedProject/index.vue
  7. 3
      src/views/qms/basicDataManage/selectedProject/selectedProject.data.ts
  8. 68
      src/views/qms/basicDataManage/selectedSet/index.vue
  9. 3
      src/views/qms/basicDataManage/selectedSet/selectedSet.data.ts
  10. 20
      src/views/qms/inspection/inspectionJob/addForm.vue
  11. 57
      src/views/qms/inspection/inspectionJob/index.vue
  12. 33
      src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts
  13. 4
      src/views/qms/inspection/inspectionRecord/index.vue
  14. 1
      src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts
  15. 4
      src/views/system/systemInstallPackage/index.vue
  16. 6
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts

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

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

6
src/api/qms/selectedProject/index.ts

@ -54,4 +54,10 @@ export const exportSelectedProject = async (params) => {
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/qms/selected-project/get-import-template' }) return request.download({ url: '/qms/selected-project/get-import-template' })
}
// 查询选定集项目列表
export const getSelectedProjectNoPage = async (params) => {
return await request.get({ url: `/qms/selected-project/noPage`, params })
} }

4
src/locales/zh-CN.ts

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

3
src/views/qms/basicDataManage/counter/counter.data.ts

@ -18,7 +18,8 @@ export const Counter = useCrudSchemas(reactive<CrudSchema[]>([
label: '物料编码', label: '物料编码',
field: 'itemCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true,
fixed: 'left'
}, },
{ {
label: '检验类型编码', label: '检验类型编码',

1
src/views/qms/basicDataManage/dynamicRule/dynamicRule.data.ts

@ -25,6 +25,7 @@ export const DynamicRule = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false, isForm: false,
fixed: 'left'
}, },
{ {
label: '描述', label: '描述',

6
src/views/qms/basicDataManage/selectedProject/index.vue

@ -62,9 +62,9 @@ import download from '@/utils/download'
import { SelectedProject,SelectedProjectRules } from './selectedProject.data' import { SelectedProject,SelectedProjectRules } from './selectedProject.data'
import * as SelectedProjectApi from '@/api/qms/selectedProject' import * as SelectedProjectApi from '@/api/qms/selectedProject'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' // import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' // import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' // import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'SelectedProject' }) defineOptions({ name: 'SelectedProject' })

3
src/views/qms/basicDataManage/selectedProject/selectedProject.data.ts

@ -27,7 +27,8 @@ export const SelectedProject = useCrudSchemas(reactive<CrudSchema[]>([
field: 'code', field: 'code',
sort: 'custom', sort: 'custom',
isTableForm: false, isTableForm: false,
isSearch: true isSearch: true,
fixed: 'left'
}, },
{ {
label: '字典及字典项', label: '字典及字典项',

68
src/views/qms/basicDataManage/selectedSet/index.vue

@ -111,6 +111,8 @@ routeName.value = route.name
const tableColumns = ref(SelectedSet.allSchemas.tableColumns) const tableColumns = ref(SelectedSet.allSchemas.tableColumns)
// //
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => { nextTick(() => {
@ -290,7 +292,11 @@ const handleDeleteTable = (item, index) => {
// //
const submitForm = async (formType, data) => { const submitForm = async (formType, data) => {
if(!validateNotRepetition(tableData.value)){
message.alertWarning('选定集字典及字典项不能重复')
basicFormRef.value.formLoading = false
return
}
data.selectedProjectDOList = tableData.value// data.selectedProjectDOList = tableData.value//
data.selectedProjectDOList = data.selectedProjectDOList.map(item => { data.selectedProjectDOList = data.selectedProjectDOList.map(item => {
// '-%%%-'' dictionaryCode // '-%%%-'' dictionaryCode
@ -322,18 +328,68 @@ const submitForm = async (formType, data) => {
} }
} }
const updateSelections = async (masterId,row) => {
let param = { masterId: masterId };
SelectedProjectApi.getSelectedProjectNoPage(param).then(res => {
DictTypeApi.getDictTypeAndData('inspection').then(originalResponse => {
// element
const response = originalResponse.map(element => {
const options = element.dictDataRespVOList.map(item => {
return {
value: element.type + "-%%%-" + item.value,
label: element.name + "-" + item.label
};
}).filter(option => {
// resdictionaryTypeAndCodeoption
return !res.some(resItem => {
if(row != null){
return option.value === resItem.dictionaryTypeAndCode && option.value != row.dictionaryTypeAndCode
}else{
return option.value === resItem.dictionaryTypeAndCode
}
});
});
return { ...element, options }; // elementoptions
}).filter(element => element.options.length > 0); // optionselement
// options
const formSchemaItem = SelectedProject.allSchemas.formSchema.find(item => item.field === 'dictionaryTypeAndCode');
if (formSchemaItem) {
formSchemaItem.componentProps.options = response;
}
});
});
};
const validateNotRepetition = (data) => {
// dictionaryTypeAndCode
const codes = data.map(item => item.dictionaryTypeAndCode);
// Set dictionaryTypeAndCode
const uniqueCodes = new Set(codes);
// Set
if (codes.length > uniqueCodes.size) {
return false; // false
}
return true; // true
};
const detailValidate = (data) => { const detailValidate = (data) => {
let tag = true; let tag = true;
return tag return tag
} }
const detailOpenForm = (type, row, masterParmas) => { const detailOpenForm = (type, row, masterParmas) => {
// if(selectDictType.value){ if(type == 'create'){
updateSelections(masterParmas.masterId,row)
// } }else if('update'){
if(type='create'){ updateSelections(masterParmas.masterId,row)
} }
} }

3
src/views/qms/basicDataManage/selectedSet/selectedSet.data.ts

@ -17,7 +17,8 @@ export const SelectedSet = useCrudSchemas(reactive<CrudSchema[]>([
field: 'code', field: 'code',
sort: 'custom', sort: 'custom',
isForm: false, isForm: false,
isSearch: true isSearch: true,
fixed: 'left'
}, },
{ {
label: '描述', label: '描述',

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

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

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

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

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

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

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

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

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

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

4
src/views/system/systemInstallPackage/index.vue

@ -148,6 +148,8 @@ const openForm = (type: string, row?: any) => {
if(uploadFile){ if(uploadFile){
uploadFile['componentProps']['upData']['tableId'] = currentTime uploadFile['componentProps']['upData']['tableId'] = currentTime
uploadFile['componentProps']['modelValue']= [] uploadFile['componentProps']['modelValue']= []
uploadFile['value'] = ''
} }
}else if(type=='update'){ }else if(type=='update'){
const uploadFile = SystemInstallPackage.allSchemas.formSchema.find(item=>item.field=='uploadFile') const uploadFile = SystemInstallPackage.allSchemas.formSchema.find(item=>item.field=='uploadFile')
@ -163,7 +165,7 @@ const openForm = (type: string, row?: any) => {
// form // form
const formsSuccess = async (formType,data) => { const formsSuccess = async (formType,data) => {
if (formType === 'create') { if (formType === 'create') {
delete data['uploadFile'] // delete data['uploadFile']
await SystemInstallPackageApi.createSystemInstallPackage(data) await SystemInstallPackageApi.createSystemInstallPackage(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else { } else {

6
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts

@ -56,7 +56,7 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
form: { form: {
labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
isSearchList: true, isSearchList: true,
searchListPlaceholder: '请选择采购订单', searchListPlaceholder: '请选择采购订单',
@ -89,7 +89,7 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
form: { form: {
componentProps: { componentProps: {
disabled: true disabled: false
} }
} }
}, },
@ -101,7 +101,7 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
form: { form: {
componentProps: { componentProps: {
disabled: true disabled: false
} }
} }
}, },

Loading…
Cancel
Save