Browse Source

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

master_hella_20240701
yufei0306 7 months ago
parent
commit
0a2f32c0f4
  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. 84
      src/views/qms/inspection/inspectionRecord/detail.vue
  9. 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 = () => { export const importTemplate = () => {
return request.download({ url: '/qms/inspection-job-main/get-import-template' }) 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) => { export const publishInspectionRecordMain = async (id) => {
return await request.put({ url: `/qms/inspection-record-main/publish?id=`+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 * as InspectionJobDetailPageApi from '@/api/qms/inspectionJob/inspectionJobDetail'
import { SearchTable } from '@/components/SearchTable' import { SearchTable } from '@/components/SearchTable'
import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain' import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'
import * as InspectionJobPackageApi from '@/api/qms/inspectionJob/InspectionJobPackage/InspectionJobPackage'
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
@ -337,7 +338,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
// await InspectionJobMainApi.acceptInspectionJobMain(row.id) // await InspectionJobMainApi.acceptInspectionJobMain(row.id)
let list = [] let list = []
list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id) 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) => { list.forEach((item, index) => {
editableTabsValue.value = index + 1 editableTabsValue.value = index + 1
item.name = index + 1 item.name = index + 1

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

@ -51,7 +51,9 @@
:isShowAddBtn="false" :detailButtonIsShow="true" :isShowAddBtn="false" :detailButtonIsShow="true"
/> />
<!-- 包装信息 --> <!-- 包装信息 -->
<ListTable ref="listTableRef" titleName="包装信息"/> <ListTable ref="listTableRef" titleName="包装信息" :allSchemas="InspectionJobMain.allSchemas"
:detailAllSchemas="InspectionJobPackage.allSchemas" :detailAllSchemasRules="InspectionJobPackageRules"
:list="list" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -59,6 +61,7 @@
import { InspectionJobMain, InspectionJobMainRules, InspectionJobDetail, InspectionJobDetailRules,InspectionJobPackage,InspectionJobPackageRules} from './inspectionJobMain.data' import { InspectionJobMain, InspectionJobMainRules, InspectionJobDetail, InspectionJobDetailRules,InspectionJobPackage,InspectionJobPackageRules} from './inspectionJobMain.data'
import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../../basicDataManage/inspectionTemplate/inspectionTemplate.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 InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'
import * as InspectionJobDetailApi from '@/api/qms/inspectionJob/inspectionJobDetail' import * as InspectionJobDetailApi from '@/api/qms/inspectionJob/inspectionJobDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -168,13 +171,16 @@
] ]
} }
const listTableRef = ref() const listTableRef = ref()
const list = ref([])
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'mainJobExe') { // if (val == 'mainJobExe') { //
execute('execute', row) execute('execute', row)
}else if (val == 'mainPackage') { // }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') { // }else if (val == 'mainJobAba') { //
handleAbandon(row.id) handleAbandon(row.id)
} else if (val == 'mainJobClo') { // } 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 { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import { SearchTable } from '@/components/SearchTable' import { SearchTable } from '@/components/SearchTable'
import * as InspectionRecordMainApi from '@/api/qms/inspectionRecord/inspectionRecordMain' import * as InspectionRecordMainApi from '@/api/qms/inspectionRecord/inspectionRecordMain'
import * as InspectionRecordPackageApi from '@/api/qms/inspectionRecord/InspectionRecordPackage/InspectionRecordPackage'
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
@ -123,7 +124,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
formType.value = type formType.value = type
if (row) { if (row) {
data.value = JSON.parse(JSON.stringify(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=>{ data.value.packageList.forEach(item=>{
item.qualifiedAmount =0 item.qualifiedAmount =0
item.noQualifiedAmount =0 item.noQualifiedAmount =0

84
src/views/qms/inspection/inspectionRecord/detail.vue

@ -190,6 +190,90 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="计量单位" prop="inspectionRecordCharacteristicsRespVO.quantifyUom" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0" >
<el-select v-model="item.inspectionRecordCharacteristicsRespVO.quantifyUom" placeholder="请选择计量单位" disabled >
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.UOM)"
:key="dict.value"
:label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="小数位" prop="inspectionRecordCharacteristicsRespVO.quantifyDecimal" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0" >
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.quantifyDecimal" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0">
<el-form-item label="是否设定上限" prop="inspectionCharacteristicsBaseVO.quantifyIsCapping" >
<el-switch v-model="item.inspectionRecordCharacteristicsRespVO.quantifyIsCapping" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0">
<el-form-item prop="inspectionRecordCharacteristicsRespVO.quantifyIsLowlimit" label="是否设定下限" >
<el-switch v-model="item.inspectionRecordCharacteristicsRespVO.quantifyIsLowlimit" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="inspectionRecordCharacteristicsRespVO.quantifyIsTarget" label="是否设定目标值" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0" >
<el-switch v-model="item.inspectionRecordCharacteristicsRespVO.quantifyIsTarget" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0 && item.inspectionRecordCharacteristicsRespVO.quantifyIsCapping">
<el-form-item label="上限值" prop="inspectionRecordCharacteristicsRespVO.quantifyCapping" >
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.quantifyCapping" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0 && item.inspectionRecordCharacteristicsRespVO.quantifyIsLowlimit">
<el-form-item label="下限值" prop="inspectionRecordCharacteristicsRespVO.quantifyLowlimit" >
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.quantifyLowlimit" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0 && item.inspectionRecordCharacteristicsRespVO.quantifyIsTarget">
<el-form-item label="目标值" prop="inspectionRecordCharacteristicsRespVO.quantifyTarget" >
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.quantifyTarget" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="评估代码">
<el-select v-model="item.inspectionRecordCharacteristicsRespVO.estimateCode" placeholder="请选择评估代码" disabled>
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.EVALUATION_CODE)" :key="dict.value" :label="dict.label" :value="dict.value" disabled/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24" v-for="(cur, i) in item.inspectionRecordCharacteristicsRespVO.quantifyRespVOList" :key="i" style="border: 1px solid #dedede; border-radius: 4px; padding-top: 16px; margin-bottom: 10px;">
<el-row>
<!-- 汇总录入的时候显示 -->
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.resultEntryMethod == 1">
<el-form-item label="合格数量">
<el-input v-model="cur.qualifiedQuantity" placeholder="请输入合格数量" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.resultEntryMethod == 1">
<el-form-item label="不合格数量">
<el-input v-model="cur.unqualifiedQuantity" type="number" placeholder="请输入不合格数量" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == '0'">
<el-form-item label="检验值">
<el-input v-model="cur.inspectionValue" placeholder="请输入检验值" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == '1'">
<el-form-item label="选定集">
<el-input v-model="cur.number" placeholder="" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == '1'" >
<el-form-item label="缺陷级别">
<el-select v-model="cur.defectLevel" placeholder="请选择缺陷级别" disabled>
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.DEFECT_LEVEL)" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
</el-tab-pane> </el-tab-pane>

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

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

Loading…
Cancel
Save