From 1e27f1c5da64a059be7eb82ca983e4d82c80b5ae Mon Sep 17 00:00:00 2001
From: yuejiayang <146344614+YangLei105@users.noreply.github.com>
Date: Wed, 7 Aug 2024 20:57:24 +0800
Subject: [PATCH] =?UTF-8?q?2024.8.7=20=E2=91=A0=E4=BA=A7=E5=93=81=E6=96=87?=
=?UTF-8?q?=E6=A1=A3=E6=94=B6=E9=9B=86-=E9=A1=B9=E7=9B=AE=E4=BF=A1?=
=?UTF-8?q?=E6=81=AF=E8=BF=9B=E4=B8=80=E6=AD=A5=E4=BC=98=E5=8C=96=20?=
=?UTF-8?q?=E2=91=A1=E4=BB=A3=E5=8A=9E=E4=BA=8B=E5=AE=9C=E5=8A=9F=E8=83=BD?=
=?UTF-8?q?=E7=AC=AC=E4=B8=80=E7=89=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------------------
进一步优化
---
package-lock.json | 10 +-
src/api/eam/eamProject.js | 4 +
src/views/modules/common/uploadFileList1.vue | 25 +-
.../modules/eam/com_project_proof_record.vue | 121 +-
src/views/modules/eam/dashBoard.vue | 35 +-
src/views/modules/eam/eamProjectInfo.vue | 2716 +++---------
.../modules/eam/eamProjectInfoForConfirm.vue | 721 ++-
.../modules/eam/eamProjectInfoForUploads.vue | 535 ++-
src/views/modules/eam/eamProjectPartInfo.vue | 3850 +++++++++++++++++
9 files changed, 5684 insertions(+), 2333 deletions(-)
create mode 100644 src/views/modules/eam/eamProjectPartInfo.vue
diff --git a/package-lock.json b/package-lock.json
index 0cf9831..44d5adf 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -597,7 +597,7 @@
},
"async-validator": {
"version": "1.8.5",
- "resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-1.8.5.tgz",
+ "resolved": "https://registry.npmjs.org/async-validator/-/async-validator-1.8.5.tgz",
"integrity": "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==",
"requires": {
"babel-runtime": "6.x"
@@ -3603,7 +3603,7 @@
},
"deepmerge": {
"version": "1.5.2",
- "resolved": "https://registry.npmmirror.com/deepmerge/-/deepmerge-1.5.2.tgz",
+ "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz",
"integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ=="
},
"default-compare": {
@@ -10107,7 +10107,7 @@
},
"moment": {
"version": "2.30.1",
- "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz",
+ "resolved": "https://mirrors.cloud.tencent.com/npm/moment/-/moment-2.30.1.tgz",
"integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how=="
},
"move-concurrently": {
@@ -16722,7 +16722,7 @@
},
"resize-observer-polyfill": {
"version": "1.5.1",
- "resolved": "https://registry.npmmirror.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
+ "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
"integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
},
"resolve": {
@@ -18397,7 +18397,7 @@
},
"throttle-debounce": {
"version": "1.1.0",
- "resolved": "https://registry.npmmirror.com/throttle-debounce/-/throttle-debounce-1.1.0.tgz",
+ "resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-1.1.0.tgz",
"integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg=="
},
"through": {
diff --git a/src/api/eam/eamProject.js b/src/api/eam/eamProject.js
index 34edd44..f93d378 100644
--- a/src/api/eam/eamProject.js
+++ b/src/api/eam/eamProject.js
@@ -6,6 +6,10 @@ export const eamProjectInfoEdit= data => createAPI(`/pms/eamProject/eamProjectIn
export const eamProjectInfoDelete= data => createAPI(`/pms/eamProject/eamProjectInfoDelete`,'post',data)
export const saveFormalPartNo= data => createAPI(`/pms/eamProject/saveFormalPartNo`,'post',data)
export const getTestPartNo= data => createAPI(`/pms/eamProject/getTestPartNo`,'post',data)
+export const eamProjectPartSearch= data => createAPI(`/pms/eamProject/eamProjectPartSearch`,'post',data)
+export const eamProjectPartInfoSave= data => createAPI(`/pms/eamProject/eamProjectPartInfoSave`,'post',data)
+export const eamProjectPartInfoEdit= data => createAPI(`/pms/eamProject/eamProjectPartInfoEdit`,'post',data)
+export const saveNewProjectPart= data => createAPI(`/pms/eamProject/saveNewProjectPart`,'post',data)
export const searchConfirmatorList= data => createAPI(`/pms/eamProject/searchConfirmatorList`,'post',data)
export const saveProductionValidationDocumentConfirmator= data => createAPI(`/pms/eamProject/saveProductionValidationDocumentConfirmator`,'post',data)
export const saveProductionValidationDocument= data => createAPI(`/pms/eamProject/saveProductionValidationDocument`,'post',data)
diff --git a/src/views/modules/common/uploadFileList1.vue b/src/views/modules/common/uploadFileList1.vue
index c52718b..ecfee70 100644
--- a/src/views/modules/common/uploadFileList1.vue
+++ b/src/views/modules/common/uploadFileList1.vue
@@ -1,6 +1,7 @@
diff --git a/src/views/modules/eam/eamProjectInfoForConfirm.vue b/src/views/modules/eam/eamProjectInfoForConfirm.vue
index 1abc03b..a8e3d12 100644
--- a/src/views/modules/eam/eamProjectInfoForConfirm.vue
+++ b/src/views/modules/eam/eamProjectInfoForConfirm.vue
@@ -1,9 +1,87 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+
-
+ :height="height"
+ style="width: 100%;margin-top: 0px;">
-
-
-
-
-
-
-
-
-
-
-
+
+
+ 项目信息
+ 确认
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 点击选择文件
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{
+ this.height = window.innerHeight - 200
+ })
+ EventBus.$on('updateAgencyMatterForConfirm', () => {
+ this.getDataList();
+ });
+ },
methods: {
+ // 获取用户的bu
+ getSiteAndBuByUserName () {
+ let tempData = {
+ username: this.$store.state.user.name,
+ }
+ getSiteAndBuByUserName(tempData).then(({data}) => {
+ if (data.code === 0) {
+ this.userBuList = data.rows
+ }
+ })
+ },
+
// 获取数据列表
getDataList () {
- if (this.$route.query.flag === '3') {
- searchConfirmProgressList(this.searchData).then(({data}) => {
+ this.searchData.limit = this.pageSize
+ this.searchData.page = this.pageIndex
+ if (this.$route.query.flag === '4') {
+ searchOverConfirmProgressList(this.searchData).then(({data}) => {
if (data.code === 0) {
- this.dataList = data.list
+ this.dataList = data.page.list
+ this.pageIndex = data.page.currPage
+ this.pageSize = data.page.pageSize
+ this.totalPage = data.page.totalCount
this.dataList.forEach((item) => {
item.projectManagerName = item.projectManager.split('-')[1]
item.projectOwnerName = item.projectOwner.split('-')[1]
@@ -521,13 +847,15 @@ export default {
item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
})
- // 判断是否全部存在数据
}
})
} else {
- searchOverConfirmProgressList(this.searchData).then(({data}) => {
+ searchConfirmProgressList(this.searchData).then(({data}) => {
if (data.code === 0) {
- this.dataList = data.list
+ this.dataList = data.page.list
+ this.pageIndex = data.page.currPage
+ this.pageSize = data.page.pageSize
+ this.totalPage = data.page.totalCount
this.dataList.forEach((item) => {
item.projectManagerName = item.projectManager.split('-')[1]
item.projectOwnerName = item.projectOwner.split('-')[1]
@@ -537,16 +865,33 @@ export default {
item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
})
- // 判断是否全部存在数据
}
})
}
},
+
+ toMes (row) {
+ this.$router.push({ path: 'eam-eamProjectPartInfo', query: { projectNo: row.projectNo, testPartNo: row.testPartNo }})
+ },
+
+ // 每页数
+ sizeChangeHandle (val) {
+ this.pageSize = val
+ this.pageIndex = 1
+ this.getDataList()
+ },
+ // 当前页
+ currentChangeHandle (val) {
+ this.pageIndex = val
+ this.getDataList()
+ },
+
viewDocumentFile(row) {
this.confirmData = {
site: row.site,
documentType: row.documentType,
orderRef1: row.orderRef1,
+ orderRef2: row.orderRef2,
itemNo: row.itemNo,
userid: row.userid,
username: row.username,
@@ -565,6 +910,7 @@ export default {
orderRef2: row.itemNo,
orderRef3: row.userid,
orderRef4: row.orderRef1,
+ orderRef5: row.orderRef2,
page: 1,
limit: 1000
}
@@ -683,6 +1029,7 @@ export default {
orderRef2: row.orderRef2,
orderRef3: row.orderRef3,
orderRef4: row.orderRef4,
+ orderRef5: row.orderRef5,
createdBy: this.$store.state.user.name
}
deleteProjectFile(inData).then(({data}) => {
@@ -713,88 +1060,135 @@ export default {
}
},
confirmDocument(row) {
- // 将this.$store.state.user.id转为字符串
- let userId = this.$store.state.user.id.toString()
- if (row.userid !== userId) {
- // 提示指定确认人为row.confirmedBy,是否继续
- this.$confirm('指定确认人为' + row.userDisplay + ',是否继续确认?', '提示', {
- confirmButtonText: '是',
- cancelButtonText: '否',
- type: 'warning'
- })
- .then(() => {
- this.confirmData = {
- site: row.site,
- documentType: row.documentType,
- orderRef1: row.orderRef1,
- itemNo: row.itemNo,
- userid: row.userid,
- username: row.username,
- userDisplay: row.userDisplay,
- wantedConfirmDate: row.wantedConfirmDate,
- confirmFlag: row.confirmFlag,
- confirmedDate: new Date(),
- createBy: row.createBy,
- createDate: row.createDate,
- confirmedBy: this.$store.state.user.userDisplay,
- documentId: row.documentId,
- remark: row.remark
- }
- this.modalData = {
- site: this.proofingCurrentRow.site,
- projectId: this.proofingCurrentRow.projectId,
- projectDesc: this.proofingCurrentRow.projectDesc,
- testPartNo: this.proofingCurrentRow.testPartNo,
- partDesc: this.proofingCurrentRow.partDesc,
- customerNo: this.proofingCurrentRow.customerNo,
- customerDesc: this.proofingCurrentRow.customerDesc,
- buNo: this.proofingCurrentRow.buNo,
- bu: this.proofingCurrentRow.site + '_' + this.proofingCurrentRow.buNo,
- cProjectTypeDb: this.proofingCurrentRow.projectCategory,
- }
- this.getProjectConfirmatorFileList(row)
- this.confirmVisible = true
+ this.confirmData = {
+ site: row.site,
+ documentType: row.documentType,
+ orderRef1: row.orderRef1,
+ orderRef2: row.orderRef2,
+ itemNo: row.itemNo,
+ userid: row.userid,
+ username: row.username,
+ userDisplay: row.userDisplay,
+ wantedConfirmDate: row.wantedConfirmDate,
+ confirmFlag: row.confirmFlag,
+ confirmedDate: new Date(),
+ createBy: row.createBy,
+ createDate: row.createDate,
+ confirmedBy: this.$store.state.user.userDisplay,
+ documentId: row.documentId,
+ remark: row.remark
+ }
+ this.modalData = {
+ site: row.site,
+ projectId: row.projectId,
+ projectNo: row.projectNo,
+ projectDesc: row.projectDesc,
+ projectPartId: row.projectPartId,
+ testPartNo: row.testPartNo,
+ partDesc: row.partDesc,
+ customerNo: row.customerNo,
+ customerDesc: row.customerDesc,
+ buNo: row.buNo,
+ bu: row.site + '_' + row.buNo,
+ cProjectTypeDb: row.projectCategory,
+ }
+ this.getProjectConfirmatorFileList(row)
+ this.confirmVisible = true
+ },
+
+ getProjectConfirmatorFileList (row) {
+ let inData = {
+ orderRef1: row.site,
+ orderRef3: row.userid,
+ orderRef2: row.itemNo,
+ orderRef4: row.orderRef1,
+ orderRef5: row.orderRef2,
+ page: 1,
+ limit: 1000
+ }
+ searchProjectConfirmatorFileList(inData).then(({data}) => {
+ if (data && data.code === 0){
+ this.projectConfirmatorFileList = data.page.list;
+ }
+ })
+ },
+
+ closeUploadFileVisible(){
+ this.confirmVisible = false;
+ this.projectConfirmatorFileList = [];
+ this.fileList = [];
+ this.closeFileUpdate()
+ },
+
+ 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;
+ this.confirmData.userid = this.$store.state.user.id;
+ updateProjectDocumentConfirm(this.confirmData) .then(({data}) => {
+ if (data.code === 0) {
+ this.confirmVisible = false;
+ this.getDataList();
+ // 成功操作后触发事件
+ EventBus.$emit('updateProjectPartInfo');
+ }else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
})
- .catch(() => {
- this.$message({
- type: 'info',
- message: '已取消操作'
- });
- });
- }else {
- this.confirmData = {
- site: row.site,
- documentType: row.documentType,
- orderRef1: row.orderRef1,
- itemNo: row.itemNo,
- userid: row.userid,
- username: row.username,
- userDisplay: row.userDisplay,
- wantedConfirmDate: row.wantedConfirmDate,
- confirmFlag: row.confirmFlag,
- confirmedDate: new Date(),
- createBy: row.createBy,
- createDate: row.createDate,
- confirmedBy: this.$store.state.user.name,
- documentId: row.documentId,
- remark: row.remark
}
- this.modalData = {
- site: this.proofingCurrentRow.site,
- projectId: this.proofingCurrentRow.projectId,
- projectDesc: this.proofingCurrentRow.projectDesc,
- testPartNo: this.proofingCurrentRow.testPartNo,
- partDesc: this.proofingCurrentRow.partDesc,
- customerNo: this.proofingCurrentRow.customerNo,
- customerDesc: this.proofingCurrentRow.customerDesc,
- buNo: this.proofingCurrentRow.buNo,
- bu: this.proofingCurrentRow.site + '_' + this.proofingCurrentRow.buNo,
- cProjectTypeDb: this.proofingCurrentRow.projectCategory,
+ })
+ let remark = this.confirmData.remark;
+ const formData = new FormData();
+ //片接文件
+ for (let i = 0; i < this.fileList.length; i++) {
+ formData.append("file",this.fileList[i].raw)
+ }
+ formData.append("folder", 'projectPDConfirmFiles');
+ formData.append("orderRef1", this.confirmData.site);
+ formData.append("orderRef4", this.confirmData.orderRef1);
+ formData.append("orderRef2", this.confirmData.itemNo);
+ formData.append("orderRef3", this.confirmData.userid);
+ formData.append("orderRef5", this.confirmData.orderRef2);
+ formData.append("createdBy", this.$store.state.user.name);
+ formData.append("updatedBy", this.$store.state.user.name);
+ formData.append("remark", remark);
+ uploadProjectFile(formData).then(({data}) => {
+ if (data.code === 0) {
+ this.$message.success('操作成功');
+ //清空文件上传记录
+ this.$refs.uploadFile.clearFiles();
+ this.closeFileUpdate();
+ this.projectConfirmatorFileList = [];
+ }else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
}
- this.getProjectConfirmatorFileList(row)
- this.confirmVisible = true
+ })
+ },
+
+ closeFileUpdate() {
+ this.fileName = '';
+ this.uploadDialog = false;
+ //this.fileRemark = ''
+ this.$refs.uploadFile.clearFiles()
+ this.fileList = []
+ },
+
+ /*选择上传文件时*/
+ onChange(file,fileList){
+ const newFileName = file.name;
+ if (this.fileName) {
+ this.fileName += ', ' + newFileName;
+ } else {
+ this.fileName = newFileName;
}
+ this.fileList.push(file);
},
+
+ triggerUpload() {
+ this.$refs.uploadFile.$el.querySelector('input').click()
+ },
+
formatDate(row, column) {
// row 是当前行的数据对象
// column 是当前列的属性信息对象
@@ -808,9 +1202,6 @@ export default {
},
rowStyle ({row}) {
},
- indexMethod(index) {
- return index + 1;
- },
getCombinedDocumentType(row) {
// 根据您的需求,组合或拼接需要显示的字段
if (row.documentType === null || row.documentType === undefined) {
@@ -819,11 +1210,123 @@ export default {
return row.documentType
}
},
+ // 校验用户是否收藏
+ favoriteIsOk () {
+ let userFavorite = {
+ userId: this.$store.state.user.id,
+ languageCode: this.$i18n.locale
+ }
+ userFavoriteList(userFavorite).then(({data}) => {
+ for (let i = 0; i < data.list.length; i++) {
+ if (this.$route.meta.menuId === data.list[i].menuId) {
+ this.favorite = true
+ }
+ }
+ })
+ },
+
+ // 收藏 OR 取消收藏
+ favoriteFunction () {
+ let userFavorite = {
+ userId: this.$store.state.user.id,
+ functionId: this.$route.meta.menuId,
+ }
+ if (this.favorite) {
+ removeUserFavorite(userFavorite).then(({data}) => {
+ this.$message.success(data.msg)
+ this.favorite = false
+ })
+ } else {
+ // 收藏
+ saveUserFavorite(userFavorite).then(({data}) => {
+ this.$message.success(data.msg)
+ this.favorite = true
+ })
+ }
+ },
+
+ // 动态列开始 获取 用户保存的 格式列
+ async getTableUserColumn(tableId, columnId) {
+ let queryTableUser = {
+ userId: this.$store.state.user.name,
+ functionId: this.$route.meta.menuId,
+ tableId: tableId,
+ status: true,
+ languageCode: this.$i18n.locale
+ }
+ await getTableUserListLanguage(queryTableUser).then(({data}) => {
+ if (data.rows.length > 0) {
+ //this.columnList1 = []
+ switch (columnId) {
+ case 1:
+ this.columnList = data.rows
+ break;
+ // case 2:
+ // this.detailColumnList = data.rows
+ // break;
+ // case 3:
+ // this.columnList2 = data.rows
+ // break;
+ // case 4:
+ // this.columnList3 = data.rows
+ // break;
+ }
+ } else {
+ this.getColumnList(tableId, columnId)
+ }
+ })
+ },
+
+ // 获取 tableDefault 列
+ async getColumnList (tableId, columnId) {
+ let queryTable= {
+ functionId: this.$route.meta.menuId,
+ tableId: tableId,
+ languageCode: this.$i18n.locale
+ }
+ await getTableDefaultListLanguage(queryTable).then(({data}) => {
+ if (!data.rows.length == 0) {
+ switch (columnId) {
+ case 1:
+ this.columnList = data.rows
+ break;
+ // case 2:
+ // this.detailColumnList = data.rows
+ // break;
+ // case 3:
+ // this.columnList2 = data.rows
+ // break;
+ // case 4:
+ // this.columnList3 = data.rows
+ // break;
+ }
+ } else {
+ // this.showDefault = true.
+ }
+ })
+ },
+ //获取按钮的权限数据
+ getButtonAuthData () {
+ let searchFlag = this.isAuth(this.menuId+":search")
+ let saveFlag = this.isAuth(this.menuId+":save")
+ let updateFlag = this.isAuth(this.menuId+":update")
+ let deleteFlag = this.isAuth(this.menuId+":delete")
+ //处理页面的权限数据
+ this.authSearch = !searchFlag
+ this.authSave = !saveFlag
+ this.authUpdate = !updateFlag
+ this.authDelete = !deleteFlag
+ },
},
};