Browse Source

2025-07-30 QC

master
fengyuan_yang 6 months ago
parent
commit
668ab7fcc8
  1. 12
      src/api/qc/qc.js
  2. 12
      src/views/modules/qc/FAIResultEntry.vue
  3. 12
      src/views/modules/qc/FQCResultEntry.vue
  4. 12
      src/views/modules/qc/IPQCResultEntry.vue
  5. 12
      src/views/modules/qc/IQCResultEntry.vue
  6. 12
      src/views/modules/qc/PQCResultEntry.vue
  7. 1482
      src/views/modules/qc/qcFamilyAttribute.vue
  8. 482
      src/views/modules/qc/qcInspector.vue
  9. 36
      src/views/modules/qc/qc_upload.vue

12
src/api/qc/qc.js

@ -16,12 +16,6 @@ export const getItemLists= data => createAPI(`/pms/qc/getItemLists`,'post',data)
export const subDetailUpload= data => createAPI(`/pms/qc/subDetailUpload`,'post',data)
export const queryMethodList= data => createAPI(`/pms/qc/queryMethodList`,'post',data)
// ===================================== 质检员信息 =====================================
export const inspectorSearch = data => createAPI(`/pms/qc/inspectorSearch`,'post',data)
export const inspectorSave = data => createAPI(`/pms/qc/inspectorSave`,'post',data)
export const inspectorUpdate = data => createAPI(`/pms/qc/inspectorUpdate`,'post',data)
export const inspectorDelete = data => createAPI(`/pms/qc/inspectorDelete`,'post',data)
// ===================================== 检验模板 =====================================
export const templateSearch = data => createAPI(`/pms/qc/templateSearch`,'post',data)
export const templateSave = data => createAPI(`/pms/qc/templateSave`,'post',data)
@ -84,12 +78,6 @@ export const getOperationDescList = data => createAPI(`/pms/qc/getOperationDescL
export const getManufacturerList = data => createAPI(`/pms/qc/getManufacturerList`,'post',data)
export const getPartTemplateLists = data => createAPI(`/pms/qc/getPartTemplateLists`,'post',data)
export const qcPartAttributeEdit = data => createAPI(`/pms/qc/qcPartAttributeEdit`,'post',data)
// ===================================== 类别属性设置 =====================================
export const qcFamilyAttributeSearch = data => createAPI(`/pms/qc/qcFamilyAttributeSearch`,'post',data)
export const qcFamilyAttributeSave = data => createAPI(`/pms/qc/qcFamilyAttributeSave`,'post',data)
export const qcFamilyAttributeDelete = data => createAPI(`/pms/qc/qcFamilyAttributeDelete`,'post',data)
export const uploadFamilyAttributeExcel = data => createAPI(`/pms/qc/uploadFamilyAttributeExcel`,'post',data)
export const queryFileId = data => createAPI(`/pms/qc/queryFileId`,'post',data)
// ===================================== FAI检验 =====================================

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

@ -907,7 +907,6 @@
import {
qcFAIInspectionSearch, // FAI
faiDetailSearch, // FAI
inspectorSearch, //
faiRecordDelete, //
saveFAIDetailedRecord, //
saveFAISubmitResult, //
@ -3305,15 +3304,6 @@
})
},
//
inspectorSearch () {
inspectorSearch().then(({data}) => {
if (data.code === 0) {
this.options = data.rows
}
})
},
//
getDataList () {
this.searchLoading = true
@ -3562,8 +3552,6 @@
}
this.detailData.batchQualifiedQty = row.batchQualifiedQty
this.getInspectionFormData()
this.inspectorSearch()
// this.acquisitionList = []
this.detailInformationFlag = true
},

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

@ -882,7 +882,6 @@
import {
qcFQCInspectionSearch, // FAI
fqcDetailSearch, // FAI
inspectorSearch, //
fqcRecordDelete, //
saveFQCDetailedRecord, //
saveFQCSubmitResult, //
@ -3278,15 +3277,6 @@
})
},
//
inspectorSearch () {
inspectorSearch().then(({data}) => {
if (data.code === 0) {
this.options = data.rows
}
})
},
//
getDataList () {
this.searchLoading = true
@ -3535,8 +3525,6 @@
}
this.detailData.batchQualifiedQty = row.batchQualifiedQty
this.getInspectionFormData()
this.inspectorSearch()
// this.acquisitionList = []
this.detailInformationFlag = true
},

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

@ -904,7 +904,6 @@
import {
qcIPQCInspectionSearch, // IPQC
ipqcDetailSearch, // IPQC
inspectorSearch, //
ipqcRecordDelete, //
saveIPQCDetailedRecord, //
saveIPQCSubmitResult, //
@ -2967,15 +2966,6 @@
})
},
//
inspectorSearch () {
inspectorSearch().then(({data}) => {
if (data.code === 0) {
this.options = data.rows
}
})
},
// S
getBaseList (val,type) {
this.tagNo = val
@ -3616,8 +3606,6 @@
}
this.detailData.batchQualifiedQty = row.batchQualifiedQty
this.getInspectionFormData()
this.inspectorSearch()
// this.acquisitionList = []
this.detailInformationFlag = true
},

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

@ -658,7 +658,6 @@
import {
qcIQCInspectionSearch, // IQC
iqcDetailSearch, // iqc
inspectorSearch, //
selectIQCSubDetailedRecord, //
checkIQCSubDetailValue, //
saveIQCDetailedRecord, //
@ -2328,15 +2327,6 @@
this.dataListSelections = val
},
//
inspectorSearch () {
inspectorSearch().then(({data}) => {
if (data.code === 0) {
this.options = data.rows
}
})
},
async Transfer (type) {
if (type === '2') {
if (this.detailData.inspectionResult === '' || this.detailData.inspectionResult == null) {
@ -2504,8 +2494,6 @@
}
this.detailData.batchQualifiedQty = row.batchQualifiedQty
this.getInspectionFormData()
this.inspectorSearch()
// this.acquisitionList = []
this.detailInformationFlag = true
},

12
src/views/modules/qc/PQCResultEntry.vue

@ -990,7 +990,6 @@
import {
qcPQCInspectionSearch, // FAI
pqcDetailSearch, // FAI
inspectorSearch, //
pqcRecordDelete, //
savePQCDetailedRecord, //
savePQCSubmitResult, //
@ -3619,15 +3618,6 @@ export default {
})
},
//
inspectorSearch () {
inspectorSearch().then(({data}) => {
if (data.code === 0) {
this.options = data.rows
}
})
},
//
getDataList () {
this.searchLoading = true
@ -3876,8 +3866,6 @@ export default {
}
this.detailData.batchQualifiedQty = row.batchQualifiedQty
this.getInspectionFormData()
this.inspectorSearch()
// this.acquisitionList = []
this.detailInformationFlag = true
},

1482
src/views/modules/qc/qcFamilyAttribute.vue
File diff suppressed because it is too large
View File

482
src/views/modules/qc/qcInspector.vue

@ -1,482 +0,0 @@
<template>
<div class="mod-config">
<!-- 收藏 -->
<!-- <div>-->
<!-- <span @click="favoriteFunction()">-->
<!-- <icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg>-->
<!-- </span>-->
<!-- </div>-->
<!-- 条件查询 -->
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
<el-form-item :label="'质检员工号'">
<el-input v-model="searchData.inspectorNo" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'质检员姓名'">
<el-input v-model="searchData.inspectorName" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'所处检验工序'">
<el-input v-model="searchData.inspectorType" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'是否在岗'">
<el-select filterable v-model="searchData.inspectorActive" style="width: 120px">
<el-option label="请选择" value=""></el-option>
<el-option label="是" value="Y"></el-option>
<el-option label="否" value="N"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="getDataList()">查询</el-button>
<el-button type="primary" @click="addModal()">新增</el-button>
<download-excel
:fields="fields()"
:data="exportData"
type="xls"
:name="exportName"
:header="exportHeader"
:footer="exportFooter"
:fetch="createExportData"
:before-generate="startDownload"
:before-finish="finishDownload"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
{{ "导出" }}
</download-excel>
</el-form-item>
</el-form>
<!-- 展示列表 -->
<el-table
:height="height"
:data="dataList"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnList" :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
fixed="right"
header-align="center"
align="center"
width="160"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="updateModal(scope.row)">修改</a>
<a type="text" size="small" @click="deleteModal(scope.row)">删除</a>
</template>
</el-table-column>
</el-table>
<!-- 新增和修改 -->
<el-dialog title="质检员信息" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="430px">
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="质检员工号:">
<el-input v-model="modalData.inspectorNo" :disabled="modalDisableFlag" style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="质检员姓名:">
<el-input v-model="modalData.inspectorName" style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="质检员电话:">
<el-input v-model="modalData.inspectorPhone" type="number" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'所处检验工序'">
<el-input v-model="modalData.inspectorType" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'是否在岗'">
<el-select filterable v-model="modalData.inspectorActive" style="width: 120px">
<el-option label="是" value="Y"></el-option>
<el-option label="否" value="N"></el-option>
</el-select>
</el-form-item>
</el-form>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="saveData()">保存</el-button>
<el-button type="primary" @click="modalFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
</div>
</template>
<script>
import {
inspectorSearch, //
inspectorSave, //
inspectorUpdate, //
inspectorDelete, //
} from "@/api/qc/qc.js"
import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
export default {
watch: {
searchData: {
deep: true,
handler: function (newV, oldV) {
this.searchData.inspectorNo = this.searchData.inspectorNo.toUpperCase()
}
},
modalData: {
deep: true,
handler: function (newV, oldV) {
this.modalData.inspectorNo = this.modalData.inspectorNo.toUpperCase()
this.modalData.inspectorType = this.modalData.inspectorType.toUpperCase()
}
}
},
data () {
return {
//
favorite: false,
// start
exportData: [],
exportName: "质检员" + this.dayjs().format('YYYYMMDDHHmmss'),
exportHeader: ["质检员"],
exportFooter: [],
exportList:[],
// end
searchData: {
inspectorNo: '',
inspectorName: '',
inspectorPhone: '',
inspectorType: '',
inspectorActive: ''
},
height: 200,
dataList: [],
dataListLoading: false,
modalFlag: false,
modalDisableFlag: false,
modalData: {
flag: '',
inspectorNo: '',
inspectorName: '',
inspectorPhone: '',
inspectorType: '',
inspectorActive: ''
},
//
columnList: [
{
userId: this.$store.state.user.name,
functionId: 101008,
serialNumber: '101008TableEamPropertiesItemID',
tableId: '101008Table',
tableName: 'common',
columnProp: 'inspectorNo',
headerAlign: 'center',
align: 'left',
columnLabel: '质检员工号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 101008,
serialNumber: '101008TableEamPropertiesItemDesc',
tableId: '101008Table',
tableName: 'common',
columnProp: 'inspectorName',
headerAlign: 'center',
align: 'left',
columnLabel: '质检员姓名',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 140
},
{
userId: this.$store.state.user.name,
functionId: 101008,
serialNumber: '101008TableEamPropertiesItemDesc',
tableId: '101008Table',
tableName: 'common',
columnProp: 'inspectorPhone',
headerAlign: 'center',
align: 'left',
columnLabel: '质检员电话',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 140
},
{
userId: this.$store.state.user.name,
functionId: 101008,
serialNumber: '101008TableEamPropertiesItemDesc',
tableId: '101008Table',
tableName: 'common',
columnProp: 'inspectorType',
headerAlign: 'center',
align: 'left',
columnLabel: '所处检验工序',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 140
},
{
userId: this.$store.state.user.name,
functionId: 101008,
serialNumber: '101008TableEamPropertiesItemDesc',
tableId: '101008Table',
tableName: 'common',
columnProp: 'inspectorActive',
headerAlign: 'center',
align: 'left',
columnLabel: '是否在岗',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 140
}
]
}
},
mounted () {
this.$nextTick(() => {
this.height = window.innerHeight - 180
})
},
created () {
this.getDataList()
this.favoriteIsOk()
},
methods: {
//
getDataList () {
inspectorSearch(this.searchData).then(({data}) => {
this.dataList = data.rows
})
},
//
addModal () {
this.modalData = {
flag: '1',
inspectorNo: '',
inspectorName: '',
inspectorPhone: '',
inspectorType: '',
inspectorActive: ''
}
this.modalDisableFlag = false
this.modalFlag = true
},
//
updateModal (row) {
this.modalData = {
flag: '2',
inspectorNo: row.inspectorNo,
inspectorName: row.inspectorName,
inspectorPhone: row.inspectorPhone,
inspectorType: row.inspectorType,
inspectorActive: row.inspectorActive
}
this.modalDisableFlag = true
this.modalFlag = true
},
//
deleteModal (row) {
this.$confirm(`是否删除这个质检员信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
inspectorDelete(row).then(({data}) => {
if (data && data.code === '0') {
this.getDataList()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
},
// /
saveData () {
if (this.modalData.inspectorNo == '' || this.modalData.inspectorNo == null) {
this.$alert('请输入质检员工号!', '错误', {
confirmButtonText: '确定'
})
return false
}
if (this.modalData.inspectorName == '' || this.modalData.inspectorName == null) {
this.$alert('请输入质检员姓名!', '错误', {
confirmButtonText: '确定'
})
return false
}
if (this.modalData.inspectorPhone == '' || this.modalData.inspectorPhone == null) {
this.$alert('请输入质检员电话!', '错误', {
confirmButtonText: '确定'
})
return false
}
if (this.modalData.inspectorType == '' || this.modalData.inspectorType == null) {
this.$alert('请输入质检员职责!', '错误', {
confirmButtonText: '确定'
})
return false
}
if (this.modalData.inspectorActive == '' || this.modalData.inspectorActive == null) {
this.$alert('请选择质检员是否在岗!', '错误', {
confirmButtonText: '确定'
})
return false
}
if (this.modalData.flag == '1') { //
inspectorSave(this.modalData).then(({data}) => {
if (data && data.code === '0') {
this.getDataList()
this.modalFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
} else { //
inspectorUpdate(this.modalData).then(({data}) => {
if (data && data.code === '0') {
this.getDataList()
this.modalFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}
},
//
favoriteIsOk() {
let userFavorite = {
userId: this.$store.state.user.id,
languageCode: this.$i18n.locale
}
console.log(this.$route.meta.menuId)
userFavoriteList(userFavorite).then(({data}) => {
for (let i = 0; i < data.list.length; i++) {
// let flag=false;
if(this.$route.meta.menuId==data.list[i].menuId){
this.favorite = true
// flag=true;
}
}
})
},
// OR
favoriteFunction() {
let userFavorite = {
userId: this.$store.state.user.id,
functionId: this.$route.meta.menuId,
}
if (this.favorite) {
//
// this.$confirm(``, '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
removeUserFavorite(userFavorite).then(({data}) => {
this.$message.success(data.msg)
this.favorite = false
})
// })
} else {
//
saveUserFavorite(userFavorite).then(({data}) => {
this.$message.success(data.msg)
this.favorite = true
})
}
},
//excel
async createExportData() {
this.searchData.limit = -1
this.searchData.page = 1
await inspectorSearch(this.searchData).then(({data}) => {
this.exportList= data.rows;
})
return this.exportList;
},
startDownload() {
// this.exportData = this.dataList
},
finishDownload() {
},
fields() {
let json = "{"
this.columnList.forEach((item, index) => {
if (index == this.columnList.length - 1) {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
} else {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
}
})
json += "}"
let s = eval("(" + json + ")")
return s
},
// end
}
}
</script>

36
src/views/modules/qc/qc_upload.vue

@ -36,7 +36,6 @@ import {
uploadExcel, //
uploadTemplateExcel, //
uploadPartAttributeExcel, //
uploadFamilyAttributeExcel, //
queryFileId, // ID
getSiteAndBuByUserName
} from "@/api/qc/qc.js"
@ -127,7 +126,7 @@ export default {
this.$message.warning(data.msg);
}
})
} else if (this.pageData.flag === 'template'){
} else if (this.pageData.flag === 'template') {
formData.set('site',this.bu)
uploadTemplateExcel(formData).then(({data}) => {
if (data.code === 0) {
@ -140,7 +139,7 @@ export default {
this.$message.warning(data.msg);
}
})
}else if (this.pageData.flag === 'partAttribute'){
} else if (this.pageData.flag === 'partAttribute') {
uploadPartAttributeExcel(formData).then(({data}) => {
if (data.code === 0) {
this.$message.success(data.msg);
@ -152,18 +151,6 @@ export default {
this.$message.warning(data.msg);
}
})
}else if (this.pageData.flag === 'familyAttribute'){
uploadFamilyAttributeExcel(formData).then(({data}) => {
if (data.code === 0) {
this.$message.success(data.msg);
//
this.$refs.uploadFile.clearFiles();
//
this.closeDialog();
}else {
this.$message.warning(data.msg);
}
})
}
this.bu = '';
},
@ -177,7 +164,7 @@ export default {
orderRef1: '',
orderRef2: ''
}
if(this.pageData.flag === 'item'){ //
if (this.pageData.flag === 'item') { //
tempData.orderRef1 = 'qc';
tempData.orderRef2 = 'itemFormat';
await queryFileId(tempData).then(({data}) => {
@ -190,7 +177,7 @@ export default {
})
}
})
}else if (this.pageData.flag === 'template'){ //
} else if (this.pageData.flag === 'template') { //
tempData.orderRef1 = 'qc';
tempData.orderRef2 = 'templateFormat';
await queryFileId(tempData).then(({data}) => {
@ -203,7 +190,7 @@ export default {
})
}
})
}else if (this.pageData.flag === 'partAttribute'){ //
} else if (this.pageData.flag === 'partAttribute') { //
tempData.orderRef1 = 'qc';
tempData.orderRef2 = 'partAttributeFormat';
await queryFileId(tempData).then(({data}) => {
@ -216,19 +203,6 @@ export default {
})
}
})
}else if (this.pageData.flag === 'familyAttribute'){ //
tempData.orderRef1 = 'qc';
tempData.orderRef2 = 'familyAttributeFormat';
await queryFileId(tempData).then(({data}) => {
if (data && data.code === 0) {
file.id = data.data.id
file.fileName = data.data.fileName
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}
await downLoadObjectFile(file).then(({data}) => {
//

Loading…
Cancel
Save