Browse Source

2025-06-24

技术参数卡-提交时的字段必填校验
master
fengyuan_yang 7 months ago
parent
commit
6bb5f31bb2
  1. 55
      src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_customerInformation.vue
  2. 50
      src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_routing.vue
  3. 100
      src/views/modules/sampleManagement/technicalSpecificationDetail/com_tsd_basicInformation.vue

55
src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_customerInformation.vue

@ -161,7 +161,7 @@
<el-row :gutter="20" style="margin-top: 60px">
<el-col :span="24">
<div class="grid-content bg-purple">
<el-form-item v-if="ifDisableFlag || plmTechnicalSpecificationSheetFlag('projectRemark') === 'N'">
<el-form-item v-if="ifDisableFlag || plmTechnicalSpecificationSheetFlag('pictureAddess') === 'N'">
<span slot="label">附加客户图纸/Attach Customer Drawing(点击跳转)</span>
<el-input v-model="dataForm.pictureAddess" disabled></el-input>
</el-form-item>
@ -342,25 +342,37 @@
nodeName: '',
},
dataForm: {
materialType:'',
materialType: '',
site: '',
codeNo:'',
finalCustomerNo:'',
finalCustomerDesc:'',
customerId:'',
customerDesc:'',
partNo:'',
partDesc:'',
customerRevNo:'',
certification:'',
partFamily:'',
customerRemark:'',
projectRemark:'',
pictureAddess:'',
customerPictureChangeRemark:'',
productionFileComments:'',
remark:'',
nodeId: ''
codeNo: '',
finalCustomerNo: '',
finalCustomerDesc: '',
customerId: '',
customerDesc: '',
partNo: '',
partDesc: '',
customerRevNo: '',
certification: '',
partFamily: '',
customerRemark: '',
projectRemark: '',
pictureAddess: '',
customerPictureChangeRemark: '',
productionFileComments: '',
remark: '',
nodeId: '',
},
dataForm2: {
customerRevNo: '',
materialNumber: '',
certification: '',
materialType: '',
customerRemark: '',
projectRemark: '',
pictureAddess: '',
remark: '',
finalCustomerNo: '',
customerPartNo: ''
},
dataRole: {
partTypeDesc: [
@ -659,9 +671,10 @@
},
submitData (tempData) {
let map = new Map(Object.entries(this.dataForm2))
if (this.plmTechnicalSpecificationSheetArr) {
for (let i = 0; i < this.plmTechnicalSpecificationSheetArr.length; i++) {
if (!this.dataForm[this.plmTechnicalSpecificationSheetArr[i].fieldId] && this.plmTechnicalSpecificationSheetArr[i].required === 'Y') {
if (map.has(this.plmTechnicalSpecificationSheetArr[i].fieldId) && !this.dataForm[this.plmTechnicalSpecificationSheetArr[i].fieldId] && this.plmTechnicalSpecificationSheetArr[i].required === 'Y') {
this.$message.warning(this.plmTechnicalSpecificationSheetArr[i].fieldName + '不能为空!')
return
}
@ -669,7 +682,7 @@
}
if (this.plmStepRoleBaseBmArr) {
for (let i = 0; i < this.plmStepRoleBaseBmArr.length; i++) {
if (!this.dataForm[this.plmStepRoleBaseBmArr[i].fieldId] && this.plmStepRoleBaseBmArr[i].required === 'Y') {
if (map.has(this.plmStepRoleBaseBmArr[i].fieldId) && !this.dataForm[this.plmStepRoleBaseBmArr[i].fieldId] && this.plmStepRoleBaseBmArr[i].required === 'Y') {
this.$message.warning(this.plmStepRoleBaseBmArr[i].fieldName + '不能为空!')
return
}

50
src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_routing.vue

@ -762,14 +762,14 @@
partList:[],
superAdmin:false,
ifDisableFlag:false,
sheetData:{
sheetData: {
site: '',
codeNo: '',
process:'',
overPrintOperator:'',
overPrintOperatorName:'',
printOperator:'',
printOperatorName:'',
process: '',
overPrintOperator: '',
overPrintOperatorName: '',
printOperator: '',
printOperatorName: '',
simplexDuplex: '',
repeat: '',
hp: '',
@ -787,7 +787,26 @@
p2cTolerance: '',
slittingTolerance: ''
},
dataForm:{
sheetData2: {
process: '',
overPrintOperator: '',
printOperator: '',
simplexDuplex: '',
repeat: '',
labelLength: '',
labelWidth: '',
hp: '',
vp: '',
across: '',
down: '',
printCopyPosition: '',
goodsRollWidth: '',
newCutter: '',
p2cTolerance: '',
dimensionTolerance: '',
slittingTolerance: ''
},
dataForm: {
site: '',
codeNo:'',
processDetail:'',
@ -1752,7 +1771,7 @@
this.ifDisableFlag = true
return false
}
if(data.status === '审批中') {
if (data.status === '审批中') {
let tempData = {
site: row.site,
stepId: row.stepId,
@ -1760,18 +1779,6 @@
}
getNodeAuthority(tempData).then(({data}) => {
if (data && data.code === 0) {
// this.ifDisableFlag = true
// let plmStepRoleBaseBm = data.rows.plm_stepRole_base_bm
// let arr = plmStepRoleBaseBm.filter(a => a.fieldId === this.searchData.fieldId)
// if (arr.length > 0) {
// if (arr[0].updateFlag === 'N') {
// this.ifDisableFlag = true
// } else {
// this.ifDisableFlag = false
// }
// } else {
// this.ifDisableFlag = true
// }
this.plmTechnicalSpecificationSheetArr = data.rows.plm_technical_specification_sheet
}
})
@ -1821,9 +1828,10 @@
},
async submitData (tempData) {
let map = new Map(Object.entries(this.sheetData2))
if (this.plmTechnicalSpecificationSheetArr) {
for (let i = 0; i < this.plmTechnicalSpecificationSheetArr.length; i++) {
if (!this.dataForm[this.plmTechnicalSpecificationSheetArr[i].fieldId] && this.plmTechnicalSpecificationSheetArr[i].required === 'Y') {
if (map.has(this.plmTechnicalSpecificationSheetArr[i].fieldId) && !this.sheetData[this.plmTechnicalSpecificationSheetArr[i].fieldId] && this.plmTechnicalSpecificationSheetArr[i].required === 'Y') {
this.$message.warning(this.plmTechnicalSpecificationSheetArr[i].fieldName + '不能为空!')
return
}

100
src/views/modules/sampleManagement/technicalSpecificationDetail/com_tsd_basicInformation.vue

@ -7,7 +7,7 @@
<el-form-item :label="' '">
<el-button type="primary" @click="refresh()">刷新数据</el-button>
<template v-if="(!ifDisableFlag && isAuth('103002:bmSave') && spForm.sp.includes(searchData.username) && dataForm.status === 'spz') || dataForm.status === 'cg' || (superAdmin)">
<el-button type="primary" @click="saveData()">保存数据 </el-button>
<el-button type="primary" @click="saveData()">保存数据</el-button>
</template>
<template v-if="dataForm.status === 'spz' && ((!ifDisableFlag && spForm.sp.includes(searchData.username)) || (superAdmin))">
<el-button type="primary" :loading="submitLoading" @click="agreeSubmit">同意</el-button>
@ -464,45 +464,45 @@
nodeName:'',
},
dataForm: {
nodeName:'',
process:'',
buNo:'',
nodeName: '',
process: '',
buNo: '',
site: '',
codeNo:'',
revNo:'',
workCenterNo:'',
partRevNo:'',
finalPartNo:'',
testPartNo:'',
customerPartNo:'',
partDesc:'',
pod:'',
mpOperatorName:'',
mpOperator:'',
createBy:'',
createDate:'',
proofingNo:'',
ecnFlag:'',
ecnNo:'',
ecnAddress:'',
quotationOfficer:'',
engineer:'',
technician:'',
quotationOfficerList:[],
stage:'',
remarkPage:'',
cqcOperator:'',
faiOperator:'',
cqcOperatorName:'',
faiOperatorName:'',
peOperater:'',
peOperaterName:'',
csOperater:'',
csOperaterName:'',
dccOperater:'',
dccOperaterName:'',
engineerNo:'',
technicianNo:'',
codeNo: '',
revNo: '',
workCenterNo: '',
partRevNo: '',
finalPartNo: '',
testPartNo: '',
customerPartNo: '',
partDesc: '',
pod: '',
mpOperatorName: '',
mpOperator: '',
createBy: '',
createDate: '',
proofingNo: '',
ecnFlag: '',
ecnNo: '',
ecnAddress: '',
quotationOfficer: '',
engineer: '',
technician: '',
quotationOfficerList: [],
stage: '',
remarkPage: '',
cqcOperator: '',
faiOperator: '',
cqcOperatorName: '',
faiOperatorName: '',
peOperater: '',
peOperaterName: '',
csOperater: '',
csOperaterName: '',
dccOperater: '',
dccOperaterName: '',
engineerNo: '',
technicianNo: '',
dcc: '',
relevancePartNo: '',
ecnUpgradeVersion: '',
@ -521,6 +521,23 @@
planOperator: '',
planOperatorName: '',
},
dataForm2: {
stage: '',
pod: '',
shopOrder: '',
documentSource: '',
ecnUpgradeVersion: '',
remarkPage: '',
relevancePartNo: '',
csOperatorList: [],
engineerList: [],
technicianList: [],
mpOperatorList: [],
planOperatorList: [],
cqcOperatorList: [],
faiOperatorList: [],
dccList: []
},
dataRole: {
partTypeDesc: [
{
@ -1221,9 +1238,10 @@
},
submitData (tempData) {
let map = new Map(Object.entries(this.dataForm2))
if (this.plmTechnicalSpecificationSheetArr) {
for (let i = 0; i < this.plmTechnicalSpecificationSheetArr.length; i++) {
if (!this.dataForm[this.plmTechnicalSpecificationSheetArr[i].fieldId] && this.plmTechnicalSpecificationSheetArr[i].required === 'Y') {
if (map.has(this.plmTechnicalSpecificationSheetArr[i].fieldId) && !this.dataForm[this.plmTechnicalSpecificationSheetArr[i].fieldId] && this.plmTechnicalSpecificationSheetArr[i].required === 'Y') {
this.$message.warning(this.plmTechnicalSpecificationSheetArr[i].fieldName + '不能为空!')
return
}
@ -1231,7 +1249,7 @@
}
if (this.plmTechnicalSpecificationTeamArr) {
for (let i = 0; i < this.plmTechnicalSpecificationTeamArr.length; i++) {
if (this.dataForm[this.plmTechnicalSpecificationTeamArr[i].fieldId].length === 0 && this.plmTechnicalSpecificationTeamArr[i].required === 'Y') {
if (map.has(this.plmTechnicalSpecificationTeamArr[i].fieldId) && this.dataForm[this.plmTechnicalSpecificationTeamArr[i].fieldId].length === 0 && this.plmTechnicalSpecificationTeamArr[i].required === 'Y') {
this.$message.warning(this.plmTechnicalSpecificationTeamArr[i].fieldName + '不能为空!')
return
}

Loading…
Cancel
Save