Browse Source

2024-04-19 物料相关更新

master
fengyuan_yang 2 years ago
parent
commit
fa5e1c6a73
  1. 54
      src/api/part/partInformation.js
  2. 144
      src/views/modules/changeManagement/changeRecord.vue
  3. 141
      src/views/modules/changeManagement/changeRequest.vue
  4. 2
      src/views/modules/customer/customerInformationManagement.vue
  5. 198
      src/views/modules/part/partCatalogInformation.vue
  6. 628
      src/views/modules/part/partInformation.vue
  7. 1213
      src/views/modules/project/projectInfo/com_project_info_part.vue
  8. 203
      src/views/modules/project/projectInfo/projectInfo.vue
  9. 4
      src/views/modules/quotation/priceCheckProperties.vue
  10. 6
      src/views/modules/test/testAttribute/testProperties.vue

54
src/api/part/partInformation.js

@ -232,3 +232,57 @@ export const copyPart = data => createAPI(`/plm/partInformation/copyPart`,'post'
* 物料信息新增(项目物料)
*/
export const partInformationSave2 = data => createAPI(`/plm/partInformation/partInformationSave2`,'post',data)
/**
* 获取项目物料编码
*/
export const getProjectPartNo = data => createAPI(`/plm/partInformation/getProjectPartNo`,'post',data)
/**
* 获取当前行项目物料对象
*/
export const getProjectPartRow = data => createAPI(`/plm/partInformation/getProjectPartRow`,'post',data)
/**
* 获取当前行项目物料对象
*/
export const getProjectPartRow2 = data => createAPI(`/plm/partInformation/getProjectPartRow2`,'post',data)
/**
* 获取当前行项目物料对象
*/
export const getProjectPartList = data => createAPI(`/plm/partInformation/getProjectPartList`,'post',data)
/**
* 新增项目物料
*/
export const addProjectPart = data => createAPI(`/plm/partInformation/addProjectPart`,'post',data)
/**
* 删除项目物料
*/
export const deleteProjectPart = data => createAPI(`/plm/partInformation/deleteProjectPart`,'post',data)
/**
* 新增项目物料
*/
export const addProjectPart2 = data => createAPI(`/plm/partInformation/addProjectPart2`,'post',data)
/**
* 查询变更记录
*/
export const getChangeRecordByPartNo = data => createAPI(`/plm/partInformation/getChangeRecordByPartNo`,'post',data)
/**
* 查询变更记录
*/
export const getBomAndRoutingList = data => createAPI(`/plm/partInformation/getBomAndRoutingList`,'post',data)
/**
* 转正式物料
*/
export const partInformationToOfficial = data => createAPI(`/plm/partInformation/partInformationToOfficial`,'post',data)

144
src/views/modules/changeManagement/changeRecord.vue

@ -7,7 +7,7 @@
<el-input v-model="searchData.changeNo" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<el-button @click="getDataList()">查询</el-button>
<el-button @click="getDataList">查询</el-button>
<download-excel
:fields="fields()"
:data="exportData"
@ -58,6 +58,7 @@
label="操作">
<template slot-scope="scope">
<el-link style="cursor: pointer" @click="updateModal(scope.row)">编辑</el-link>
<el-link style="cursor: pointer" @click="issueModal(scope.row)">下达</el-link>
</template>
</el-table-column>
</el-table>
@ -121,8 +122,8 @@
<el-button type="primary" @click="chooseEcnTypeModal" style="width: 90px">ECN种类</el-button>
</el-form-item>
<el-form-item prop="tpEngineerId" :rules="rules.tpEngineerId">
<span style="cursor: pointer" slot="label" @click="getBaseList(103,2)"><a href="#">审批人员</a></span>
<el-input v-model="modalData.tpEngineerId" style="width: 120px"></el-input>
<span style="cursor: pointer" slot="label" @click="getBaseList(2005)"><a href="#">审批人员</a></span>
<el-input v-model="modalData.tpEngineerId" clearable style="width: 120px"></el-input>
<el-input v-model="modalData.tpEngineerName" disabled style="width: 300px"></el-input>
</el-form-item>
</el-form>
@ -144,14 +145,26 @@
<dict-data-select v-model="modalData.dfIsProduct" style="width: 205px" dict-type="change_df_is_product"></dict-data-select>
</el-form-item>
<el-form-item label=" " prop="industrialEngineerId" :rules="[{required: modalData.dfIsProduct === 'Y',message: ' ',trigger: ['blur','change']}]">
<span style="cursor: pointer" slot="label" @click="getBaseList(103,6)"><a href="#">I/E</a></span>
<el-input v-model="modalData.industrialEngineerId" style="width: 120px"></el-input>
<span style="cursor: pointer" slot="label" @click="getBaseList(2006)"><a href="#">I/E</a></span>
<el-input v-model="modalData.industrialEngineerId" clearable style="width: 120px"></el-input>
<el-input v-model="modalData.industrialEngineerName" disabled style="width: 300px"></el-input>
</el-form-item>
<!-- <el-form-item label="制造成本是否变更" prop="manufacturingCostIsChange" :rules="rules.manufacturingCostIsChange">-->
<!-- <dict-data-select v-model="modalData.manufacturingCostIsChange" style="width: 205px" dict-type="change_manufacturing_cost_is_change"></dict-data-select>-->
<!-- </el-form-item>-->
</el-form>
<el-form :inline="true" label-position="top" :model="modalData">
<el-form-item label=" ">
<span style="cursor: pointer" slot="label" @click="getBaseList(2007)"><a href="#">CQC</a></span>
<el-input v-model="modalData.cqcOperatorId" clearable style="width: 120px"></el-input>
<el-input v-model="modalData.cqcOperatorName" disabled style="width: 300px"></el-input>
</el-form-item>
<el-form-item label=" ">
<span style="cursor: pointer" slot="label" @click="getBaseList(2008)"><a href="#">FAI</a></span>
<el-input v-model="modalData.faiOperatorId" clearable style="width: 120px"></el-input>
<el-input v-model="modalData.faiOperatorName" disabled style="width: 300px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
<el-form-item label="变更要求描述" prop="changeRequestDesc" :rules="rules.changeRequestDesc">
<el-input type="textarea" v-model="modalData.changeRequestDesc" :rows="3" resize='none' show-word-limit style="width: 643px;height: 30px"></el-input>
@ -183,7 +196,7 @@
<div class="rq">
<el-table
:data="chooseDataList"
height="385px"
height="348px"
border
style="width:100%">
<el-table-column
@ -341,7 +354,7 @@
</el-tab-pane>
<el-tab-pane label="TP&执行信息" name="actionInformation">
<div style="height: 675px">
<div style="height: 670px">
<div class="rq">
<el-table
:data="chooseItemList2"
@ -491,7 +504,7 @@
</el-tab-pane>
<el-tab-pane label="会签信息" name="countersignature">
<div style="height: 675px">
<div style="height: 670px">
<div class="rq">
<el-table
:data="chooseCSItemList"
@ -843,6 +856,26 @@
}
}
},
watch: {
modalData: {
deep: true,
handler: function (newV, oldV) {
if (this.modalData.tpEngineerId === '' || this.modalData.tpEngineerId == null) {
this.modalData.tpEngineerName = ''
}
if (this.modalData.industrialEngineerId === '' || this.modalData.industrialEngineerId == null) {
this.modalData.industrialEngineerName = ''
}
if (this.modalData.cqcOperatorId === '' || this.modalData.cqcOperatorId == null) {
this.modalData.cqcOperatorName = ''
}
if (this.modalData.faiOperatorId === '' || this.modalData.faiOperatorId == null) {
this.modalData.faiOperatorName = ''
}
}
},
},
data () {
return {
//
@ -901,7 +934,11 @@
ecnTypeData: [],
industrialEngineerId: '',
industrialEngineerName: '',
changeStatus: ''
changeStatus: '',
cqcOperatorId: '',
cqcOperatorName: '',
faiOperatorId: '',
faiOperatorName: ''
},
costImpactData: {
site: this.$store.state.user.site,
@ -1024,6 +1061,22 @@
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 108002,
serialNumber: '108002Table1ChangeStatus',
tableId: '108002Table1',
tableName: '工程变更记录表',
columnProp: 'changeStatus',
headerAlign: 'center',
align: 'center',
columnLabel: '变更单状态',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 108002,
@ -1621,9 +1674,14 @@
})
},
created () {
activated () {
if (this.$route.params.changeNo) {
this.searchData.changeNo = this.$route.params.changeNo
}
this.getDataList()
},
created () {
this.getEcnModel()
},
@ -2014,7 +2072,11 @@
ecnTypeData: [],
industrialEngineerId: row.industrialEngineerId,
industrialEngineerName: row.industrialEngineerName,
changeStatus: row.changeStatus
changeStatus: row.changeStatus,
cqcOperatorId: row.cqcOperatorId,
cqcOperatorName: row.cqcOperatorName,
faiOperatorId: row.faiOperatorId,
faiOperatorName: row.faiOperatorName
}
this.changeTitle = '变更申请-' + this.modalData.changeNo
// ECN
@ -2032,6 +2094,11 @@
this.modalDisableFlag = true
},
//
issueModal (row) {
},
// ECN
getChangeChooseEcnType () {
getChooseEcnType(this.modalData).then(({data}) => {
@ -2215,6 +2282,14 @@
this.$message.warning('请选择印刷方式!')
return
}
if ((this.modalData.cqcOperatorId === '' || this.modalData.cqcOperatorId == null) && (this.modalData.faiOperatorId === '' || this.modalData.faiOperatorId == null)) {
this.$message.warning('请选择CQC或者FAI人员!')
return
}
if (this.modalData.cqcOperatorId !== '' && this.modalData.cqcOperatorId != null && this.modalData.faiOperatorId !== '' && this.modalData.faiOperatorId != null) {
this.$message.warning('CQC和FAI人员只能选一个!')
return
}
this.modalData.detailList = this.chooseDataList
this.modalData.ecnTypeData = this.form
changeRequestUpdate(this.modalData).then(({data}) => {
@ -2421,11 +2496,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
@ -2444,8 +2518,6 @@
} else {
strVal = this.costImpactData.affectedExecutor
}
} else if (type === 6) {
strVal = this.modalData.industrialEngineerId
} else if (type === 7) {
strVal = this.tempExecutorRow.executor
}
@ -2453,7 +2525,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)
})
},
@ -2464,9 +2552,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
@ -2479,9 +2564,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)
}
@ -2490,6 +2572,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
}
},
// ======== ========

141
src/views/modules/changeManagement/changeRequest.vue

@ -137,8 +137,8 @@
<el-button type="primary" @click="chooseEcnTypeModal" style="width: 90px">ECN种类</el-button>
</el-form-item>
<el-form-item prop="tpEngineerId" :rules="rules.tpEngineerId">
<span style="cursor: pointer" slot="label" @click="getBaseList(103,2)"><a href="#">审批人员</a></span>
<el-input v-model="modalData.tpEngineerId" style="width: 120px"></el-input>
<span style="cursor: pointer" slot="label" @click="getBaseList(2005)"><a href="#">审批人员</a></span>
<el-input v-model="modalData.tpEngineerId" clearable style="width: 120px"></el-input>
<el-input v-model="modalData.tpEngineerName" disabled style="width: 300px"></el-input>
</el-form-item>
</el-form>
@ -160,14 +160,26 @@
<dict-data-select v-if="modalFlag" v-model="modalData.dfIsProduct" style="width: 205px" dict-type="change_df_is_product"></dict-data-select>
</el-form-item>
<el-form-item label=" " prop="industrialEngineerId" :rules="[{required: modalData.dfIsProduct === 'Y',message: ' ',trigger: ['blur','change']}]">
<span style="cursor: pointer" slot="label" @click="getBaseList(103,6)"><a href="#">I/E</a></span>
<el-input v-model="modalData.industrialEngineerId" style="width: 120px"></el-input>
<span style="cursor: pointer" slot="label" @click="getBaseList(2006)"><a href="#">I/E</a></span>
<el-input v-model="modalData.industrialEngineerId" clearable style="width: 120px"></el-input>
<el-input v-model="modalData.industrialEngineerName" disabled style="width: 300px"></el-input>
</el-form-item>
<!-- <el-form-item label="制造成本是否变更" prop="manufacturingCostIsChange" :rules="rules.manufacturingCostIsChange">-->
<!-- <dict-data-select v-model="modalData.manufacturingCostIsChange" style="width: 205px" dict-type="change_manufacturing_cost_is_change"></dict-data-select>-->
<!-- </el-form-item>-->
</el-form>
<el-form :inline="true" label-position="top" :model="modalData">
<el-form-item label=" ">
<span style="cursor: pointer" slot="label" @click="getBaseList(2007)"><a href="#">CQC</a></span>
<el-input v-model="modalData.cqcOperatorId" clearable style="width: 120px"></el-input>
<el-input v-model="modalData.cqcOperatorName" disabled style="width: 300px"></el-input>
</el-form-item>
<el-form-item label=" ">
<span style="cursor: pointer" slot="label" @click="getBaseList(2008)"><a href="#">FAI</a></span>
<el-input v-model="modalData.faiOperatorId" clearable style="width: 120px"></el-input>
<el-input v-model="modalData.faiOperatorName" disabled style="width: 300px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
<el-form-item label="变更要求描述" prop="changeRequestDesc" :rules="rules.changeRequestDesc">
<el-input type="textarea" v-model="modalData.changeRequestDesc" :rows="3" resize='none' show-word-limit style="width: 643px;height: 30px"></el-input>
@ -201,7 +213,7 @@
<div class="rq">
<el-table
:data="chooseDataList"
height="385px"
height="348px"
border
style="width:100%">
<el-table-column
@ -359,7 +371,7 @@
</el-tab-pane>
<el-tab-pane label="TP&执行信息" name="actionInformation">
<div style="height: 675px">
<div style="height: 670px">
<el-button type="primary" @click="chooseFeasibilityAssessmentModel">选择评估模板</el-button>
<div class="rq">
<el-table
@ -510,7 +522,7 @@
</el-tab-pane>
<el-tab-pane label="会签信息" name="countersignature">
<div style="height: 675px">
<div style="height: 670px">
<el-button type="primary" @click="chooseCSModel">选择会签模板</el-button>
<div class="rq">
<el-table
@ -810,6 +822,26 @@
ChooseList
},
watch: {
modalData: {
deep: true,
handler: function (newV, oldV) {
if (this.modalData.tpEngineerId === '' || this.modalData.tpEngineerId == null) {
this.modalData.tpEngineerName = ''
}
if (this.modalData.industrialEngineerId === '' || this.modalData.industrialEngineerId == null) {
this.modalData.industrialEngineerName = ''
}
if (this.modalData.cqcOperatorId === '' || this.modalData.cqcOperatorId == null) {
this.modalData.cqcOperatorName = ''
}
if (this.modalData.faiOperatorId === '' || this.modalData.faiOperatorId == null) {
this.modalData.faiOperatorName = ''
}
}
},
},
data() {
return {
uploadDialog: false,
@ -874,7 +906,11 @@
industrialEngineerId: '',
industrialEngineerName: '',
changeStatus: '',
ecnType: ''
ecnType: '',
cqcOperatorId: '',
cqcOperatorName: '',
faiOperatorId: '',
faiOperatorName: ''
},
costImpactData: {
site: this.$store.state.user.site,
@ -1872,7 +1908,11 @@
industrialEngineerId: '',
industrialEngineerName: '',
changeStatus: '草稿',
ecnType: ''
ecnType: '',
cqcOperatorId: '',
cqcOperatorName: '',
faiOperatorId: '',
faiOperatorName: ''
}
this.changeTitle = '变更申请-' + this.modalData.changeNo
this.costImpactData = {
@ -2025,29 +2065,39 @@
this.$message.warning('请选择印刷方式!')
return
}
if ((this.modalData.cqcOperatorId === '' || this.modalData.cqcOperatorId == null) && (this.modalData.faiOperatorId === '' || this.modalData.faiOperatorId == null)) {
this.$message.warning('请选择CQC或者FAI人员!')
return
}
if (this.modalData.cqcOperatorId !== '' && this.modalData.cqcOperatorId != null && this.modalData.faiOperatorId !== '' && this.modalData.faiOperatorId != null) {
this.$message.warning('CQC和FAI人员只能选一个!')
return
}
this.modalData.detailList = this.chooseDataList
this.modalData.ecnTypeData = this.form
this.fileData.orderRef1 = this.modalData.site
this.fileData.orderRef2 = this.modalData.changeNo
this.fileData.fileRemark = this.$refs.changeRef.fileRemark
this.fileData.folder = 'change'
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])
}
changeRequestSave(this.modalData).then(({data}) => {
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
}
},
// ======== ========

2
src/views/modules/customer/customerInformationManagement.vue

@ -20,7 +20,7 @@
<el-button type="primary" @click="addModal">新增</el-button>
<el-button type="primary" @click="delModal">删除</el-button>
<download-excel
:fields="fields"
:fields="fields()"
:data="exportData"
type="xls"
:name="exportName"

198
src/views/modules/part/partCatalogInformation.vue

@ -179,29 +179,76 @@
<el-tab-pane label="物料属性" name="part_item">
<el-form label-position="top" style="margin-top: 2px; margin-left: 2px;">
<el-button type="primary" @click="addOrDelItem">新增</el-button>
<el-button type="primary" @click="updateItemValue">编辑</el-button>
<!-- <el-button type="primary" @click="updateItemValue">编辑</el-button>-->
<el-button type="primary" :loading="loading" @click="clickSave">{{ attributeDialog?'编辑':'保存' }}</el-button>
</el-form>
<el-table
:data="partItemList"
:height="secondHeight - 60"
border
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnItemList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
<div class="rq" v-if="attributeDialog">
<el-table
:data="partItemList"
:height="secondHeight - 60"
border
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnItemList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<div v-if="item.columnProp !== 'textValue' && item.columnProp !== 'numValue'">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</div>
<div v-else>
{{scope.row.textValue?scope.row.textValue:scope.row.numValue}}
</div>
</template>
</el-table-column>
</el-table>
</div>
<div class="rq" v-else>
<el-table
:data="copyAttributeList"
:height="secondHeight - 60"
border
style="width: 100%">
<el-table-column
v-for="(item,index) in columnItemList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed===''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<div v-if="item.columnProp !== 'textValue' && item.columnProp !== 'numValue'">
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</div>
<div v-else>
<div v-if="scope.row.valueChooseFlag !== 'Y'">
<el-input-number v-model="scope.row.numValue" style="padding: 0;width: 100%" v-if="scope.row.valueTypeDb === 'N'" :controls="false"></el-input-number>
<el-input v-model="scope.row.textValue" v-else></el-input>
</div>
<div v-else>
<el-select style="width: 100%;" v-if="scope.row.valueTypeDb === 'T'" v-model="scope.row.textValue">
<el-option :value="i.availableValue" :label="i.availableValue" v-for="(i,key) in scope.row.list" :key="key"></el-option>
</el-select>
<el-select style="width: 100%;" v-else v-model="scope.row.numValue">
<el-option :value="i.availableValue" :label="i.availableValue" v-for="(i,key) in scope.row.list" :key="key"></el-option>
</el-select>
</div>
</div>
</template>
</el-table-column>
</el-table>
</div>
</el-tab-pane>
</el-tabs>
@ -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 = ''

628
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%;">
<!-- <el-table-column-->
<!-- type="selection"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- :selectable="selectFlag"-->
<!-- width="50">-->
<!-- </el-table-column>-->
<el-table-column
v-for="(item,index) in columnList" :key="index"
:sortable="item.columnSortable"
@ -102,6 +94,7 @@
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="toMenu('BOM',scope.row)">BOM</el-dropdown-item>
<el-dropdown-item @click.native="toMenu('Routing',scope.row)">Routing</el-dropdown-item>
<el-dropdown-item v-if="scope.row.status !== 'Y'" @click.native="toBecomeOfficialPartModal(scope.row)">转正式物料</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
@ -122,7 +115,7 @@
</el-pagination>
<!-- 物料新增/编辑模态框 -->
<el-dialog :title="modalData.title" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="1000px">
<el-dialog :title="modalData.title" top="10vh" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="1000px">
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
<el-form-item label="物料编码" prop="partNo" :rules="rules.partNo">
<el-input v-model="modalData.partNo" clearable style="width: 128px" @blur="queryMasterField" :disabled="modalDisableFlag"></el-input>
@ -130,14 +123,17 @@
<el-form-item label="物料描述" prop="partDesc" :rules="rules.partDesc" style="margin-left: -10px">
<el-input v-model="modalData.partDesc" clearable style="width: 330px"></el-input>
</el-form-item>
<el-form-item v-if="modalDisableFlag" :label="' '">
<el-form-item v-if="modalData.flag === '2'" :label="' '">
<el-button type="primary" @click="toCopyPartModal">Copy</el-button>
</el-form-item>
<el-form-item v-if="modalDisableFlag && modalData.status !== 'Y'" :label="' '">
<el-button type="primary" @click="toBecomeOfficialPart">转正式物料</el-button>
<el-form-item v-if="modalData.flag === '3'" label="IFS物料编码" prop="ifsPartNo" :rules="[{required: true,message: ' ',trigger: ['blur','change']}]" style="margin-left: -10px">
<el-input v-model="modalData.ifsPartNo" clearable style="width: 330px"></el-input>
</el-form-item>
<!-- <el-form-item v-if="modalDisableFlag && modalData.status !== 'Y'" :label="' '">-->
<!-- <el-button type="primary" @click="toBecomeOfficialPart">转正式物料</el-button>-->
<!-- </el-form-item>-->
<el-tabs v-model="inventoryPartTable" style="width: 100%;height: 465px;" type="border-card" @tab-click="inventoryPartClick">
<el-tab-pane label="General">
<el-tab-pane label="General" name="General">
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
<el-form-item label="零件类型 / Part Type" prop="partType" :rules="rules.partType">
<el-select v-model="modalData.partType" style="width: 461px">
@ -239,7 +235,7 @@
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
<el-form-item prop="codeDesc" :rules="rules.codeDesc">
<el-form-item prop="codeNo" :rules="rules.codeNo">
<span style="cursor: pointer" slot="label" @click="getBaseList(20)"><a herf="#">属性模板</a></span>
<el-input v-model="modalData.codeNo" style="width: 128px"></el-input>
<el-input v-model="modalData.codeDesc" disabled style="width: 330px"></el-input>
@ -253,7 +249,7 @@
</el-form>
</el-tab-pane>
<el-tab-pane label="Acquisition">
<el-tab-pane label="Acquisition" name="Acquisition">
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
<el-form-item label="制造备货期 / Manufacturing Lead Time">
<el-input :disabled="!(modalData.partType === 'Manufactured' || modalData.partType === 'Manufactured Recipe')" class="inlineNumber numInput" v-model="modalData.manufacturingLeadTime" @input="handleInput(modalData.manufacturingLeadTime,17)" @change="changeExpectedLeadTime" type="number" style="width: 223px"></el-input>
@ -298,7 +294,7 @@
</el-form>
</el-tab-pane>
<el-tab-pane label="Costs">
<el-tab-pane label="Costs" name="Costs">
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
<el-form-item label="配置标识 / Configuration ID">
<el-select v-model="modalData.configurationId" style="width: 461px">
@ -313,7 +309,7 @@
</el-form>
</el-tab-pane>
<el-tab-pane label="Misc Part Info">
<el-tab-pane label="Misc Part Info" name="MiscPartInfo">
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
<el-form-item label="库存估价方法 / Inventory Valuation Method">
<el-select v-model="modalData.inventoryValuationMethod" style="width: 461px">
@ -360,7 +356,7 @@
</el-form>
</el-tab-pane>
<el-tab-pane label="Planning Data">
<el-tab-pane label="Planning Data" name="PlanningData">
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
<el-form-item>
<span style="cursor: pointer" slot="label" @click="getBaseList(132)"><a herf="#">计划方法 / Planning Method</a></span>
@ -397,7 +393,7 @@
</el-form>
</el-tab-pane>
<el-tab-pane label="Manufacturing">
<el-tab-pane label="Manufacturing" name="Manufacturing">
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
<el-form-item label="累计提前期 / Cum Lead Time">
<el-input class="inlineNumber numInput" v-model="modalData.cumLeadTime" @input="handleInput(modalData.cumLeadTime,9)" type="number" style="width: 296px"></el-input>
@ -504,9 +500,76 @@
</el-table>
</el-tab-pane>
</el-tabs>
<el-container v-if="modalData.flag === '3'">
<el-aside style="width: 485px">
<el-table
:data="bomAlternativeList"
height="200px"
border
ref="bomAlternativeTable"
@row-click="bomAlternativeClickRow"
@selection-change="selectionBomAlternative"
style="width:100%">
<el-table-column
type="selection"
header-align="center"
align="center"
width="50">
</el-table-column>
<el-table-column
v-for="(item,index) in columnBomAlternativeList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed == ''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
</el-aside>
<el-main style="padding: 0 0 0 0">
<el-table
:data="routingAlternativeList"
height="200px"
border
ref="routingAlternativeTable"
@row-click="routingAlternativeClickRow"
@selection-change="selectionRoutingAlternative"
style="width:100%">
<el-table-column
type="selection"
header-align="center"
align="center"
width="50">
</el-table-column>
<el-table-column
v-for="(item,index) in columnRoutingAlternativeList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed == ''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
</el-main>
</el-container>
</el-form>
<el-footer style="height:35px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="saveData()">保存</el-button>
<el-button v-if="modalData.flag === '3'" type="primary" @click="saveData()">投产</el-button>
<el-button v-else type="primary" @click="saveData()">保存</el-button>
<el-button type="primary" @click="modalFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
@ -517,45 +580,81 @@
<el-tab-pane label="物料属性" name="part_item">
<el-form label-position="top" style="margin-top: 2px; margin-left: 2px;">
<el-button type="primary" @click="addOrDelItem">新增</el-button>
<el-button type="primary" @click="updateItemValue">编辑</el-button>
<!-- <el-button type="primary" @click="updateItemValue">编辑</el-button>-->
<el-button type="primary" :loading="loading" @click="clickSave">{{ attributeDialog?'编辑':'保存' }}</el-button>
</el-form>
<el-table
:data="partItemList"
:height="secondHeight - 60"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnItemList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<!-- <el-table-column-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="150"-->
<!-- fixed="right"-->
<!-- label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <a type="text" size="small" @click="deleteItemModal(scope.row)">删除</a>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<div class="rq " v-if="attributeDialog">
<el-table
:data="partItemList"
:height="secondHeight - 60"
border
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnItemList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<div v-if="item.columnProp !== 'textValue' && item.columnProp !== 'numValue'">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</div>
<div v-else>
{{scope.row.textValue?scope.row.textValue:scope.row.numValue}}
</div>
</template>
</el-table-column>
</el-table>
</div>
<div class="rq " v-else>
<el-table
:data="copyAttributeList"
:height="secondHeight - 60"
border
style="width: 100%">
<el-table-column
v-for="(item,index) in columnItemList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed===''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<div v-if="item.columnProp !== 'textValue' && item.columnProp !== 'numValue'">
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</div>
<div v-else>
<div v-if="scope.row.valueChooseFlag !== 'Y'">
<el-input-number v-model="scope.row.numValue" style="padding: 0;width: 100%" v-if="scope.row.valueTypeDb === 'N'" :controls="false"></el-input-number>
<el-input v-model="scope.row.textValue" v-else></el-input>
</div>
<div v-else>
<el-select style="width: 100%;" v-if="scope.row.valueTypeDb === 'T'" v-model="scope.row.textValue">
<el-option :value="i.availableValue" :label="i.availableValue" v-for="(i,key) in scope.row.list" :key="key"></el-option>
</el-select>
<el-select style="width: 100%;" v-else v-model="scope.row.numValue">
<el-option :value="i.availableValue" :label="i.availableValue" v-for="(i,key) in scope.row.list" :key="key"></el-option>
</el-select>
</div>
</div>
</template>
</el-table-column>
</el-table>
</div>
</el-tab-pane>
<!-- 代理商页签 -->
<el-tab-pane label="代理商" name="part_agent">
<el-form label-position="top" style="margin-top: 2px; margin-left: 2px;">
<el-button type="primary" @click="savePartAgent()">新增</el-button>
<el-button type="primary" @click="savePartAgent">新增</el-button>
</el-form>
<el-table
:data="partAgentList"
@ -672,7 +771,6 @@
:data="fileContentList"
:height="secondHeight - 60"
border
v-loading="dataListLoading"
style="width: 100%; ">
<el-table-column
v-for="(item,index) in columnFileList" :key="index"
@ -734,11 +832,11 @@
min-width="80"
label="文本值">
<template slot-scope="scope">
<el-input v-if="scope.row.valueTypeDb === 'T' && scope.row.valueChooseFlag === 'N'" v-model="scope.row.textValue" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
<el-input v-if="scope.row.valueTypeDb === 'T' && scope.row.valueChooseFlag === 'N'" v-model="scope.row.textValue" style="height: 11px;width:98%"></el-input>
<el-select v-if="scope.row.valueTypeDb === 'T' && scope.row.valueChooseFlag === 'Y'" v-model="scope.row.textValue" style="width: 180px" placeholder="请选择">
<el-option v-for="item in scope.row.availableValueList" :key="index" :label="item.availableValue" :value="item.availableValue"></el-option>
</el-select>
<el-input v-if="scope.row.valueTypeDb !== 'T'" v-model="scope.row.textValue" disabled style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
<el-input v-if="scope.row.valueTypeDb !== 'T'" v-model="scope.row.textValue" disabled style="height: 11px;width:98%"></el-input>
</template>
</el-table-column>
<el-table-column
@ -1156,16 +1254,16 @@
</el-dialog>
<el-dialog title="Revision" :close-on-click-modal="false" v-drag :visible.sync="updateRevisionModelFlag" width="430px">
<el-form :inline="true" label-position="top" :model="revisionData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="Revision">
<el-input v-model="revisionData.engChgLevel" :disabled="updateRevisionModelDisableFlag" style="width: 185px"></el-input>
<el-form :inline="true" label-position="top" :model="revisionData" :rules="revisionRules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="Revision" prop="engChgLevel" :rules="revisionRules.engChgLevel">
<el-input class="inlineNumber numInput" v-model="revisionData.engChgLevel" :disabled="updateRevisionModelDisableFlag" type="number" style="width: 185px"></el-input>
</el-form-item>
<el-form-item label="Eng Rev">
<el-input v-model="revisionData.engRevision" style="width: 185px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="revisionData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="Phase In">
<el-form-item label="Phase In" prop="effPhaseInDate" :rules="revisionRules.effPhaseInDate">
<el-date-picker style="width: 185px" v-model="revisionData.effPhaseInDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
</el-form-item>
<el-form-item label="Phase Out">
@ -1285,7 +1383,9 @@
saveRevision, //
updateRevision, //
deleteRevision, //
copyPart //
copyPart, //
getBomAndRoutingList, // bomrouting
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: ''
}
// BOMrouting
this.getBomAndRoutingList()
this.inventoryPartTable = 'General'
this.modalDisableFlag = true
this.modalFlag = true
},
// BOMrouting
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) {

1213
src/views/modules/project/projectInfo/com_project_info_part.vue
File diff suppressed because it is too large
View File

203
src/views/modules/project/projectInfo/projectInfo.vue

@ -344,7 +344,7 @@
</el-table>
</el-tab-pane>
<el-tab-pane label="项目物料" name="part">
<projectPart ref="projectPart" ></projectPart>
<projectPart ref="projectPart"></projectPart>
</el-tab-pane>
<el-tab-pane label="询价信息" name="quotation">
<projectQuotation ref="projectQuotation" ></projectQuotation>
@ -353,16 +353,55 @@
<quotationHeader ref="quotationHeader"></quotationHeader>
</el-tab-pane>
<el-tab-pane label="打样信息" name="sample">
<sample ref="sample" ></sample>
<sample ref="sample"></sample>
</el-tab-pane>
<el-tab-pane label="测试记录" name="test">
<test ref="test" ></test>
<test ref="test"></test>
</el-tab-pane>
<el-tab-pane label="刀模申请" name="purchase">
<purchase ref="purchase" ></purchase>
<purchase ref="purchase"></purchase>
</el-tab-pane>
<el-tab-pane label="技术参数卡" name="technicalSpecification">
<technicalSpecification ref="technicalSpecification" ></technicalSpecification>
<technicalSpecification ref="technicalSpecification"></technicalSpecification>
</el-tab-pane>
<el-tab-pane label="变更记录" name="changeRecord">
<el-table
:data="changeRecordList"
height="260"
border
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnChangeRecord" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<div v-if="item.columnProp === 'changeNo'">
<el-link style="cursor:pointer;" v-if="!item.columnHidden" @click="toChangeMenu(scope.row.changeNo)"> {{ scope.row[item.columnProp] }}</el-link>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</div>
<div v-else>
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</div>
</template>
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="100"
label="操作">
<template slot-scope="scope">
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
@ -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 @@
</script>
<style >
.el-transfer-panel {
border: 2px solid #17b3a3;
border-radius: 4px;

4
src/views/modules/quotation/priceCheckProperties.vue

@ -293,6 +293,10 @@ export default {
}
},
saveBtnClick(){
if (!this.attributeDialog) {
this.$message.warning('请保存更改!')
return
}
this.searchPriceCheckPropertiesItemList({})
},
},

6
src/views/modules/test/testAttribute/testProperties.vue

@ -270,6 +270,10 @@ export default {
}
},
clickSaveBtn(){
if (!this.attributeDialog) {
this.$message.warning('请保存更改!')
return
}
//
this.searchAttributeList({})
},
@ -347,7 +351,7 @@ export default {
<div v-else>
<div v-if="scope.row.valueChooseFlag !== 'Y'">
<el-input-number v-model="scope.row.numValue" style="padding: 0;width: 100%" v-if="scope.row.valueType === '数字'" :controls="false"></el-input-number>
<el-input v-model="scope.row.numValue" v-else></el-input>
<el-input v-model="scope.row.textValue" v-else></el-input>
</div>
<div v-else>
<el-select style="width: 100%;" v-if="scope.row.valueType === '文本'" v-model="scope.row.textValue">

Loading…
Cancel
Save