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 @@
@@ -839,7 +839,7 @@
-
+
新增
+ path="/upload/test" :is-editable="isEditable" :is-mass-production-stage="isMassProductionStage">
@@ -1264,6 +1264,8 @@ import {
uploadProjectFile
} from "../../../api/eam/eamProject";
import row from "element-ui/packages/row";
+import moment from 'moment';
+import 'moment/locale/zh-cn';
import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
/*打样记录組件*/
@@ -1358,6 +1360,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
projectAllDocumentList: [],
projectAllDocumentList1: [],
projectAllDocumentConfirmatorList: [],
+ proofDocumentListDefinition: [],
confirmProgressPusherList: [],
confirmProgressDocumentList: [],
projectConfirmatorFileList: [],
@@ -1387,6 +1390,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
MFGlag:false,
uploadDialog:false,
isEditable: true,
+ isMassProductionStage: true,
projectDocumentListVisible: false,
addProjectDocumentTypeFlag: false,
projectProductionValidationDocumentVisible: false,
@@ -2014,7 +2018,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 120,
+ columnWidth: 180,
},
//是否上传
{
@@ -2054,6 +2058,24 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
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: 70,
+ },
{
userId: this.$store.state.user.name,
functionId: 103001,
@@ -2070,7 +2092,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 160
+ columnWidth: 120
},
{
userId: this.$store.state.user.name,
@@ -2182,7 +2204,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 120,
+ columnWidth: 80,
},
{
userId: this.$store.state.user.name,
@@ -2218,7 +2240,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 120,
+ columnWidth: 180,
},
//是否上传
{
@@ -2258,6 +2280,24 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
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: 70,
+ },
{
userId: this.$store.state.user.name,
functionId: 103001,
@@ -2274,7 +2314,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 160
+ columnWidth: 130
},
{
userId: this.$store.state.user.name,
@@ -3444,7 +3484,6 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
this.otherDocumentCurrentRow = {
proofingId: '*',
documentTypeId: '', // 清空文档类型ID
- documentType: '' , // 清空文件类型
id: '-1'
};
this.uploadDialog = true
@@ -3458,7 +3497,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
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,
@@ -3480,7 +3519,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
type: 'warning'
})
}else {
- this.$confirm('是否删除该转量产阶段文档?', '提示', {
+ this.$confirm('是否删除该转量产阶段文档的文件?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -3606,11 +3645,17 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
page: 1
}
this.getProjectOtherDocument()
-
+// 遍历proofDocumentList
+ for (let i = 0; i < this.projectOtherDocumentList.length; i++) {
+ if (this.projectOtherDocumentList[i].documentTypeId !== 'N/A') {
+ this.proofDocumentListDefinition.push(this.projectOtherDocumentList[i])
+ }
+ }
this.projectDocumentListVisible = true
},
projectDocumentListVisibleFalse() {
this.projectDocumentListVisible = false
+ this.proofDocumentListDefinition = []
},
deleteProjectDocumentType(row) {
this.$confirm('是否删除该文档清单?', '提示', {
@@ -3799,19 +3844,13 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
.then(confirmatorResults => {
let allConfirmatorSuccess = confirmatorResults.every(result => result.data && result.data.code === 0);
if (allConfirmatorSuccess) {
- let saveDocumentPromises = this.selectedDocumentItems.map(item => {
- let inData = {
- site: this.proofingCurrentRow.site,
- orderRef1: this.proofingCurrentRow.projectId,
- itemNo: '',
- documentType: item.documentType,
- documentId: item.documentId,
- createBy: this.$store.state.user.name
- };
- return this.handleDocumentSave(inData);
- });
-
- Promise.all(saveDocumentPromises)
+ let inData = {
+ site: this.proofingCurrentRow.site,
+ orderRef1: this.proofingCurrentRow.projectId,
+ selectedDocumentItems: this.selectedDocumentItems,
+ }
+ let saveDocumentPromises = this.handleDocumentSave(inData);
+ saveDocumentPromises
.then(() => {
this.$message({
message: '新增成功',
@@ -4026,7 +4065,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
confirmedDate: new Date(),
createBy: row.createBy,
createDate: row.createDate,
- confirmedBy: this.$store.state.user.name,
+ confirmedBy: this.$store.state.user.userDisplay,
documentId: row.documentId,
remark: row.remark
}
@@ -4099,6 +4138,8 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
this.$refs.uploadFile.$el.querySelector('input').click()
},
saveUploadFile(){
+ this.confirmData.confirmedDate = moment(this.confirmData.confirmedDate).utcOffset('+8').format('YYYY-MM-DD HH:mm:ss');
+ this.confirmData.confirmedBy = this.$store.state.user.userDisplay;
console.log('this.confirmData',this.confirmData)
updateProjectDocumentConfirm(this.confirmData) .then(({data}) => {
if (data.code === 0) {
@@ -4179,7 +4220,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
confirmedDate: new Date(),
createBy: row.createBy,
createDate: row.createDate,
- confirmedBy: this.$store.state.user.name,
+ confirmedBy: this.$store.state.user.userDisplay,
documentId: row.documentId,
remark: row.remark
}
@@ -4199,7 +4240,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
this.viewDocumentFileVisible = true
},
deleteFile(row) {
- if (this.confirmData.confirmedBy === this.$store.state.user.name) {
+ if (this.confirmData.confirmedBy === this.$store.state.user.userDisplay) {
this.$confirm('是否删除该文件?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@@ -4240,6 +4281,15 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
})
}
},
+ shouldShowDelete(row) {
+ console.log('row.documentId',row.documentId)
+ console.log('row.projectPhase',row.projectPhase)
+ console.log('Y/N',row.documentId !== null || row.projectPhase !== 'SOP文档')
+ // 根据条件判断是否显示删除操作
+ if (row.projectPhase === 'SOP文档') {
+ return false
+ }else return row.documentId !== null;
+ },
// 查看文件
viewFile(row) {
// 预览文件