|
|
@ -480,7 +480,9 @@ import { |
|
|
rollNoEnter as rollNoEnterAPI, // 标签号回车事件 |
|
|
rollNoEnter as rollNoEnterAPI, // 标签号回车事件 |
|
|
searchSeqInfo, // 派工单号查询 |
|
|
searchSeqInfo, // 派工单号查询 |
|
|
getSiteAndBuByUserName2, // 获取BU列表 |
|
|
getSiteAndBuByUserName2, // 获取BU列表 |
|
|
saveIPQCDetailedRecord // 保存检验明细记录 |
|
|
|
|
|
|
|
|
saveIPQCDetailedRecord, // 保存检验明细记录 |
|
|
|
|
|
getSpecialOperationList, // 获取特殊工序列表 |
|
|
|
|
|
inspectionTypeSearch, // 搜索所有检验类型 |
|
|
} from "@/api/qc/qc.js" |
|
|
} from "@/api/qc/qc.js" |
|
|
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" |
|
|
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" |
|
|
import { getInspectionFile } from '@/api/eam/eam_object_list.js' |
|
|
import { getInspectionFile } from '@/api/eam/eam_object_list.js' |
|
|
@ -503,6 +505,14 @@ export default { |
|
|
seqNo: { |
|
|
seqNo: { |
|
|
type: String, |
|
|
type: String, |
|
|
default: '' |
|
|
default: '' |
|
|
|
|
|
}, |
|
|
|
|
|
site: { |
|
|
|
|
|
type: String, |
|
|
|
|
|
default: '' |
|
|
|
|
|
}, |
|
|
|
|
|
buNo: { |
|
|
|
|
|
type: String, |
|
|
|
|
|
default: '' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
@ -743,14 +753,19 @@ export default { |
|
|
seqNo: '', |
|
|
seqNo: '', |
|
|
orderNo: '', |
|
|
orderNo: '', |
|
|
operationDesc: '', |
|
|
operationDesc: '', |
|
|
|
|
|
operationNo: '', |
|
|
|
|
|
resourceId: '', |
|
|
resourceDesc: '', |
|
|
resourceDesc: '', |
|
|
|
|
|
workCenterNo: '', |
|
|
partNo: '', |
|
|
partNo: '', |
|
|
partDesc: '', |
|
|
partDesc: '', |
|
|
invdefinetype: '', |
|
|
invdefinetype: '', |
|
|
sku: '', |
|
|
sku: '', |
|
|
|
|
|
cinvSourceCode: '', |
|
|
inspectionTypeNo: '', |
|
|
inspectionTypeNo: '', |
|
|
rollQty: '', |
|
|
rollQty: '', |
|
|
umId: '', |
|
|
umId: '', |
|
|
|
|
|
umName: '', |
|
|
templateId: '', |
|
|
templateId: '', |
|
|
templateName: '', |
|
|
templateName: '', |
|
|
sjzs: '', |
|
|
sjzs: '', |
|
|
@ -993,17 +1008,18 @@ export default { |
|
|
} |
|
|
} |
|
|
], |
|
|
], |
|
|
rules: { |
|
|
rules: { |
|
|
bu: [{ required: true, message: '请选择BU', trigger: 'change' }], |
|
|
|
|
|
seqNoType: [{ required: true, message: '请输入派工单号', trigger: 'blur' }], |
|
|
|
|
|
orderNoType: [{ required: true, message: '请输入工单号', trigger: 'blur' }], |
|
|
|
|
|
operationDescType: [{ required: true, message: '请选择工序', trigger: 'change' }], |
|
|
|
|
|
resourceIdType: [{ required: true, message: '请输入机台', trigger: 'blur' }], |
|
|
|
|
|
partNoType: [{ required: true, message: '请输入物料编码', trigger: 'blur' }], |
|
|
|
|
|
inspectionTypeNoType: [{ required: true, message: '请选择检验类型', trigger: 'change' }], |
|
|
|
|
|
rollQtyType: [{ required: true, message: '请输入送检数量', trigger: 'blur' }], |
|
|
|
|
|
umIdType: [{ required: true, message: '请选择单位', trigger: 'change' }], |
|
|
|
|
|
templateId: [{ required: true, message: '请选择检验模板', trigger: 'change' }] |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
bu: [{ required: true, message: '请选择BU', trigger: ['blur','change']}], |
|
|
|
|
|
seqNoType: [{ required: true, message: '请输入派工单号', trigger: ['blur','change'] }], |
|
|
|
|
|
orderNoType: [{ required: true, message: '请输入工单号', trigger: ['blur','change'] }], |
|
|
|
|
|
operationDescType: [{ required: true, message: '请选择工序', trigger: ['blur','change'] }], |
|
|
|
|
|
resourceIdType: [{ required: true, message: '请输入机台', trigger: ['blur','change'] }], |
|
|
|
|
|
partNoType: [{ required: true, message: '请输入物料编码', trigger: ['blur','change'] }], |
|
|
|
|
|
inspectionTypeNoType: [{ required: true, message: '请选择检验类型', trigger: ['blur','change'] }], |
|
|
|
|
|
rollQtyType: [{ required: true, message: '请输入送检数量', trigger: ['blur','change'] }], |
|
|
|
|
|
umIdType: [{ required: true, message: '请选择单位', trigger: ['blur','change'] }], |
|
|
|
|
|
templateId: [{ required: true, message: '请选择检验模板', trigger: ['blur','change'] }] |
|
|
|
|
|
}, |
|
|
|
|
|
typeOptions: [], |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
watch: { |
|
|
watch: { |
|
|
@ -1032,13 +1048,32 @@ export default { |
|
|
this.getUmList() |
|
|
this.getUmList() |
|
|
// 查看 质量任务生成规则控制 动控是否开启 |
|
|
// 查看 质量任务生成规则控制 动控是否开启 |
|
|
this.queryController() |
|
|
this.queryController() |
|
|
|
|
|
this.inspectionTypeSearch() |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 查询检验类型 |
|
|
|
|
|
inspectionTypeSearch () { |
|
|
|
|
|
let tempData = { |
|
|
|
|
|
site: this.site |
|
|
|
|
|
} |
|
|
|
|
|
inspectionTypeSearch(tempData).then(({data}) => { |
|
|
|
|
|
if (data.code === 0) { |
|
|
|
|
|
this.typeOptions = data.rows |
|
|
|
|
|
this.typeOptions.forEach(val => { |
|
|
|
|
|
if (val.inspectionTypeName.includes('IPQC')) { |
|
|
|
|
|
this.templateData.inspectionTypeNo = val.inspectionTypeNo |
|
|
|
|
|
this.templateData.inspectionTypeName = val.inspectionTypeName |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 检查动控是否开启 |
|
|
// 检查动控是否开启 |
|
|
queryController () { |
|
|
queryController () { |
|
|
let tempData = { |
|
|
let tempData = { |
|
|
controlNo: '10004', |
|
|
controlNo: '10004', |
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
|
|
|
site: this.site, |
|
|
} |
|
|
} |
|
|
queryController(tempData).then(({data}) => { |
|
|
queryController(tempData).then(({data}) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
@ -1128,14 +1163,19 @@ export default { |
|
|
seqNo: '', |
|
|
seqNo: '', |
|
|
orderNo: '', |
|
|
orderNo: '', |
|
|
operationDesc: '', |
|
|
operationDesc: '', |
|
|
|
|
|
operationNo: '', |
|
|
|
|
|
resourceId: '', |
|
|
resourceDesc: '', |
|
|
resourceDesc: '', |
|
|
|
|
|
workCenterNo: '', |
|
|
partNo: '', |
|
|
partNo: '', |
|
|
partDesc: '', |
|
|
partDesc: '', |
|
|
invdefinetype: '', |
|
|
invdefinetype: '', |
|
|
sku: '', |
|
|
sku: '', |
|
|
|
|
|
cinvSourceCode: '', |
|
|
inspectionTypeNo: '', |
|
|
inspectionTypeNo: '', |
|
|
rollQty: '', |
|
|
rollQty: '', |
|
|
umId: '', |
|
|
|
|
|
|
|
|
umId: this.umList.length > 0 ? this.umList[0].umId : '', |
|
|
|
|
|
umName: this.umList.length > 0 ? this.umList[0].umName : '', |
|
|
templateId: '', |
|
|
templateId: '', |
|
|
templateName: '', |
|
|
templateName: '', |
|
|
sjzs: '', |
|
|
sjzs: '', |
|
|
@ -1143,13 +1183,24 @@ export default { |
|
|
specialRequirements: '', |
|
|
specialRequirements: '', |
|
|
specialTaskFlag: 'N' |
|
|
specialTaskFlag: 'N' |
|
|
} |
|
|
} |
|
|
|
|
|
this.operationList = [] |
|
|
this.checked = false |
|
|
this.checked = false |
|
|
this.modalFlag = true |
|
|
this.modalFlag = true |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// BU变化事件 |
|
|
// BU变化事件 |
|
|
buChange() { |
|
|
buChange() { |
|
|
// BU变化处理逻辑 |
|
|
|
|
|
|
|
|
if (this.modalData.specialTaskFlag !== 'Y') { // 正常检验 |
|
|
|
|
|
this.modalData.templateId = '' |
|
|
|
|
|
this.modalData.templateName = '' |
|
|
|
|
|
} else { // 无工单检验 |
|
|
|
|
|
this.modalData.partNo = '' |
|
|
|
|
|
this.modalData.partDesc = '' |
|
|
|
|
|
this.modalData.invdefinetype = '' |
|
|
|
|
|
this.modalData.sku = '' |
|
|
|
|
|
this.modalData.templateId = '' |
|
|
|
|
|
this.modalData.templateName = '' |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 标签号回车事件 |
|
|
// 标签号回车事件 |
|
|
@ -1193,7 +1244,11 @@ export default { |
|
|
|
|
|
|
|
|
// 获取单位列表 |
|
|
// 获取单位列表 |
|
|
getUmList() { |
|
|
getUmList() { |
|
|
umSearch().then(({data}) => { |
|
|
|
|
|
|
|
|
let tempData = { |
|
|
|
|
|
site: this.site, |
|
|
|
|
|
active: 'Y' |
|
|
|
|
|
} |
|
|
|
|
|
umSearch(tempData).then(({data}) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
this.umList = data.rows |
|
|
this.umList = data.rows |
|
|
} |
|
|
} |
|
|
@ -1294,16 +1349,120 @@ export default { |
|
|
|
|
|
|
|
|
// 无工单检验变化 |
|
|
// 无工单检验变化 |
|
|
changeSpecialTask() { |
|
|
changeSpecialTask() { |
|
|
this.modalData.specialTaskFlag = this.checked ? 'Y' : 'N' |
|
|
|
|
|
|
|
|
// 先重置数据 |
|
|
|
|
|
this.modalData = { |
|
|
|
|
|
flag: '1', |
|
|
|
|
|
site: '', |
|
|
|
|
|
bu: this.userBuList.length > 0 ? this.userBuList[0].buNo : '', |
|
|
|
|
|
rollNo: '', |
|
|
|
|
|
seqNo: '', |
|
|
|
|
|
orderNo: '', |
|
|
|
|
|
operationDesc: '', |
|
|
|
|
|
operationNo: '', |
|
|
|
|
|
resourceId: '', |
|
|
|
|
|
resourceDesc: '', |
|
|
|
|
|
workCenterNo: '', |
|
|
|
|
|
partNo: '', |
|
|
|
|
|
partDesc: '', |
|
|
|
|
|
invdefinetype: '', |
|
|
|
|
|
sku: '', |
|
|
|
|
|
cinvSourceCode: '', |
|
|
|
|
|
inspectionTypeNo: '', |
|
|
|
|
|
rollQty: '', |
|
|
|
|
|
umId: this.umList.length > 0 ? this.umList[0].umId : '', |
|
|
|
|
|
umName: this.umList.length > 0 ? this.umList[0].umName : '', |
|
|
|
|
|
templateId: '', |
|
|
|
|
|
templateName: '', |
|
|
|
|
|
sjzs: '', |
|
|
|
|
|
batchRollNo: '', |
|
|
|
|
|
specialRequirements: '', |
|
|
|
|
|
specialTaskFlag: '' |
|
|
|
|
|
} |
|
|
|
|
|
// 获取选中框 |
|
|
|
|
|
let obj = document.getElementsByName('specialTask') |
|
|
|
|
|
// 判断是否打勾 |
|
|
|
|
|
if (obj[0].checked) { |
|
|
|
|
|
let tempData = { |
|
|
|
|
|
site: '', |
|
|
|
|
|
bu: this.modalData.bu |
|
|
|
|
|
} |
|
|
|
|
|
this.modalData.specialTaskFlag = 'Y' |
|
|
|
|
|
// 获取特殊工序列表 |
|
|
|
|
|
getSpecialOperationList(tempData).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.operationList = data.rows |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.error(data.msg) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
// 派工单和工单号赋值 |
|
|
|
|
|
this.modalData.seqNo = '000#1TSGD' |
|
|
|
|
|
this.modalData.orderNo = '000#1' |
|
|
|
|
|
} else { |
|
|
|
|
|
this.operationList = [] |
|
|
|
|
|
this.modalData.specialTaskFlag = '' |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 保存数据 |
|
|
// 保存数据 |
|
|
saveData() { |
|
|
saveData() { |
|
|
|
|
|
// 验证 BU |
|
|
|
|
|
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.inspectionTypeNo === '' || this.modalData.inspectionTypeNo == 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.saveLoading = true |
|
|
this.saveLoading = true |
|
|
if (this.modalData.flag === '1') { |
|
|
if (this.modalData.flag === '1') { |
|
|
saveOsInspection(this.modalData).then(({data}) => { |
|
|
saveOsInspection(this.modalData).then(({data}) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
this.getDataList() |
|
|
this.getDataList() |
|
|
|
|
|
this.operationList = [] |
|
|
this.modalFlag = false |
|
|
this.modalFlag = false |
|
|
this.$message.success('操作成功') |
|
|
this.$message.success('操作成功') |
|
|
} else { |
|
|
} else { |
|
|
|