From 5de97278dd4c523c9e33a3e5fec5cfaf2e0c1420 Mon Sep 17 00:00:00 2001
From: fengyuan_yang <1976974459@qq.com>
Date: Fri, 12 Jul 2024 16:04:27 +0800
Subject: [PATCH] =?UTF-8?q?2024-07-12=20=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../modules/changeManagement/changeRecord.vue | 40 ++++++++-
src/views/modules/part/bomManagement.vue | 26 +++---
.../modules/part/partCatalogInformation.vue | 84 ++++++++++---------
src/views/modules/part/partInformation.vue | 8 +-
src/views/modules/part/routingManagement.vue | 21 +++--
.../projectInfo/com_project_info_part.vue | 2 +-
6 files changed, 117 insertions(+), 64 deletions(-)
diff --git a/src/views/modules/changeManagement/changeRecord.vue b/src/views/modules/changeManagement/changeRecord.vue
index 955f3f8..b898e28 100644
--- a/src/views/modules/changeManagement/changeRecord.vue
+++ b/src/views/modules/changeManagement/changeRecord.vue
@@ -646,7 +646,7 @@
width="100"
label="操作">
- 预览
+ 预览
下载
@@ -3458,6 +3458,44 @@
})
},
+ // 预览
+ previewFile (row) {
+ // 预览文件
+ let image = ['jpg', 'jpeg', 'png', 'gif', 'bmp']
+ let type = ''
+ if (image.includes(row.fileType.toLowerCase())) {
+ type = 'image/' + row.fileType
+ }
+ let video = ['mp4', 'avi', 'mov', 'wmv', 'flv']
+ if (video.includes(row.fileType.toLowerCase())) {
+ type = 'video/' + row.fileType
+ }
+ let txt = ['txt']
+ if (txt.includes(row.fileType.toLowerCase())) {
+ type = 'text/plain'
+ }
+ let office = ['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx']
+ if (office.includes(row.fileType.toLowerCase())) {
+ this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
+ return
+ }
+ let pdf = ['pdf']
+ if (pdf.includes(row.fileType.toLowerCase())) {
+ type = 'application/pdf'
+ }
+ if (type === ''){
+ this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
+ return;
+ }
+ downLoadQuotationFile(row).then(({data}) => {
+ const blob = new Blob([data], { type: type });
+ // 创建URL来生成预览
+ const fileURL = URL.createObjectURL(blob);
+ // 在新标签页中打开文件预览
+ const newTab = window.open(fileURL, '_blank')
+ })
+ },
+
// ======== chooseList相关方法 ========
// 获取基础数据列表S
diff --git a/src/views/modules/part/bomManagement.vue b/src/views/modules/part/bomManagement.vue
index 9f63bab..5562b31 100644
--- a/src/views/modules/part/bomManagement.vue
+++ b/src/views/modules/part/bomManagement.vue
@@ -156,6 +156,7 @@
+
@@ -167,7 +168,7 @@
Copy
Build
Retire
-
+ 转正式BOM
@@ -198,6 +199,7 @@
+
@@ -2476,13 +2478,12 @@ export default {
*/
getDataList () {
//如果是跳转过来的 要判断
- if(localStorage.getItem('bomData')!=undefined){
- let data=JSON.parse(localStorage.getItem('bomData'));
- this.searchData.partNo=data.partNo
- this.searchData.bomType=data.bomType
- this.searchData.engChgLevel=data.engChgLevel
+ if (localStorage.getItem('bomData') != undefined) {
+ let data = JSON.parse(localStorage.getItem('bomData'))
+ this.searchData.partNo = data.partNo
+ this.searchData.bomType = data.bomType
+ this.searchData.engChgLevel = data.engChgLevel
}
-
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
this.queryLoading = true
@@ -2493,21 +2494,17 @@ export default {
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
this.$refs.selectDiv.setLengthAll( this.dataList.length)
-
- if(localStorage.getItem('bomData')!=undefined){
-
+ if (localStorage.getItem('bomData') != undefined) {
this.updateModal(this.dataList[0])
-
}
}
this.queryLoading = false
- if(localStorage.getItem('bomData')!=undefined){
+ if (localStorage.getItem('bomData') != undefined) {
this.$nextTick(function () {
- localStorage.removeItem('bomData');
+ localStorage.removeItem('bomData')
})
}
})
-
},
/**
* 复选列表信息
@@ -2588,7 +2585,6 @@ export default {
printUnit: row.printUnit,
printUnitName: row.printUnitName,
officialFlag: row.officialFlag,
- offFlag: row.offFlag
}
this.subDetailTable = 'bom_sub_detail'
// 查bom明细
diff --git a/src/views/modules/part/partCatalogInformation.vue b/src/views/modules/part/partCatalogInformation.vue
index c28a120..c62a252 100644
--- a/src/views/modules/part/partCatalogInformation.vue
+++ b/src/views/modules/part/partCatalogInformation.vue
@@ -101,9 +101,9 @@
多级跟踪
允许为未使用
-
- 转正式物料
-
+
+
+
@@ -427,6 +427,7 @@
queryMasterPartItem,
toBecomeOfficialMasterPart, // 转正式物料
} from '@/api/part/masterPartInformation.js'
+ import {getProjectPartNo} from '@/api/part/partInformation.js'
import Chooselist from '@/views/modules/common/Chooselist'
import DictDataSelect from '../sys/dict-data-select.vue'
export default {
@@ -475,7 +476,7 @@
tempCodeNo: '',
// 条件查询
searchData: {
- site: this.$store.state.user.site,
+ site: '*',
partNo: '',
partDesc: '',
page: 1,
@@ -488,7 +489,6 @@
modalData: {
flag: '',
title: '',
- site: this.$store.state.user.site,
partNo: '',
partDesc: '',
umId: '',
@@ -522,7 +522,7 @@
itemDesc: '',
textValue: '',
numValue: '',
- recordType: 'MP'
+ recordType: 'IP'
},
// ======== 数据列表 ========
dataList: [],
@@ -1192,7 +1192,7 @@
site: this.$store.state.user.site,
partNo: this.partCurrentRow.partNo,
codeNo: this.partCurrentRow.codeNo,
- recordType: 'MP'
+ recordType: 'IP'
}
getItemLists(tempData).then(({data}) => {
this.itemList1 = data.rows.row1
@@ -1225,7 +1225,7 @@
partNo: this.partCurrentRow.partNo,
codeNo: this.partCurrentRow.codeNo,
codeDesc: this.partCurrentRow.codeDesc,
- recordType: 'MP',
+ recordType: 'IP',
itemList: this.itemSelections1
}
addMasterPartItem(inData).then(({data}) => {
@@ -1256,7 +1256,7 @@
partNo: this.partCurrentRow.partNo,
codeNo: this.partCurrentRow.codeNo,
codeDesc: this.partCurrentRow.codeDesc,
- recordType: 'MP',
+ recordType: 'IP',
itemList: this.itemSelections2
}
deleteMasterPartItem(inData).then(({data}) => {
@@ -1392,7 +1392,7 @@
site: this.$store.state.user.site,
partNo: this.partCurrentRow.partNo,
codeNo: this.partCurrentRow.codeNo,
- recordType: 'MP'
+ recordType: 'IP'
}
getMasterPartItem(tempData).then(({data}) => {
if (data && data.code === 0) {
@@ -1407,6 +1407,7 @@
* 获取数据列表
*/
getDataList () {
+ this.searchData.site = this.$store.state.user.site
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
masterPartSearch(this.searchData).then(({data}) => {
@@ -1433,34 +1434,40 @@
* 物料信息新增模态框
*/
addModal () {
- this.modalData = {
- site: this.$store.state.user.site,
- flag: '1',
- title: '物料新增',
- partNo: '',
- partDesc: '',
- umId: '',
- umName: '',
- partMainGroup: '',
- groupName: '',
- weightNet: '',
- uomForWeightNet: '',
- volumeNet: '',
- uomForVolumeNet: '',
- codeNo: '',
- codeDesc: '',
- conditionCodeUsageDb: '',
- multilevelTrackingDb: '',
- allowAsNotConsumedDb: '',
- lotTrackingCode: 'Not Lot Tracking',
- lotQuantityRule: 'One Lot Per Production Order',
- subLotRule: 'No Sub Lots Allowed',
- componentLotRule: 'Many Lots Allowed',
- createBy: this.$store.state.user.name,
- officialFlag: 'N'
- }
- this.modalDisableFlag = false
- this.modalFlag = true
+ getProjectPartNo(this.searchData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.modalData = {
+ flag: '1',
+ title: '物料新增',
+ partNo: data.partNo,
+ partDesc: '',
+ umId: '',
+ umName: '',
+ partMainGroup: '',
+ groupName: '',
+ weightNet: '',
+ uomForWeightNet: '',
+ volumeNet: '',
+ uomForVolumeNet: '',
+ codeNo: '',
+ codeDesc: '',
+ conditionCodeUsageDb: '',
+ multilevelTrackingDb: '',
+ allowAsNotConsumedDb: '',
+ lotTrackingCode: 'Not Lot Tracking',
+ lotQuantityRule: 'One Lot Per Production Order',
+ subLotRule: 'No Sub Lots Allowed',
+ componentLotRule: 'Many Lots Allowed',
+ createBy: this.$store.state.user.name,
+ officialFlag: 'N'
+ }
+ this.modalDisableFlag = false
+ this.modalFlag = true
+ } else {
+ this.$message.error(data.msg)
+ }
+ })
+
},
/**
* 物料信息编辑模态框
@@ -1470,7 +1477,6 @@
this.modalData = {
flag: '2',
title: '物料编辑',
- site: this.$store.state.user.site,
partNo: row.partNo,
partDesc: row.partDesc,
umId: row.umId,
diff --git a/src/views/modules/part/partInformation.vue b/src/views/modules/part/partInformation.vue
index fb32be0..e5be4dc 100644
--- a/src/views/modules/part/partInformation.vue
+++ b/src/views/modules/part/partInformation.vue
@@ -104,7 +104,7 @@
-
-
+
@@ -4473,6 +4473,10 @@
this.$message.warning('请选择属性模板!')
return
}
+ if (this.modalData.flag === '3' && (this.modalData.planningMethod == null || this.modalData.planningMethod === '')) {
+ this.$message.warning('请选择计划方法!')
+ return
+ }
if (this.modalData.flag === '1') {
partInformationSave(this.modalData).then(({data}) => {
if (data && data.code === 0) {
diff --git a/src/views/modules/part/routingManagement.vue b/src/views/modules/part/routingManagement.vue
index fbc7d29..fa8fedb 100644
--- a/src/views/modules/part/routingManagement.vue
+++ b/src/views/modules/part/routingManagement.vue
@@ -96,7 +96,7 @@
物料编码
- 物料编码
+ 物料编码
@@ -158,7 +158,7 @@
Copy
Build
Retire
-
+ 转正式Routing
@@ -436,9 +436,12 @@
-
-
-
+
+
+
+
+
+
@@ -1001,7 +1004,9 @@ export default {
createDate: '',
createBy: '',
updateDate: '',
- updateBy: ''
+ updateBy: '',
+ ifsRowId: '',
+ ifsRowVersion: ''
},
partData: {
site: this.$store.state.user.site,
@@ -2643,6 +2648,8 @@ export default {
overlap: '',
noteText: '',
createBy: this.$store.state.user.name,
+ ifsRowId: '',
+ ifsRowVersion: ''
}
this.queryMaxOperationNo()
this.componentDisableFlag = false
@@ -2695,6 +2702,8 @@ export default {
overlap: row.overlap,
noteText: row.noteText,
updateBy: this.$store.state.user.name,
+ ifsRowId: row.ifsRowId,
+ ifsRowVersion: row.ifsRowVersion
}
this.componentDisableFlag = true
this.componentSaveModal = true
diff --git a/src/views/modules/project/projectInfo/com_project_info_part.vue b/src/views/modules/project/projectInfo/com_project_info_part.vue
index 9675395..5309ff4 100644
--- a/src/views/modules/project/projectInfo/com_project_info_part.vue
+++ b/src/views/modules/project/projectInfo/com_project_info_part.vue
@@ -598,7 +598,7 @@
可选物料: