Browse Source

2025.04.24 IPQC\FQAS

master
jiayang yue 9 months ago
parent
commit
6dc991a3c6
  1. 1
      src/api/qc/qc.js
  2. 476
      src/views/modules/qc/FQASResultEntry.vue
  3. 21
      src/views/modules/qc/IPQCResultEntry.vue
  4. 28
      src/views/modules/qc/IQCResultEntry.vue

1
src/api/qc/qc.js

@ -185,6 +185,7 @@ export const saveFQASSubmitResult = data => createAPI(`/pms/qc/saveFQASSubmitRes
export const fqasRecordDelete = data => createAPI(`/pms/qc/fqasRecordDelete`,'post',data)
export const fqasRecordOverLoad = data => createAPI(`/pms/qc/fqasRecordOverLoad`,'post',data)
export const batchSaveIQCDetailedRecord = data => createAPI(`/pms/qc/batchSaveIQCDetailedRecord`,'post',data)
export const batchSaveFQASDetailedRecord = data => createAPI(`/pms/qc/batchSaveFQASDetailedRecord`,'post',data)
export const changeInspectionWay = data => createAPI(`/pms/qc/changeInspectionWay`,'post',data)
// ============================================= OQC ====================================================

476
src/views/modules/qc/FQASResultEntry.vue

@ -98,6 +98,7 @@
<el-button v-if="!authCheck" type="primary" @click="submitResult">审核</el-button>
<el-button v-if="!authDelete" type="primary" @click="deleteModal">删除</el-button>
<el-button v-if="!authOverLoad" type="primary" :loading="overLoading" @click="overLoadModal">任务重载</el-button>
<el-button v-if="!authOverLoad" type="primary" @click="batchQualifiedModal">批量合格处理</el-button>
<download-excel
:fields="fields()"
:data="exportData"
@ -628,6 +629,166 @@
</el-footer>
</el-dialog>
<!-- 批量处理检验单 -->
<el-dialog title="批量合格处理" :close-on-click-modal="false" v-drag :visible.sync="batchInformationFlag" width="1200px">
<el-form :inline="true" label-position="top">
<el-form-item style="margin-left: 25px">
<el-button type="primary" @click="getFileContentData(detailData)">工作文件</el-button>
</el-form-item>
<el-form-item style="margin-left: 20px">
<el-button type="primary" icon="el-icon-upload" @click="subDetailUpload">明细导入</el-button>
</el-form-item>
<el-form-item style="margin-left: 20px">
<el-checkbox v-model="personnelSynchronizationFlag">人员同步应用</el-checkbox>
</el-form-item>
<el-tabs v-model="batchInformationTable" style="width: 100%;height: auto;" type="border-card">
<el-tab-pane label="所选检验单" name="batchInfo" style="padding: 0">
<div class="rq ">
<el-table
:height="500"
:data="FQASSelections"
border
style="width: 100%;">
<el-table-column
v-for="(item,index) in batchColumnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed===''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="center"
min-width="170"
label="协同人员">
<template slot-scope="scope">
<el-input v-model="scope.row.operator" readonly style="width:77%"></el-input>
<el-button type="primary" @click="batchGetOperatorList(scope.$index)" style="width:18%;padding: 3px 7px">·&nbsp;·&nbsp;·</el-button>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="center"
min-width="170"
label="责任人">
<template slot-scope="scope">
<el-input v-model="scope.row.responsiblePerson" readonly style="width:77%"></el-input>
<el-button type="primary" @click="batchGetResponsiblePersonList(scope.$index)" style="width:18%;padding: 3px 7px">·&nbsp;·&nbsp;·</el-button>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="center"
min-width="200"
label="质检备注">
<template slot-scope="scope">
<el-input v-model="scope.row.inspectionRemark" style="height: 11px; width: 98%"></el-input>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="center"
min-width="60"
fixed="right"
label="操作">
<template slot-scope="scope">
<el-link style="cursor: pointer" @click="deleteBatch(scope.row)">删除</el-link>
</template>
</el-table-column>
</el-table>
</div>
</el-tab-pane>
<el-tab-pane label="检验单明细" name="detailInfo" style="padding: 0">
<div class="rq ">
<el-table
:height="500"
:data="batchDetailList"
border
style="width: 100%;">
<el-table-column
prop=""
header-align="center"
align="center"
min-width="60"
label="操作">
<template slot-scope="scope">
<el-button v-if="scope.row.detailImageNum > 0" type="success" class="el-icon-picture" @click="uploadImageModal(scope.row)"></el-button>
<el-button v-else class="el-icon-picture" type="primary" @click="uploadImageModal(scope.row)"></el-button>
</template>
</el-table-column>
<el-table-column
v-for="(item,index) in detailColumnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed===''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="right"
min-width="80"
label="实测值">
<template slot-scope="scope">
<el-input :ref="`textValue${scope.$index}`" v-if="scope.row.valueTypeDb === 'N'" v-model="scope.row.numberValue" @keyup.enter.native="focusNextInput(scope.$index, 'textValue')" type="number" style="height: 11px; width: 98%"></el-input>
<el-input :ref="`textValue${scope.$index}`" v-else v-model="scope.row.textValue" @keyup.enter.native="focusNextInput(scope.$index, 'textValue')" style="height: 11px; width: 98%"></el-input>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="center"
min-width="80"
label="检验明细">
<template slot-scope="scope">
<el-button v-if="scope.row.subDetailRecordNum > 0" type="success" @click="subDetailModal(scope.row) ">点击输入</el-button>
<el-button v-else type="primary" @click="subDetailModal(scope.row) ">点击输入</el-button>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="right"
min-width="90"
label="项目检验结论">
<template slot-scope="scope">
<el-select :class="{redElSelect:scope.row.itemResult === 'N', greenElSelect:scope.row.itemResult === 'Y'}" v-model="scope.row.itemResult" disabled style="height: 11px;padding: 0px" >
<el-option label="合格" value="Y" style="color: green"></el-option>
<el-option label="不合格" value="N" style="color: red"></el-option>
</el-select>
</template>
</el-table-column>
</el-table>
</div>
</el-tab-pane>
</el-tabs>
</el-form>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" :loading="batchLoading" @click="batchSave">保存</el-button>
<el-button type="primary" @click="batchInformationFlag=false">关闭</el-button>
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<!-- 上传文件的modal -->
@ -674,6 +835,7 @@
import qcFAIUploadFile from "./qc_FAI_upload_file"
import comQcItemImageUploadFile from "./com_qc_itemImage_upload_file"
import subDetailUpload from "./sub_detail_upload"
import {batchSaveFQASDetailedRecord} from "../../../api/qc/qc";
export default {
components: {
Chooselist,
@ -790,6 +952,105 @@
isQualified:'',
isQualifiedChinese:''
},
batchInformationFlag: false,
batchDetailList: [],
batchInformationTable: 'batchInfo',
batchColumnList: [
{
columnProp: 'inspectionNo',
headerAlign: "center",
align: "center",
columnLabel: '检验单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
{
columnProp: 'partNo',
headerAlign: "center",
align: "center",
columnLabel: '物料编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
{
columnProp: 'partDesc',
headerAlign: "center",
align: "left",
columnLabel: '物料名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 200,
},
{
columnProp: 'rollQty',
headerAlign: "center",
align: "right",
columnLabel: '到货数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80,
},
{
columnProp: 'rollCount',
headerAlign: "center",
align: "right",
columnLabel: '送检数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80,
},
{
columnProp: 'samplingQty',
headerAlign: "center",
align: "right",
columnLabel: '抽样数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80,
},
// {
// columnProp: 'passQty',
// headerAlign: "center",
// align: "right",
// columnLabel: '',
// columnHidden: false,
// columnImage: false,
// columnSortable: false,
// sortLv: 0,
// status: true,
// fixed: '',
// columnWidth: 80,
// },
],
batchIndex: '',
personnelSynchronizationFlag: true,
batchLoading: false,
//
// columnList1: [],
columnList1: [
@ -1988,7 +2249,7 @@
this.detailData.operator = this.detailData.operator.substring(1)
this.detailData.operatorName = this.detailData.operatorName.substring(1)
}
} else {
} else if (this.operatorData.flag === '2') {
for (let i = 0; i < this.dataListSelections2.length; i++) {
if (!this.detailData.responsiblePerson.split(';').includes(this.dataListSelections2[i].adminID)) {
this.detailData.responsiblePersonName = this.detailData.responsiblePersonName + ";" + this.dataListSelections2[i].adminName
@ -1999,6 +2260,50 @@
this.detailData.responsiblePerson = this.detailData.responsiblePerson.substring(1)
this.detailData.responsiblePersonName = this.detailData.responsiblePersonName.substring(1)
}
} else if (this.operatorData.flag === '3') {
for (let i = 0; i < this.dataListSelections2.length; i++) {
if (!this.FQASSelections[this.batchIndex].operator.split(';').includes(this.dataListSelections2[i].adminID)) {
this.FQASSelections[this.batchIndex].operatorName = this.FQASSelections[this.batchIndex].operatorName + ";" + this.dataListSelections2[i].adminName
this.FQASSelections[this.batchIndex].operator = this.FQASSelections[this.batchIndex].operator + ";" + this.dataListSelections2[i].adminID
}
}
if (this.FQASSelections[this.batchIndex].operator.charAt(0) === ';') {
this.FQASSelections[this.batchIndex].operator = this.FQASSelections[this.batchIndex].operator.substring(1)
this.FQASSelections[this.batchIndex].operatorName = this.FQASSelections[this.batchIndex].operatorName.substring(1)
//
if (this.personnelSynchronizationFlag && this.FQASSelections.length > 1) {
// this.batchIndex
let tempData = this.FQASSelections.filter((item, index) => index !== this.batchIndex)
//
tempData.forEach(item => {
this.$set(item, 'operator', this.FQASSelections[this.batchIndex].operator)
this.$set(item, 'operatorName', this.FQASSelections[this.batchIndex].operatorName)
})
}
}
} else if (this.operatorData.flag === '4') {
for (let i = 0; i < this.dataListSelections2.length; i++) {
if (!this.FQASSelections[this.batchIndex].responsiblePerson.split(';').includes(this.dataListSelections2[i].adminID)) {
this.FQASSelections[this.batchIndex].responsiblePersonName = this.FQASSelections[this.batchIndex].responsiblePersonName + ";" + this.dataListSelections2[i].adminName
this.FQASSelections[this.batchIndex].responsiblePerson = this.FQASSelections[this.batchIndex].responsiblePerson + ";" + this.dataListSelections2[i].adminID
}
}
if (this.FQASSelections[this.batchIndex].responsiblePerson.charAt(0) === ';') {
this.FQASSelections[this.batchIndex].responsiblePerson = this.FQASSelections[this.batchIndex].responsiblePerson.substring(1)
this.FQASSelections[this.batchIndex].responsiblePersonName = this.FQASSelections[this.batchIndex].responsiblePersonName.substring(1)
//
if (this.personnelSynchronizationFlag && this.FQASSelections.length > 1) {
// this.batchIndex
let tempData = this.FQASSelections.filter((item, index) => index !== this.batchIndex)
//
tempData.forEach(item => {
this.$set(item, 'responsiblePerson', this.FQASSelections[this.batchIndex].responsiblePerson)
this.$set(item, 'responsiblePersonName', this.FQASSelections[this.batchIndex].responsiblePersonName)
})
}
}
}
this.operatorData = {
flag: '',
@ -2088,6 +2393,146 @@
})
},
batchQualifiedModal () {
if (this.FQASSelections.length === 0) {
this.$message.warning('请勾选要批量处理的检验单!')
return
}
//
if (this.FQASSelections.every(val => val.state === '待检验')) {
//
if (this.FQASSelections.some(val => val.templateId == null || val.templateId === '')) {
this.$message.warning('检验单不存在检验明细!')
return
}
//
//
const firstItem = this.FQASSelections[0]
const firstTemplateId = firstItem.templateId
const firstSupplierNo = firstItem.supplierNo
if (!this.FQASSelections.every(item => item.templateId === firstTemplateId)) {
this.$message.warning('所选检验单模板和供应商必须一致!')
return
}
this.FQASSelections.forEach((item, index) => {
this.$set(this.FQASSelections[index], 'inspectorNo', this.$store.state.user.name)
})
this.detailModal2(this.FQASSelections[0])
this.personnelSynchronizationFlag = true
} else {
this.$message.warning('检验单必须为待检验状态!')
return
}
},
//
batchGetOperatorList (index) {
this.operatorData.flag = '3'
this.operatorData.bu = this.FQASSelections[index].site + '_' + this.FQASSelections[index].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.FQASSelections[index].operator == null ? '' : this.FQASSelections[index].operator).split(';')
getOperatorList(this.operatorData).then(({data}) => {
if (data && data.code === 0) {
this.operatorList = data.rows
this.operatorList.forEach(val => {
//
if (tempDataList.includes(val.adminID)) {
this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
}
})
this.batchIndex = index
this.operatorModelFlag = true
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
//
batchGetResponsiblePersonList (index) {
this.operatorData.flag = '4'
this.operatorData.bu = this.FQASSelections[index].site + '_' + this.FQASSelections[index].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.FQASSelections[index].responsiblePerson == null ? '' : this.FQASSelections[index].responsiblePerson).split(';')
getOperatorList(this.operatorData).then(({data}) => {
if (data && data.code === 0) {
this.operatorList = data.rows
this.operatorList.forEach(val => {
//
if (tempDataList.includes(val.adminID)) {
this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
}
})
this.batchIndex = index
this.operatorModelFlag = true
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
//
batchSave () {
this.$confirm(`确认保存检验数据?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let tempData = {
submitList: JSON.parse(JSON.stringify(this.FQASSelections)),
itemList: JSON.parse(JSON.stringify(this.batchDetailList))
}
this.batchLoading = true
batchSaveFQASDetailedRecord(tempData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.batchInformationFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
this.batchLoading = false
}).catch(()=>{
this.batchLoading = false
})
})
},
//
FQASClickRow (row) {
this.currentRow = JSON.parse(JSON.stringify(row))
@ -2515,6 +2960,35 @@
this.detailInformationFlag = true
},
detailModal2 (row) {
this.detailData.site = row.site
this.detailData.buNo = row.buNo
this.detailData.inspectionNo = row.inspectionNo
this.detailData.partNo = row.partNo
this.detailData.partDesc = row.partDesc
this.detailData.rollQty = row.rollQty
this.detailData.samplingQty = row.samplingQty
this.detailData.unqualifiedQty = row.unqualifiedQty
this.detailData.unqualifiedQuantity = row.unqualifiedQuantity
this.detailData.submitFlag = row.submitFlag
this.detailData.disposalMeasures = row.disposalMeasures
this.detailData.disposalRemark = row.disposalRemark
this.detailData.inspectionResult = row.inspectionResult
this.detailData.inspectorNo = row.inspectorNo
this.detailData.inspectionRemark = row.inspectionRemark
this.detailData.umId = row.umId
this.detailData.rollCount = row.rollCount
fqasDetailSearch(this.detailData).then(({data}) => {
if (data && data.code === 0) {
this.batchDetailList = data.rows
this.batchInformationTable = 'batchInfo'
this.batchInformationFlag = true
} else {
this.$message.warning('未查到检验单明细信息!')
}
})
},
//
getInspectionFormData () {
fqasDetailSearch(this.detailData).then(({data}) => {

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

@ -62,7 +62,14 @@
<el-input v-model="searchData.seqNo" clearable style="width: 173px"></el-input>
</el-form-item>
<el-form-item :label="'加工中心'">
<el-input v-model="searchData.workCenterNo" clearable style="width: 120px"></el-input>
<el-select v-model="searchData.workCenterNo" placeholder="请选择" clearable style="width: 80px">
<el-option
v-for = "i in workCenterList"
:key = "i.workCenterNo"
:label = "i.workCenterDesc"
:value = "i.workCenterNo">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="'工序'">
<el-input v-model="searchData.operationDesc" clearable style="width: 80px"></el-input>
@ -942,6 +949,7 @@
import qcFAIUploadFile from "./qc_FAI_upload_file"
import comQcItemImageUploadFile from "./com_qc_itemImage_upload_file"
import subDetailUpload from "./sub_detail_upload";
import {getWorkCenterData} from "../../../api/base/site";
/*上传文件的組件*/
export default {
components: {
@ -1017,6 +1025,7 @@
exportFooter: [],
exportList: [],
// end
workCenterList: [],
checkCompletedData:{
inspectionNo: ''
},
@ -2449,6 +2458,8 @@
this.inspectionTypeSearch()
//
this.disposalMeasuresSearch()
//
this.getWorkCenterList()
//
this.umSearch()
//
@ -4040,6 +4051,14 @@
})
},
getWorkCenterList(){
getWorkCenterData().then(({data}) => {
if (data.code === 0) {
this.workCenterList = data.rows
}
})
},
// OR
favoriteFunction () {
let userFavorite = {

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

@ -612,6 +612,9 @@
<el-form-item style="margin-left: 20px">
<el-button type="primary" icon="el-icon-upload" @click="subDetailUpload">明细导入</el-button>
</el-form-item>
<el-form-item style="margin-left: 20px">
<el-checkbox v-model="personnelSynchronizationFlag">人员同步应用</el-checkbox>
</el-form-item>
<el-tabs v-model="batchInformationTable" style="width: 100%;height: auto;" type="border-card">
<el-tab-pane label="所选检验单" name="batchInfo" style="padding: 0">
<div class="rq ">
@ -848,6 +851,7 @@
import qcFAIUploadFile from "./qc_FAI_upload_file"
import comQcItemImageUploadFile from "./com_qc_itemImage_upload_file"
import subDetailUpload from "./sub_detail_upload"
import {getWorkCenterData} from "../../../api/base/site";
export default {
components: {
Chooselist,
@ -907,6 +911,7 @@
},
tagNo:'',
tagType: '',
personnelSynchronizationFlag: true,
searchData: {
site: '',
userName: this.$store.state.user.name,
@ -2194,6 +2199,7 @@
this.$set(this.IQCSelections[index], 'inspectorNo', this.$store.state.user.name)
})
this.detailModal2(this.IQCSelections[0])
this.personnelSynchronizationFlag = true
} else {
this.$message.warning('检验单必须为待检验状态!')
return
@ -2573,6 +2579,17 @@
if (this.IQCSelections[this.batchIndex].operator.charAt(0) === ';') {
this.IQCSelections[this.batchIndex].operator = this.IQCSelections[this.batchIndex].operator.substring(1)
this.IQCSelections[this.batchIndex].operatorName = this.IQCSelections[this.batchIndex].operatorName.substring(1)
//
if (this.personnelSynchronizationFlag && this.IQCSelections.length > 1) {
// this.batchIndex
let tempData = this.IQCSelections.filter((item, index) => index !== this.batchIndex)
//
tempData.forEach(item => {
this.$set(item, 'operator', this.IQCSelections[this.batchIndex].operator)
this.$set(item, 'operatorName', this.IQCSelections[this.batchIndex].operatorName)
})
}
}
} else if (this.operatorData.flag === '4') {
for (let i = 0; i < this.dataListSelections2.length; i++) {
@ -2584,6 +2601,17 @@
if (this.IQCSelections[this.batchIndex].responsiblePerson.charAt(0) === ';') {
this.IQCSelections[this.batchIndex].responsiblePerson = this.IQCSelections[this.batchIndex].responsiblePerson.substring(1)
this.IQCSelections[this.batchIndex].responsiblePersonName = this.IQCSelections[this.batchIndex].responsiblePersonName.substring(1)
//
if (this.personnelSynchronizationFlag && this.IQCSelections.length > 1) {
// this.batchIndex
let tempData = this.IQCSelections.filter((item, index) => index !== this.batchIndex)
//
tempData.forEach(item => {
this.$set(item, 'responsiblePerson', this.IQCSelections[this.batchIndex].responsiblePerson)
this.$set(item, 'responsiblePersonName', this.IQCSelections[this.batchIndex].responsiblePersonName)
})
}
}
}
this.operatorData = {

Loading…
Cancel
Save