{
if (data && data.code === 0) {
- uploadFileList("/upload/test",tempData).then(({data}) => {
- if (data.code !== 0) {
- this.$message.warning(data.msg)
+ if (this.fileData.file.length > 0) { // 上传文件
+ let tempData = new FormData()
+ for (let i in this.fileData) {
+ if (i === 'file') {
+ for (let j = 0; j < this.fileData.file.length; j++) {
+ tempData.append("file", this.fileData.file[j].raw)
+ }
+ continue
+ }
+ tempData.append(i, this.fileData[i])
}
- })
+ uploadFileList("/upload/test",tempData).then(({data}) => {
+ if (data.code !== 0) {
+ this.$message.warning(data.msg)
+ }
+ })
+ }
this.getDataList()
this.basicInformationFlag = false
this.$message({
@@ -2580,11 +2630,10 @@
this.tagNo1 = type
this.$nextTick(() => {
let strVal = ''
+ let conSql = ''
if (val === 103) {
if (type === 1) {
strVal = this.modalData.applicantId
- } else if (type === 2) {
- strVal = this.modalData.tpEngineerId
} else if (type === 3) {
if (this.costImpactData.productionProductFlag !== 'Y') {
return
@@ -2603,8 +2652,6 @@
} else {
strVal = this.costImpactData.affectedExecutor
}
- } else if (type === 6) {
- strVal = this.modalData.industrialEngineerId
} else if (type === 7) {
strVal = this.tempExecutorRow.executor
}
@@ -2612,7 +2659,23 @@
if (val === 133) {
strVal = this.tempPartRow.newPartNo
}
- this.$refs.baseList.init(val, strVal)
+ if (val === 2005) {
+ strVal = this.modalData.tpEngineerId
+ conSql = " and b.site = '" + this.$store.state.user.site + "'"
+ }
+ if (val === 2006) {
+ strVal = this.modalData.industrialEngineerId
+ conSql = " and b.site = '" + this.$store.state.user.site + "'"
+ }
+ if (val === 2007) {
+ strVal = this.modalData.cqcOperatorId
+ conSql = " and b.site = '" + this.$store.state.user.site + "'"
+ }
+ if (val === 2008) {
+ strVal = this.modalData.faiOperatorId
+ conSql = " and b.site = '" + this.$store.state.user.site + "'"
+ }
+ this.$refs.baseList.init(val, strVal, conSql)
})
},
@@ -2623,9 +2686,6 @@
this.modalData.applicantId = val.username
this.modalData.applicantName = val.user_display
this.getDepartmentByUserName()
- } else if (this.tagNo1 === 2) {
- this.modalData.tpEngineerId = val.username
- this.modalData.tpEngineerName = val.user_display
} else if (this.tagNo1 === 3) {
this.costImpactData.productionProductExecutor = val.username
this.costImpactData.productionProductExecutorName = val.user_display
@@ -2638,9 +2698,6 @@
this.costImpactData.affectedExecutor = val.username
this.costImpactData.affectedExecutorName = val.user_display
//this.$set(this.costImpactData,'affectedExecutorName',val.user_display)
- } else if (this.tagNo1 === 6) {
- this.modalData.industrialEngineerId = val.username
- this.modalData.industrialEngineerName = val.user_display
} else if (this.tagNo1 === 7) {
this.$set(this.tempExecutorRow,'executor',val.username)
}
@@ -2649,6 +2706,22 @@
//this.tempPartRow.newPartNo = val.part_no
this.$set(this.tempPartRow,'newPartNo',val.part_no)
}
+ if (this.tagNo === 2005) {
+ this.modalData.tpEngineerId = val.username
+ this.modalData.tpEngineerName = val.user_display
+ }
+ if (this.tagNo === 2006) {
+ this.modalData.industrialEngineerId = val.username
+ this.modalData.industrialEngineerName = val.user_display
+ }
+ if (this.tagNo === 2007) {
+ this.modalData.cqcOperatorId = val.username
+ this.modalData.cqcOperatorName = val.user_display
+ }
+ if (this.tagNo === 2008) {
+ this.modalData.faiOperatorId = val.username
+ this.modalData.faiOperatorName = val.user_display
+ }
},
// ======== 导出相关方法 ========
diff --git a/src/views/modules/customer/customerInformationManagement.vue b/src/views/modules/customer/customerInformationManagement.vue
index 89da058..cd1e282 100644
--- a/src/views/modules/customer/customerInformationManagement.vue
+++ b/src/views/modules/customer/customerInformationManagement.vue
@@ -20,7 +20,7 @@
新增
删除
新增
- 编辑
+
+ {{ attributeDialog?'编辑':'保存' }}
-
-
-
- {{scope.row[item.columnProp]}}
-
-
-
-
+
+
+
+
+
+
{{scope.row[item.columnProp]}}
+
![]()
+
+
+ {{scope.row.textValue?scope.row.textValue:scope.row.numValue}}
+
+
+
+
+
+
+
+
+
+
+
{{ scope.row[item.columnProp] }}
+
![]()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -486,6 +533,7 @@
itemSelections2: [],
itemList1:[],
itemList2:[],
+ copyAttributeList: [],
// ======== 列表表头 ========
columnList: [
{
@@ -867,7 +915,7 @@
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 90,
+ columnWidth: 100,
},
{
userId: this.$store.state.user.name,
@@ -877,7 +925,7 @@
tableName: "物料属性表",
columnProp: 'itemDesc',
headerAlign: "center",
- align: "center",
+ align: "left",
columnLabel: '属性名称',
columnHidden: false,
columnImage: false,
@@ -885,7 +933,7 @@
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 90,
+ columnWidth: 120,
},
{
userId: this.$store.state.user.name,
@@ -903,7 +951,7 @@
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 70,
+ columnWidth: 100,
},
{
userId: this.$store.state.user.name,
@@ -913,34 +961,34 @@
tableName: "物料属性表",
columnProp: 'textValue',
headerAlign: "center",
- align: "center",
- columnLabel: '文本值',
+ align: "left",
+ columnLabel: '实测值',
columnHidden: false,
columnImage: false,
columnSortable: true,
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 70,
- },
- {
- userId: this.$store.state.user.name,
- functionId: 104001,
- serialNumber: '104001Table2ValueChooseFlag',
- tableId: "104001Table2",
- tableName: "物料属性表",
- columnProp: 'numValue',
- headerAlign: "center",
- align: "center",
- columnLabel: '数字值',
- columnHidden: false,
- columnImage: false,
- columnSortable: true,
- sortLv: 0,
- status: true,
- fixed: '',
- columnWidth: 70,
+ columnWidth: 100,
},
+ // {
+ // userId: this.$store.state.user.name,
+ // functionId: 104001,
+ // serialNumber: '104001Table2ValueChooseFlag',
+ // tableId: "104001Table2",
+ // tableName: "物料属性表",
+ // columnProp: 'numValue',
+ // headerAlign: "center",
+ // align: "center",
+ // columnLabel: '数字值',
+ // columnHidden: false,
+ // columnImage: false,
+ // columnSortable: true,
+ // sortLv: 0,
+ // status: true,
+ // fixed: '',
+ // columnWidth: 70,
+ // },
],
updateColumnItemList: [
{
@@ -1044,7 +1092,9 @@
agentModelFlag: false,
manufacturerModelFlag: false,
updateItemModelFlag: false,
- fastAddFlag: false
+ fastAddFlag: false,
+ loading: false,
+ attributeDialog: true,
}
},
@@ -1074,23 +1124,55 @@
})
},
+ /**
+ * 编辑物料属性
+ */
+ // updateItemValue () {
+ // let tempData = {
+ // site: this.$store.state.user.site,
+ // partNo: this.partCurrentRow.partNo,
+ // codeNo: this.partCurrentRow.codeNo,
+ // recordType: 'MP'
+ // }
+ // getMasterPartItem(tempData).then(({data}) => {
+ // if (data && data.code === 0) {
+ // this.updatePartItemList = data.rows
+ // this.updateItemModelFlag = true
+ // } else {
+ // this.updatePartItemList = []
+ // }
+ // })
+ // },
+
+ clickSave () {
+ if (!this.attributeDialog) { // 保存
+ this.updateItemValue()
+ } else { // 编辑
+ this.copyAttributeList = JSON.parse(JSON.stringify(this.partItemList))
+ this.attributeDialog = false
+ }
+ },
+
/**
* 编辑物料属性
*/
updateItemValue () {
+ this.loading = true
let tempData = {
- site: this.$store.state.user.site,
- partNo: this.partCurrentRow.partNo,
- codeNo: this.partCurrentRow.codeNo,
- recordType: 'MP'
+ itemList: JSON.parse(JSON.stringify(this.copyAttributeList))
}
- getMasterPartItem(tempData).then(({data}) => {
+ commitItemValue(tempData).then(({data}) => {
if (data && data.code === 0) {
- this.updatePartItemList = data.rows
- this.updateItemModelFlag = true
+ this.getMasterPartItem()
+ this.attributeDialog = true
+ this.$message.success(data.msg)
} else {
- this.updatePartItemList = []
+ this.$message.warning(data.msg)
}
+ this.loading = false
+ }).catch((error) => {
+ this.$message.error(error)
+ this.loading = false
})
},
@@ -1098,6 +1180,10 @@
* 新增/删除物料属性
*/
addOrDelItem () {
+ if (!this.attributeDialog) {
+ this.$message.warning('请保存更改!')
+ return
+ }
this.itemSelections1 = null
this.itemSelections2 = null
this.itemData.propertiesItemNo = ''
diff --git a/src/views/modules/part/partInformation.vue b/src/views/modules/part/partInformation.vue
index 383e279..ba0721c 100644
--- a/src/views/modules/part/partInformation.vue
+++ b/src/views/modules/part/partInformation.vue
@@ -63,15 +63,7 @@
@row-click="partClickRow"
@selection-change="selectionPart"
@current-change="changeCurrentRow"
- v-loading="dataListLoading"
style="width: 100%;">
-
-
-
-
-
-
-
BOM
Routing
+ 转正式物料
@@ -122,7 +115,7 @@
-
+
@@ -130,14 +123,17 @@
-
+
Copy
-
- 转正式物料
+
+
+
+
+
-
+
@@ -239,7 +235,7 @@
-
+
属性模板
@@ -253,7 +249,7 @@
-
+
@@ -298,7 +294,7 @@
-
+
@@ -313,7 +309,7 @@
-
+
@@ -360,7 +356,7 @@
-
+
计划方法 / Planning Method
@@ -397,7 +393,7 @@
-
+
@@ -504,9 +500,76 @@
+
+
+
+
+
+
+
+ {{scope.row[item.columnProp]}}
+
+
+
+
+
+
+
+
+
+
+
+ {{scope.row[item.columnProp]}}
+
+
+
+
+
+
- 保存
+ 投产
+ 保存
关闭
@@ -517,45 +580,81 @@
新增
- 编辑
+
+ {{ attributeDialog?'编辑':'保存' }}
-
-
-
- {{scope.row[item.columnProp]}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
{{scope.row[item.columnProp]}}
+
![]()
+
+
+ {{scope.row.textValue?scope.row.textValue:scope.row.numValue}}
+
+
+
+
+
+
+
+
+
+
+
{{ scope.row[item.columnProp] }}
+
![]()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- 新增
+ 新增
- ;width:98%">
+
- ;width:98%">
+
-
-
-
+
+
+
-
+
@@ -1285,7 +1383,9 @@
saveRevision, // 新增物料版本
updateRevision, // 编辑物料版本
deleteRevision, // 删除物料版本
- copyPart // 复制物料
+ copyPart, // 复制物料
+ getBomAndRoutingList, // 查询物料的bom和routing集合
+ partInformationToOfficial, // 转正式物料
} from '@/api/part/partInformation.js'
import {
getFileContentList, // 获取物料单附件列表
@@ -1387,10 +1487,10 @@
limit: 10
},
// 其它
- dataListLoading: false,
+
// 初始页签
activeTable: 'part_item',
- inventoryPartTable: '',
+ inventoryPartTable: 'General',
// ======== 数据对象 ========
modalData: {
flag: '',
@@ -1576,6 +1676,9 @@
itemList1:[],
itemList2:[],
revisionList: [],
+ bomAlternativeList: [],
+ routingAlternativeList: [],
+ copyAttributeList: [],
// ======== 列表表头 ========
columnList: [
{
@@ -2024,11 +2127,9 @@
columnLabel: '属性编码',
columnHidden: false,
columnImage: false,
- columnSortable: true,
- sortLv: 0,
status: true,
fixed: '',
- columnWidth: 90,
+ columnWidth: 100,
},
{
userId: this.$store.state.user.name,
@@ -2038,15 +2139,13 @@
tableName: "物料属性表",
columnProp: 'itemDesc',
headerAlign: "center",
- align: "center",
+ align: "left",
columnLabel: '属性名称',
columnHidden: false,
columnImage: false,
- columnSortable: true,
- sortLv: 0,
status: true,
fixed: '',
- columnWidth: 90,
+ columnWidth: 120,
},
{
userId: this.$store.state.user.name,
@@ -2060,11 +2159,9 @@
columnLabel: '属性类型',
columnHidden: false,
columnImage: false,
- columnSortable: true,
- sortLv: 0,
status: true,
fixed: '',
- columnWidth: 70,
+ columnWidth: 100,
},
{
userId: this.$store.state.user.name,
@@ -2074,34 +2171,30 @@
tableName: "物料属性表",
columnProp: 'textValue',
headerAlign: "center",
- align: "center",
- columnLabel: '文本值',
+ align: "left",
+ columnLabel: '实测值',
columnHidden: false,
columnImage: false,
- columnSortable: true,
- sortLv: 0,
status: true,
fixed: '',
- columnWidth: 70,
- },
- {
- userId: this.$store.state.user.name,
- functionId: 104001,
- serialNumber: '104001Table2ValueChooseFlag',
- tableId: "104001Table2",
- tableName: "物料属性表",
- columnProp: 'numValue',
- headerAlign: "center",
- align: "center",
- columnLabel: '数字值',
- columnHidden: false,
- columnImage: false,
- columnSortable: true,
- sortLv: 0,
- status: true,
- fixed: '',
- columnWidth: 70,
+ columnWidth: 100,
},
+ // {
+ // userId: this.$store.state.user.name,
+ // functionId: 104001,
+ // serialNumber: '104001Table2ValueChooseFlag',
+ // tableId: "104001Table2",
+ // tableName: "物料属性表",
+ // columnProp: 'numValue',
+ // headerAlign: "center",
+ // align: "center",
+ // columnLabel: '数字值',
+ // columnHidden: false,
+ // columnImage: false,
+ // status: true,
+ // fixed: '',
+ // columnWidth: 70,
+ // },
],
updateColumnItemList: [
{
@@ -2742,6 +2835,90 @@
fixed: '',
},
],
+ columnBomAlternativeList: [
+ {
+ columnProp: 'engChgLevel',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: 'BOM版本',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ },
+ {
+ columnProp: 'bomType',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '制造类型',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ },
+ {
+ columnProp: 'alternativeNo',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '替代编码',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ },
+ {
+ columnProp: 'alternativeDescription',
+ headerAlign: "center",
+ align: "left",
+ columnLabel: '替代名称',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ }
+ ],
+ columnRoutingAlternativeList: [
+ {
+ columnProp: 'routingRevision',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: 'Routing版本',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ },
+ {
+ columnProp: 'routingType',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '工艺类型',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ },
+ {
+ columnProp: 'alternativeNo',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '替代编码',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ },
+ {
+ columnProp: 'alternativeDescription',
+ headerAlign: "center",
+ align: "left",
+ columnLabel: '替代名称',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ }
+ ],
// ======== 必填规则 ========
rules: {
partNo: [
@@ -2765,7 +2942,7 @@
trigger: ['blur','change']
}
],
- codeDesc: [
+ codeNo: [
{
required: true,
message: ' ',
@@ -2815,8 +2992,26 @@
}
],
},
+ revisionRules: {
+ engChgLevel: [
+ {
+ required: true,
+ message: ' ',
+ trigger: ['blur','change']
+ }
+ ],
+ effPhaseInDate: [
+ {
+ required: true,
+ message: ' ',
+ trigger: ['blur','change']
+ }
+ ],
+ },
// ======== 复选数据集 ========
partSelections: [],
+ bomAlternativeSelections: [],
+ routingAlternativeSelections: [],
// ======== 选中的当前行数据 ========
partCurrentRow: {},
// ======== 模态框开关控制 ========
@@ -2834,7 +3029,9 @@
locationModelFlag: false,
updateRevisionModelFlag: false,
updateRevisionModelDisableFlag: false,
- copyPartModelFlag: false
+ copyPartModelFlag: false,
+ loading: false,
+ attributeDialog: true,
}
},
@@ -2873,8 +3070,7 @@
queryPartRevisionList () {
let tempData = {
site: this.modalData.site,
- partNo: this.modalData.partNo,
- // partType: this.modalData.partType
+ partNo: this.modalData.partNo
}
queryPartRevisionList(tempData).then(({data}) => {
if (data && data.code === 0) {
@@ -3026,9 +3222,9 @@
this.modalData.umId = data.data.umId
this.modalData.umName = data.data.umName
this.modalData.weightNet = data.data.weightNet
- this.modalData.uomForWeightNet = data.data.uomForWeightNet
+ //this.modalData.uomForWeightNet = data.data.uomForWeightNet
this.modalData.volumeNet = data.data.volumeNet
- this.modalData.uomForVolumeNet = data.data.uomForVolumeNet
+ //this.modalData.uomForVolumeNet = data.data.uomForVolumeNet
}
}
})
@@ -3056,23 +3252,55 @@
})
},
+ // /**
+ // * 编辑物料属性
+ // */
+ // updateItemValue () {
+ // let tempData = {
+ // site: this.$store.state.user.site,
+ // partNo: this.partCurrentRow.partNo,
+ // codeNo: this.partCurrentRow.codeNo,
+ // recordType: 'IP'
+ // }
+ // getPartItem(tempData).then(({data}) => {
+ // if (data && data.code === 0) {
+ // this.updatePartItemList = data.rows
+ // this.updateItemModelFlag = true
+ // } else {
+ // this.updatePartItemList = []
+ // }
+ // })
+ // },
+
+ clickSave () {
+ if (!this.attributeDialog) { // 保存
+ this.updateItemValue()
+ } else { // 编辑
+ this.copyAttributeList = JSON.parse(JSON.stringify(this.partItemList))
+ this.attributeDialog = false
+ }
+ },
+
/**
* 编辑物料属性
*/
updateItemValue () {
+ this.loading = true
let tempData = {
- site: this.$store.state.user.site,
- partNo: this.partCurrentRow.partNo,
- codeNo: this.partCurrentRow.codeNo,
- recordType: 'IP'
+ itemList: JSON.parse(JSON.stringify(this.copyAttributeList))
}
- getPartItem(tempData).then(({data}) => {
+ commitItemValue(tempData).then(({data}) => {
if (data && data.code === 0) {
- this.updatePartItemList = data.rows
- this.updateItemModelFlag = true
+ this.getPartItem()
+ this.attributeDialog = true
+ this.$message.success(data.msg)
} else {
- this.updatePartItemList = []
+ this.$message.warning(data.msg)
}
+ this.loading = false
+ }).catch((error) => {
+ this.$message.error(error)
+ this.loading = false
})
},
@@ -3080,6 +3308,10 @@
* 新增/删除物料属性
*/
addOrDelItem () {
+ if (!this.attributeDialog) {
+ this.$message.warning('请保存更改!')
+ return
+ }
this.itemSelections1 = null
this.itemSelections2 = null
this.itemData.propertiesItemNo = ''
@@ -3411,7 +3643,6 @@
this.partClickRow(this.dataList[0])
}
}
- this.dataListLoading = false
})
},
@@ -3436,9 +3667,9 @@
umId: '',
umName: '',
weightNet: '',
- uomForWeightNet: '',
+ uomForWeightNet: 'kg',
volumeNet: '',
- uomForVolumeNet: '',
+ uomForVolumeNet: 'm3',
lotTrackingCode: 'Order Based',
active: 'Y',
remark: '',
@@ -3517,6 +3748,7 @@
density: 0,
variableLeadTimeHour: 0
}
+ this.inventoryPartTable = 'General'
this.modalDisableFlag = false
this.modalFlag = true
},
@@ -3623,10 +3855,150 @@
variableLeadTimeHour: row.variableLeadTimeHour,
createDate: row.createDate
}
+ this.inventoryPartTable = 'General'
+ this.modalDisableFlag = true
+ this.modalFlag = true
+ },
+
+ // 转正式物料
+ toBecomeOfficialPartModal (row) {
+ this.modalData = {
+ flag: '3',
+ title: '物料投产',
+ site: row.site,
+ partNo: row.partNo,
+ partDesc: row.partDesc,
+ spec: row.spec,
+ partTypeDb: row.partTypeDb,
+ partType: row.partType,
+ familyId: row.familyId,
+ familyName: row.familyName,
+ groupId: row.groupId,
+ groupName: row.groupName,
+ umId: row.umId,
+ umName: row.umName,
+ weightNet: row.weightNet,
+ uomForWeightNet: row.uomForWeightNet,
+ volumeNet: row.volumeNet,
+ uomForVolumeNet: row.uomForVolumeNet,
+ lotTrackingCode: row.lotTrackingCode,
+ active: row.active,
+ remark: row.remark,
+ supplierId: row.supplierId,
+ supplierName: row.supplierName,
+ productGroupId1: row.productGroupId1,
+ productGroupName1: row.productGroupName1,
+ productGroupId2: row.productGroupId2,
+ productGroupName2: row.productGroupName2,
+ productGroupId3: row.productGroupId3,
+ productGroupName3: row.productGroupName3,
+ productGroupId4: row.productGroupId4,
+ productGroupName4: row.productGroupName4,
+ erpPartNo: row.erpPartNo,
+ codeNo: row.codeNo,
+ codeDesc: row.codeDesc,
+ manufacturerId: row.manufacturerId,
+ manufacturerName: row.manufacturerName,
+ agentId: row.agentId,
+ agentName: row.agentName,
+ updateBy: this.$store.state.user.name,
+ typeDesignation: row.typeDesignation,
+ hazardCode: row.hazardCode,
+ hazardDesc: row.hazardDesc,
+ assetClass: row.assetClass,
+ assetClassDesc: row.assetClassDesc,
+ dimQuality: row.dimQuality,
+ abcClass: row.abcClass,
+ abcClassDesc: row.abcClassDesc,
+ frequencyClass: row.frequencyClass,
+ lifecycleStage: row.lifecycleStage,
+ countryOfOrigin: row.countryOfOrigin,
+ countryOfOriginDesc: row.countryOfOriginDesc,
+ manufacturingLeadTime: row.manufacturingLeadTime,
+ expectedLeadTime: row.expectedLeadTime,
+ regionOfOrigin: row.regionOfOrigin,
+ regionOfOriginDesc: row.regionOfOriginDesc,
+ durabilityWeek: '',
+ customsStatNo: row.customsStatNo,
+ customsStatDesc: row.customsStatDesc,
+ durabilityDay: row.durabilityDay,
+ intrastatConvFactor: row.intrastatConvFactor,
+ umDesc: row.umDesc,
+ status: row.status,
+ partStatus: row.partStatus,
+ partStatusDesc: row.partStatusDesc,
+ configurationId: row.configurationId,
+ estimatedMaterialCost: row.estimatedMaterialCost,
+ inventoryValuationMethod: row.inventoryValuationMethod,
+ partCostGroupId: row.partCostGroupId,
+ partCostGroupDesc: row.partCostGroupDesc,
+ inventoryPartCostLevel: row.inventoryPartCostLevel,
+ invoiceConsideration: row.invoiceConsideration,
+ zeroCostFlag: row.zeroCostFlag,
+ planningMethod: row.planningMethod,
+ planningMethodDesc: row.planningMethodDesc,
+ safetyStock: row.safetyStock,
+ minOrderQty: row.minOrderQty,
+ maxOrderQty: row.maxOrderQty,
+ mulOrderQty: row.mulOrderQty,
+ safetyLeadTime: row.safetyLeadTime,
+ shrinkageFac: row.shrinkageFac,
+ stdOrderQty: row.stdOrderQty,
+ cumLeadTime: row.cumLeadTime,
+ backFlushPart: row.backFlushPart,
+ byProdAsSupplyInMrpDb: row.byProdAsSupplyInMrpDb,
+ unprotectedLeadTime: row.unprotectedLeadTime,
+ issueType: row.issueType,
+ mrpControlFlagDb: row.mrpControlFlagDb,
+ fixedLeadTimeDay: row.fixedLeadTimeDay,
+ overReporting: row.overReporting,
+ useTheoreticalDensityDb: row.useTheoreticalDensityDb,
+ variableLeadTimeDay: row.variableLeadTimeDay,
+ overReportTolerance: row.overReportTolerance,
+ fixedLeadTimeHour: row.fixedLeadTimeHour,
+ density: row.density,
+ variableLeadTimeHour: row.variableLeadTimeHour,
+ createDate: row.createDate,
+ bomAlternativeList: [],
+ routingAlternativeList: [],
+ ifsPartNo: ''
+ }
+ // 查出该物料的BOM和routing的替代
+ this.getBomAndRoutingList()
+ this.inventoryPartTable = 'General'
this.modalDisableFlag = true
this.modalFlag = true
},
+ // 查出该物料的BOM和routing的替代
+ getBomAndRoutingList () {
+ getBomAndRoutingList(this.modalData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.bomAlternativeList = data.rows.bomList
+ this.routingAlternativeList = data.rows.routingList
+ } else {
+ this.bomAlternativeList = []
+ this.routingAlternativeList = []
+ }
+ })
+ },
+
+ bomAlternativeClickRow (row) {
+ this.$refs.bomAlternativeTable.toggleRowSelection(row)
+ },
+
+ routingAlternativeClickRow (row) {
+ this.$refs.routingAlternativeTable.toggleRowSelection(row)
+ },
+
+ selectionBomAlternative (val) {
+ this.bomAlternativeSelections = val
+ },
+
+ selectionRoutingAlternative (val) {
+ this.routingAlternativeSelections = val
+ },
+
/**
* 选择代理商
*/
@@ -4089,6 +4461,7 @@
refreshDetailList () {
this.getPartAgent()
this.getPartManufacturer()
+ this.getDefaultLocation()
},
// ======== 新增/编辑/删除方法 ========
@@ -4137,6 +4510,33 @@
})
}
})
+ } else if (this.modalData.flag === '3') { // 转正式物料
+ if (this.modalData.ifsPartNo === '' || this.modalData.ifsPartNo == null) {
+ this.$message.warning('请填写IFS物料编码!')
+ return
+ }
+ if (this.modalData.partNo === this.modalData.ifsPartNo) {
+ this.$message.warning('IFS物料编码不能等于PLM物料编码!')
+ return
+ }
+ this.modalData.bomAlternativeList = this.bomAlternativeSelections
+ this.modalData.routingAlternativeList = this.routingAlternativeSelections
+ partInformationToOfficial(this.modalData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.getDataList()
+ this.modalFlag = false
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {}
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
} else {
partInformationEdit(this.modalData).then(({data}) => {
if (data && data.code === 0) {
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 6cc7795..b1824d5 100644
--- a/src/views/modules/project/projectInfo/com_project_info_part.vue
+++ b/src/views/modules/project/projectInfo/com_project_info_part.vue
@@ -2,7 +2,8 @@
- 新增
+ 新增
+ 料号导入
{{ scope.row[item.columnProp] }}
-
![]()
+
{{ scope.row[item.columnProp] }}
-
![]()
+
+
+
+ 编辑
+ 复制
+
+
@@ -67,19 +77,19 @@
-
+
-
+
-
- Copy
-
-
- 转正式物料
+
+
+
+
+
-
+
@@ -161,7 +171,6 @@
-
@@ -176,12 +185,11 @@
-
-
+
属性模板
@@ -195,7 +203,7 @@
-
+
@@ -240,7 +248,7 @@
-
+
@@ -255,7 +263,7 @@
-
+
@@ -302,7 +310,7 @@
-
+
计划方法 / Planning Method
@@ -339,7 +347,7 @@
-
+
@@ -408,6 +416,43 @@
+
+
+ 新增
+
+
+
+ {{scope.row[item.columnProp]}}
+
+
+
+
+
+ 编辑
+ 删除
+
+
+
+
@@ -416,6 +461,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+ 关闭
+
+
+
@@ -498,6 +579,113 @@
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+ 可选物料:
+
+
+
+
+
+
+
+
+
+
+
+ 添加>>
+ 删除<<
+
+
+
+ 已选物料:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+ 关闭
+
+
+
@@ -518,6 +706,18 @@
queryMasterField, // 根据物料编码查 masterPart 属性
toBecomeOfficialPart, // 临时物料转为正式物料
partInformationSave2, // 物料信息新增
+ getProjectPartNo, // 获取项目物料编码
+ getProjectPartRow, // 获取当前行项目物料对象
+ getProjectPartRow2, //
+ queryPartRevisionList, //
+ saveRevision,
+ updateRevision,
+ deleteRevision,
+ partInformationEdit,
+ getProjectPartList,
+ addProjectPart, // 新增项目物料
+ deleteProjectPart, // 删除项目物料
+ addProjectPart2, // 新增项目物料
} from '@/api/part/partInformation.js'
import Chooselist from '@/views/modules/common/Chooselist'
import DictDataSelect from "../../sys/dict-data-select.vue";
@@ -558,6 +758,7 @@
site: '',
username: this.$store.state.user.name,
projectId: '',
+ customerId: ''
},
visible:false,
dataListLoading: false,
@@ -927,7 +1128,6 @@
itemChooseFlag:false,
-
modalData: {
flag: '',
title: '',
@@ -935,6 +1135,7 @@
site: this.$store.state.user.site,
partNo: '',
partDesc: '',
+ customerPartNo: '',
spec: '',
partTypeDb: '',
partType: '',
@@ -1027,7 +1228,8 @@
overReportTolerance: '',
fixedLeadTimeHour: '',
density: '',
- variableLeadTimeHour: ''
+ variableLeadTimeHour: '',
+ customerNo: '',
},
modalFlag: false,
modalDisableFlag: false,
@@ -1053,7 +1255,7 @@
trigger: ['blur','change']
}
],
- codeDesc: [
+ codeNo: [
{
required: true,
message: ' ',
@@ -1102,9 +1304,116 @@
trigger: ['blur','change']
}
],
+ customerPartNo: [
+ {
+ required: true,
+ message: ' ',
+ trigger: ['blur','change']
+ }
+ ],
},
- inventoryPartTable: '',
+ inventoryPartTable: 'General',
tempCodeNo: '',
+ revisionList: [],
+ revisionData: {
+ flag: '',
+ site: '',
+ partNo: '',
+ engChgLevel: '',
+ effPhaseInDate: '',
+ effPhaseOutDate: '',
+ revisionText: '',
+ productStatus: '',
+ repairStatus: '',
+ engRevision: '',
+ createBy: '',
+ updateBy: '',
+ },
+ updateRevisionModelFlag: false,
+ updateRevisionModelDisableFlag: false,
+ columnRevisionList: [
+ {
+ columnProp: 'engChgLevel',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: 'Revision',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ },
+ {
+ columnProp: 'effPhaseInDate',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: 'Phase In',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ },
+ {
+ columnProp: 'effPhaseOutDate',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: 'Phase Out',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ },
+ {
+ columnProp: 'revisionText',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: 'Revision Text',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ },
+ {
+ columnProp: 'productStatus',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: 'Product Status',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ },
+ {
+ columnProp: 'repairStatus',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: 'Repair Status',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ },
+ {
+ columnProp: 'engRevision',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '工程版本',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ },
+ ],
+ partSelections1: [],
+ partSelections2: [],
+ partListAll: [],
+ partList1: [],
+ partList2: [],
+ partData: {
+ site: this.$store.state.user.site,
+ partNo: '',
+ partDesc: ''
+ },
+ partModelFlag: false
}
},
methods: {
@@ -1241,16 +1550,18 @@
this.searchTable();
},
+
searchTable(){
getProjectInfoPartList(this.searchData).then(({data}) => {
//区分请求成功和失败的状况
if (data && data.code == 0) {
- this.dataList = data.rows;
+ this.dataList = data.rows
} else {
- this.dataList = [];
+ this.dataList = []
}
});
},
+
addModal () {
if (this.searchData.projectId == "" || this.searchData.projectId == null) {
this.$alert('请选择项目!', '错误', {
@@ -1258,111 +1569,346 @@
})
return false
}
- this.modalData = {
- flag: '1',
- title: '物料新增',
- projectId: this.searchData.projectId,
- site: this.$store.state.user.site,
- partNo: '',
- partDesc: '',
- spec: '',
- partTypeDb: '',
- partType: 'Purchased (raw)',
- familyId: '',
- familyName: '',
- groupId: '',
- groupName: '',
- umId: '',
- umName: '',
- weightNet: '',
- uomForWeightNet: '',
- volumeNet: '',
- uomForVolumeNet: '',
- lotTrackingCode: 'Order Based',
- active: 'Y',
- remark: '',
- supplierId: '',
- supplierName: '',
- productGroupId1: '',
- productGroupName1: '',
- productGroupId2: '',
- productGroupName2: '',
- productGroupId3: '',
- productGroupName3: '',
- productGroupId4: '*',
- productGroupName4: 'NorthSky Application owner',
- erpPartNo: '',
- codeNo: '',
- codeDesc: '',
- manufacturerId: '',
- manufacturerName: '',
- agentId: '',
- agentName: '',
- createBy: this.$store.state.user.name,
- typeDesignation: '',
- hazardCode: '',
- hazardDesc: '',
- assetClass: 'S',
- assetClassDesc: '标准',
- dimQuality: '',
- abcClass: 'C',
- abcClassDesc: '',
- frequencyClass: 'Very Slow Mover',
- lifecycleStage: 'Development',
- countryOfOrigin: '',
- countryOfOriginDesc: '',
- manufacturingLeadTime: 0,
- expectedLeadTime: 0,
- regionOfOrigin: '',
- regionOfOriginDesc: '',
- durabilityWeek: '',
- customsStatNo: '',
- customsStatDesc: '',
- durabilityDay: '',
- intrastatConvFactor: '',
- umDesc: '',
- status: 'N',
- partStatus: 'A',
- partStatusDesc: '活动',
- configurationId: '*',
- estimatedMaterialCost: 0,
- inventoryValuationMethod: 'Standard Cost',
- partCostGroupId: '',
- partCostGroupDesc: '',
- inventoryPartCostLevel: 'Cost Per Part',
- invoiceConsideration: 'Ignore Invoice Price',
- zeroCostFlag: 'Zero Cost Forbidden',
- planningMethod: '',
- planningMethodDesc: '',
- safetyStock: 0,
- minOrderQty: 0,
- maxOrderQty: 0,
- mulOrderQty: 0,
- safetyLeadTime: 0,
- shrinkageFac: 0,
- stdOrderQty: 0,
- cumLeadTime: 0,
- backFlushPart: 'All Locations',
- byProdAsSupplyInMrpDb: '',
- unprotectedLeadTime: 0,
- issueType: 'Reserve And Backflush',
- mrpControlFlagDb: 'Y',
- fixedLeadTimeDay: 0,
- overReporting: 'Allowed',
- useTheoreticalDensityDb: '',
- variableLeadTimeDay: 0,
- overReportTolerance: 0,
- fixedLeadTimeHour: 0,
- density: 0,
- variableLeadTimeHour: 0
- }
- this.modalFlag = true
- this.modalDisableFlag = false
+ getProjectPartNo(this.searchData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.modalData = {
+ flag: '1',
+ title: '项目物料新增',
+ projectId: this.searchData.projectId,
+ site: this.$store.state.user.site,
+ partNo: data.partNo,
+ partDesc: '',
+ customerPartNo: '',
+ spec: '',
+ partTypeDb: '',
+ partType: 'Purchased (raw)',
+ familyId: '',
+ familyName: '',
+ groupId: '',
+ groupName: '',
+ umId: '',
+ umName: '',
+ weightNet: '',
+ uomForWeightNet: '',
+ volumeNet: '',
+ uomForVolumeNet: '',
+ lotTrackingCode: 'Order Based',
+ active: 'Y',
+ remark: '',
+ supplierId: '',
+ supplierName: '',
+ productGroupId1: '',
+ productGroupName1: '',
+ productGroupId2: '',
+ productGroupName2: '',
+ productGroupId3: '',
+ productGroupName3: '',
+ productGroupId4: '*',
+ productGroupName4: 'NorthSky Application owner',
+ erpPartNo: '',
+ codeNo: '',
+ codeDesc: '',
+ manufacturerId: '',
+ manufacturerName: '',
+ agentId: '',
+ agentName: '',
+ createBy: this.$store.state.user.name,
+ typeDesignation: '',
+ hazardCode: '',
+ hazardDesc: '',
+ assetClass: 'S',
+ assetClassDesc: '标准',
+ dimQuality: '',
+ abcClass: 'C',
+ abcClassDesc: '',
+ frequencyClass: 'Very Slow Mover',
+ lifecycleStage: 'Development',
+ countryOfOrigin: '',
+ countryOfOriginDesc: '',
+ manufacturingLeadTime: 0,
+ expectedLeadTime: 0,
+ regionOfOrigin: '',
+ regionOfOriginDesc: '',
+ durabilityWeek: '',
+ customsStatNo: '',
+ customsStatDesc: '',
+ durabilityDay: '',
+ intrastatConvFactor: '',
+ umDesc: '',
+ status: 'N',
+ partStatus: 'A',
+ partStatusDesc: '活动',
+ configurationId: '*',
+ estimatedMaterialCost: 0,
+ inventoryValuationMethod: 'Standard Cost',
+ partCostGroupId: '',
+ partCostGroupDesc: '',
+ inventoryPartCostLevel: 'Cost Per Part',
+ invoiceConsideration: 'Ignore Invoice Price',
+ zeroCostFlag: 'Zero Cost Forbidden',
+ planningMethod: '',
+ planningMethodDesc: '',
+ safetyStock: 0,
+ minOrderQty: 0,
+ maxOrderQty: 0,
+ mulOrderQty: 0,
+ safetyLeadTime: 0,
+ shrinkageFac: 0,
+ stdOrderQty: 0,
+ cumLeadTime: 0,
+ backFlushPart: 'All Locations',
+ byProdAsSupplyInMrpDb: '',
+ unprotectedLeadTime: 0,
+ issueType: 'Reserve And Backflush',
+ mrpControlFlagDb: 'Y',
+ fixedLeadTimeDay: 0,
+ overReporting: 'Allowed',
+ useTheoreticalDensityDb: '',
+ variableLeadTimeDay: 0,
+ overReportTolerance: 0,
+ fixedLeadTimeHour: 0,
+ density: 0,
+ variableLeadTimeHour: 0,
+ customerNo: this.searchData.customerId
+ }
+ this.modalFlag = true
+ this.modalDisableFlag = false
+ this.inventoryPartTable = 'General'
+ } else {
+ this.$message.error('获取项目物料编码失败,请重试!')
+ }
+ })
},
- /**
- * 物料信息新增/编辑
- */
+ // 物料信息编辑模态框
+ updateModal (row) {
+ getProjectPartRow2(row).then(({data}) => {
+ //区分请求成功和失败的状况
+ if (data && data.code === 0) {
+ this.modalData = {
+ flag: '2',
+ title: '项目物料编辑',
+ projectId: this.searchData.projectId,
+ site: data.rows.site,
+ partNo: data.rows.partNo,
+ partDesc: data.rows.partDesc,
+ customerPartNo: data.rows.customerPartNo,
+ spec: data.rows.spec,
+ partTypeDb: data.rows.partTypeDb,
+ partType: data.rows.partType,
+ familyId: data.rows.familyId,
+ familyName: data.rows.familyName,
+ groupId: data.rows.groupId,
+ groupName: data.rows.groupName,
+ umId: data.rows.umId,
+ umName: data.rows.umName,
+ weightNet: data.rows.weightNet,
+ uomForWeightNet: data.rows.uomForWeightNet,
+ volumeNet: data.rows.volumeNet,
+ uomForVolumeNet: data.rows.uomForVolumeNet,
+ lotTrackingCode: data.rows.lotTrackingCode,
+ active: data.rows.active,
+ remark: data.rows.remark,
+ supplierId: data.rows.supplierId,
+ supplierName: data.rows.supplierName,
+ productGroupId1: data.rows.productGroupId1,
+ productGroupName1: data.rows.productGroupName1,
+ productGroupId2: data.rows.productGroupId2,
+ productGroupName2: data.rows.productGroupName2,
+ productGroupId3: data.rows.productGroupId3,
+ productGroupName3: data.rows.productGroupName3,
+ productGroupId4: data.rows.productGroupId4,
+ productGroupName4: data.rows.productGroupName4,
+ erpPartNo: data.rows.erpPartNo,
+ codeNo: data.rows.codeNo,
+ codeDesc: data.rows.codeDesc,
+ manufacturerId: data.rows.manufacturerId,
+ manufacturerName: data.rows.manufacturerName,
+ agentId: data.rows.agentId,
+ agentName: data.rows.agentName,
+ updateBy: this.$store.state.user.name,
+ typeDesignation: data.rows.typeDesignation,
+ hazardCode: data.rows.hazardCode,
+ hazardDesc: data.rows.hazardDesc,
+ assetClass: data.rows.assetClass,
+ assetClassDesc: data.rows.assetClassDesc,
+ dimQuality: data.rows.dimQuality,
+ abcClass: data.rows.abcClass,
+ abcClassDesc: data.rows.abcClassDesc,
+ frequencyClass: data.rows.frequencyClass,
+ lifecycleStage: data.rows.lifecycleStage,
+ countryOfOrigin: data.rows.countryOfOrigin,
+ countryOfOriginDesc: data.rows.countryOfOriginDesc,
+ manufacturingLeadTime: data.rows.manufacturingLeadTime,
+ expectedLeadTime: data.rows.expectedLeadTime,
+ regionOfOrigin: data.rows.regionOfOrigin,
+ regionOfOriginDesc: data.rows.regionOfOriginDesc,
+ durabilityWeek: '',
+ customsStatNo: data.rows.customsStatNo,
+ customsStatDesc: data.rows.customsStatDesc,
+ durabilityDay: data.rows.durabilityDay,
+ intrastatConvFactor: data.rows.intrastatConvFactor,
+ umDesc: data.rows.umDesc,
+ status: data.rows.status,
+ partStatus: data.rows.partStatus,
+ partStatusDesc: data.rows.partStatusDesc,
+ configurationId: data.rows.configurationId,
+ estimatedMaterialCost: data.rows.estimatedMaterialCost,
+ inventoryValuationMethod: data.rows.inventoryValuationMethod,
+ partCostGroupId: data.rows.partCostGroupId,
+ partCostGroupDesc: data.rows.partCostGroupDesc,
+ inventoryPartCostLevel: data.rows.inventoryPartCostLevel,
+ invoiceConsideration: data.rows.invoiceConsideration,
+ zeroCostFlag: data.rows.zeroCostFlag,
+ planningMethod: data.rows.planningMethod,
+ planningMethodDesc: data.rows.planningMethodDesc,
+ safetyStock: data.rows.safetyStock,
+ minOrderQty: data.rows.minOrderQty,
+ maxOrderQty: data.rows.maxOrderQty,
+ mulOrderQty: data.rows.mulOrderQty,
+ safetyLeadTime: data.rows.safetyLeadTime,
+ shrinkageFac: data.rows.shrinkageFac,
+ stdOrderQty: data.rows.stdOrderQty,
+ cumLeadTime: data.rows.cumLeadTime,
+ backFlushPart: data.rows.backFlushPart,
+ byProdAsSupplyInMrpDb: data.rows.byProdAsSupplyInMrpDb,
+ unprotectedLeadTime: data.rows.unprotectedLeadTime,
+ issueType: data.rows.issueType,
+ mrpControlFlagDb: data.rows.mrpControlFlagDb,
+ fixedLeadTimeDay: data.rows.fixedLeadTimeDay,
+ overReporting: data.rows.overReporting,
+ useTheoreticalDensityDb: data.rows.useTheoreticalDensityDb,
+ variableLeadTimeDay: data.rows.variableLeadTimeDay,
+ overReportTolerance: data.rows.overReportTolerance,
+ fixedLeadTimeHour: data.rows.fixedLeadTimeHour,
+ density: data.rows.density,
+ variableLeadTimeHour: data.rows.variableLeadTimeHour,
+ customerNo: this.searchData.customerId
+ }
+ this.modalFlag = true
+ this.modalDisableFlag = true
+ this.inventoryPartTable = 'General'
+ } else {
+ this.$message.error('操作失败!')
+ }
+ })
+ },
+
+ // 复制项目物料
+ copyProjectPartModal (row) {
+ getProjectPartRow(row).then(({data}) => {
+ //区分请求成功和失败的状况
+ if (data && data.code === 0) {
+ this.modalData = {
+ flag: '3',
+ title: '项目物料复制',
+ projectId: this.searchData.projectId,
+ site: data.rows.site,
+ partNo: data.rows.partNo,
+ partDesc: data.rows.partDesc,
+ customerPartNo: '',
+ spec: data.rows.spec,
+ partTypeDb: data.rows.partTypeDb,
+ partType: data.rows.partType,
+ familyId: data.rows.familyId,
+ familyName: data.rows.familyName,
+ groupId: data.rows.groupId,
+ groupName: data.rows.groupName,
+ umId: data.rows.umId,
+ umName: data.rows.umName,
+ weightNet: data.rows.weightNet,
+ uomForWeightNet: data.rows.uomForWeightNet,
+ volumeNet: data.rows.volumeNet,
+ uomForVolumeNet: data.rows.uomForVolumeNet,
+ lotTrackingCode: data.rows.lotTrackingCode,
+ active: data.rows.active,
+ remark: data.rows.remark,
+ supplierId: data.rows.supplierId,
+ supplierName: data.rows.supplierName,
+ productGroupId1: data.rows.productGroupId1,
+ productGroupName1: data.rows.productGroupName1,
+ productGroupId2: data.rows.productGroupId2,
+ productGroupName2: data.rows.productGroupName2,
+ productGroupId3: data.rows.productGroupId3,
+ productGroupName3: data.rows.productGroupName3,
+ productGroupId4: data.rows.productGroupId4,
+ productGroupName4: data.rows.productGroupName4,
+ erpPartNo: data.rows.erpPartNo,
+ codeNo: data.rows.codeNo,
+ codeDesc: data.rows.codeDesc,
+ manufacturerId: data.rows.manufacturerId,
+ manufacturerName: data.rows.manufacturerName,
+ agentId: data.rows.agentId,
+ agentName: data.rows.agentName,
+ createBy: this.$store.state.user.name,
+ typeDesignation: data.rows.typeDesignation,
+ hazardCode: data.rows.hazardCode,
+ hazardDesc: data.rows.hazardDesc,
+ assetClass: data.rows.assetClass,
+ assetClassDesc: data.rows.assetClassDesc,
+ dimQuality: data.rows.dimQuality,
+ abcClass: data.rows.abcClass,
+ abcClassDesc: data.rows.abcClassDesc,
+ frequencyClass: data.rows.frequencyClass,
+ lifecycleStage: data.rows.lifecycleStage,
+ countryOfOrigin: data.rows.countryOfOrigin,
+ countryOfOriginDesc: data.rows.countryOfOriginDesc,
+ manufacturingLeadTime: data.rows.manufacturingLeadTime,
+ expectedLeadTime: data.rows.expectedLeadTime,
+ regionOfOrigin: data.rows.regionOfOrigin,
+ regionOfOriginDesc: data.rows.regionOfOriginDesc,
+ durabilityWeek: '',
+ customsStatNo: data.rows.customsStatNo,
+ customsStatDesc: data.rows.customsStatDesc,
+ durabilityDay: data.rows.durabilityDay,
+ intrastatConvFactor: data.rows.intrastatConvFactor,
+ umDesc: data.rows.umDesc,
+ status: data.rows.status,
+ partStatus: data.rows.partStatus,
+ partStatusDesc: data.rows.partStatusDesc,
+ configurationId: data.rows.configurationId,
+ estimatedMaterialCost: data.rows.estimatedMaterialCost,
+ inventoryValuationMethod: data.rows.inventoryValuationMethod,
+ partCostGroupId: data.rows.partCostGroupId,
+ partCostGroupDesc: data.rows.partCostGroupDesc,
+ inventoryPartCostLevel: data.rows.inventoryPartCostLevel,
+ invoiceConsideration: data.rows.invoiceConsideration,
+ zeroCostFlag: data.rows.zeroCostFlag,
+ planningMethod: data.rows.planningMethod,
+ planningMethodDesc: data.rows.planningMethodDesc,
+ safetyStock: data.rows.safetyStock,
+ minOrderQty: data.rows.minOrderQty,
+ maxOrderQty: data.rows.maxOrderQty,
+ mulOrderQty: data.rows.mulOrderQty,
+ safetyLeadTime: data.rows.safetyLeadTime,
+ shrinkageFac: data.rows.shrinkageFac,
+ stdOrderQty: data.rows.stdOrderQty,
+ cumLeadTime: data.rows.cumLeadTime,
+ backFlushPart: data.rows.backFlushPart,
+ byProdAsSupplyInMrpDb: data.rows.byProdAsSupplyInMrpDb,
+ unprotectedLeadTime: data.rows.unprotectedLeadTime,
+ issueType: data.rows.issueType,
+ mrpControlFlagDb: data.rows.mrpControlFlagDb,
+ fixedLeadTimeDay: data.rows.fixedLeadTimeDay,
+ overReporting: data.rows.overReporting,
+ useTheoreticalDensityDb: data.rows.useTheoreticalDensityDb,
+ variableLeadTimeDay: data.rows.variableLeadTimeDay,
+ overReportTolerance: data.rows.overReportTolerance,
+ fixedLeadTimeHour: data.rows.fixedLeadTimeHour,
+ density: data.rows.density,
+ variableLeadTimeHour: data.rows.variableLeadTimeHour,
+ customerNo: this.searchData.customerId
+ }
+ this.modalFlag = true
+ this.modalDisableFlag = false
+ this.inventoryPartTable = 'General'
+ } else {
+ this.$message.error('获取项目物料失败,请重试!')
+ }
+ })
+ },
+
+ // 物料信息新增 / 编辑
saveData () {
if (this.modalData.partNo === '' || this.modalData.partNo == null) {
this.$message.warning('请填写物料编码!')
@@ -1372,6 +1918,10 @@
this.$message.warning('请填写物料描述!')
return
}
+ if (this.modalData.customerPartNo === '' || this.modalData.customerPartNo == null) {
+ this.$message.warning('请填写客户料号!')
+ return
+ }
if (this.modalData.partType === '' || this.modalData.partType == null) {
this.$message.warning('请选择零件类型!')
return
@@ -1388,7 +1938,7 @@
this.$message.warning('请选择属性模板!')
return
}
- if (this.modalData.flag === '1') {
+ if (this.modalData.flag === '1' || this.modalData.flag === '3') {
partInformationSave2(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.searchTable()
@@ -1405,11 +1955,237 @@
})
}
})
+ } else {
+ partInformationEdit(this.modalData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.searchTable()
+ this.modalFlag = false
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {}
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ }
+ },
+
+ // 物料导入
+ partImportModal () {
+ if (this.searchData.projectId == null || this.searchData.projectId === "") {
+ this.$alert('请选择项目!', '错误', {
+ confirmButtonText: '确定'
+ })
+ return false
}
+ this.partSelections1 = []
+ this.partSelections2 = []
+ this.partList1 = []
+ this.partList2 = []
+ getProjectPartList(this.searchData).then(({data}) => {
+ this.partListAll = data.row1
+ this.partList1 = this.partListAll
+ this.partData = {
+ site: this.$store.state.user.site,
+ partNo: '',
+ partDesc: ''
+ }
+ this.partModelFlag = true
+ })
},
+ // 关闭后刷新列表
+ refreshDetailList () {
+ this.searchTable()
+ },
- deleteData(row){
+ /**
+ * 选择项目物料
+ */
+ getPartList () {
+ let tempList = []
+ if (this.partData.partNo !== '' && this.partData.partDesc === '') {
+ this.partList1.forEach(item => {
+ if (item.partNo.includes(this.partData.partNo)) {
+ tempList.push(item)
+ }
+ })
+ this.partList1 = tempList
+ } else if (this.partData.partDesc !== '' && this.partData.partNo === '') {
+ this.partList1.forEach(item => {
+ if (item.partDesc.includes(this.partData.partDesc)) {
+ tempList.push(item)
+ }
+ })
+ this.partList1 = tempList
+ } else if (this.partData.partNo !== '' && this.partData.partDesc !== '') {
+ this.partList1.forEach(item => {
+ if (item.partNo.includes(this.partData.partNo) && item.partDesc.includes(this.partData.partDesc)) {
+ tempList.push(item)
+ }
+ })
+ this.partList1 = tempList
+ } else {
+ this.partList1 = this.partListAll.filter(x => {
+ return this.partList2.every(y => y.partNo !== x.partNo)
+ })
+ }
+
+ // getPartListBy(this.partData).then(({data}) => {
+ // if (data && data.code === 0) {
+ // this.partList1 = data.rows
+ // } else {
+ // this.$alert(data.msg, '错误', {
+ // confirmButtonText: '确定'
+ // })
+ // }
+ // })
+ },
+
+ // 可选物料
+ partClickRow1 (row) {
+ this.$refs.partTable1.toggleRowSelection(row)
+ },
+ // 已有物料
+ partClickRow2 (row) {
+ this.$refs.partTable2.toggleRowSelection(row)
+ },
+ selectionPart1 (val) {
+ this.partSelections1 = val
+ },
+ selectionPart2 (val) {
+ this.partSelections2 = val
+ },
+
+ // 添加物料
+ addPart () {
+ if (this.partSelections1 == null || this.partSelections1.length === 0) {
+ this.$message.warning('请选择可选物料!')
+ return
+ }
+ this.partSelections1.forEach(item => {
+ item.customerPartNo = ''
+ this.partList2.push(item)
+ let index = this.partList1.findIndex(x => {
+ if (x.partNo === item.partNo) {
+ return true;
+ }
+ })
+ this.partList1.splice(index, 1)
+ })
+
+ // for (let i = 0; i < this.partSelections1.length; i++) {
+ // this.partSelections1[i].customerPartNo = ''
+ // this.partList2.push(this.partSelections1[i])
+ // let index = this.partList1.findIndex(item => {
+ // if (item.partNo === this.partSelections1[i].partNo) {
+ // return true;
+ // }
+ // })
+ // this.partList1.splice(index, 1)
+ // }
+
+ // let inData = {
+ // site: this.$store.state.user.site,
+ // customerNo: this.searchData.customerId,
+ // projectId: this.searchData.projectId,
+ // createBy: this.$store.state.user.name,
+ // partList: this.partSelections1
+ // }
+ // addProjectPart(inData).then(({data}) => {
+ // if (data && data.code === 0) {
+ // this.partList1 = data.rows.row1
+ // this.partList2 = data.rows.row2
+ // this.partSelections1 = []
+ // } else {
+ // this.$alert(data.msg, '错误', {
+ // confirmButtonText: '确定'
+ // })
+ // }
+ // })
+ },
+ // 删除物料
+ deletePart () {
+ if(this.partSelections2 == null || this.partSelections2.length === 0){
+ this.$message.warning('请选择已选物料!')
+ return
+ }
+ this.partSelections2.forEach(item => {
+ this.partList1.push(item)
+ let index = this.partList2.findIndex(x => {
+ if (x.partNo === item.partNo) {
+ return true;
+ }
+ })
+ this.partList2.splice(index, 1)
+ })
+
+
+ // for (let i = 0; i < this.partSelections2.length; i++) {
+ // this.partList1.push(this.partSelections2[i])
+ // let index = this.partList2.findIndex(item => {
+ // if (item.partNo === this.partSelections2[i].partNo) {
+ // return true
+ // }
+ // })
+ // this.partList2.splice(index, 1)
+ // }
+
+ // let inData = {
+ // site: this.$store.state.user.site,
+ // projectId: this.searchData.projectId,
+ // partList: this.partSelections2
+ // }
+ // deleteProjectPart(inData).then(({data}) => {
+ // if (data && data.code === 0) {
+ // this.partList1 = data.rows.row1
+ // this.partList2 = data.rows.row2
+ // this.partSelections2 = []
+ // } else {
+ // this.$alert(data.msg, '错误', {
+ // confirmButtonText: '确定'
+ // })
+ // }
+ // })
+ },
+
+ /**
+ * 新增项目物料
+ */
+ saveProjectPartModal () {
+ if (this.partList2.every(x => x.customerPartNo == null || x.customerPartNo === '')) {
+ this.$message.warning('客户料号不能为空!')
+ return
+ }
+ let tempData = {
+ projectId: this.searchData.projectId,
+ customerNo: this.searchData.customerId,
+ createBy: this.$store.state.user.name,
+ partList: this.partList2
+ }
+ addProjectPart2(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.searchTable()
+ this.partModelFlag = false
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ },
+
+ // 制造提前期内容改变事件
+ changeExpectedLeadTime () {
+ this.modalData.expectedLeadTime = this.modalData.manufacturingLeadTime
+ },
+
+ deleteData (row) {
this.$confirm('确定要删除这条数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@@ -1426,19 +2202,22 @@
}).catch(() => {
})
},
- itemModal(row){
+
+ itemModal (row) {
this.itemModalData.site=row.site
this.itemModalData.partNo=row.testPartNo
this.searchItemList();
this.partItemModelFlag=true;
},
-// 属性模板
- searchItemList(){
+
+ // 属性模板
+ searchItemList () {
getItemModal(this.itemModalData).then(({data}) => {
this.itemModalList = data.rows
})
},
- itemSaveData(){
+
+ itemSaveData () {
if(this.itemData.partNo==''||this.itemData.partNo==null){
this.$alert('未选择物料!', '错误', {
confirmButtonText: '确定'
@@ -1470,8 +2249,9 @@
}
})
},
- updateItemModal(row){
- this.itemData={
+
+ updateItemModal (row) {
+ this.itemData = {
id:1,
site:row.site,
partNo:row.partNo,
@@ -1480,15 +2260,15 @@
textValue:row.textValue,
numValue:row.numValue,
}
- this.availableValueList=row.availableValueList
- if(row.valueChooseFlag=='Y'){
- this.itemChooseFlag=true;
- }else {
- this.itemChooseFlag=false;
+ this.availableValueList = row.availableValueList
+ if (row.valueChooseFlag=='Y') {
+ this.itemChooseFlag = true;
+ } else {
+ this.itemChooseFlag = false;
}
this.itemTextDisableFlag=true
this.itemNumberDisableFlag=true
- if(row.valueTypeDb!="T"){
+ if (row.valueTypeDb!="T") {
this.itemNumberDisableFlag=false
}else {
this.itemTextDisableFlag=false
@@ -1496,6 +2276,7 @@
this.itemModalDisableFlag=true
this.itemModalFlag=true;
},
+
changeItemDisable(){
let inData={
itemNo:this.itemData.itemNo
@@ -1609,24 +2390,6 @@
})
},
- // 复制物料的模态框
- toCopyPartModal () {
- this.copyPartData = {
- site: this.modalData.site,
- partNo: this.modalData.partNo,
- partDesc: this.modalData.partDesc,
- copyGeneral: 'Y',
- copyCosts: '',
- copyPlanningData: '',
- copyManufacturing: '',
- copyDefaultLocation: '',
- copyRevision: '',
- previousVersion: this.modalData,
- createBy: this.$store.state.user.name
- }
- this.copyPartModelFlag = true
- },
-
// 临时物料转为正式物料
toBecomeOfficialPart () {
toBecomeOfficialPart(this.modalData).then(({data}) => {
@@ -1657,6 +2420,132 @@
}
},
+ // 查询物料的bom版本列表
+ queryPartRevisionList () {
+ let tempData = {
+ site: this.modalData.site,
+ partNo: this.modalData.partNo
+ }
+ queryPartRevisionList(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.revisionList = data.rows
+ } else {
+ this.revisionList = []
+ }
+ })
+ },
+
+ // 新增revision模态框
+ savePartRevisionModal () {
+ this.revisionData = {
+ flag: '1',
+ site: this.modalData.site,
+ partNo: this.modalData.partNo,
+ engChgLevel: '',
+ effPhaseInDate: '',
+ effPhaseOutDate: '',
+ revisionText: '',
+ productStatus: 'Not In Effect',
+ repairStatus: 'Not In Effect',
+ engRevision: '',
+ createBy: this.$store.state.user.name,
+ }
+ this.updateRevisionModelFlag = true
+ this.updateRevisionModelDisableFlag = false
+ },
+
+ // 编辑bom版本模态框
+ updateRevisionModal (row) {
+ this.revisionData = {
+ flag: '2',
+ site: row.site,
+ partNo: row.partNo,
+ engChgLevel: row.engChgLevel,
+ effPhaseInDate: row.effPhaseInDate,
+ effPhaseOutDate: row.effPhaseOutDate,
+ revisionText: row.revisionText,
+ productStatus: row.productStatus,
+ repairStatus: row.repairStatus,
+ engRevision: row.engRevision,
+ updateBy: this.$store.state.user.name,
+ }
+ this.updateRevisionModelFlag = true
+ this.updateRevisionModelDisableFlag = true
+ },
+
+ // 新增/编辑bom版本
+ updateRevision () {
+ if (this.revisionData.engChgLevel === '' || this.revisionData.engChgLevel == null) {
+ this.$message.warning('请填写版本号(Revision)!')
+ return
+ }
+ if (this.revisionData.effPhaseInDate === '' || this.revisionData.effPhaseInDate == null) {
+ this.$message.warning('请选择生效日期(Phase In)!')
+ return
+ }
+ if (this.revisionData.flag === '1') {
+ saveRevision(this.revisionData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.queryPartRevisionList()
+ this.updateRevisionModelFlag = false
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {}
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ } else {
+ updateRevision(this.revisionData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.queryPartRevisionList()
+ this.updateRevisionModelFlag = false
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {}
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ }
+ },
+
+ // 删除物料revision
+ deleteRevisionModal (row) {
+ this.$confirm(`是否删除该版本?`, '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ deleteRevision(row).then(({data}) => {
+ if (data && data.code === 0) {
+ this.queryPartRevisionList()
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {}
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ }).catch(() => {
+ })
+ },
+
// ======= 正则校验 =======
handleInput (value, type) {
// 大于等于0,且只能输入4位小数
diff --git a/src/views/modules/project/projectInfo/projectInfo.vue b/src/views/modules/project/projectInfo/projectInfo.vue
index 3cfa987..7a2a555 100644
--- a/src/views/modules/project/projectInfo/projectInfo.vue
+++ b/src/views/modules/project/projectInfo/projectInfo.vue
@@ -344,7 +344,7 @@
-
+
@@ -353,16 +353,55 @@
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
{{ scope.row[item.columnProp] }}
+
![]()
+
+
+
{{ scope.row[item.columnProp] }}
+
![]()
+
+
+
+
+
+
+
+
+
@@ -496,6 +535,9 @@
deleteContact,
queryCustomerContact
} from "@/api/project/project.js"
+ import {
+ getChangeRecordByPartNo, // 查询变更记录
+ } from '@/api/part/partInformation.js'
import projectUploadFile from "./com_project_upload_file";/*上传文件的組件*/
import projectPart from "./com_project_info_part.vue";/*組件*/
import projectQuotation from "./com_project_puotation";/*組件*/
@@ -1175,6 +1217,119 @@
contactId: '',
contactName: '',
},
+ changeRecordList: [],
+ columnChangeRecord: [
+ {
+ columnProp: 'changeNo',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: '申请编号',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 120
+ },
+ {
+ columnProp: 'applicantName',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: '申请人',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 120
+ },
+ {
+ columnProp: 'applicationDepartmentName',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: '申请部门',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 120
+ },
+ {
+ columnProp: 'changeStatus',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: '变更单状态',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 100
+ },
+ {
+ columnProp: 'ecnStage',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: 'ECN阶段',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 100
+ },
+ {
+ columnProp: 'changeType',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: '变更类别',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 100
+ },
+ {
+ columnProp: 'ecnType',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: 'ECN种类',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 100
+ },
+ {
+ columnProp: 'applyDate',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: '申请日期',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 100
+ },
+ {
+ columnProp: 'changePhaseInDate',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: '变更生效日期',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 100
+ },
+ {
+ columnProp: 'xxx',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: 'ECN执行日期',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 100
+ }
+ ]
}
},
mounted() {
@@ -1411,12 +1566,32 @@
if (this.activeName == 'technicalSpecification') {
this.refreshTechnicalSpecificationTable();
}
+ if (this.activeName === 'changeRecord') {
+ this.getChangeRecordList()
+ }
+ },
+
+ // 获取变更记录
+ getChangeRecordList () {
+ let tempData = {
+ site: this.$store.state.user.site,
+ projectId: this.currentRow.projectId
+ }
+ getChangeRecordByPartNo(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.changeRecordList = data.rows
+ } else {
+ this.changeRecordList = []
+ }
+ })
},
+
refreshPartTable(){
- let inData={
+ let inData = {
site: this.currentRow.site,
projectId: this.currentRow.projectId,
- username:this.$store.state.user.name
+ username: this.$store.state.user.name,
+ customerId: this.currentRow.customerId
}
this.$refs.projectPart.init(inData)
},
@@ -1828,11 +2003,9 @@
})
}
})
-
},
checkField(){
-
if(!this.accessField('10202001')){
this.columnList1=this.columnList1.filter(item => item.columnProp !== 'customerId');
this.columnList1=this.columnList1.filter(item => item.columnProp !== 'customerName');
@@ -1840,8 +2013,16 @@
if(!this.accessField('10202002')){
this.columnList1=this.columnList1.filter(item => item.columnProp !== 'projectSource');
}
-
},
+
+ toChangeMenu(changeNo){
+ if (this.$router.resolve(`/changeManagement-changeRecord`).resolved.name === '404'){
+ this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',});
+ }else {
+ this.$router.push({name:`changeManagement-changeRecord`,params:{changeNo:changeNo},})
+ }
+ }
+
},
activated() {
if (this.$route.params.projectId){
@@ -1854,6 +2035,8 @@