Browse Source

2025-06-24

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

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

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

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

@ -787,6 +787,25 @@
p2cTolerance: '', p2cTolerance: '',
slittingTolerance: '' slittingTolerance: ''
}, },
sheetData2: {
process: '',
overPrintOperator: '',
printOperator: '',
simplexDuplex: '',
repeat: '',
labelLength: '',
labelWidth: '',
hp: '',
vp: '',
across: '',
down: '',
printCopyPosition: '',
goodsRollWidth: '',
newCutter: '',
p2cTolerance: '',
dimensionTolerance: '',
slittingTolerance: ''
},
dataForm: { dataForm: {
site: '', site: '',
codeNo:'', codeNo:'',
@ -1760,18 +1779,6 @@
} }
getNodeAuthority(tempData).then(({data}) => { getNodeAuthority(tempData).then(({data}) => {
if (data && data.code === 0) { 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 this.plmTechnicalSpecificationSheetArr = data.rows.plm_technical_specification_sheet
} }
}) })
@ -1821,9 +1828,10 @@
}, },
async submitData (tempData) { async submitData (tempData) {
let map = new Map(Object.entries(this.sheetData2))
if (this.plmTechnicalSpecificationSheetArr) { if (this.plmTechnicalSpecificationSheetArr) {
for (let i = 0; i < this.plmTechnicalSpecificationSheetArr.length; i++) { 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 + '不能为空!') this.$message.warning(this.plmTechnicalSpecificationSheetArr[i].fieldName + '不能为空!')
return return
} }

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

@ -521,6 +521,23 @@
planOperator: '', planOperator: '',
planOperatorName: '', planOperatorName: '',
}, },
dataForm2: {
stage: '',
pod: '',
shopOrder: '',
documentSource: '',
ecnUpgradeVersion: '',
remarkPage: '',
relevancePartNo: '',
csOperatorList: [],
engineerList: [],
technicianList: [],
mpOperatorList: [],
planOperatorList: [],
cqcOperatorList: [],
faiOperatorList: [],
dccList: []
},
dataRole: { dataRole: {
partTypeDesc: [ partTypeDesc: [
{ {
@ -1221,9 +1238,10 @@
}, },
submitData (tempData) { submitData (tempData) {
let map = new Map(Object.entries(this.dataForm2))
if (this.plmTechnicalSpecificationSheetArr) { if (this.plmTechnicalSpecificationSheetArr) {
for (let i = 0; i < this.plmTechnicalSpecificationSheetArr.length; i++) { 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 + '不能为空!') this.$message.warning(this.plmTechnicalSpecificationSheetArr[i].fieldName + '不能为空!')
return return
} }
@ -1231,7 +1249,7 @@
} }
if (this.plmTechnicalSpecificationTeamArr) { if (this.plmTechnicalSpecificationTeamArr) {
for (let i = 0; i < this.plmTechnicalSpecificationTeamArr.length; i++) { 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 + '不能为空!') this.$message.warning(this.plmTechnicalSpecificationTeamArr[i].fieldName + '不能为空!')
return return
} }

Loading…
Cancel
Save