Browse Source

2025-04-30

master
qiezi 9 months ago
parent
commit
4084ed0adb
  1. 205
      src/views/modules/sampleManagement/com_technical-add-or-update.vue
  2. 163
      src/views/modules/sampleManagement/technicalSpecificationDetail/com_tsd_basicInformation.vue

205
src/views/modules/sampleManagement/com_technical-add-or-update.vue

@ -61,12 +61,14 @@
<el-input v-model="dataForm.mpOperatorName" ref="mpOperatorName" placeholder="请选择人员" readonly style="width: 130px" ></el-input> <el-input v-model="dataForm.mpOperatorName" ref="mpOperatorName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<span slot="label" @click="getUserList(1)"><a herf="#">Select CQC</a></span>
<el-input v-model="dataForm.cqcOperatorName" ref="cqcOperatorName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
<!-- <span slot="label" @click="getUserList(1)"><a herf="#">Select CQC</a></span>-->
<span slot="label" @click="handleCqcOperator"><a >Select CQC</a></span>
<el-input v-model="dataForm.cqcOperatorName" @focus="handleCqcOperator()" ref="cqcOperatorName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<span slot="label" @click="getUserList(2)"><a herf="#">Select FAI</a></span>
<el-input v-model="dataForm.faiOperatorName" ref="faiOperatorName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
<!-- <span slot="label" @click="getUserList(2)"><a herf="#">Select FAI</a></span>-->
<span slot="label" @click="handleFaiOperator"><a >Select FAI</a></span>
<el-input v-model="dataForm.faiOperatorName" @focus="handleFaiOperator" ref="faiOperatorName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item >--> <!-- <el-form-item >-->
<!-- <span slot="label" style="" @click="quotationOfficerChooseModal()"><a herf="#">报价员</a></span>--> <!-- <span slot="label" style="" @click="quotationOfficerChooseModal()"><a herf="#">报价员</a></span>-->
@ -95,7 +97,7 @@
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item > <el-form-item >
<span slot="label" @click="dccChooseModal()"><a herf="#">Select DCC</a></span> <span slot="label" @click="dccChooseModal()"><a herf="#">Select DCC</a></span>
<el-input v-model="dataForm.dcc" ref="dcc" readonly style="" @focus="dccChooseModal()" style="width: 130px"></el-input>
<el-input v-model="dataForm.dcc" ref="dcc" readonly @focus="dccChooseModal()" style="width: 130px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" label-width="100px" > <el-form :inline="true" label-position="top" label-width="100px" >
@ -112,7 +114,7 @@
</el-form-item> </el-form-item>
</el-form> </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="dataFormSubmit()">{{'确定'}}</el-button>
<el-button type="primary" :loading="saveLoading" @click="dataFormSubmit()">{{'确定'}}</el-button>
<el-button type="primary" @click="visible = false">{{'关闭'}}</el-button> <el-button type="primary" @click="visible = false">{{'关闭'}}</el-button>
</el-form> </el-form>
</el-dialog> </el-dialog>
@ -364,6 +366,41 @@
</span> </span>
</el-dialog> </el-dialog>
<el-dialog title="CQC人员"
:visible.sync="cqcVisible"
:close-on-click-modal="false"
width="530px">
<el-transfer
v-model="dataForm.cqcOperatorList"
class="rq"
filterable
:props="operatorProp"
:data="cqcOperatorList"
:titles="['未选择', '已选择']">
</el-transfer>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleSaveCqcOperator">确定</el-button>
<el-button type="primary" @click="cqcVisible = false">取消</el-button>
</div>
</el-dialog>
<el-dialog title="FAI人员"
:visible.sync="faiVisible"
:close-on-click-modal="false"
width="530px">
<el-transfer
v-model="dataForm.faiOperatorList"
class="rq"
filterable
:props="operatorProp"
:data="faiOperatorList"
:titles="['未选择', '已选择']">
</el-transfer>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleSaveFaiOperator">确定</el-button>
<el-button type="primary" @click="faiVisible = false">取消</el-button>
</div>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<ChooseUser ref="userList" @getBaseData="getUserData"></ChooseUser> <ChooseUser ref="userList" @getBaseData="getUserData"></ChooseUser>
@ -424,7 +461,9 @@
cqcOperator: '', cqcOperator: '',
faiOperator: '', faiOperator: '',
cqcOperatorName: '', cqcOperatorName: '',
cqcOperatorList:[],
faiOperatorName: '', faiOperatorName: '',
faiOperatorList: [],
peOperater: '', peOperater: '',
peOperaterName: '', peOperaterName: '',
csOperater: '', csOperater: '',
@ -508,6 +547,18 @@
proofingModelFlag:false, proofingModelFlag:false,
partList:[], partList:[],
partModelFlag:false, partModelFlag:false,
//
saveLoading:false,
//
operatorProp:{
key: 'operatorId',
label: 'operatorName'
},
cqcVisible:false,
cqcOperatorList:[],
faiVisible:false,
faiOperatorList:[],
} }
}, },
created () { created () {
@ -771,7 +822,9 @@
cqcOperator: '', cqcOperator: '',
faiOperator: '', faiOperator: '',
cqcOperatorName: '', cqcOperatorName: '',
cqcOperatorList:[],
faiOperatorName: '', faiOperatorName: '',
faiOperatorList: [],
peOperater: '', peOperater: '',
peOperaterName: '', peOperaterName: '',
csOperater: this.$store.state.user.name, csOperater: this.$store.state.user.name,
@ -871,12 +924,7 @@
this.dataForm.finalPartNo = row.finalPartNo this.dataForm.finalPartNo = row.finalPartNo
this.dataForm.buNo = row.buNo this.dataForm.buNo = row.buNo
// DCC // DCC
let inData = {
site: this.dataForm.site,
buNo: this.dataForm.buNo,
roleNo: 'R015'
}
searchBMUser(inData).then(({data}) => {
this.queryUserInfoByBM('R015').then(({data}) => {
if (data && data.code === 0){ if (data && data.code === 0){
this.$nextTick(() => { this.$nextTick(() => {
this.operatorList = data.rows this.operatorList = data.rows
@ -886,6 +934,28 @@
}) })
} }
}) })
// CQC
this.queryUserInfoByBM('R008').then(({data}) => {
if (data && data.code === 0){
this.$nextTick(() => {
this.cqcOperatorList = data.rows
this.dataForm.cqcOperatorList = data.rows.map(item=>item.operatorId)
this.handleSaveCqcOperator()
this.cqcOperatorList = []
})
}
})
// FAI
this.queryUserInfoByBM('R009').then(({data}) => {
if (data && data.code === 0){
this.$nextTick(() => {
this.faiOperatorList = data.rows
this.dataForm.faiOperatorList = data.rows.map(item=>item.operatorId)
this.handleSaveFaiOperator()
this.faiOperatorList = []
})
}
})
this.partModelFlag = false this.partModelFlag = false
}, },
@ -1002,7 +1072,6 @@
// //
dataFormSubmit () { dataFormSubmit () {
if(this.dataForm.testPartNo===''){ if(this.dataForm.testPartNo===''){
this.$message.error('请输入测试料号!') this.$message.error('请输入测试料号!')
return false return false
} }
@ -1014,31 +1083,33 @@
this.dataForm.engineerList.push(this.dataForm.engineerNo); this.dataForm.engineerList.push(this.dataForm.engineerNo);
this.dataForm.technicianList = []; this.dataForm.technicianList = [];
this.dataForm.technicianList.push(this.dataForm.technicianNo); this.dataForm.technicianList.push(this.dataForm.technicianNo);
this.saveLoading = true
saveTechnicalSpecificationSheet(this.dataForm).then(({data}) => { saveTechnicalSpecificationSheet(this.dataForm).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message.success( '操作成功') this.$message.success( '操作成功')
this.visible = false this.visible = false
this.$emit('refreshDataList') this.$emit('refreshDataList')
if(this.jumpFlag){ if(this.jumpFlag){
this.$nextTick(function () {
setTimeout(() => {
let inData = {
site: this.$store.state.user.site,
codeNo: data.row.codeNo,
buNo: data.row.buNo,
username: this.$store.state.user.name
};
localStorage.setItem('tsfData', JSON.stringify(inData))
window.open('#/BMPage');
},500)
})
setTimeout(() => {
let inData = {
site: this.$store.state.user.site,
codeNo: data.row.codeNo,
buNo: data.row.buNo,
username: this.$store.state.user.name
};
localStorage.setItem('tsfData', JSON.stringify(inData))
window.open('#/BMPage');
},500)
} }
} else { } else {
this.$message.error(data.msg) this.$message.error(data.msg)
} }
this.saveLoading = false
}).catch((error)=>{
this.$message.error(error)
this.saveLoading = false
}) })
}, },
changeTestDesc(){ changeTestDesc(){
this.dataForm.proofingNo=""; this.dataForm.proofingNo="";
@ -1072,19 +1143,85 @@
this.refreshPartList() this.refreshPartList()
}, },
dccChooseModal(){ dccChooseModal(){
let inData={
site:this.dataForm.site,
buNo:this.dataForm.buNo,
roleNo:'R015'
}
// let inData={
// site:this.dataForm.site,
// buNo:this.dataForm.buNo,
// roleNo:'R015'
// }
this.operatorList = []; this.operatorList = [];
searchBMUser(inData).then(({data}) => {
this.operatorList=data.rows
this.queryUserInfoByBM('R015').then(({data}) => {
this.operatorList = data.rows
}) })
this.dccList = JSON.parse(JSON.stringify(this.dataForm.dccList)); this.dccList = JSON.parse(JSON.stringify(this.dataForm.dccList));
this.dccFlag=true this.dccFlag=true
}, },
queryUserInfoByBM(roleNo){
let params = {
site:this.dataForm.site,
buNo:this.dataForm.buNo,
roleNo:roleNo,
}
return searchBMUser(params)
},
handleCqcOperator(){
this.cqcVisible = true;
this.cqcOperatorList = []
this.queryUserInfoByBM('R008').then(({data}) => {
if (data && data.code === 0){
this.cqcOperatorList = data.rows
}else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
this.$message.error(error);
})
},
handleFaiOperator(){
this.faiVisible = true;
this.faiOperatorList = []
this.queryUserInfoByBM('R009').then(({data}) => {
if (data && data.code === 0){
this.faiOperatorList = data.rows
}else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
this.$message.error(error);
})
},
handleSaveCqcOperator(){
this.dataForm.cqcOperatorName = this.cqcOperatorList.filter(item => this.dataForm.cqcOperatorList.includes(item.operatorId)).map(item=> item.operatorName).join(';');
this.cqcVisible = false;
},
handleSaveFaiOperator(){
this.dataForm.faiOperatorName = this.faiOperatorList.filter(item => this.dataForm.faiOperatorList.includes(item.operatorId)).map(item=> item.operatorName).join(';');
this.faiVisible = false;
},
},
watch:{
saveLoading(newVal,oldVal){
if (newVal){
setTimeout(()=>{
this.saveLoading = false
},30000)
}
},
visible(newVal,oldVal){
if (!newVal){
this.dataForm.cqcOperatorList = []
this.dataForm.faiOperatorList = []
}
},
cqcVisible(newVal,oldVal){
if (!newVal){
this.cqcOperatorList = []
}
},
faiVisible(newVal,oldVal){
if (!newVal){
this.faiOperatorList = []
}
},
}, },
} }
</script> </script>

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

@ -182,16 +182,18 @@
<el-col :span="6"> <el-col :span="6">
<div class="grid-content bg-purple"> <div class="grid-content bg-purple">
<el-form-item > <el-form-item >
<span slot="label" @click="getBaseList(1)"><a herf="#">Select CQC</a></span>
<el-input v-model="dataForm.cqcOperatorName" ref="cqcOperatorName" placeholder="请选择人员" readonly></el-input>
<!-- <span slot="label" @click="getBaseList(1)"><a herf="#">Select CQC</a></span>-->
<span slot="label" @click="handleCqcOperator"><a >Select CQC</a></span>
<el-input v-model="dataForm.cqcOperatorName" @focus="handleCqcOperator()" ref="cqcOperatorName" placeholder="请选择人员" readonly></el-input>
</el-form-item> </el-form-item>
</div> </div>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<div class="grid-content bg-purple"> <div class="grid-content bg-purple">
<el-form-item > <el-form-item >
<span slot="label" @click="getBaseList(2)"><a herf="#">Select FAI</a></span>
<el-input v-model="dataForm.faiOperatorName" ref="faiOperatorName" placeholder="请选择人员" readonly></el-input>
<!-- <span slot="label" @click="getBaseList(2)"><a herf="#">Select FAI</a></span>-->
<span slot="label" @click="handleFaiOperator"><a >Select FAI</a></span>
<el-input v-model="dataForm.faiOperatorName" @focus="handleFaiOperator()" ref="faiOperatorName" placeholder="请选择人员" readonly></el-input>
</el-form-item> </el-form-item>
</div> </div>
</el-col> </el-col>
@ -315,6 +317,43 @@
</span> </span>
</el-dialog> </el-dialog>
<el-dialog title="CQC人员"
:visible.sync="cqcVisible"
:close-on-click-modal="false"
width="530px">
<el-transfer
v-model="dataForm.cqcOperatorList"
class="rq"
filterable
:props="operatorProp"
:data="cqcOperatorList"
:titles="['未选择', '已选择']">
</el-transfer>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleSaveCqcOperator">确定</el-button>
<el-button type="primary" @click="cqcVisible = false">取消</el-button>
</div>
</el-dialog>
<el-dialog title="FAI人员"
:visible.sync="faiVisible"
:close-on-click-modal="false"
width="530px">
<el-transfer
v-model="dataForm.faiOperatorList"
class="rq"
filterable
:props="operatorProp"
:data="faiOperatorList"
:titles="['未选择', '已选择']">
</el-transfer>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleSaveFaiOperator">确定</el-button>
<el-button type="primary" @click="faiVisible = false">取消</el-button>
</div>
</el-dialog>
<ChooseUser ref="baseList" @getBaseData="getBaseData"></ChooseUser> <ChooseUser ref="baseList" @getBaseData="getBaseData"></ChooseUser>
<!-- 提交 --> <!-- 提交 -->
@ -421,6 +460,8 @@
technicianNo:'', technicianNo:'',
dcc:'', dcc:'',
dccList:'', dccList:'',
cqcOperatorList:[],
faiOperatorList:[],
relevancePartNo:'', relevancePartNo:'',
}, },
dataRole: { dataRole: {
@ -441,6 +482,15 @@
}, },
rejectOpinion: '', rejectOpinion: '',
submitModalFlag: false, submitModalFlag: false,
//
operatorProp:{
key: 'operatorId',
label: 'operatorName'
},
cqcVisible:false,
cqcOperatorList:[],
faiVisible:false,
faiOperatorList:[],
} }
}, },
methods: { methods: {
@ -604,6 +654,7 @@
this.quotationNo = data.rows[0].quotationNo this.quotationNo = data.rows[0].quotationNo
} }
}) })
// dcc
let inData5 = { let inData5 = {
site: this.dataForm.site, site: this.dataForm.site,
codeNo: this.dataForm.codeNo, codeNo: this.dataForm.codeNo,
@ -612,6 +663,28 @@
searchTechnicalSpecificationTeamStr(inData5).then(({data}) => { searchTechnicalSpecificationTeamStr(inData5).then(({data}) => {
this.dataForm.dccList = data.rows this.dataForm.dccList = data.rows
}) })
// cqc
let cqcParams = {
site: this.dataForm.site,
codeNo: this.dataForm.codeNo,
type: 'cqc',
}
searchTechnicalSpecificationTeamStr(cqcParams).then(({data}) => {
if (data && data.code === 0){
this.dataForm.cqcOperatorList = data.rows
}
})
// fai
let faiParams = {
site: this.dataForm.site,
codeNo: this.dataForm.codeNo,
type: 'fai',
}
searchTechnicalSpecificationTeamStr(faiParams).then(({data}) => {
if (data && data.code === 0){
this.dataForm.faiOperatorList = data.rows
}
})
} else { } else {
this.dataList = ''; this.dataList = '';
this.$alert('刷新失败请重新打开技术参数卡', '失败', { this.$alert('刷新失败请重新打开技术参数卡', '失败', {
@ -672,6 +745,28 @@
searchTechnicalSpecificationTeamStr(inData5).then(({data}) => { searchTechnicalSpecificationTeamStr(inData5).then(({data}) => {
this.dataForm.dccList = data.rows this.dataForm.dccList = data.rows
}) })
// cqc
let cqcParams = {
site: this.dataForm.site,
codeNo: this.dataForm.codeNo,
type: 'cqc',
}
searchTechnicalSpecificationTeamStr(cqcParams).then(({data}) => {
if (data && data.code === 0){
this.dataForm.cqcOperatorList = data.rows
}
})
// fai
let faiParams = {
site: this.dataForm.site,
codeNo: this.dataForm.codeNo,
type: 'fai',
}
searchTechnicalSpecificationTeamStr(faiParams).then(({data}) => {
if (data && data.code === 0){
this.dataForm.faiOperatorList = data.rows
}
})
} else { } else {
this.dataList = ''; this.dataList = '';
} }
@ -974,6 +1069,66 @@
}) })
}, },
queryUserInfoByBM(roleNo){
let params = {
site:this.dataForm.site,
buNo:this.dataForm.buNo,
roleNo:roleNo,
}
return searchBMUser(params)
},
handleCqcOperator(){
if(this.ifDisableFlag){
return
}
this.cqcVisible = true;
this.cqcOperatorList = []
this.queryUserInfoByBM('R008').then(({data}) => {
if (data && data.code === 0){
this.cqcOperatorList = data.rows
}else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
this.$message.error(error);
})
},
handleFaiOperator(){
if(this.ifDisableFlag){
return
}
this.faiVisible = true;
this.faiOperatorList = []
this.queryUserInfoByBM('R009').then(({data}) => {
if (data && data.code === 0){
this.faiOperatorList = data.rows
}else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
this.$message.error(error);
})
},
handleSaveCqcOperator(){
this.dataForm.cqcOperatorName = this.cqcOperatorList.filter(item => this.dataForm.cqcOperatorList.includes(item.operatorId)).map(item=> item.operatorName).join(';');
this.cqcVisible = false;
},
handleSaveFaiOperator(){
this.dataForm.faiOperatorName = this.faiOperatorList.filter(item => this.dataForm.faiOperatorList.includes(item.operatorId)).map(item=> item.operatorName).join(';');
this.faiVisible = false;
},
},
watch:{
cqcVisible(newVal,oldVal){
if (!newVal){
this.cqcOperatorList = []
}
},
faiVisible(newVal,oldVal){
if (!newVal){
this.faiOperatorList = []
}
},
}, },
} }
</script> </script>

Loading…
Cancel
Save