From 292b0cfc9f96b9a673296c77d717fa13a979fe07 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B5=B5=E5=AE=8F=E6=96=8C?= <2164406372@qq.com>
Date: Fri, 27 Jun 2025 17:36:36 +0800
Subject: [PATCH] =?UTF-8?q?PQC=E6=A3=80=E9=AA=8C=E5=8A=9F=E8=83=BD?=
=?UTF-8?q?=EF=BC=9A1.=E4=BF=AE=E6=94=B9=E6=96=B0=E5=A2=9Eui=202.=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E7=94=A8=E6=88=B7=E9=BB=98=E8=AE=A4=E5=B7=A5=E5=BA=8F?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD=203.=E6=96=B0=E5=A2=9E=E5=B7=A5=E5=BA=8F?=
=?UTF-8?q?=E5=AF=B9=E5=BA=94=E6=9C=BA=E5=8F=B0=E5=8A=9F=E8=83=BD=204.?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=95=B0=E6=8D=AE=E8=A1=A8=EF=BC=9Aqc=5Fpqc?=
=?UTF-8?q?=5Frecord=5Foperation?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/qc/qc.js | 15 +
src/views/modules/qc/OperationForResource.vue | 450 ++++++++++++++
src/views/modules/qc/PQCResultEntry.vue | 574 ++++++++++++++----
src/views/modules/qc/UserDefaultOperation.vue | 453 ++++++++++++++
4 files changed, 1374 insertions(+), 118 deletions(-)
create mode 100644 src/views/modules/qc/OperationForResource.vue
create mode 100644 src/views/modules/qc/UserDefaultOperation.vue
diff --git a/src/api/qc/qc.js b/src/api/qc/qc.js
index 886d126..cd0faf9 100644
--- a/src/api/qc/qc.js
+++ b/src/api/qc/qc.js
@@ -130,6 +130,21 @@ export const actionPQCInspection = data => createAPI(`/pms/pqc/actionPQCInspecti
export const getPQCItemObjectList = data => createAPI(`/pms/pqc/getPQCItemObjectList`,'post',data)
export const rollNoEnter2 = data => createAPI(`/pms/pqc/rollNoEnter2`,'post',data)
export const getOperationList2 = data => createAPI(`/pms/pqc/getOperationList2`,'post',data)
+export const queytOperationList = data => createAPI(`/pms/pqc/queytOperationList`,'post',data)
+export const queryUserDefaultOperationList = data => createAPI(`/pms/pqc/queryUserDefaultOperationList`,'post',data)
+export const queryUserDefaultOperationListByUsername = data => createAPI(`/pms/pqc/queryUserDefaultOperationListByUsername`,'post',data)
+export const saveUserDefaultOperation = data => createAPI(`/pms/pqc/saveUserDefaultOperation`,'post',data)
+export const queryPartDescByNo = data => createAPI(`/pms/pqc/queryPartDescByNo`,'post',data)
+export const queryOperationForResourceList = data => createAPI(`/pms/pqc/queryOperationForResourceList`,'post',data)
+export const saveOperationForResource = data => createAPI(`/pms/pqc/saveOperationForResource`,'post',data)
+export const queryResourceList = data => createAPI(`/pms/pqc/queryResourceList`,'post',data)
+export const queryOperationResourceList = data => createAPI(`/pms/pqc/queryOperationResourceList`,'post',data)
+export const queryEamObjectlist = data => createAPI(`/pms/pqc/queryEamObjectlist`,'post',data)
+export const deleteOperationForResource = data => createAPI(`/pms/pqc/deleteOperationForResource`,'post',data)
+export const deleteUserDefaultOperation = data => createAPI(`/pms/pqc/deleteUserDefaultOperation`,'post',data)
+export const getHuanXianSysUserList = data => createAPI(`/pms/pqc/getHuanXianSysUserList`,'post',data)
+export const getAllUserList = data => createAPI(`/pms/pqc/getAllUserList`,'post',data)
+export const queryResourceList2 = data => createAPI(`/pms/pqc/queryResourceList2`,'post',data)
// ===================================== IPQC检验 =====================================
export const qcIPQCInspectionSearch = data => createAPI(`/pms/qc/qcIPQCInspectionSearch`,'post',data)
diff --git a/src/views/modules/qc/OperationForResource.vue b/src/views/modules/qc/OperationForResource.vue
new file mode 100644
index 0000000..25efc56
--- /dev/null
+++ b/src/views/modules/qc/OperationForResource.vue
@@ -0,0 +1,450 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 新增
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ i.sitename }}
+
+ {{ i.buDesc }}
+
+
+
+
+
+
+
+
+
+
+
+ 机台编码
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保 存
+ 取 消
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+ {{scope.row[item.columnProp]}}
+
+
+
+
+
+
+ 关闭
+
+
+
+
+
+
+
+
diff --git a/src/views/modules/qc/PQCResultEntry.vue b/src/views/modules/qc/PQCResultEntry.vue
index 6164907..ad986f1 100644
--- a/src/views/modules/qc/PQCResultEntry.vue
+++ b/src/views/modules/qc/PQCResultEntry.vue
@@ -171,124 +171,232 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
- {{ i.sitename }}
-
- {{ i.buDesc }}
-
+ v-for = "i in operationList"
+ :key = "i.code"
+ :label = "i.description"
+ :value = "i.code">
-
-
-
+
+
-
-
-
- 派工单号
-
+
+
-
- 派工单号
-
+
+
-
- 派工单号
-
+
+
+
+ 物料编码
+
-
-
+
+
-
-
-
+
+
+
+ v-for = "i in eamObjectList"
+ :key = "i.objectID"
+ :label = "i.objectID+' '+i.objectDesc"
+ :value = "i.objectID">
-
- 机台
-
-
-
-
-
-
-
-
- 物料编码
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
- 检验模板
-
+
+
-
-
+
+
-
-
+
+
+ v-for = "i in allUserList"
+ :key = "i.username"
+ :label = "i.username+' '+i.userDisplay"
+ :value = "i.username">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
保存
关闭
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+ {{scope.row[item.columnProp]}}
+
+
+
+
+
+
+ 关闭
+
+
+
+
@@ -911,6 +1019,12 @@ import {
getPQCItemObjectList, // 查询项目设备
dataAcquisitionByItem, // 根据项目数据采集
cancelApproval2, // 取消审核
+ queytOperationList,//查询新增时的工序列表
+ queryPartDescByNo, //保存前查询物料描述回填
+ queryOperationResourceList,//查询工序对应机台
+ queryEamObjectlist,//查询机台对应的设备
+ queryUserDefaultOperationListByUsername,//查询用户是否有默认工序设置
+ getHuanXianSysUserList,//获取所有用户列表
} from "@/api/qc/qc.js"
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
@@ -926,6 +1040,7 @@ import comQcItemImageUploadFile from "./com_qc_itemImage_upload_file"
import subDetailUpload from "./sub_detail_upload"
import QrCode from "../common/QrCode.vue";
import IqcFileTable from "./IQCFileTable.vue";
+import {format} from "nightwatch/lib/util/utils";
/*上传文件的組件*/
export default {
components: {
@@ -944,6 +1059,42 @@ export default {
end = this.tableData.length
}
return this.tableData.slice(start,end)
+ },
+ returntemplateId(){
+ let a = this.modalData.operationDesc
+ let list = this.operationList
+ for (let i = 0; i < list.length; i++) {
+ let data = list[i];
+ if (data.code==a){
+ this.modalData.templateId = data.template
+ return data.template
+ }
+ }
+ return ''
+ },
+ returntemplateDesc(){
+ let a = this.modalData.operationDesc
+ let list = this.operationList
+ for (let i = 0; i < list.length; i++) {
+ let data = list[i];
+ if (data.code==a){
+ this.modalData.templateDesc = data.templateDesc
+ return data.templateDesc
+ }
+ }
+ return ''
+ },
+ returnBU(){
+ let a = this.modalData.operationDesc
+ let list = this.operationList
+ for (let i = 0; i < list.length; i++) {
+ let data = list[i];
+ if (data.code==a){
+ this.modalData.bu = data.bu
+ return data.bu
+ }
+ }
+ return ''
}
},
watch: {
@@ -984,6 +1135,9 @@ export default {
inspectionNo: '',
fileFlag: false,
fileContentList: [],
+ eamObjectList:[],
+ queryResourceData:[],
+ partList2:[],
// 是否收藏
favorite: false,
// 导出 start
@@ -1038,6 +1192,8 @@ export default {
height: 200,
dataList: [],
dataListSelections: [],
+ partFlag:false,
+ partModalData:{},
modalData: {
flag: '',
site: '',
@@ -1050,7 +1206,8 @@ export default {
inspectorNo: '',
inspectorName: '',
submit_flag: '',
- seqNo: '',
+ seqNo: '000#1TSGD',
+ orderNo: '000#1',
batchRollNo: '',
invdefinetype: '',
sku: '',
@@ -1060,6 +1217,9 @@ export default {
specialRequirements: '',
templateId: '',
templateName: '',
+ templateDesc:'',
+ eamObjectId:'',
+ eamObjectDesc:'',
specialTaskFlag: '',
workCenterNo: '',
rollNo: '',
@@ -1067,6 +1227,44 @@ export default {
umName: '',
sjzs: ''
},
+ partColomn:[
+ {
+ userId: this.$store.state.user.name,
+ functionId: 301015,
+ serialNumber: '301015Table1partNo',
+ tableId: "301015Table1",
+ tableName: "物料表",
+ columnProp: 'partNo',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '物料编码',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 100,
+ },
+ {
+ userId: this.$store.state.user.name,
+ functionId: 301015,
+ serialNumber: '301015Table1partDesc',
+ tableId: "301015Table1",
+ tableName: "物料表",
+ columnProp: 'partDesc',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '物料名称',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 120,
+ }
+ ],
// 展示列集
columnList1: [
{
@@ -2148,6 +2346,7 @@ export default {
},
resourceList: [],
operationList: [],
+ userDefaultOperation:'',
partList: [],
batchHandleAddModalFlag: false,
batchAddData: {
@@ -2270,6 +2469,7 @@ export default {
umList: [],
userBuList: [],
buList: [],
+ allUserList:[],
authSearch: false,
authSave: false,
authCheck: false,
@@ -2412,9 +2612,18 @@ export default {
}
// 获取用户角色
this.getUserRoleList()
+ // 获取用户列表
+ this.getAllSysUserList()
},
methods: {
+ getAllSysUserList(){
+ getHuanXianSysUserList().then(({data})=>{
+ if (data.code==0){
+ this.allUserList = data.rows
+ }
+ }).catch()
+ },
// 获取用户的bu
getSiteAndBuByUserName2 () {
@@ -2900,7 +3109,29 @@ export default {
})
}
},
-
+ queryALLPartList(){
+ queryPartDescByNo(this.partModalData).then(({data})=>{
+ if (data.code==0){
+ this.partList2 = data.rows
+ this.partFlag = true
+ }else {
+ this.$message.error("系统异常")
+ }
+ })
+ },
+ eamObjectIdChange(){
+ let a = this.modalData.eamObjectId
+ console.log(a)
+ let list = this.eamObjectList
+ for (let i = 0; i < list.length; i++) {
+ let data = list[i];
+ if (data.objectID==a){
+ this.modalData.eamObjectDesc = data.objectDesc
+ return data.template
+ }
+ }
+ return ''
+ },
// 获取工序列表
getOperationList () {
getOperationList2(this.modalData).then(({data}) => {
@@ -3012,42 +3243,80 @@ export default {
// 新增FAI巡检记录
saveData () {
- if (this.modalData.bu === '' || this.modalData.bu == null) {
- this.$message.warning('请选择BU!')
- return
- }
- if (this.modalData.seqNo === '' || this.modalData.seqNo == null) {
- this.$message.warning('请选择派工单!')
- return
- }
- if (this.modalData.orderNo === '' || this.modalData.orderNo == null) {
- this.$message.warning('请选择工单!')
- return
- }
- if (this.modalData.specialTaskFlag !== 'Y' && (this.modalData.partNo === '' || this.modalData.partNo == null)) {
- this.$message.warning('请选择物料!')
+ // if (this.modalData.bu === '' || this.modalData.bu == null) {
+ // this.$message.warning('请选择BU!')
+ // return
+ // }
+ // if (this.modalData.seqNo === '' || this.modalData.seqNo == null) {
+ // this.$message.warning('请选择派工单!')
+ // return
+ // }
+ // if (this.modalData.orderNo === '' || this.modalData.orderNo == null) {
+ // this.$message.warning('请选择工单!')
+ // return
+ // }
+ // if (this.modalData.specialTaskFlag !== 'Y' && (this.modalData.partNo === '' || this.modalData.partNo == null)) {
+ // this.$message.warning('请选择物料!')
+ // return
+ // }
+ // if (this.modalData.operationDesc === '' || this.modalData.operationDesc == null) {
+ // this.$message.warning('请选择工序!')
+ // return
+ // }
+ // if (this.modalData.specialTaskFlag !== 'Y' && (this.modalData.resourceId === '' || this.modalData.resourceId == null)) {
+ // this.$message.warning('请选择机台!')
+ // return
+ // }
+ // if (this.modalData.rollQty === '' || this.modalData.rollQty == null) {
+ // this.$message.warning('请填写送检数量!')
+ // return
+ // }
+ // if (this.modalData.umId === '' || this.modalData.umId == null) {
+ // this.$message.warning('请选择单位!')
+ // return
+ // }
+ // if (this.controlData.baseData === '控制' && (this.modalData.templateId == null || this.modalData.templateId === '')) {
+ // this.$message.warning('请选择检验模板!')
+ // return
+ // }
+ this.saveFlag = true
+ if (this.modalData.operationDesc==null ||this.modalData.operationDesc==''){
+ this.$message.warning('请选择工序!')
return
}
- if (this.modalData.operationDesc === '' || this.modalData.operationDesc == null) {
- this.$message.warning('请选择工序!')
+ if (this.modalData.partNo==null ||this.modalData.partNo==''){
+ this.$message.warning('请填写物料编码!')
return
}
- if (this.modalData.specialTaskFlag !== 'Y' && (this.modalData.resourceId === '' || this.modalData.resourceId == null)) {
- this.$message.warning('请选择机台!')
+ if (this.modalData.eamObjectId==null ||this.modalData.eamObjectId==''){
+ this.$message.warning('请填写设备编码!')
return
}
- if (this.modalData.rollQty === '' || this.modalData.rollQty == null) {
- this.$message.warning('请填写送检数量!')
+ if (this.modalData.sopNum==null ||this.modalData.sopNum==''){
+ this.$message.warning('请填写SOP编码!')
return
}
- if (this.modalData.umId === '' || this.modalData.umId == null) {
- this.$message.warning('请选择单位!')
+ if (this.modalData.changeLineTime==null ||this.modalData.changeLineTime==''){
+ this.$message.warning('换线时间不能为空!')
return
}
- if (this.controlData.baseData === '控制' && (this.modalData.templateId == null || this.modalData.templateId === '')) {
- this.$message.warning('请选择检验模板!')
+ if (this.modalData.changePeople==null ||this.modalData.changePeople==''){
+ this.$message.warning('换线人员不能为空!')
return
}
+
+ // await queryPartDescByNo(this.modalData).then(({data})=>{
+ // if (data.code==0){
+ // this.modalData.partDesc = data.rows[0].partDesc
+ // }else {
+ // this.$message.error("请填写正确的物料编码")
+ // this.saveFlag = false
+ // }
+ // })
+ // //判断物料编码是否正确
+ // if (!this.saveFlag){
+ // return
+ // }
this.saveLoading = true
if (this.modalData.flag === '1') {
savePQCInspection(this.modalData).then(({data}) => {
@@ -3091,7 +3360,61 @@ export default {
}
})
},
-
+ queryUserDefaultOperationListByUsername(){
+ let json = {
+ username:this.$store.state.user.name
+ }
+ queryUserDefaultOperationListByUsername(json).then(({data})=>{
+ if (data.code==2){
+ this.modalData.operationDesc = data.rows[0].operation
+ }
+ }).catch()
+ },
+ queytOperationList(){
+ queytOperationList().then(({data})=>{
+ if (data && data.code === 0) {
+ this.operationList = data.rows
+ }
+ }).catch((error)=>{
+ console.log("失败")
+ console.log(error)
+ })
+ },
+ async queryOperationResourceList(){
+ let json = {
+ operation:this.modalData.operationDesc
+ }
+ await queryOperationResourceList(json).then(({data})=>{
+ if (data.code==0){
+ // this.queryResourceData = data.rows[0].resource
+ this.eamObjectList = data.rows
+ // this.queryResourceData = data.rows
+ // for (let i = 0; i < data.rows.length; i++){
+ // console.log(i)
+ // this.queryResourceData.add(data.rows[i].resource)
+ // }
+ // this.$message.success(this.queryResourceData)
+ }
+ }).catch()
+ },
+ async queryEamObjectlist(){
+ let json = {
+ resourceID: this.queryResourceData
+ }
+ await queryEamObjectlist(json).then(({data})=>{
+ if (data.code==0){
+ this.eamObjectList = data.rows
+ }
+ }).catch()
+ },
+ async operationDescInput(){
+ this.queryResourceData = ''
+ this.eamObjectList = []
+ //查询工序对应的机台
+ await this.queryOperationResourceList()
+ //查询机台对应的设备
+ // await this.queryEamObjectlist()
+ },
// 新增
addModal () {
this.modalData = {
@@ -3106,13 +3429,13 @@ export default {
inspectorNo: '',
inspectorName: '',
submit_flag: '',
- orderNo: '',
+ seqNo: '000#1TSGD',
+ orderNo: '000#1',
operationDesc: '',
operationNo: '',
resourceId: '',
resourceDesc: '',
- rollQty: '',
- seqNo: '',
+ rollQty: '1',
batchRollNo: '',
invdefinetype: '',
sku: '',
@@ -3126,10 +3449,20 @@ export default {
umId: this.umList[0].umId,
umName: this.umList[0].umName,
sjzs: '',
+ changeLineTime: new Date(),
+ sopNum:'',
+ objectID:'',
+ changePeople:[this.$store.state.user.name]
}
this.operationList = []
this.resourceList = []
this.partList = []
+ //查询工序列表
+ this.queytOperationList()
+ //查询当前用户默认工序设置
+ this.queryUserDefaultOperationListByUsername()
+ //新增
+ this.operationDescInput()
this.modalFlag = true
this.checked = false
},
@@ -3177,6 +3510,11 @@ export default {
this.modalData.templateName = row.templateName
this.templateModelFlag = false
},
+ getRowData3(row){
+ this.modalData.partNo = row.partNo
+ this.modalData.partDesc = row.partDesc
+ this.partFlag = false
+ },
// 选中派工单号
getRowData1 (row) {
diff --git a/src/views/modules/qc/UserDefaultOperation.vue b/src/views/modules/qc/UserDefaultOperation.vue
new file mode 100644
index 0000000..89231c5
--- /dev/null
+++ b/src/views/modules/qc/UserDefaultOperation.vue
@@ -0,0 +1,453 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 新增
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ i.sitename }}
+
+ {{ i.buDesc }}
+
+
+
+
+
+
+
+
+
+
+
+ 用户名
+
+
+
+
+
+
+
+ 保 存
+ 取 消
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+ {{scope.row[item.columnProp]}}
+
+
+
+
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+