Browse Source

2024-06-18

功能优化
java8
fengyuan_yang 2 years ago
parent
commit
197e0aa55a
  1. 1
      src/api/qc/qc.js
  2. 44
      src/views/modules/qc/FAIResultEntry.vue
  3. 44
      src/views/modules/qc/FQCResultEntry.vue
  4. 44
      src/views/modules/qc/IPQCResultEntry.vue
  5. 53
      src/views/modules/qc/IQCResultEntry.vue

1
src/api/qc/qc.js

@ -168,6 +168,7 @@ export const actionIPQCInspection = data => createAPI(`/pms/qc/actionIPQCInspect
export const actionFQCInspection = data => createAPI(`/pms/qc/actionFQCInspection`,'post',data)
export const dataAcquisition = data => createAPI(`/pms/qc/dataAcquisition`,'post',data)
export const getEquipmentNoList = data => createAPI(`/pms/qc/getEquipmentNoList`,'post',data)
export const getResponsibleOperatorList = data => createAPI(`/pms/qc/getResponsibleOperatorList`,'post',data)

44
src/views/modules/qc/FAIResultEntry.vue

@ -775,7 +775,7 @@
<el-dialog title="人员清单" :close-on-click-modal="false" v-drag :visible.sync="operatorModelFlag" width="820px">
<div class="rq">
<el-form :inline="true" label-position="top" :model="operatorData">
<el-form-item :label="'所属角色'">
<el-form-item v-if="operatorData.flag !== '2'" :label="'所属角色'">
<el-select v-model="operatorData.roleId" placeholder="请选择" style="width: 120px">
<el-option
v-for = "i in roleList"
@ -874,6 +874,7 @@
searchSeqInfo, //
actionFAIInspection, //
dataAcquisition, //
getResponsibleOperatorList, //
} from "@/api/qc/qc.js"
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
@ -2204,6 +2205,7 @@
adminName: '',
roleName: '',
roleId: '',
userName: this.$store.state.user.name
},
operatorModelFlag: false,
dataListSelections2: [],
@ -2375,21 +2377,12 @@
getResponsiblePersonList () {
this.operatorData.flag = '2'
this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo
if (this.roleList.length > 0) {
let filterList = this.roleList.filter(item => item.roleName === '系统管理员')
if (filterList.length > 0) {
this.operatorData.roleId = filterList[0].roleId
} else {
this.operatorData.roleId = this.roleList[0].roleId
}
} else {
this.operatorData.roleId = ''
}
//
this.$nextTick(() => this.$refs.operatorTable.clearSelection())
//
let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';')
getOperatorList(this.operatorData).then(({data}) => {
getResponsibleOperatorList(this.operatorData).then(({data}) => {
if (data && data.code === 0) {
this.operatorList = data.rows
this.operatorList.forEach(val => {
@ -2428,7 +2421,7 @@
} else {
//
let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';')
getOperatorList(this.operatorData).then(({data}) => {
getResponsibleOperatorList(this.operatorData).then(({data}) => {
if (data && data.code === 0) {
this.operatorList = data.rows
this.operatorList.forEach(val => {
@ -2462,18 +2455,26 @@
}
if (this.operatorData.flag === '1') {
for (let i = 0; i < this.dataListSelections2.length; i++) {
this.detailData.operatorName = this.detailData.operatorName + ";" + this.dataListSelections2[i].adminName
this.detailData.operator = this.detailData.operator + ";" + this.dataListSelections2[i].adminID
if (!this.detailData.operator.split(';').includes(this.dataListSelections2[i].adminID)) {
this.detailData.operatorName = this.detailData.operatorName + ";" + this.dataListSelections2[i].adminName
this.detailData.operator = this.detailData.operator + ";" + this.dataListSelections2[i].adminID
}
}
if (this.detailData.operator.charAt(0) === ';') {
this.detailData.operator = this.detailData.operator.substring(1)
this.detailData.operatorName = this.detailData.operatorName.substring(1)
}
this.detailData.operator = this.detailData.operator.substring(1)
this.detailData.operatorName = this.detailData.operatorName.substring(1)
} else {
for (let i = 0; i < this.dataListSelections2.length; i++) {
this.detailData.responsiblePersonName = this.detailData.responsiblePersonName + ";" + this.dataListSelections2[i].adminName
this.detailData.responsiblePerson = this.detailData.responsiblePerson + ";" + this.dataListSelections2[i].adminID
if (!this.detailData.responsiblePerson.split(';').includes(this.dataListSelections2[i].adminID)) {
this.detailData.responsiblePersonName = this.detailData.responsiblePersonName + ";" + this.dataListSelections2[i].adminName
this.detailData.responsiblePerson = this.detailData.responsiblePerson + ";" + this.dataListSelections2[i].adminID
}
}
if (this.detailData.responsiblePerson.charAt(0) === ';') {
this.detailData.responsiblePerson = this.detailData.responsiblePerson.substring(1)
this.detailData.responsiblePersonName = this.detailData.responsiblePersonName.substring(1)
}
this.detailData.responsiblePerson = this.detailData.responsiblePerson.substring(1)
this.detailData.responsiblePersonName = this.detailData.responsiblePersonName.substring(1)
}
this.operatorData = {
flag: '',
@ -2483,6 +2484,7 @@
adminName: '',
roleName: '',
roleId: '',
userName: this.$store.state.user.name
}
this.operatorModelFlag = false
},

44
src/views/modules/qc/FQCResultEntry.vue

@ -751,7 +751,7 @@
<el-dialog title="人员清单" :close-on-click-modal="false" v-drag :visible.sync="operatorModelFlag" width="820px">
<div class="rq">
<el-form :inline="true" label-position="top" :model="operatorData">
<el-form-item :label="'所属角色'">
<el-form-item v-if="operatorData.flag !== '2'" :label="'所属角色'">
<el-select v-model="operatorData.roleId" placeholder="请选择" style="width: 120px">
<el-option
v-for = "i in roleList"
@ -851,6 +851,7 @@
searchSeqInfo, //
actionFQCInspection, //
dataAcquisition, //
getResponsibleOperatorList, //
} from "@/api/qc/qc.js"
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
@ -2179,6 +2180,7 @@
adminName: '',
roleName: '',
roleId: '',
userName: this.$store.state.user.name
},
operatorModelFlag: false,
dataListSelections2: [],
@ -2350,21 +2352,12 @@
getResponsiblePersonList () {
this.operatorData.flag = '2'
this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo
if (this.roleList.length > 0) {
let filterList = this.roleList.filter(item => item.roleName === '系统管理员')
if (filterList.length > 0) {
this.operatorData.roleId = filterList[0].roleId
} else {
this.operatorData.roleId = this.roleList[0].roleId
}
} else {
this.operatorData.roleId = ''
}
//
this.$nextTick(() => this.$refs.operatorTable.clearSelection())
//
let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';')
getOperatorList(this.operatorData).then(({data}) => {
getResponsibleOperatorList(this.operatorData).then(({data}) => {
if (data && data.code === 0) {
this.operatorList = data.rows
this.operatorList.forEach(val => {
@ -2403,7 +2396,7 @@
} else {
//
let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';')
getOperatorList(this.operatorData).then(({data}) => {
getResponsibleOperatorList(this.operatorData).then(({data}) => {
if (data && data.code === 0) {
this.operatorList = data.rows
this.operatorList.forEach(val => {
@ -2437,18 +2430,26 @@
}
if (this.operatorData.flag === '1') {
for (let i = 0; i < this.dataListSelections2.length; i++) {
this.detailData.operatorName = this.detailData.operatorName + ";" + this.dataListSelections2[i].adminName
this.detailData.operator = this.detailData.operator + ";" + this.dataListSelections2[i].adminID
if (!this.detailData.operator.split(';').includes(this.dataListSelections2[i].adminID)) {
this.detailData.operatorName = this.detailData.operatorName + ";" + this.dataListSelections2[i].adminName
this.detailData.operator = this.detailData.operator + ";" + this.dataListSelections2[i].adminID
}
}
if (this.detailData.operator.charAt(0) === ';') {
this.detailData.operator = this.detailData.operator.substring(1)
this.detailData.operatorName = this.detailData.operatorName.substring(1)
}
this.detailData.operator = this.detailData.operator.substring(1)
this.detailData.operatorName = this.detailData.operatorName.substring(1)
} else {
for (let i = 0; i < this.dataListSelections2.length; i++) {
this.detailData.responsiblePersonName = this.detailData.responsiblePersonName + ";" + this.dataListSelections2[i].adminName
this.detailData.responsiblePerson = this.detailData.responsiblePerson + ";" + this.dataListSelections2[i].adminID
if (!this.detailData.responsiblePerson.split(';').includes(this.dataListSelections2[i].adminID)) {
this.detailData.responsiblePersonName = this.detailData.responsiblePersonName + ";" + this.dataListSelections2[i].adminName
this.detailData.responsiblePerson = this.detailData.responsiblePerson + ";" + this.dataListSelections2[i].adminID
}
}
if (this.detailData.responsiblePerson.charAt(0) === ';') {
this.detailData.responsiblePerson = this.detailData.responsiblePerson.substring(1)
this.detailData.responsiblePersonName = this.detailData.responsiblePersonName.substring(1)
}
this.detailData.responsiblePerson = this.detailData.responsiblePerson.substring(1)
this.detailData.responsiblePersonName = this.detailData.responsiblePersonName.substring(1)
}
this.operatorData = {
flag: '',
@ -2458,6 +2459,7 @@
adminName: '',
roleName: '',
roleId: '',
userName: this.$store.state.user.name
}
this.operatorModelFlag = false
},

44
src/views/modules/qc/IPQCResultEntry.vue

@ -773,7 +773,7 @@
<el-dialog title="人员清单" :close-on-click-modal="false" v-drag :visible.sync="operatorModelFlag" width="820px">
<div class="rq">
<el-form :inline="true" label-position="top" :model="operatorData">
<el-form-item :label="'所属角色'">
<el-form-item v-if="operatorData.flag !== '2'" :label="'所属角色'">
<el-select v-model="operatorData.roleId" placeholder="请选择" style="width: 120px">
<el-option
v-for = "i in roleList"
@ -871,6 +871,7 @@
searchSeqInfo, //
actionIPQCInspection, //
dataAcquisition, //
getResponsibleOperatorList, //
} from "@/api/qc/qc.js"
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
@ -2233,6 +2234,7 @@
adminName: '',
roleName: '',
roleId: '',
userName: this.$store.state.user.name
},
operatorModelFlag: false,
dataListSelections2: [],
@ -2404,21 +2406,12 @@
getResponsiblePersonList () {
this.operatorData.flag = '2'
this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo
if (this.roleList.length > 0) {
let filterList = this.roleList.filter(item => item.roleName === '系统管理员')
if (filterList.length > 0) {
this.operatorData.roleId = filterList[0].roleId
} else {
this.operatorData.roleId = this.roleList[0].roleId
}
} else {
this.operatorData.roleId = ''
}
//
this.$nextTick(() => this.$refs.operatorTable.clearSelection())
//
let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';')
getOperatorList(this.operatorData).then(({data}) => {
getResponsibleOperatorList(this.operatorData).then(({data}) => {
if (data && data.code === 0) {
this.operatorList = data.rows
this.operatorList.forEach(val => {
@ -2457,7 +2450,7 @@
} else {
//
let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';')
getOperatorList(this.operatorData).then(({data}) => {
getResponsibleOperatorList(this.operatorData).then(({data}) => {
if (data && data.code === 0) {
this.operatorList = data.rows
this.operatorList.forEach(val => {
@ -2491,18 +2484,26 @@
}
if (this.operatorData.flag === '1') {
for (let i = 0; i < this.dataListSelections2.length; i++) {
this.detailData.operatorName = this.detailData.operatorName + ";" + this.dataListSelections2[i].adminName
this.detailData.operator = this.detailData.operator + ";" + this.dataListSelections2[i].adminID
if (!this.detailData.operator.split(';').includes(this.dataListSelections2[i].adminID)) {
this.detailData.operatorName = this.detailData.operatorName + ";" + this.dataListSelections2[i].adminName
this.detailData.operator = this.detailData.operator + ";" + this.dataListSelections2[i].adminID
}
}
if (this.detailData.operator.charAt(0) === ';') {
this.detailData.operator = this.detailData.operator.substring(1)
this.detailData.operatorName = this.detailData.operatorName.substring(1)
}
this.detailData.operator = this.detailData.operator.substring(1)
this.detailData.operatorName = this.detailData.operatorName.substring(1)
} else {
for (let i = 0; i < this.dataListSelections2.length; i++) {
this.detailData.responsiblePersonName = this.detailData.responsiblePersonName + ";" + this.dataListSelections2[i].adminName
this.detailData.responsiblePerson = this.detailData.responsiblePerson + ";" + this.dataListSelections2[i].adminID
if (!this.detailData.responsiblePerson.split(';').includes(this.dataListSelections2[i].adminID)) {
this.detailData.responsiblePersonName = this.detailData.responsiblePersonName + ";" + this.dataListSelections2[i].adminName
this.detailData.responsiblePerson = this.detailData.responsiblePerson + ";" + this.dataListSelections2[i].adminID
}
}
if (this.detailData.responsiblePerson.charAt(0) === ';') {
this.detailData.responsiblePerson = this.detailData.responsiblePerson.substring(1)
this.detailData.responsiblePersonName = this.detailData.responsiblePersonName.substring(1)
}
this.detailData.responsiblePerson = this.detailData.responsiblePerson.substring(1)
this.detailData.responsiblePersonName = this.detailData.responsiblePersonName.substring(1)
}
this.operatorData = {
flag: '',
@ -2512,6 +2513,7 @@
adminName: '',
roleName: '',
roleId: '',
userName: this.$store.state.user.name
}
this.operatorModelFlag = false
},

53
src/views/modules/qc/IQCResultEntry.vue

@ -489,7 +489,7 @@
<el-dialog title="人员清单" :close-on-click-modal="false" v-drag :visible.sync="operatorModelFlag" width="820px">
<div class="rq">
<el-form :inline="true" label-position="top" :model="operatorData">
<el-form-item :label="'所属角色'">
<el-form-item v-if="operatorData.flag !== '2'" :label="'所属角色'">
<el-select v-model="operatorData.roleId" placeholder="请选择" style="width: 120px">
<el-option
v-for = "i in roleList"
@ -578,6 +578,7 @@
orderTypeSearch, //
actionIQCInspection, //
dataAcquisition, //
getResponsibleOperatorList, //
} from "@/api/qc/qc.js"
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
@ -1529,6 +1530,7 @@
adminName: '',
roleName: '',
roleId: '',
userName: this.$store.state.user.name
},
operatorModelFlag: false,
dataListSelections2: [],
@ -1692,21 +1694,21 @@
getResponsiblePersonList () {
this.operatorData.flag = '2'
this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo
if (this.roleList.length > 0) {
let filterList = this.roleList.filter(item => item.roleName === '系统管理员')
if (filterList.length > 0) {
this.operatorData.roleId = filterList[0].roleId
} else {
this.operatorData.roleId = this.roleList[0].roleId
}
} else {
this.operatorData.roleId = ''
}
// if (this.roleList.length > 0) {
// let filterList = this.roleList.filter(item => item.roleName === '')
// if (filterList.length > 0) {
// this.operatorData.roleId = filterList[0].roleId
// } else {
// this.operatorData.roleId = this.roleList[0].roleId
// }
// } else {
// this.operatorData.roleId = ''
// }
//
this.$nextTick(() => this.$refs.operatorTable.clearSelection())
//
let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';')
getOperatorList(this.operatorData).then(({data}) => {
getResponsibleOperatorList(this.operatorData).then(({data}) => {
if (data && data.code === 0) {
this.operatorList = data.rows
this.operatorList.forEach(val => {
@ -1745,7 +1747,7 @@
} else {
//
let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';')
getOperatorList(this.operatorData).then(({data}) => {
getResponsibleOperatorList(this.operatorData).then(({data}) => {
if (data && data.code === 0) {
this.operatorList = data.rows
this.operatorList.forEach(val => {
@ -1779,18 +1781,26 @@
}
if (this.operatorData.flag === '1') {
for (let i = 0; i < this.dataListSelections2.length; i++) {
this.detailData.operatorName = this.detailData.operatorName + ";" + this.dataListSelections2[i].adminName
this.detailData.operator = this.detailData.operator + ";" + this.dataListSelections2[i].adminID
if (!this.detailData.operator.split(';').includes(this.dataListSelections2[i].adminID)) {
this.detailData.operatorName = this.detailData.operatorName + ";" + this.dataListSelections2[i].adminName
this.detailData.operator = this.detailData.operator + ";" + this.dataListSelections2[i].adminID
}
}
if (this.detailData.operator.charAt(0) === ';') {
this.detailData.operator = this.detailData.operator.substring(1)
this.detailData.operatorName = this.detailData.operatorName.substring(1)
}
this.detailData.operator = this.detailData.operator.substring(1)
this.detailData.operatorName = this.detailData.operatorName.substring(1)
} else {
for (let i = 0; i < this.dataListSelections2.length; i++) {
this.detailData.responsiblePersonName = this.detailData.responsiblePersonName + ";" + this.dataListSelections2[i].adminName
this.detailData.responsiblePerson = this.detailData.responsiblePerson + ";" + this.dataListSelections2[i].adminID
if (!this.detailData.responsiblePerson.split(';').includes(this.dataListSelections2[i].adminID)) {
this.detailData.responsiblePersonName = this.detailData.responsiblePersonName + ";" + this.dataListSelections2[i].adminName
this.detailData.responsiblePerson = this.detailData.responsiblePerson + ";" + this.dataListSelections2[i].adminID
}
}
if (this.detailData.responsiblePerson.charAt(0) === ';') {
this.detailData.responsiblePerson = this.detailData.responsiblePerson.substring(1)
this.detailData.responsiblePersonName = this.detailData.responsiblePersonName.substring(1)
}
this.detailData.responsiblePerson = this.detailData.responsiblePerson.substring(1)
this.detailData.responsiblePersonName = this.detailData.responsiblePersonName.substring(1)
}
this.operatorData = {
flag: '',
@ -1800,6 +1810,7 @@
adminName: '',
roleName: '',
roleId: '',
userName: this.$store.state.user.name
}
this.operatorModelFlag = false
},

Loading…
Cancel
Save