Browse Source

2024-08-02

采集优化
java8
fengyuan_yang 2 years ago
parent
commit
2f1d4df459
  1. 8
      src/views/modules/qc/qcItem.vue
  2. 16
      src/views/modules/qc/qc_SOP_upload_file.vue

8
src/views/modules/qc/qcItem.vue

@ -1380,10 +1380,6 @@
this.$message.warning('请选择检验方法!')
return
}
// if ((this.modalData.samplingProgrammeNo === '' || this.modalData.samplingProgrammeNo == null) && (this.modalData.itemSamplingQuantity === '' || this.modalData.itemSamplingQuantity == null) && (this.modalData.defaultSamplingProportion === '' || this.modalData.defaultSamplingProportion == null)) {
// this.$message.warning('')
// return
// }
if ((this.modalData.samplingProgrammeNo !== '' && this.modalData.samplingProgrammeNo != null) && (this.modalData.samplingLevelNo === '' || this.modalData.samplingLevelNo == null)) {
this.$message.warning('请选择检验水平!')
return
@ -1396,6 +1392,10 @@
this.$message.warning('请选择采集数据方式!')
return
}
if (this.modalData.collectionFlag === 'Y' && (this.modalData.collectionMethodList.some(value => value === 'file') && this.modalData.collectionMethodList.some(value => value === 'plc'))) {
this.$message.warning('文件数据采集和PLC数据采集只能选一个!')
return
}
this.modalData.collectionSource = this.modalData.collectionSourceList.join(',')
this.modalData.collectionMethod = this.modalData.collectionMethodList.join(',')
//this.modalData.collectionCondition = this.modalData.collectionConditionList.join(',')

16
src/views/modules/qc/qc_SOP_upload_file.vue

@ -23,8 +23,8 @@
</el-row>
<el-row>
<el-col :span="24">
<el-upload class="customer-upload" drag
action="javascript:void(0);" ref="uploadFile" :limit="1"
<el-upload class="customer-upload" drag multiple :file-list="fileList"
action="javascript:void(0);" ref="uploadFile"
:before-upload="beforeUploadHandle" :on-change="onChange"
accept="*" :auto-upload="false"
style="text-align: left;">
@ -37,7 +37,7 @@
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="saveUploadFile()">保存</el-button>
<el-button type="primary" @click="saveUploadFile">保存</el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
</span>
</el-dialog>
@ -88,12 +88,14 @@ export default {
// this.num++
},
/* 选择上传文件时 */
onChange (file) {
this.fileList.push(file)
onChange (file, fileList) {
this.fileList = fileList
},
/* 关闭modal */
closeDialog () {
this.fileList = []
//
this.$refs.uploadFile.clearFiles()
//
this.$emit('refreshPageTables')
//
@ -113,7 +115,9 @@ export default {
}
const formData = new FormData()
//
formData.append("file", this.fileList[0].raw)
for (let i = 0; i < this.fileList.length; i++) {
formData.append("file",this.fileList[i].raw)
}
formData.append("orderRef1", this.pageData.site)
formData.append("orderRef2", this.pageData.partNo)
formData.append("orderRef3", this.pageData.inspectionTypeNo)

Loading…
Cancel
Save