diff --git a/package-lock.json b/package-lock.json index 2e5388a..d68aa18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10553,6 +10553,11 @@ } } }, + "moment": { + "version": "2.30.1", + "resolved": "https://mirrors.cloud.tencent.com/npm/moment/-/moment-2.30.1.tgz", + "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==" + }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", diff --git a/package.json b/package.json index 2c9b23a..a43e490 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "gulp-replace": "1.0.0", "gulp-shell": "0.8.0", "lodash": "4.17.5", + "moment": "^2.30.1", "node-sass": "4.13.1", "npm": "^6.9.0", "pubsub-js": "^1.9.3", diff --git a/src/element-ui/index.js b/src/element-ui/index.js index 4d1b5c5..46a937d 100644 --- a/src/element-ui/index.js +++ b/src/element-ui/index.js @@ -151,7 +151,7 @@ Vue.prototype.$ELEMENT = {size: 'medium'} Vue.prototype.$message = function (msg) { let msgObj = { message: msg.message ? msg.message : msg, - duration: 2000 + duration: msg.duration || 2000 } let msgType = msg.type || "" switch (msgType) { diff --git a/src/views/modules/common/uploadFileList1.vue b/src/views/modules/common/uploadFileList1.vue index 1c39c1b..deabeef 100644 --- a/src/views/modules/common/uploadFileList1.vue +++ b/src/views/modules/common/uploadFileList1.vue @@ -93,27 +93,21 @@ export default { default: '' }, isEditable: Boolean, - }, - computed: { - displayValue() { - if (this.noType === null || this.noType === undefined) { - return this.noDesc - }else { - return this.noType - } - } + isMassProductionStage: Boolean, }, data () { return { //fileRemark: '', fileName: '', + noType1: '', + conclusion: '', + documentGroupDesc: '', conclusionList: [ {conclusion: '合格'}, {conclusion: '不合格'}, {conclusion: '让步接受'}, {conclusion: 'N/A'} ], - conclusion:'', //选中当前行 documentClickRow: {}, bu : this.site + "-" + this.buNo, @@ -136,6 +130,47 @@ export default { } } }, + computed: { + displayValue() { + if (this.noType === null || this.noType === undefined) { + return this.noDesc + }else { + return this.noType + } + }, + documentGroupDescJudgment() { + if (this.id !== '-1') { + return '常规' + } else { + return '其他' + } + }, + conclusionDefaultValue() { + if (this.isMassProductionStage) { + return 'N/A'; + }else { + return this.isEditable ? 'N/A' : ''; + } + } + }, + watch: { + conclusionDefaultValue(newValue) { + this.conclusion = newValue; + } + }, + created() { + this.conclusion = this.conclusionDefaultValue; + }, + beforeDestroy() { + // 组件销毁前清理数据 + if (this.isMassProductionStage) { + this.conclusion = 'N/A'; + }else if (this.isEditable) { + this.conclusion = 'N/A'; + }else { + this.conclusion = ''; + } + }, methods: { triggerUpload() { this.fileName = ''; // 清空文件名称 @@ -148,6 +183,15 @@ export default { //this.fileRemark = '' this.$refs.uploadFile.clearFiles() this.$emit("update:fileList", []) + this.fileName = ''; // 清空文件名称 + this.noType = ''; + if (this.isMassProductionStage) { + this.conclusion = 'N/A'; + }else if (this.isEditable) { + this.conclusion = 'N/A'; + }else { + this.conclusion = ''; + } }, onRemove(file, fileList) { this.$emit("update:fileList", fileList) @@ -191,17 +235,20 @@ export default { this.$message.success(data.msg); this.fileList = []; this.fileName = ''; + this.noType = ''; // this.$emit('get-document-list'); // this.$emit('get-proof-document'); } else { this.$message.warning(data.msg); this.fileList = []; this.fileName = ''; + this.noType = ''; } }).catch((error) => { this.$message.error(error); this.fileList = []; this.fileName = ''; + this.noType = ''; }); }, changeCurrentRow1 (row, oldRow) { @@ -284,6 +331,9 @@ export default { } return row.documentType }, + validateField(fieldName) { + this.$refs.validateField(fieldName); + }, // getDocumentList() { // getDocumentList(this.modalData).then(({data}) => { // if (data && data.code === 0) { @@ -340,16 +390,16 @@ export default { - + 点击选择文件 - - + + - - + + - + - + 上传 - 关闭 + 关闭 diff --git a/src/views/modules/eam/com_project_proof_record.vue b/src/views/modules/eam/com_project_proof_record.vue index 71e5cc4..d0a9067 100644 --- a/src/views/modules/eam/com_project_proof_record.vue +++ b/src/views/modules/eam/com_project_proof_record.vue @@ -69,7 +69,7 @@ @@ -229,7 +229,7 @@ 新增 @@ -481,6 +481,7 @@ currentRow:'', fileContentList:[], proofDocumentList:[], + proofDocumentListDefinition:[], fileList: [], documentNo: '', // 控制上传时文档类型ID输入框的内容 documentNoType: '',// 控制文件类型输入框的内容 @@ -851,10 +852,10 @@ { userId: this.$store.state.user.name, functionId: 101001014, - serialNumber: '101001014Table1CAdditionalInfo', + serialNumber: '101001014Table1Conclusion', tableId: "101001014Table1", tableName: "打样文档表", - columnProp: 'cAdditionalInfo', + columnProp: 'conclusion', headerAlign: "center", align: "center", columnLabel: '结论', @@ -866,6 +867,24 @@ fixed: '', columnWidth: 70, }, + { + userId: this.$store.state.user.name, + functionId: 101001014, + serialNumber: '101001014Table1DocumentGroupDesc', + tableId: "101001014Table1", + tableName: "打样文档表", + columnProp: 'documentGroupDesc', + headerAlign: "center", + align: "center", + columnLabel: '文档种类', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 80, + }, { userId: this.$store.state.user.name, functionId: 103001, @@ -875,7 +894,7 @@ columnProp: 'createDate', headerAlign: 'center', align: 'center', - columnLabel: '创建时间', + columnLabel: '上传时间', columnHidden: false, columnImage: false, columnSortable: false, @@ -893,7 +912,7 @@ columnProp: 'createdBy', headerAlign: 'center', align: 'center', - columnLabel: '创建人', + columnLabel: '上传人', columnHidden: false, columnImage: false, columnSortable: false, @@ -1165,6 +1184,7 @@ }, documentListVisibleFalse() { this.documentListVisible = false + this.proofDocumentListDefinition = [] }, addDocumentList(row) { this.documentListVisible = true @@ -1183,6 +1203,12 @@ limit: 1000 } this.documentTypeData.proofingNo = row.proofingNo + // 遍历proofDocumentList + for (let i = 0; i < this.proofDocumentList.length; i++) { + if (this.proofDocumentList[i].documentTypeId !== 'N/A') { + this.proofDocumentListDefinition.push(this.proofDocumentList[i]) + } + } }, updateProofingRecord(row) { this.proofingRecordVisible = true @@ -1285,7 +1311,11 @@ } // 否则提示后端返回的错误信息 else { - this.$message.warning(data.msg) + this.$message({ + message: data.msg, + type: 'warning', + duration: 3000 // 设置提示的时长,单位为毫秒 + }); } }) }, @@ -1341,7 +1371,7 @@ site: row.site, username: this.$store.state.user.name, buNo: row.buNo, - proofingId: row.proofingNo, + proofingNo: row.proofingNo, projectId: row.projectId, projectDesc: row.projectDesc, customerId: row.customerNo, @@ -1359,11 +1389,11 @@ } if (tempData.createBy !== tempData.username) { this.$message({ - message: '只能删除自己创建的打样文档', + message: '只能删除上传人的上传打样文档', type: 'warning' }) }else { - this.$confirm('是否删除该打样文档?', '提示', { + this.$confirm('是否删除该打样文档的文件?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' @@ -1605,7 +1635,6 @@ this.fileList = [] this.documentClickRow = { documentTypeId: '', // 清空文档类型ID - documentType: '' , // 清空文件类型 id: '-1' }; this.uploadDialog = true diff --git a/src/views/modules/eam/eamProjectInfo.vue b/src/views/modules/eam/eamProjectInfo.vue index 679fc02..56e2f63 100644 --- a/src/views/modules/eam/eamProjectInfo.vue +++ b/src/views/modules/eam/eamProjectInfo.vue @@ -737,9 +737,9 @@ fixed="left" label="操作"> @@ -780,7 +780,7 @@