Browse Source

检验任务加回到顶部,检验方案加复制功能

hella_online_20240829
zhang_li 5 months ago
parent
commit
9f5379ab3c
  1. 15
      src/views/qms/inspectionJob/addForm.vue
  2. 77
      src/views/qms/inspectionScheme/addForm.vue
  3. 3
      src/views/qms/inspectionScheme/index.vue
  4. 3
      src/views/qms/inspectionTemplate/addForm.vue

15
src/views/qms/inspectionJob/addForm.vue

@ -2,7 +2,8 @@
<div>
<Dialog :title="dialogTitle" v-model="dialogVisible" :width="dialogWidth" :close-on-click-modal="false"
:vLoading="formLoading">
<div style="max-height: 80vh; overflow-y: auto; padding: 0px 20px">
<div class="box" style="max-height: 80vh; overflow-y: auto; padding: 0px 20px" ref="mianscroll">
<el-backtop :right="40" :bottom="100" target='.box' @click="topScrollClick"/>
<Form ref="formMainRef" :rules="rules" :schema="formSchema" :is-col="true" @opensearchTable="opensearchTable" />
<div class="small-title">包装列表</div>
<div style="border:1px solid #dedede;margin-bottom:20px;display: flex;">
@ -1031,6 +1032,12 @@
cur.defectLevel = obj.defectLevel
cur.estimateCode = obj.estimateCode
}
const mianscroll =ref()
const topScrollClick=()=> {
nextTick(() => {
mianscroll.value.scrollTo({ top: 550, behavior: 'smooth' });
})
}
</script>
<style scoped>
.small-title {
@ -1042,11 +1049,15 @@
</style>
<style>
.el-tabs--left .el-tabs__header.is-left {
min-height: 700px !important;
padding-bottom: 5000px;
margin-bottom: -5000px;
min-width: 150px !important;
}
.el-tabs--left.el-tabs--border-card .el-tabs__item.is-left {
min-width: 120px !important;
}
.el-backtop{
position: absolute!important;
}
</style>

77
src/views/qms/inspectionScheme/addForm.vue

@ -819,6 +819,76 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
isShowField.value = 0 //isShowField == 0aql
if (row) {
data.value = JSON.parse(JSON.stringify(row))
//
if(formType.value == 'create'){
data.value.id = ''
data.value.code = ''
data.value.itemCode = ''
data.value.process= []
let list =[]
if (row.content) {
list = JSON.parse(row.content)
} else {
list = await InspectionProcessPageApi.getListByTempleteCode(row.programmeTemplateCode)
}
let arr = []
list.forEach((item, index) => {
editableTabsValue.value = index + 1
item.name = index + 1
console.log(item.inspectionCharacteristicsBaseVO)
let obj = {
inspectionCode:item.inspectionCode,
description:item.description,
inspectionCharCode:item.inspectionCharCode,
sequenceCode:item.sequenceCode,
name : index + 1,
inspectionCharacteristicsBaseVO:{
description:item.inspectionCharacteristicsBaseVO.description,
featureType:item.inspectionCharacteristicsBaseVO.featureType,
inspectionMethodCode:item.inspectionCharacteristicsBaseVO.inspectionMethodCode,
inspectionMethodName:item.inspectionCharacteristicsBaseVO.inspectionMethodName,
samplingProcessCode:item.inspectionCharacteristicsBaseVO.samplingProcessCode,
isCanUpdate:item.inspectionCharacteristicsBaseVO.isCanUpdate,
isDestructionInspection:item.inspectionCharacteristicsBaseVO.isDestructionInspection,
quantifyCapping:item.inspectionCharacteristicsBaseVO.quantifyCapping,
quantifyDecimal:item.inspectionCharacteristicsBaseVO.quantifyDecimal,
quantifyIsCapping:item.inspectionCharacteristicsBaseVO.quantifyIsCapping,
quantifyIsLowlimit:item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit,
quantifyIsTarget:item.inspectionCharacteristicsBaseVO.quantifyIsTarget,
quantifyLowlimit:item.inspectionCharacteristicsBaseVO.quantifyLowlimit,
quantifyQuantifyCode:item.inspectionCharacteristicsBaseVO.quantifyQuantifyCode,
quantifyQuantifyName:item.inspectionCharacteristicsBaseVO.quantifyQuantifyName,
quantifyTarget:item.inspectionCharacteristicsBaseVO.quantifyTarget,
quantifyUom:item.inspectionCharacteristicsBaseVO.quantifyUom,
resultEntryMethod:item.inspectionCharacteristicsBaseVO.resultEntryMethod,
samplingProcessCode:item.inspectionCharacteristicsBaseVO.samplingProcessCode,
samplingProcessName:item.inspectionCharacteristicsBaseVO.samplingProcessName,
}
}
//
if (item.inspectionCharacteristicsBaseVO.quantifyIsCapping) {
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false
}
if (item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit) {
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false
}
if (item.inspectionCharacteristicsBaseVO.quantifyIsTarget) {
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false
}
arr.push(obj)
})
data.value.process = arr
console.log(111, data.value)
}else{
let list = []
if (row.content) {
list = JSON.parse(row.content)
@ -858,6 +928,10 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
rules.value.aql[0].required = false
}
data.value.process = list
}
} else {
data.value = {
code: '',
@ -1323,7 +1397,8 @@ const changeIsTarget = (e, item) => {
</style>
<style>
.el-tabs--left .el-tabs__header.is-left {
min-height: 700px !important;
padding-bottom: 5000px;
margin-bottom: -5000px;
min-width: 150px !important;
}
.el-tabs--left.el-tabs--border-card .el-tabs__item.is-left {

3
src/views/qms/inspectionScheme/index.vue

@ -139,6 +139,7 @@ const butttondata = (row) => {
defaultButtons.mainListEditBtn({hasPermi: 'qms:inspection-scheme:update'}),
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'qms:inspection-scheme:enable'}),
defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'qms:inspection-scheme:disable'}),
defaultButtons.mainCopyBtn({hasPermi:'qms:programme-template:copy'}),
]
}
@ -152,6 +153,8 @@ const buttonTableClick = async (val, row) => {
handleEnable(row.id)
}else if (val == 'disable') {
handleDisable(row.id)
}else if (val == 'copy') {
openForm('create', row)
}
}

3
src/views/qms/inspectionTemplate/addForm.vue

@ -1027,7 +1027,8 @@ const changeIsTarget = (e,item) => {
</style>
<style>
.el-tabs--left .el-tabs__header.is-left {
min-height: 700px !important;
padding-bottom: 5000px;
margin-bottom: -5000px;
min-width: 150px !important;
}
.el-tabs--left.el-tabs--border-card .el-tabs__item.is-left {

Loading…
Cancel
Save