Browse Source

plm BM

master
ruanqi 2 years ago
parent
commit
46da7e87d6
  1. 91
      src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_bom.vue
  2. 102
      src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_customerInformation.vue
  3. 109
      src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_demoSlot.vue
  4. 1
      src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_packageInfo.vue
  5. 117
      src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_routing.vue
  6. 3
      src/views/modules/sampleManagement/technicalSpecificationDetail/com_tsd_basicInformation.vue
  7. 3
      src/views/modules/sampleManagement/technicalSpecificationDetail/technicalSpecificationDetail.vue

91
src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_bom.vue

@ -15,8 +15,10 @@
</el-form-item>
<el-form-item label=" ">
<el-button type="primary" @click="searchTable()" >刷新</el-button>
<el-button type="primary" @click="changeBomRev()" >变更</el-button>
<el-button type="primary" v-if="!ifDisableFlag" @click="changeBomRev()" >变更</el-button>
<el-button type="primary" @click="jumpBom()" >跳转至BOM</el-button>
<el-button v-if="baseForm.status === 'spz'&&!ifDisableFlag" type="primary" @click="agreeSubmit">同意</el-button>
<el-button v-if="baseForm.status === 'spz' && baseForm.isReject === 'Y' &&!ifDisableFlag" type="primary" @click="rejectSubmit">驳回</el-button>
<!-- <el-button type="primary" @click="newData()" v-if="!ifDisableFlag">新增</el-button>-->
</el-form-item>
@ -127,7 +129,12 @@
searchBMBom,
searchBMBomDetail,
updateBMBomRev,
tsdBasicInformationSearch,
submitChange, //
} from "@/api/sampleManagement/technicalSpecificationList.js"
import {
getNodeAuthority, //
} from '@/api/changeManagement/changeManagement.js'
import Chooselist from '@/views/modules/common/Chooselist'
export default {
components: {
@ -144,6 +151,7 @@
username: this.$store.state.user.name,
codeNo: '',
buNo:'',
fieldId:'',
},
bomData:{
site: '',
@ -355,7 +363,10 @@
columnWidth: 150
},
],
baseForm:{
status:'',
isReject:'',
},
ifDisableFlag:false,
@ -424,6 +435,10 @@
this.$message.error(data.msg)
}
});
tsdBasicInformationSearch(this.searchData).then(({data}) => {
this.baseForm=data.row;
this.getNodeAuthority(data.row)
})
},
searchDetailTable(){
searchBMBomDetail(this.bomData).then(({data}) => {
@ -479,6 +494,78 @@
localStorage.setItem('bomData', JSON.stringify(inData))
window.open('#/part-bomManagement');
},
//
getNodeAuthority (row) {
//
let tempData = {
site: row.site,
stepId: row.stepId,
menuId: '103002'
}
getNodeAuthority(tempData).then(({data}) => {
if (data && data.code === 0) {
let plmStepRoleBaseBm = data.rows.plm_stepRole_base_bm
let arr = plmStepRoleBaseBm.filter(a => a.fieldId === this.searchData.fieldId)
if (arr.length > 0) {
if (arr[0].updateFlag === 'N') {
this.ifDisableFlag = true
} else {
this.ifDisableFlag = false
}
} else {
this.ifDisableFlag = true
}
}
})
},
//
agreeSubmit () {
this.$confirm(`是否确认提交?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let tempData = {
site: this.searchData.site,
userName: this.$store.state.user.name,
codeNo: this.searchData.codeNo,
menuId: '103002',
nodeConclusion: 'Y'
}
this.submitData(tempData)
})
},
//
rejectSubmit () {
this.$confirm(`是否确认驳回?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let tempData = {
site: this.searchData.site,
userName: this.$store.state.user.name,
codeNo: this.searchData.codeNo,
menuId: '103002',
nodeConclusion: 'N'
}
this.submitData(tempData)
})
},
submitData (tempData) {
submitChange(tempData).then(({data}) => {
if (data && data.code === 0) {
this.$message({message: '操作成功', type: 'success'})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
},
}
</script>

102
src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_customerInformation.vue

@ -3,8 +3,8 @@
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;">
<el-button type="primary" @click="refresh()" >刷新数据</el-button>
<el-button type="primary" @click="saveData()" v-if="!ifDisableFlag">保存</el-button>
<el-button v-if="baseForm.status === 'spz'&&!ifDisableFlag" type="primary" @click="saveData">同意</el-button>
<el-button v-if="baseForm.status === 'spz' && baseForm.isReject === 'Y' &&!ifDisableFlag" type="primary" @click="saveData">驳回</el-button>
<el-button v-if="baseForm.status === 'spz'&&!ifDisableFlag" type="primary" @click="agreeSubmit">同意</el-button>
<el-button v-if="baseForm.status === 'spz' && baseForm.isReject === 'Y' &&!ifDisableFlag" type="primary" @click="rejectSubmit">驳回</el-button>
</el-form>
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;">
<el-row :gutter="20">
@ -157,9 +157,9 @@
</el-row>
</el-form>
<!-- <el-form label-position="top" style="margin-top: 60px; margin-left: 0px;text-align:center">-->
<el-form label-position="top" style="margin-top: 60px; margin-left: 0px;text-align:center">
<!-- <el-button type="primary" @click="saveData()" v-if="!ifDisableFlag">保存</el-button>-->
<!-- </el-form>-->
</el-form>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
@ -169,7 +169,12 @@
import {
searchBMcustomerInfo,
updateBMcustomerInfo,
tsdBasicInformationSearch,
submitChange, //
} from "@/api/sampleManagement/technicalSpecificationList.js"
import {
getNodeAuthority, //
} from '@/api/changeManagement/changeManagement.js'
import Chooselist from '@/views/modules/common/Chooselist'
export default {
components: {
@ -182,6 +187,7 @@
username: this.$store.state.user.name,
codeNo: '',
buNo:'',
fieldId:'',
},
ifDisableFlag:false,
baseForm:{
@ -271,6 +277,10 @@
})
return false
}
tsdBasicInformationSearch(this.searchData).then(({data}) => {
this.baseForm=data.row;
this.getNodeAuthority(data.row)
})
searchBMcustomerInfo(this.searchData).then(({data}) => {
if(data.rows.length>0){
this.dataForm = data.rows[0];
@ -286,6 +296,10 @@
});
},
searchTable(){
tsdBasicInformationSearch(this.searchData).then(({data}) => {
this.baseForm=data.row;
this.getNodeAuthority(data.row)
})
searchBMcustomerInfo(this.searchData).then(({data}) => {
if(data.rows.length>0){
this.dataForm = data.rows[0];
@ -311,6 +325,86 @@
return
})
},
//
getNodeAuthority (row) {
//
let tempData = {
site: row.site,
stepId: row.stepId,
menuId: '103002'
}
getNodeAuthority(tempData).then(({data}) => {
if (data && data.code === 0) {
let plmStepRoleBaseBm = data.rows.plm_stepRole_base_bm
let arr = plmStepRoleBaseBm.filter(a => a.fieldId === this.searchData.fieldId)
if (arr.length > 0) {
if (arr[0].updateFlag === 'N') {
this.ifDisableFlag = true
} else {
this.ifDisableFlag = false
}
} else {
this.ifDisableFlag = true
}
}
})
},
//
agreeSubmit () {
this.$confirm(`是否确认提交?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let tempData = {
site: this.searchData.site,
userName: this.$store.state.user.name,
codeNo: this.searchData.codeNo,
menuId: '103002',
nodeConclusion: 'Y'
}
this.submitData(tempData)
})
},
//
rejectSubmit () {
this.$confirm(`是否确认驳回?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let tempData = {
site: this.searchData.site,
userName: this.$store.state.user.name,
codeNo: this.searchData.codeNo,
menuId: '103002',
nodeConclusion: 'N'
}
this.submitData(tempData)
})
},
submitData (tempData) {
updateBMcustomerInfo(this.dataForm).then(({data}) => {
if (data && data.code === 0) {
submitChange(tempData).then(({data}) => {
if (data && data.code === 0) {
this.$message({message: '操作成功', type: 'success'})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
} else {
this.$message.error(data.msg)
}
})
},
},
}
</script>

109
src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_demoSlot.vue

@ -11,6 +11,8 @@
<el-button type="primary" @click="refreshBMPageModal()" v-if="!ifDisableFlag">更新模板</el-button>
<el-button type="primary" @click="searchTable()" >刷新数据</el-button>
<el-button type="primary" @click="saveTable()" v-if="!ifDisableFlag">保存数据</el-button>
<el-button v-if="baseForm.status === 'spz'&&!ifDisableFlag" type="primary" @click="agreeSubmit">同意</el-button>
<el-button v-if="baseForm.status === 'spz' && baseForm.isReject === 'Y' &&!ifDisableFlag" type="primary" @click="rejectSubmit">驳回</el-button>
</el-form-item>
<div class="rq ">
<el-table
@ -51,10 +53,10 @@
min-width="400"
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 ;width:98%" allow-create></el-input>
<div v-if="scope.row.valueTypeDb === 'S'&&scope.row.valueChooseFlag === 'N'"><el-input v-model="scope.row.textValue" style="height: 11px;padding: 0px ;width:98%" allow-create></el-input></div>
<el-input v-if="scope.row.valueTypeDb === 'N'&&scope.row.valueChooseFlag === 'N'" v-model="scope.row.numValue" type="number" style="height: 11px;padding: 0px;width:98%" allow-create></el-input>
<el-select v-if="scope.row.valueTypeDb === 'T'&&scope.row.valueChooseFlag === 'Y'" v-model="scope.row.textValue" placeholder="请选择" style="height: 11px;padding: 0px " allow-create>
<el-input v-if="scope.row.valueTypeDb === 'T'&&scope.row.valueChooseFlag === 'N'" v-model="scope.row.textValue" style="height: 11px;padding: 0px ;width:98%" allow-create :disabled="ifDisableFlag" ></el-input>
<div v-if="scope.row.valueTypeDb === 'S'&&scope.row.valueChooseFlag === 'N'"><el-input v-model="scope.row.textValue" style="height: 11px;padding: 0px ;width:98%" allow-create :disabled="ifDisableFlag"></el-input></div>
<el-input v-if="scope.row.valueTypeDb === 'N'&&scope.row.valueChooseFlag === 'N'" v-model="scope.row.numValue" type="number" style="height: 11px;padding: 0px;width:98%" allow-create :disabled="ifDisableFlag"></el-input>
<el-select v-if="scope.row.valueTypeDb === 'T'&&scope.row.valueChooseFlag === 'Y'" v-model="scope.row.textValue" placeholder="请选择" style="height: 11px;padding: 0px " allow-create :disabled="ifDisableFlag">
<el-option
v-for="item in scope.row.availableValueList"
:key="index"
@ -62,7 +64,7 @@
:value="item.availableValue">
</el-option>
</el-select>
<el-select v-if="scope.row.valueTypeDb === 'N'&&scope.row.valueChooseFlag === 'Y'" v-model="scope.row.numValue" placeholder="请选择" style="height: 11px;padding: 0px " allow-create>
<el-select v-if="scope.row.valueTypeDb === 'N'&&scope.row.valueChooseFlag === 'Y'" v-model="scope.row.numValue" placeholder="请选择" style="height: 11px;padding: 0px " allow-create :disabled="ifDisableFlag">
<el-option
v-for="item in scope.row.availableValueList"
:key="index"
@ -70,7 +72,7 @@
:value="item.availableValue">
</el-option>
</el-select>
<div v-if="scope.row.valueTypeDb === 'S'&&scope.row.valueChooseFlag === 'Y'"> <el-select v-model="scope.row.textValue" placeholder="请选择" style="height: 11px;padding: 0px ;width:98%" allow-create>
<div v-if="scope.row.valueTypeDb === 'S'&&scope.row.valueChooseFlag === 'Y'"> <el-select v-model="scope.row.textValue" placeholder="请选择" style="height: 11px;padding: 0px ;width:98%" allow-create :disabled="ifDisableFlag">
<el-option
v-for="item in scope.row.availableValueList"
:key="index"
@ -95,8 +97,12 @@
refreshBMPageModal,
searchBMPropertiesHeaderForBM,
checkUrl,
tsdBasicInformationSearch,
submitChange, //
} from "@/api/sampleManagement/technicalSpecificationList.js"
import {
getNodeAuthority, //
} from '@/api/changeManagement/changeManagement.js'
export default {
components: {
@ -113,10 +119,15 @@
buNo:'',
type:'',
propertiesCodeNo:'',
fieldId:'',
},
type:'prepress',
ifDisableFlag:false,
tableData:[],
baseForm:{
status:'',
isReject:'',
},
}
},
mounted () {
@ -151,6 +162,10 @@
// this.searchData.propertiesCodeNo = data.row.propertiesCodeNo;
this.$set(this.searchData, 'propertiesCodeNo', data.row.propertiesCodeNo);
});
tsdBasicInformationSearch(this.searchData).then(({data}) => {
this.baseForm=data.row;
this.getNodeAuthority(data.row)
})
},
refreshBMPageModal(){
this.$confirm(`是否刷新至最新模板界面,已填数据会更新到新模板中,若旧属性在新模板中被删除,该条数据会消失。`, '提示', {
@ -218,6 +233,86 @@
});
},
//
getNodeAuthority (row) {
//
let tempData = {
site: row.site,
stepId: row.stepId,
menuId: '103002'
}
getNodeAuthority(tempData).then(({data}) => {
if (data && data.code === 0) {
let plmStepRoleBaseBm = data.rows.plm_stepRole_base_bm
let arr = plmStepRoleBaseBm.filter(a => a.fieldId === this.searchData.fieldId)
if (arr.length > 0) {
if (arr[0].updateFlag === 'N') {
this.ifDisableFlag = true
} else {
this.ifDisableFlag = false
}
} else {
this.ifDisableFlag = true
}
}
})
},
//
agreeSubmit () {
this.$confirm(`是否确认提交?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let tempData = {
site: this.searchData.site,
userName: this.$store.state.user.name,
codeNo: this.searchData.codeNo,
menuId: '103002',
nodeConclusion: 'Y'
}
this.submitData(tempData)
})
},
//
rejectSubmit () {
this.$confirm(`是否确认驳回?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let tempData = {
site: this.searchData.site,
userName: this.$store.state.user.name,
codeNo: this.searchData.codeNo,
menuId: '103002',
nodeConclusion: 'N'
}
this.submitData(tempData)
})
},
submitData (tempData) {
saveBMPropertiesValue(this.tableData).then(({data}) => {
if (data && data.code === 0) {
submitChange(tempData).then(({data}) => {
if (data && data.code === 0) {
this.$message({message: '操作成功', type: 'success'})
this.$emit("closeModel")
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
} else {
this.$message.error(data.msg)
}
})
},
},
}
</script>

1
src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_packageInfo.vue

@ -35,6 +35,7 @@
codeNo: '',
buNo:'',
type:'',
fieldId:'',
},
ifDisableFlag:false,
picUrl:this.$store.state.user.bmPicUrl+'defaultPaperOrientation.png',

117
src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_routing.vue

@ -13,7 +13,9 @@
<el-input v-model="sheetData.printOperatorName" placeholder="请选择人员" readonly style="width: 120px" ></el-input>
</el-form-item>
<el-form-item label=" ">
<el-button type="primary" @click="updateBMProcess()" >保存</el-button>
<el-button type="primary" @click="updateBMProcess()" v-if="!ifDisableFlag">保存</el-button>
<el-button v-if="baseForm.status === 'spz'&&!ifDisableFlag" type="primary" @click="agreeSubmit">同意</el-button>
<el-button v-if="baseForm.status === 'spz' && baseForm.isReject === 'Y' &&!ifDisableFlag" type="primary" @click="rejectSubmit">驳回</el-button>
</el-form-item>
</el-form>
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;" v-if="searchData.buNo=='RDC'">
@ -173,8 +175,8 @@
</el-form-item>
<el-form-item label=" ">
<el-button type="primary" @click="searchTable()" >刷新</el-button>
<el-button type="primary" @click="changeRouteRev()" >变更</el-button>
<el-button type="primary" @click="jumpRoute()" >调整至Routing</el-button>
<el-button type="primary" @click="changeRouteRev()" v-if="!ifDisableFlag">变更</el-button>
<el-button type="primary" @click="jumpRoute()" >跳转至Routing</el-button>
</el-form-item>
</el-form>
@ -441,7 +443,11 @@
updateBMRouteRev,
tsdBasicInformationSearch,
updateBMProcess,
submitChange, //
} from "@/api/sampleManagement/technicalSpecificationList.js"
import {
getNodeAuthority, //
} from '@/api/changeManagement/changeManagement.js'
import Chooselist from '@/views/modules/common/Chooselist'
import {
searchOperatorWithSite,
@ -507,6 +513,11 @@
username: this.$store.state.user.name,
codeNo: '',
buNo:'',
fieldId:'',
},
baseForm:{
status:'',
isReject:'',
},
tableData:'',
partList:[],
@ -865,6 +876,9 @@
methods: {
// S
getBaseList (val, type) {
if(this.ifDisableFlag){
return false
}
this.tagNo = val
this.tagNo1 = type
this.$nextTick(() => {
@ -911,6 +925,8 @@
tsdBasicInformationSearch(this.searchData).then(({data}) => {
if(data&& data.code===0){
this.sheetData=data.row
this.baseForm=data.row;
this.getNodeAuthority(data.row)
}else {
this.$message.error(data.msg)
}
@ -1139,6 +1155,7 @@
},
savepeEngineerList(){
let peEngineerName='';
for (let i = 0; i < this.peEngineerList.length; i++) {
let select= this.operatorList.filter(item => item.operatorId === this.peEngineerList[i])
@ -1396,7 +1413,101 @@
window.open('#/part-routingManagement');
},
//
getNodeAuthority (row) {
//
let tempData = {
site: row.site,
stepId: row.stepId,
menuId: '103002'
}
getNodeAuthority(tempData).then(({data}) => {
if (data && data.code === 0) {
let plmStepRoleBaseBm = data.rows.plm_stepRole_base_bm
let arr = plmStepRoleBaseBm.filter(a => a.fieldId === this.searchData.fieldId)
if (arr.length > 0) {
if (arr[0].updateFlag === 'N') {
this.ifDisableFlag = true
} else {
this.ifDisableFlag = false
}
} else {
this.ifDisableFlag = true
}
}
})
},
//
agreeSubmit () {
this.$confirm(`是否确认提交?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let tempData = {
site: this.searchData.site,
userName: this.$store.state.user.name,
codeNo: this.searchData.codeNo,
menuId: '103002',
nodeConclusion: 'Y'
}
this.submitData(tempData)
})
},
//
rejectSubmit () {
this.$confirm(`是否确认驳回?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let tempData = {
site: this.searchData.site,
userName: this.$store.state.user.name,
codeNo: this.searchData.codeNo,
menuId: '103002',
nodeConclusion: 'N'
}
this.submitData(tempData)
})
},
async submitData (tempData) {
await updateBMProcess(this.sheetData).then(({data}) => {
if (data && data.code === 0) {
tsdBasicInformationSearch(this.searchData).then(({data}) => {
if(data.row){
this.sheetData=data.row
}else {
}
});
} else {
this.$message.error(data.msg)
return false
}
})
await updateBMRoutingDetail(this.dataForm).then(({data}) => {
if (data && data.code === 0) {
} else {
this.$message.error(data.msg)
return false
}
})
await submitChange(tempData).then(({data}) => {
if (data && data.code === 0) {
this.$message({message: '操作成功', type: 'success'})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
},
}
</script>

3
src/views/modules/sampleManagement/technicalSpecificationDetail/com_tsd_basicInformation.vue

@ -610,7 +610,6 @@
stepId: row.stepId,
menuId: '103002'
}
debugger
getNodeAuthority(tempData).then(({data}) => {
if (data && data.code === 0) {
let plmStepRoleBaseBm = data.rows.plm_stepRole_base_bm
@ -670,8 +669,6 @@
submitChange(tempData).then(({data}) => {
if (data && data.code === 0) {
this.$message({message: '操作成功', type: 'success'})
this.submitModalFlag = false
this.modalFlag = false
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'

3
src/views/modules/sampleManagement/technicalSpecificationDetail/technicalSpecificationDetail.vue

@ -119,10 +119,10 @@
username:this.$store.state.user.name,
type:'',
ifDisableFlag:false,
fieldId:'',
},
pageRole:'',
activeName:'baseInfo',
}
},
mounted() {
@ -141,6 +141,7 @@
},
methods: {
refreshCurrentTabTable(){
this.dataForm.fieldId=this.activeName
//
this.changeHeightAuto()
if (this.activeName == 'baseInfo') {

Loading…
Cancel
Save