Browse Source

2026-01-23

优化
master
fengyuan_yang 1 month ago
parent
commit
814458d94b
  1. 2
      src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue
  2. 2
      src/views/modules/qc/inboundNotification.vue
  3. 2
      src/views/modules/qc/outboundNotification.vue
  4. 444
      src/views/modules/yieldReport/com_process_inspection.vue

2
src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue

@ -1385,7 +1385,7 @@
serialNumber: '701002Table1Category',
tableId: "701002Table1",
tableName: "领料申请主表",
columnProp: "category",
columnProp: "categoryName",
headerAlign: "center",
align: "center",
columnLabel: "出库类别",

2
src/views/modules/qc/inboundNotification.vue

@ -937,7 +937,7 @@
serialNumber: '610Table1Category',
tableId: "610Table1",
tableName: "收货入库任务表",
columnProp: 'category',
columnProp: 'categoryName',
headerAlign: "center",
align: "center",
columnLabel: '入库类别',

2
src/views/modules/qc/outboundNotification.vue

@ -945,7 +945,7 @@
serialNumber: '620Table1Category',
tableId: "620Table1",
tableName: "拣货出库任务表",
columnProp: 'category',
columnProp: 'categoryName',
headerAlign: "center",
align: "center",
columnLabel: '出库类别',

444
src/views/modules/yieldReport/com_process_inspection.vue

@ -489,6 +489,9 @@
<el-button type="info" size="small" @click="getFileContentData(detailData)" icon="el-icon-folder-opened">
文件清单
</el-button>
<el-button type="warning" size="small" @click="subDetailUploadModal" icon="el-icon-upload2">
子明细导入
</el-button>
</div>
<div class="right-actions">
<el-button type="success" size="small" @click="openItemOperationDialog" icon="el-icon-setting">
@ -520,9 +523,10 @@
prop=""
header-align="center"
align="center"
width="80"
width="110"
label="操作">
<template slot-scope="scope">
<el-button icon="el-icon-picture" :type="scope.row.detailImageNum > 0 ? 'success' : 'primary'" size="mini" @click="uploadImageModal(scope.row)" title="上传图片"></el-button>
<el-button icon="el-icon-edit-outline" type="success" size="mini" :loading="loadFlag" @click="dataAcquisitionByItemHandle(scope.row)" title="数据采集"></el-button>
</template>
</el-table-column>
@ -604,6 +608,17 @@
<el-input-number :controls="false" :step="0" v-else :ref="`unqualifiedQuantity${scope.$index}`" v-model="scope.row.unqualifiedQuantity" @keyup.enter.native="focusNextInput(scope.$index, 'unqualifiedQuantity')" style="height: 11px; width: 98%"></el-input-number>
</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" size="mini" @click="subDetailModal(scope.row)">点击输入</el-button>
<el-button v-else type="primary" size="mini" @click="subDetailModal(scope.row)">点击输入</el-button>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
@ -940,12 +955,14 @@
<!-- 文件清单对话框 -->
<el-dialog title="文件清单" :close-on-click-modal="false" :visible.sync="fileFlag" width="900px" append-to-body>
<el-tabs v-model="fileActiveTab" type="border-card">
<!-- QC检验文件标签页 -->
<el-tab-pane label="QC检验文件" name="qcFile">
<el-table :height="350" :data="fileContentList" border v-loading="fileLoading" style="width: 100%;">
<el-table-column prop="fileName" header-align="center" align="left" label="文件名称" min-width="200" show-overflow-tooltip></el-table-column>
<el-table-column prop="createdBy" header-align="center" align="center" label="上传人" width="120"></el-table-column>
<el-table-column prop="createDate" header-align="center" align="center" label="上传时间" width="160"></el-table-column>
</el-table>
<el-form :inline="true" label-position="top">
<el-form-item v-if="detailInformationFlag">
<el-button type="primary" size="small" @click="addUploadFileModal">上传文件</el-button>
</el-form-item>
</el-form>
<iqc-file-table :columns="fileColumnList" :data-list="fileContentList" :query-loading="fileLoading"></iqc-file-table>
</el-tab-pane>
<el-tab-pane label="SOP文件" name="sopFile">
<el-table :data="sopFileList" border v-loading="sopFileLoading" height="350" style="width: 100%;">
@ -967,6 +984,111 @@
</el-footer>
</el-dialog>
<!-- 上传文件的modal -->
<qcFAIUploadFile ref="qcFAIUploadFile" @refreshPageTables="()=>{this.getFileContentData(this.detailData)}" v-drag></qcFAIUploadFile>
<!-- 子明细导入 -->
<subDetailUpload ref="subDetailUpload" @refreshPageTables="getInspectionFormData" v-drag></subDetailUpload>
<!-- 上传项目图片的modal -->
<comQcItemImageUploadFile ref="comQcItemImageUploadFile" @refreshPageTables2="getInspectionFormData" v-drag></comQcItemImageUploadFile>
<!-- 子明细信息弹窗 -->
<el-dialog title="子明细信息" :close-on-click-modal="false" v-drag :visible.sync="subDetailFlag" width="1102px" append-to-body>
<el-button type="success" icon="el-icon-plus" size="mini" @click="handleAddBtn(subDetailData)">添加</el-button>
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteBtn(subDetailData)">删除</el-button>
<el-button type="primary" icon="el-icon-more" size="mini" @click="batchHandleAdd(subDetailData)">批量新增</el-button>
<div class="rq ">
<el-table
:height="400"
:data="templateTableData"
border
v-loading="subDetailLoading"
element-loading-text="拼命加载中"
:row-class-name="rowClassName"
@selection-change="handleDetailSelectionChange"
style="width: 100%;">
<el-table-column type="selection" align="center" width="40"></el-table-column>
<el-table-column label="序号" align="center" prop="num" width="50"></el-table-column>
<el-table-column prop="samplingLocation" header-align="center" align="center" :required="true" label="抽样位置A" width="120">
<template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].samplingLocation" readonly placeholder="请输入抽样位置A"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `a`" v-model="templateTableData[row.xh-1].samplingLocation" @keyup.enter.native="nextFocus1(row.xh-1)" placeholder="请输入抽样位置A"></el-input>
</template>
</el-table-column>
<el-table-column prop="samplingLocationB" header-align="center" align="center" :required="true" label="抽样位置B" width="120">
<template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].samplingLocationB" readonly placeholder="请输入抽样位置B"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `b`" v-model="templateTableData[row.xh-1].samplingLocationB" @keyup.enter.native="nextFocus2(row.xh-1)" placeholder="请输入抽样位置B"></el-input>
</template>
</el-table-column>
<el-table-column prop="subDetailValue" header-align="center" align="center" :required="true" label="实测值A" width="150">
<template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValue" readonly placeholder="请输入实测值A"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `c`" v-model="templateTableData[row.xh-1].subDetailValue" @keyup.enter.native="nextFocus3(row.xh-1)" placeholder="请输入实测值A"></el-input>
</template>
</el-table-column>
<el-table-column prop="subDetailValueB" header-align="center" align="center" :required="true" label="实测值B" width="150">
<template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueB" readonly placeholder="请输入实测值B"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `d`" v-model="templateTableData[row.xh-1].subDetailValueB" @keyup.enter.native="nextFocus4(row.xh-1)" placeholder="请输入实测值B"></el-input>
</template>
</el-table-column>
<el-table-column prop="subDetailValueC" header-align="center" align="center" :required="true" label="实测值C" width="150">
<template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueC" readonly placeholder="请输入实测值C"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `e`" v-model="templateTableData[row.xh-1].subDetailValueC" @keyup.enter.native="nextFocus5(row.xh-1)" placeholder="请输入实测值C"></el-input>
</template>
</el-table-column>
<el-table-column prop="subDetailValueD" header-align="center" align="center" :required="true" label="实测值D" width="150">
<template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueD" readonly placeholder="请输入实测值D"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `f`" v-model="templateTableData[row.xh-1].subDetailValueD" @keyup.enter.native="nextFocus6(row.xh-1)" placeholder="请输入实测值D"></el-input>
</template>
</el-table-column>
<el-table-column prop="subDetailValueE" header-align="center" align="center" :required="true" label="实测值E" width="150">
<template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueE" readonly placeholder="请输入实测值E"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `g`" v-model="templateTableData[row.xh-1].subDetailValueE" @keyup.enter.native="nextFocus7(row.xh-1)" placeholder="请输入实测值E"></el-input>
</template>
</el-table-column>
</el-table>
<!-- 分页-->
<el-pagination
@size-change="sizeChangeHandle2"
@current-change="currentChangeHandle2"
:current-page="pageIndex2"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize2"
:total="tableData.length"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
</div>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button v-if="detailData.submitFlag !== 'Y'" type="primary" @click="saveSubDetailResult">保存</el-button>
<el-button type="primary" @click="subDetailFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- 批量新增子明细弹窗 -->
<el-dialog title="批量新增" :close-on-click-modal="false" v-drag :visible.sync="batchAddFlag" width="400px" append-to-body>
<el-form :model="batchAddData" label-width="100px">
<el-form-item label="抽样位置A">
<el-input v-model="batchAddData.samplingLocation" placeholder="请输入抽样位置A"></el-input>
</el-form-item>
<el-form-item label="抽样位置B">
<el-input v-model="batchAddData.samplingLocationB" placeholder="请输入抽样位置B"></el-input>
</el-form-item>
<el-form-item label="新增数量">
<el-input-number v-model="batchAddData.samplingNumber" :min="1" :max="100" placeholder="请输入数量"></el-input-number>
</el-form-item>
</el-form>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="confirmBatchAdd">确定</el-button>
<el-button @click="batchAddFlag = false">取消</el-button>
</el-footer>
</el-dialog>
</div>
</template>
@ -1002,13 +1124,25 @@ import {
deleteIPQCItemDetails, //
getIPQCTemplateList, // IPQC
importIPQCTemplateItems, //
selectIPQCSubDetailedRecord, //
saveIPQCSubDetailed, //
} from "@/api/qc/qc.js"
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
import { getInspectionFile } from '@/api/eam/eam_object_list.js'
import { searchQcSopFileList, downloadSopFile } from '@/api/qc/qc.js'
import qcFAIUploadFile from "../qc/qc_FAI_upload_file"
import subDetailUpload from "../qc/sub_detail_upload"
import IqcFileTable from "../qc/IQCFileTable.vue"
import comQcItemImageUploadFile from "../qc/com_qc_itemImage_upload_file"
export default {
name: 'ComProcessInspection',
components: {
qcFAIUploadFile,
subDetailUpload,
IqcFileTable,
comQcItemImageUploadFile
},
props: {
visible: {
type: Boolean,
@ -1039,6 +1173,16 @@ export default {
default: ''
}
},
computed: {
templateTableData() {
let start = (this.pageIndex2 - 1) * this.pageSize2
let end = start + this.pageSize2
if (end > this.tableData.length) {
end = this.tableData.length
}
return this.tableData.slice(start, end)
}
},
data() {
return {
//
@ -1441,9 +1585,78 @@ export default {
fileContentList: [],
fileLoading: false,
fileActiveTab: 'qcFile',
fileColumnList: [
{
columnProp: 'fileName',
headerAlign: "center",
align: "left",
columnLabel: '文件名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 200,
showOverflowTooltip: true
},
{
columnProp: 'createdBy',
headerAlign: "center",
align: "center",
columnLabel: '上传人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
columnProp: 'createDate',
headerAlign: "center",
align: "center",
columnLabel: '上传时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 160
}
],
sopFileList: [],
sopFileLoading: false,
currentFileRow: null,
//
subDetailFlag: false,
subDetailLoading: false,
subDetailData: {
site: '',
buNo: '',
inspectionNo: '',
itemNo: '',
itemDesc: '',
defaultValue: '',
maxValue: '',
minValue: '',
valueTypeDb: '',
subDetailValues: [],
page: 1,
limit: 10,
},
tableData: [],
checkedDetail: [],
pageIndex2: 1,
pageSize2: 20,
batchAddFlag: false,
batchAddData: {
samplingLocation: '',
samplingLocationB: '',
samplingNumber: 1
},
//
seqDetailFlag: false,
seqInfoList: [],
@ -2316,6 +2529,225 @@ export default {
this.fileFlag = true
},
//
addUploadFileModal() {
let currentData = {
titleCon: 'IPQC文件上传',
site: this.detailData.site,
buNo: this.detailData.buNo,
createBy: this.$store.state.user.name,
inspectionNo: this.detailData.inspectionNo,
remark: '',
folder: 'qcIPQC',
}
this.$nextTick(() => {
this.$refs.qcFAIUploadFile.init(currentData)
})
},
//
subDetailUploadModal() {
let currentData = {
flag: 'IPQC',
site: this.detailData.site,
buNo: this.detailData.buNo,
inspectionNo: this.detailData.inspectionNo
}
this.$nextTick(() => {
this.$refs.subDetailUpload.init(currentData)
})
},
//
uploadImageModal(row) {
let currentData = {
site: this.detailData.site,
buNo: this.detailData.buNo,
createBy: this.$store.state.user.name,
inspectionNo: this.detailData.inspectionNo,
itemNo: row.itemNo,
folder: 'IPQCItemImageFile'
}
this.$nextTick(() => {
this.$refs.comQcItemImageUploadFile.init(currentData)
})
},
//
subDetailModal(row) {
this.subDetailLoading = true
this.subDetailData = {
...row,
site: this.detailData.site,
buNo: this.detailData.buNo,
inspectionNo: this.detailData.inspectionNo,
subDetailValues: []
}
this.pageIndex2 = 1
selectIPQCSubDetailedRecord(this.subDetailData).then(({data}) => {
if (data.code === 0) {
this.tableData = data.rows || []
}
this.subDetailLoading = false
}).catch(() => {
this.subDetailLoading = false
})
this.batchAddData = {
samplingLocation: '',
samplingLocationB: '',
samplingNumber: 1
}
this.subDetailFlag = true
},
//
sizeChangeHandle2(val) {
this.pageSize2 = val
this.pageIndex2 = 1
},
currentChangeHandle2(val) {
this.pageIndex2 = val
},
//
rowClassName({row, rowIndex}) {
row.xh = (this.pageIndex2 - 1) * this.pageSize2 + rowIndex + 1
row.num = row.xh
return ''
},
//
handleDetailSelectionChange(val) {
this.checkedDetail = val
},
//
handleAddBtn(row) {
let newRow = {
site: this.detailData.site,
buNo: this.detailData.buNo,
inspectionNo: this.detailData.inspectionNo,
itemNo: row.itemNo,
samplingLocation: '',
samplingLocationB: '',
subDetailValue: '',
subDetailValueB: '',
subDetailValueC: '',
subDetailValueD: '',
subDetailValueE: '',
isSubmit: 'N'
}
this.tableData.push(newRow)
},
//
handleDeleteBtn(row) {
if (this.checkedDetail.length === 0) {
this.$message.warning('请选择要删除的记录!')
return
}
//
const canDelete = this.checkedDetail.filter(item => item.isSubmit !== 'Y')
if (canDelete.length === 0) {
this.$message.warning('已提交的记录不能删除!')
return
}
this.tableData = this.tableData.filter(item => !canDelete.includes(item))
this.checkedDetail = []
},
//
batchHandleAdd(row) {
this.batchAddData = {
samplingLocation: '',
samplingLocationB: '',
samplingNumber: 1
}
this.batchAddFlag = true
},
//
confirmBatchAdd() {
if (!this.batchAddData.samplingNumber || this.batchAddData.samplingNumber < 1) {
this.$message.warning('请输入有效的新增数量!')
return
}
for (let i = 0; i < this.batchAddData.samplingNumber; i++) {
let newRow = {
site: this.detailData.site,
buNo: this.detailData.buNo,
inspectionNo: this.detailData.inspectionNo,
itemNo: this.subDetailData.itemNo,
samplingLocation: this.batchAddData.samplingLocation,
samplingLocationB: this.batchAddData.samplingLocationB,
subDetailValue: '',
subDetailValueB: '',
subDetailValueC: '',
subDetailValueD: '',
subDetailValueE: '',
isSubmit: 'N'
}
this.tableData.push(newRow)
}
this.batchAddFlag = false
},
//
saveSubDetailResult() {
if (this.tableData.length === 0) {
this.$message.warning('没有可保存的数据!')
return
}
this.subDetailData.subDetailValues = this.tableData
saveIPQCSubDetailed(this.subDetailData).then(({data}) => {
if (data && data.code === 0) {
if (data.count > 0) {
this.subDetailData.itemResult = 'N'
this.subDetailData.unqualifiedQuantity = data.count
this.subDetailData.subDetailRecordNum = this.tableData.length
} else {
this.subDetailData.subDetailRecordNum = this.tableData.length > 0 ? this.tableData.length : -1
this.subDetailData.unqualifiedQuantity = 0
this.subDetailData.itemResult = 'Y'
}
this.subDetailFlag = false
this.tableData = []
this.$message.success('保存成功')
this.getInspectionFormData()
} else {
this.$message.error(data.msg || '保存失败')
}
})
},
//
nextFocus1(index) {
this.$refs[`${index}b`] && this.$refs[`${index}b`].focus()
},
nextFocus2(index) {
this.$refs[`${index}c`] && this.$refs[`${index}c`].focus()
},
nextFocus3(index) {
this.$refs[`${index}d`] && this.$refs[`${index}d`].focus()
},
nextFocus4(index) {
this.$refs[`${index}e`] && this.$refs[`${index}e`].focus()
},
nextFocus5(index) {
this.$refs[`${index}f`] && this.$refs[`${index}f`].focus()
},
nextFocus6(index) {
this.$refs[`${index}g`] && this.$refs[`${index}g`].focus()
},
nextFocus7(index) {
//
const nextIndex = index + 1
if (nextIndex < this.templateTableData.length) {
this.$refs[`${nextIndex}a`] && this.$refs[`${nextIndex}a`].focus()
}
},
// SOPsite, partNo, operationDesc, workcenterNo, orderNo
getSopFileList(row) {
this.sopFileLoading = true

Loading…
Cancel
Save