Browse Source

任务和检验记录包装不好使问题

master_hella_20240701
zhang_li 7 months ago
parent
commit
8cc3c8aeb3
  1. 13
      src/api/qms/inspectionJob/InspectionJobPackage/InspectionJobPackage.ts
  2. 5
      src/api/qms/inspectionJob/inspectionJobMain/index.ts
  3. 13
      src/api/qms/inspectionRecord/InspectionRecordPackage/InspectionRecordPackage.ts
  4. 4
      src/api/qms/inspectionRecord/inspectionRecordMain/index.ts
  5. 3
      src/views/qms/inspection/inspectionJob/addForm.vue
  6. 12
      src/views/qms/inspection/inspectionJob/index.vue
  7. 3
      src/views/qms/inspection/inspectionRecord/addForm.vue
  8. 14
      src/views/qms/inspection/inspectionRecord/index.vue

13
src/api/qms/inspectionJob/InspectionJobPackage/InspectionJobPackage.ts

@ -0,0 +1,13 @@
import request from '@/config/axios'
export interface InspectionRequestPackageVO {
number: string
packageCode: string
packageSpecificationCode: string
amount: string
measuringUnit: string
}
//查询包装列表
export const getInspectionJobPackageList = async (id: number) => {
return await request.get({ url: `/qms/inspection-job-package/list?masterId=` + id })
}

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

@ -55,8 +55,5 @@ export const exportInspectionJobMain = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/qms/inspection-job-main/get-import-template' })
}
//查询包装列表
export const getInspectionJobPackageList = async (id: number) => {
  return await request.get({ url: `/qms/inspection-job-package/list?masterId=` + id })
}

13
src/api/qms/inspectionRecord/InspectionRecordPackage/InspectionRecordPackage.ts

@ -0,0 +1,13 @@
import request from '@/config/axios'
export interface InspectionRequestPackageVO {
number: string
packageCode: string
packageSpecificationCode: string
amount: string
measuringUnit: string
}
//查询包装列表
export const getInspectionRecordPackageList = async (id: number) => {
return await request.get({ url: `/qms/inspection-record-package/list?masterId=` + id })
}

4
src/api/qms/inspectionRecord/inspectionRecordMain/index.ts

@ -67,7 +67,3 @@ export const importTemplate = () => {
export const publishInspectionRecordMain = async (id) => {
return await request.put({ url: `/qms/inspection-record-main/publish?id=`+id })
}
//查询包装列表
export const getInspectionRecordPackageList = async (id: number) => {
return await request.get({ url: `/qms/inspection-record-package/list?masterId=` + id })
}

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

@ -171,6 +171,7 @@ import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import * as InspectionJobDetailPageApi from '@/api/qms/inspectionJob/inspectionJobDetail'
import { SearchTable } from '@/components/SearchTable'
import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'
import * as InspectionJobPackageApi from '@/api/qms/inspectionJob/InspectionJobPackage/InspectionJobPackage'
const { proxy } = getCurrentInstance()
@ -337,7 +338,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
// await InspectionJobMainApi.acceptInspectionJobMain(row.id)
let list = []
list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id)
data.value.packageList = await InspectionJobMainApi.getInspectionJobPackageList(row.id)
data.value.packageList = await InspectionJobPackageApi.getInspectionJobPackageList(row.id)
list.forEach((item, index) => {
editableTabsValue.value = index + 1
item.name = index + 1

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

@ -51,7 +51,9 @@
:isShowAddBtn="false" :detailButtonIsShow="true"
/>
<!-- 包装信息 -->
<ListTable ref="listTableRef" titleName="包装信息"/>
<ListTable ref="listTableRef" titleName="包装信息" :allSchemas="InspectionJobMain.allSchemas"
:detailAllSchemas="InspectionJobPackage.allSchemas" :detailAllSchemasRules="InspectionJobPackageRules"
:list="list" />
</template>
<script setup lang="ts">
@ -59,6 +61,7 @@
import { InspectionJobMain, InspectionJobMainRules, InspectionJobDetail, InspectionJobDetailRules,InspectionJobPackage,InspectionJobPackageRules} from './inspectionJobMain.data'
import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../../basicDataManage/inspectionTemplate/inspectionTemplate.data'
import * as InspectionJobPackageApi from '@/api/qms/inspectionJob/InspectionJobPackage/InspectionJobPackage'
import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'
import * as InspectionJobDetailApi from '@/api/qms/inspectionJob/inspectionJobDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -168,13 +171,16 @@
]
}
const listTableRef = ref()
const list = ref([])
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainJobExe') { //
execute('execute', row)
}else if (val == 'mainPackage') { //
const list = await InspectionJobMainApi.getInspectionJobPackageList(row.id)
listTableRef.value.openPackage(row,'包装信息',InspectionJobPackage.allSchemas.tableColumns,list)
list.value = await InspectionJobPackageApi.getInspectionJobPackageList(row.id)
// row.status = '1'
listTableRef.value.openPackage(row,'包装信息',InspectionJobPackage.allSchemas.tableColumns)
}else if (val == 'mainJobAba') { //
handleAbandon(row.id)
} else if (val == 'mainJobClo') { //

3
src/views/qms/inspection/inspectionRecord/addForm.vue

@ -43,6 +43,7 @@ import { getCurrentInstance } from 'vue'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import { SearchTable } from '@/components/SearchTable'
import * as InspectionRecordMainApi from '@/api/qms/inspectionRecord/inspectionRecordMain'
import * as InspectionRecordPackageApi from '@/api/qms/inspectionRecord/InspectionRecordPackage/InspectionRecordPackage'
const { proxy } = getCurrentInstance()
@ -123,7 +124,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
formType.value = type
if (row) {
data.value = JSON.parse(JSON.stringify(row))
data.value.packageList = await InspectionRecordMainApi.getInspectionRecordPackageList(row.id)
data.value.packageList = await InspectionRecordPackageApi.getInspectionRecordPackageList(row.id)
data.value.packageList.forEach(item=>{
item.qualifiedAmount =0
item.noQualifiedAmount =0

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

@ -45,14 +45,16 @@
:apiDelete="InspectionRecordDetailApi.deleteInspectionRecordDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
:isShowAddBtn="false" :detailButtonIsShow="true"
/>
<!-- 包装信息 -->
<ListTable ref="listTableRef" titleName="包装信息"/>
<!-- 包装信息 --> <ListTable ref="listTableRef" titleName="包装信息" :allSchemas="InspectionRecordMain.allSchemas"
:detailAllSchemas="InspectionRecordPackage.allSchemas" :detailAllSchemasRules="InspectionRecordPackageRules"
:list="list"/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { InspectionRecordMain, InspectionRecordMainRules, InspectionRecordDetail, InspectionRecordDetailRules,InspectionRecordPackage, InspectionRecordPackageRules} from './inspectionRecordMain.data'
// import { InspectionJobPackage,InspectionJobPackageRules} from '../inspectionJob/inspectionJobMain.data'
import * as InspectionRecordPackageApi from '@/api/qms/inspectionRecord/InspectionRecordPackage/InspectionRecordPackage'
import * as InspectionRecordMainApi from '@/api/qms/inspectionRecord/inspectionRecordMain'
import * as InspectionRecordDetailApi from '@/api/qms/inspectionRecord/inspectionRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -132,6 +134,7 @@ import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
}
const listTableRef = ref()
const list = ref([])
const useDecisionList = getStrDictOptions(DICT_TYPE.USAGE_DECISION)
// const useDecisionList = InspectionRecordMain.allSchemas.formSchema.filter(item=>item.field == "useDecision")
// -
@ -153,14 +156,15 @@ import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
}
openForm('update', row)
}else if (val == 'mainPackage') { //
const list = await InspectionRecordMainApi.getInspectionRecordPackageList(row.id)
list.forEach(item=>{
list.value = await InspectionRecordPackageApi.getInspectionRecordPackageList(row.id)
list.value.forEach(item=>{
item.qualifiedAmount = item.qualifiedAmount ?item.qualifiedAmount :0
item.noQualifiedAmount = item.noQualifiedAmount ?item.noQualifiedAmount :0
item.destroyAmount = item.destroyAmount ?item.destroyAmount :0
item.frozenAmount = item.frozenAmount ?item.frozenAmount :0
})
listTableRef.value.openPackage(row,'包装信息',InspectionRecordPackage.allSchemas.tableColumns,list)
// row.status = '1'
listTableRef.value.openPackage(row,'包装信息',InspectionRecordPackage.allSchemas.tableColumns)
}else if (val == 'delete') { //
handleDelete(row.id)
}else if (val == 'mainOrderPub') { //

Loading…
Cancel
Save