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. 53
      src/views/qms/inspection/inspectionJob/index.vue
  12. 31
      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'
// 查询检验申请列表
// 查询检验任务列表
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 })

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

@ -55,3 +55,9 @@ export const exportSelectedProject = async (params) => {
export const importTemplate = () => {
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: '审批通过成功',
refusedSuccess: '审批驳回成功',
handleSuccess: '执行成功',
acceptSuccess: '承接成功',
giveupSuccess: '放弃成功',
confirmColse: '确认关闭吗?',
confirmReAdd: '确认重新添加吗?',
confirmAgree: '确认审批通过吗?',
confirmRefused: '确认审批驳回吗?',
confirmHandle: '确认处理吗?',
confirmSubmit: '确认提交吗?',
confirmAccept: '确认承接吗?',
confirmGiveup: '确认放弃吗?',
},
error: {
noPermission: `抱歉,您无权访问此页面。`,

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

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

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

@ -25,6 +25,7 @@ export const DynamicRule = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: true,
isForm: false,
fixed: 'left'
},
{
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 * as SelectedProjectApi from '@/api/qms/selectedProject'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
// import TableHead from '@/components/TableHead/src/TableHead.vue'
// import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
// import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'SelectedProject' })

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

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

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

@ -111,6 +111,8 @@ routeName.value = route.name
const tableColumns = ref(SelectedSet.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
@ -290,7 +292,11 @@ const handleDeleteTable = (item, index) => {
//
const submitForm = async (formType, data) => {
if(!validateNotRepetition(tableData.value)){
message.alertWarning('选定集字典及字典项不能重复')
basicFormRef.value.formLoading = false
return
}
data.selectedProjectDOList = tableData.value//
data.selectedProjectDOList = data.selectedProjectDOList.map(item => {
// '-%%%-'' 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) => {
let tag = true;
return tag
}
const detailOpenForm = (type, row, masterParmas) => {
// if(selectDictType.value){
// }
if(type='create'){
if(type == 'create'){
updateSelections(masterParmas.masterId,row)
}else if('update'){
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',
sort: 'custom',
isForm: false,
isSearch: true
isSearch: true,
fixed: 'left'
},
{
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 {
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:{

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

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

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

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

Loading…
Cancel
Save