Browse Source

plm BM

master
ruanqi 2 years ago
parent
commit
c8418e0b6c
  1. 1
      src/api/base/properties.js
  2. 214
      src/views/modules/common/ChooseUser.vue
  3. 205
      src/views/modules/proofing/profingFile.vue
  4. 26
      src/views/modules/proofing/requestForProofing.vue
  5. 16
      src/views/modules/sampleManagement/com_technical-add-or-update.vue
  6. 6
      src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_demoSlot.vue
  7. 1
      src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_packageInfo.vue
  8. 1
      src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_printing.vue
  9. 50
      src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_routing.vue
  10. 42
      src/views/modules/sampleManagement/technicalSpecificationDetail/com_tsd_basicInformation.vue
  11. 2
      src/views/modules/sampleManagement/technicalSpecificationDetail/technicalSpecificationDetail.vue
  12. 179
      src/views/modules/test/requestForTest.vue

1
src/api/base/properties.js

@ -20,6 +20,7 @@ export const getItemLists = data => createAPI(`/properties/getItemLists`,'post',
export const deleteModalDetail = data => createAPI(`/properties/deleteModalDetail`,'post',data)
export const saveItemAvailable = data => createAPI(`/properties/saveItemAvailable`,'post',data)
export const deleteItemAvailable = data => createAPI(`/properties/deleteItemAvailable`,'post',data)
export const getPartItemWithPartNo = data => createAPI(`/plm/partInformation/getPartItemWithPartNo`,'post',data)
export const getItemModal = data => createAPI(`/properties/getItemModal`,'post',data)

214
src/views/modules/common/ChooseUser.vue

@ -0,0 +1,214 @@
<template>
<el-dialog append-to-body title="查询人员"
:close-on-click-modal="false" :close-on-press-escape="false"
@close="closeDialog"
:visible.sync="visible"
width="685px" v-drag>
<el-form label-position="top"
inline="inline"
size="mini"
label-width="120px">
<el-form-item label="编码" >
<el-input v-model="param1"></el-input>
</el-form-item>
<el-form-item label="名称" >
<el-input v-model="param2"></el-input>
</el-form-item>
<el-button style="margin-top: 18px" type="primary" @click="getDataList(false)">查询
</el-button>
</el-form>
<el-table
:height="height"
:data="dataList"
border
@row-dblclick="getRowData"
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnList" :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">
{{ scope.row[item.columnProp] }}
</template>
</el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button @click="closeModel()" type="primary">关闭</el-button>
</span>
</el-dialog>
</template>
<script>
import {
getChooselist,
getChooselistData
} from "@/api/chooselist/chooselist.js"
export default {
data() {
return {
height: 200,
tagNo: '',
title: '列表',
columnList: [
{
columnProp: "username",
headerAlign: "center",
align: "left",
columnLabel: "编码",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
columnProp: "userDisplay",
headerAlign: "center",
align: "left",
columnLabel: "名称",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
columnProp: "site",
headerAlign: "center",
align: "left",
columnLabel: "工厂编码",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
columnProp: "buNo",
headerAlign: "center",
align: "left",
columnLabel: "BU",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
],
queryTable: {},
visible: false,
dataListLoading: false,
fullscreenLoading: false,
param1: '',
param2: '',
param3: '',
param: '',
site: '',
conSql: '',
param4: this.$store.state.user.site,
dataList: [],
baseListData: {
caption1: '',
caption2: '',
caption3: '',
caption4: '',
description: '',
fieldname1: '',
fieldname2: '',
sqlcode: '',
tagno: '',
},
defaultParam: false
}
},
methods: {
closeModel(){
this.baseListData={
caption1: '',
caption2: '',
caption3: '',
caption4: '',
description: '',
fieldname1: '',
fieldname2: '',
sqlcode: '',
tagno: '',
}
this.dataList=[];
this.visible = false;
},
// 获取 用户的配置
init(site,conSql,param) {
this.visible = true;
this.site=site
this.param = param===null?'':param
this.conSql = conSql?conSql: ''
// 根据 tagNo 获取列表
this.getDataList(true)
this.dataListLoading = false
},
getDataList (bool) {
let sql = "select a.username,a.user_display userDisplay,b.site,b.bu_no as buNo from sys_user a left join AccessBu b on a.username=b.username where b.bu_no='"
sql += this.conSql+"'"
sql += " and b.site = '" + this.site + "'"
if (bool) {
sql += " and (a.username like '%" + this.param + "%' OR a.user_display like '%" + this.param + "%'" +" ) "
}
if (this.param1) {
sql += " and a.username like '%" + this.param1 + "%'"
}
if (this.param2) {
sql += " and a.user_display like '%" + this.param2 + "%'"
}
getChooselistData({"sqlcode": sql}).then(({data}) => {
if (data.code == 0) {
this.dataList = data.baseListData
} else {
this.$message.error(data.msg)
}
})
},
getRowData (row) {
this.visible = false
this.$emit('getBaseData',row)
},
closeDialog () {
this.dataList = []
}
}
}
</script>
<style>
</style>

205
src/views/modules/proofing/profingFile.vue

@ -0,0 +1,205 @@
<script>
import UploadFileList from "../common/uploadFileList.vue";
import {downloadFileList, getFileContentList, removeFile} from "../../../api/test/testInformation";
import {deleteQuotationFile, downLoadQuotationFile} from "../../../api/quotation/quotationInformation";
export default {
name: "profingFile",
components: {UploadFileList},
props:{
dataList:{
type: Array,
default: ()=>[],
},
testNo:{
type:String,
},
columnList:{
type: Array,
default: ()=>[],
},
height:{
type:Number,
default:300
},
},
model:{
prop:"dataList",
event:"change"
},
data(){
return{
uploadDialog:false,
fileRemark:'',
token:'',
fileList:[],
}
},
methods:{
getFileContentList(){
let params = {
orderRef1:this.$store.state.user.site,
orderRef2:this.testNo
}
getFileContentList(params).then(({data})=>{
if (data && data.code === 0){
this.$emit("change",data.rows)
}else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
this.$message.error(error)
})
},
downloadFile (row) {
downLoadQuotationFile(row).then(({data}) => {
// 不限制文件下载类型
const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})
// 下载文件名称
const fileName = row.fileName
// a标签下载
const linkNode = document.createElement('a')
linkNode.download = fileName // a标签的download属性规定下载文件的名称
linkNode.style.display = 'none'
linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
document.body.appendChild(linkNode)
linkNode.click() // 模拟在按钮上的一次鼠标单击
URL.revokeObjectURL(linkNode.href) // 释放URL 对象
document.body.removeChild(linkNode)
})
},
removeFile(row){
this.$confirm('确定要删除此文件?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteQuotationFile(row).then(({data}) => {
if (data && data.code === 0) {
this.getFileContentList()
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
},
previewFile(row){
// 预览文件
let image = ['jpg', 'jpeg', 'png', 'gif', 'bmp'];
let type = '';
if (image.includes(row.fileType.toLowerCase())){
type = 'image/' + row.fileType;
}
let video = ['mp4', 'avi', 'mov', 'wmv', 'flv'];
if (video.includes(row.fileType.toLowerCase())){
type = 'video/' + row.fileType;
}
let txt = ['txt'];
if (txt.includes(row.fileType.toLowerCase())){
type = 'text/plain';
}
let office = ['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx'];
if (office.includes(row.fileType.toLowerCase())){
// if (row.fileType.toLowerCase() === 'doc' || row.fileType.toLowerCase() === 'docx'){
// type = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
// } else if (row.fileType.toLowerCase() === 'ppt' || row.fileType.toLowerCase() === 'pptx'){
// type = 'application/vnd.openxmlformats-officedocument.presentationml.presentation';
// } else {
// type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
// }
this.$message.warning(`该文件格式暂不支持预览`)
return
}
let pdf = ['pdf'];
if (pdf.includes(row.fileType.toLowerCase())){
type = 'application/pdf';
}
if (type === ''){
this.$message.warning(`该文件格式暂不支持预览`)
return;
}
downLoadQuotationFile(row).then(({data}) => {
const blob = new Blob([data], { type: type });
// 创建URL来生成预览
const fileURL = URL.createObjectURL(blob);
// 在新标签页中打开文件预览
const newTab = window.open(fileURL, '_blank');
});
},
downloadBtn(){
if (this.selectionFile.length < 1){
this.$message.warning('请选择需要下载的文件')
return
}
for (let i = 0; i < this.selectionFile.length; i++) {
this.downloadFile(this.selectionFile[i])
}
},
handleSelectionChange(val){
this.selectionFile = val
}
},
watch:{
uploadDialog(newValue,oldValue){
if (newValue === false){
this.getFileContentList();
}
},
}
}
</script>
<template>
<div>
<div style="margin: 5px 0px">
<el-button type="primary" @click="uploadDialog = true">上传文件</el-button>
<el-button type="primary" @click="downloadBtn" >下载</el-button>
</div>
<el-table
:height="height"
:data="dataList"
border
@selection-change="handleSelectionChange"
style="width: 100%">
<el-table-column type="selection" label="序号" align="center"/>
<el-table-column
v-for="(item,index) in columnList" :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
fixed="right"
header-align="center"
align="center"
width="120"
label="操作">
<template slot-scope="{row,$index}">
<!-- <el-link style="cursor:pointer;" @click="downloadFile(row)">下载</el-link>-->
<el-link style="cursor:pointer;" @click="removeFile(row)">删除</el-link>
<el-link style="cursor:pointer;" @click="previewFile(row)">预览</el-link>
</template>
</el-table-column>
</el-table>
<upload-file-list folder="testFile" :label="'测试单号:'" :file-list.sync="fileList" :no="testNo" :upload-dialog.sync="uploadDialog" path="/upload/test"></upload-file-list>
</div>
</template>
<style scoped>
</style>

26
src/views/modules/proofing/requestForProofing.vue

@ -238,7 +238,7 @@
<!-- <span style="cursor: pointer" slot="label" @click="getBaseList(103,1)"><a herf="#">CS</a></span>-->
<label v-if="columnFlagByHeader('tracker')" slot="label">CS</label>
<span v-else style="cursor: pointer" slot="label" @click="getBaseList(2051)"><a herf="#">CS</a></span>
<el-input v-model="modalData.trackerName" :disabled="columnFlagByHeader('tracker')" readonly></el-input>
<el-input v-model="modalData.trackerName" :disabled="columnFlagByHeader('tracker')" readonly ></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
@ -247,7 +247,7 @@
<!-- <span style="cursor: pointer" slot="label" @click="getBaseList(103,2)"><a herf="#">NPI工程师</a></span>-->
<label v-if="columnFlagByHeader('engineer')" slot="label">NPI工程师</label>
<span v-else style="cursor: pointer" slot="label" @click="getBaseList(2052)"><a herf="#">NPI工程师</a></span>
<el-input v-model="modalData.engineerName" :disabled="columnFlagByHeader('engineer')" readonly></el-input>
<el-input v-model="modalData.engineerName" :disabled="columnFlagByHeader('engineer')" readonly ></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
@ -269,7 +269,7 @@
</el-row>
<el-row :gutter="15">
<el-col :span="24">
<el-form-item label="技术注意事项" style="height: 90px">
<el-form-item label="备注" style="height: 90px">
<el-input type="textarea" v-model="modalData.technicalConsiderations" :rows="3" resize='none'
show-word-limit></el-input>
</el-form-item>
@ -495,7 +495,7 @@
<el-tab-pane label="打样详细信息" name="proofing_detail_information" v-if="false">
<el-form :inline="true" label-position="top" :model="proofingDetailData"
style="margin-left: 10px;margin-top: 10px;">
<el-form-item label="技术注意事项">
<el-form-item label="备注">
<el-input type="textarea" v-model="proofingDetailData.technicalConsiderations" readonly :rows="3"
resize='none' show-word-limit style="width: 600px;height: 30px"></el-input>
</el-form-item>
@ -919,6 +919,7 @@
</el-row>
</el-form>
</el-tab-pane>
</el-tabs>
<!-- chooseList模态框 -->
@ -2519,6 +2520,7 @@ export default {
* 客户信息新增/编辑
*/
saveData() {
this.$refs.modalForm.validate((valid) => {
if (!valid) {
this.validateDataValue()
@ -2527,6 +2529,22 @@ export default {
this.$message.warning('请选择项目料号')
return
}
if(this.modalData.trackerName==''||this.modalData.trackerName==null){
this.$message.warning('请选择CS')
return
}
if(this.modalData.engineerName==''||this.modalData.engineerName==null){
this.$message.warning('请选择NPI工程师')
return
}
if(this.modalData.approverName==''||this.modalData.approverName==null){
this.$message.warning('请选择Approver')
return
}
if(this.delegateAccessName==''||this.delegateAccessName==null){
this.$message.warning('请选择DelegateAccess')
return
}
this.confirmProjectPart();
// 将选中的 人员信息添加到请求
this.modalData.delegateAccessList = this.selectionDelegateAccess

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

@ -15,7 +15,7 @@
</el-form-item>
<el-form-item prop="testPartNo" :rules="dataRole.testPartNo" style="margin-left: 12px">
<span slot="label" style="" @click="getBaseList(134,1)" ><a herf="#">测试料号</a></span>
<el-input v-model="dataForm.testPartNo" @change="changeTestDesc" style="width: 130px" ></el-input>
<el-input v-model="dataForm.testPartNo" @change="changeTestDesc" style="width: 130px" :disabled="dataForm.id!=0" ></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="100px" :rules="dataRole">
@ -36,20 +36,20 @@
<el-input v-model="dataForm.oriCodeNo" disabled style="width: 130px" ></el-input>
</el-form-item>
<el-form-item :label="'版本号'" prop="revNo" :rules="dataRole.revNo">
<el-input v-model="dataForm.revNo" style="width: 130px" ></el-input>
</el-form-item>
<el-form-item >
<span slot="label" style="" @click="quotationOfficerChooseModal()"><a herf="#">报价员</a></span>
<el-input v-model="dataForm.quotationOfficer" readonly style="width: 274px" @focus="quotationOfficerChooseModal()"></el-input>
<el-input v-model="dataForm.revNo" style="width: 130px" :disabled="dataForm.id!=0" ></el-input>
</el-form-item>
<!-- <el-form-item >-->
<!-- <span slot="label" style="" @click="quotationOfficerChooseModal()"><a herf="#">报价员</a></span>-->
<!-- <el-input v-model="dataForm.quotationOfficer" readonly style="width: 274px" @focus="quotationOfficerChooseModal()"></el-input>-->
<!-- </el-form-item>-->
</el-form>
<el-form :inline="true" label-position="top" label-width="100px" >
<el-form-item >
<span slot="label" style="" @click="engineerChooseModal()"><a herf="#">工程师</a></span>
<span slot="label" style="" @click="engineerChooseModal()"><a herf="#">Select PE Engineer</a></span>
<el-input v-model="dataForm.engineer" readonly style="width: 274px" @focus="engineerChooseModal()"></el-input>
</el-form-item>
<el-form-item >
<span slot="label" style="" @click="technicianModal()"><a herf="#">技术员</a></span>
<span slot="label" style="" @click="technicianModal()"><a herf="#">Select Artwork</a></span>
<el-input v-model="dataForm.technician" readonly style="width: 274px" @focus="technicianModal()"></el-input>
</el-form-item>
</el-form>

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

@ -144,6 +144,7 @@
}
//初始化参数
this.searchData = JSON.parse(JSON.stringify(inData));
if(this.searchData.ifDisableFlag){
this.ifDisableFlag=true
}
@ -157,6 +158,7 @@
},
searchTable(){
searchBMPropertiesValue(this.searchData).then(({data}) => {
this.tableData = data.rows;
});
searchBMPropertiesHeaderForBM(this.searchData).then(({data}) => {
@ -252,7 +254,9 @@
if (arr[0].updateFlag === 'N') {
this.ifDisableFlag = true
} else {
this.ifDisableFlag = false
if(!this.searchData.ifDisableFlag){
this.ifDisableFlag = false
}
}
} else {
this.ifDisableFlag = true

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

@ -76,7 +76,6 @@
//刷新表格
this.searchData.type='PackageInfo'
this.$refs.PackageInfo.init(JSON.parse(JSON.stringify(this.searchData)))
},
},

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

@ -261,7 +261,6 @@
this.searchTable();
this.colorSearch();
//刷新表格
console.log(this.searchData)
this.searchData.type='printing'
this.$refs.printing.init(JSON.parse(JSON.stringify(this.searchData)))
},

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

@ -5,11 +5,11 @@
<dict-data-select :site="searchData.site" v-if="searchData.site" v-model="sheetData.process" dict-type="bm_process" style="width: 120px"></dict-data-select>
</el-form-item>
<el-form-item >
<span slot="label" style="" @click="getBaseList(103,1)"><a herf="#">热转移打印人员</a></span>
<span slot="label" style="" @click="getBaseList(1)"><a herf="#">热转移打印人员</a></span>
<el-input v-model="sheetData.overPrintOperatorName" ref="overPrintOperatorName" placeholder="请选择人员" readonly style="width: 120px" ></el-input>
</el-form-item>
<el-form-item >
<span slot="label" style="" @click="getBaseList(103,2)"><a herf="#">印刷人员</a></span>
<span slot="label" style="" @click="getBaseList(2)"><a herf="#">印刷人员</a></span>
<el-input v-model="sheetData.printOperatorName" ref="printOperatorName" placeholder="请选择人员" readonly style="width: 120px" ></el-input>
</el-form-item>
<el-form-item label=" ">
@ -428,7 +428,7 @@
<el-button type="primary" @click="modalFlag=false">取消</el-button>
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<ChooseUser ref="baseList" @getBaseData="getBaseData"></ChooseUser>
</div>
</template>
@ -448,7 +448,7 @@
import {
getNodeAuthority, // 获取节点权限
} from '@/api/changeManagement/changeManagement.js'
import Chooselist from '@/views/modules/common/Chooselist'
import ChooseUser from '@/views/modules/common/ChooseUser'
import {
searchOperatorWithSite,
} from "@/api/project/project.js"
@ -474,7 +474,7 @@
export default {
components: {
DictDataSelect,
Chooselist,
ChooseUser,
prepress,
printing,
printOther,
@ -875,43 +875,42 @@
},
methods: {
// 获取基础数据列表S
getBaseList (val, type) {
getBaseList ( type) {
if(this.ifDisableFlag){
return false
}
this.tagNo = val
this.tagNo1 = type
this.$nextTick(() => {
let strVal = ''
if (val === 103) {
if(type==1) {
strVal = this.sheetData.overPrintOperator
}
if(type==2) {
strVal = this.sheetData.printOperator
}
}
this.$refs.baseList.init(val, strVal)
this.$refs.baseList.init(this.searchData.site,this.searchData.buNo, strVal)
})
},
/* 列表方法的回调 */
getBaseData (val) {
if (this.tagNo === 103) {
if(this.tagNo1==1) {
this.sheetData.overPrintOperator = val.username
this.sheetData.overPrintOperatorName = val.user_display
this.$nextTick(() => {
this.$triggerInputEvent(this.$refs.overPrintOperatorName);
});
}
if(this.tagNo1==2) {
this.sheetData.printOperator = val.username
this.sheetData.printOperatorName = val.user_display
this.$nextTick(() => {
this.$triggerInputEvent(this.$refs.printOperatorName);
});
}
if(this.tagNo1==1) {
this.sheetData.overPrintOperator = val.username
this.sheetData.overPrintOperatorName = val.userDisplay
this.$nextTick(() => {
this.$triggerInputEvent(this.$refs.overPrintOperatorName);
});
}
if(this.tagNo1==2) {
this.sheetData.printOperator = val.username
this.sheetData.printOperatorName = val.userDisplay
this.$nextTick(() => {
this.$triggerInputEvent(this.$refs.printOperatorName);
});
}
},
@ -988,7 +987,6 @@
}
},
closeModel(){
console.log('666')
this.routeModelFlag=false;
},
//根据itemType

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

@ -101,13 +101,13 @@
</div></el-col>
<el-col :span="6"><div class="grid-content bg-purple">
<el-form-item >
<span slot="label" style="" @click="getBaseList(103,1)"><a herf="#">CQC人员</a></span>
<span slot="label" style="" @click="getBaseList(1)"><a herf="#">CQC人员</a></span>
<el-input v-model="dataForm.cqcOperatorName" ref="cqcOperatorName" placeholder="请选择人员" readonly style="" ></el-input>
</el-form-item>
</div></el-col>
<el-col :span="6"><div class="grid-content bg-purple">
<el-form-item >
<span slot="label" style="" @click="getBaseList(103,2)"><a herf="#">FAI人员</a></span>
<span slot="label" style="" @click="getBaseList(2)"><a herf="#">FAI人员</a></span>
<el-input v-model="dataForm.faiOperatorName" ref="faiOperatorName" placeholder="请选择人员" readonly style="" ></el-input>
</el-form-item>
</div></el-col>
@ -131,25 +131,25 @@
<el-row :gutter="20">
<el-col :span="6"><div class="grid-content bg-purple">
<el-form-item >
<span slot="label" style="" @click="getBaseList(103,3)"><a herf="#">PE人员</a></span>
<span slot="label" style="" @click="getBaseList(3)"><a herf="#">PE人员</a></span>
<el-input v-model="dataForm.peOperaterName" ref="peOperaterName" placeholder="请选择人员" readonly style="" ></el-input>
</el-form-item>
</div></el-col>
<el-col :span="6"><div class="grid-content bg-purple">
<el-form-item >
<span slot="label" style="" @click="getBaseList(103,4)"><a herf="#">CS人员</a></span>
<span slot="label" style="" @click="getBaseList(4)"><a herf="#">CS人员</a></span>
<el-input v-model="dataForm.csOperaterName" ref="csOperaterName" placeholder="请选择人员" readonly style="" ></el-input>
</el-form-item>
</div></el-col>
<el-col :span="6"><div class="grid-content bg-purple">
<el-form-item >
<span slot="label" style="" @click="getBaseList(103,5)"><a herf="#">DCC人员</a></span>
<span slot="label" style="" @click="getBaseList(5)"><a herf="#">DCC人员</a></span>
<el-input v-model="dataForm.dccOperaterName" ref="dccOperaterName" placeholder="请选择人员" readonly style="" ></el-input>
</el-form-item>
</div></el-col>
<el-col :span="6"><div class="grid-content bg-purple">
<el-form-item >
<span slot="label" style="" @click="getBaseList(103,6)"><a herf="#">MP人员</a></span>
<span slot="label" style="" @click="getBaseList(6)"><a herf="#">MP人员</a></span>
<el-input v-model="dataForm.mpOperatorName" ref="mpOperatorName" placeholder="请选择人员" readonly style="" ></el-input>
</el-form-item>
</div></el-col>
@ -231,7 +231,7 @@
</span>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<ChooseUser ref="baseList" @getBaseData="getBaseData"></ChooseUser>
</div>
</template>
@ -249,10 +249,10 @@
import {
searchOperatorWithSite,
} from "@/api/project/project.js"
import Chooselist from '@/views/modules/common/Chooselist'
import ChooseUser from '@/views/modules/common/ChooseUser'
export default {
components: {
Chooselist
ChooseUser
},
data() {
return {
@ -331,15 +331,14 @@
},
methods: {
// 获取基础数据列表S
getBaseList (val, type) {
getBaseList (type) {
if(this.ifDisableFlag){
return false
}
this.tagNo = val
this.tagNo1 = type
this.$nextTick(() => {
let strVal = ''
if (val === 103) {
if(type==1) {
strVal = this.dataForm.cqcOperator
}
@ -358,55 +357,54 @@
if(type==6) {
strVal = this.dataForm.mpOperator
}
}
this.$refs.baseList.init(val, strVal)
this.$refs.baseList.init(this.searchData.site,this.searchData.buNo, strVal)
})
},
/* 列表方法的回调 */
getBaseData (val) {
if (this.tagNo === 103) {
if(this.tagNo1==1) {
this.dataForm.cqcOperator = val.username
this.dataForm.cqcOperatorName = val.user_display
this.dataForm.cqcOperatorName = val.userDisplay
this.$nextTick(() => {
this.$triggerInputEvent(this.$refs.cqcOperatorName);
});
}
if(this.tagNo1==2) {
this.dataForm.faiOperator = val.username
this.dataForm.faiOperatorName = val.user_display
this.dataForm.faiOperatorName = val.userDisplay
this.$nextTick(() => {
this.$triggerInputEvent(this.$refs.faiOperatorName);
});
}
if(this.tagNo1==3) {
this.dataForm.peOperater = val.username
this.dataForm.peOperaterName = val.user_display
this.dataForm.peOperaterName = val.userDisplay
this.$nextTick(() => {
this.$triggerInputEvent(this.$refs.peOperaterName);
});
}
if(this.tagNo1==4) {
this.dataForm.csOperater = val.username
this.dataForm.csOperaterName = val.user_display
this.dataForm.csOperaterName = val.userDisplay
this.$nextTick(() => {
this.$triggerInputEvent(this.$refs.csOperaterName);
});
}
if(this.tagNo1==5) {
this.dataForm.dccOperater = val.username
this.dataForm.dccOperaterName = val.user_display
this.dataForm.dccOperaterName = val.userDisplay
this.$nextTick(() => {
this.$triggerInputEvent(this.$refs.dccOperaterName);
});
}
if(this.tagNo1==6) {
this.dataForm.mpOperator = val.username
this.dataForm.mpOperatorName = val.user_display
this.dataForm.mpOperatorName = val.userDisplay
this.$nextTick(() => {
this.$triggerInputEvent(this.$refs.mpOperatorName);
});
}
}
},
//初始化组件的参数

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

@ -158,7 +158,7 @@
}else if(this.activeName == 'bom'){
this.getBom();
}else if(this.activeName == 'routing'){
this.changeHeight(1100);
this.changeHeight(2000);
this.getRouting();
}else if(this.activeName == 'technicalRequirement'){
this.getTechnicalRequirement();

179
src/views/modules/test/requestForTest.vue

@ -251,7 +251,7 @@
<el-row :gutter="10">
<el-col :span="10">
<el-form-item prop="testPartNo" label="物料编码">
<span slot="label" v-if="modalData.projectId && modalData.flag === '1'" @click="projectPartModelFlag = true"><a herf="#">项目编码</a></span>
<span slot="label" v-if="modalData.projectId && modalData.flag === '1'" @click="projectPartModelFlag = true"><a herf="#">物料编码</a></span>
<el-input :disabled="!modalData.projectId || modalData.flag !== '1'" v-model="modalData.testPartNo"></el-input>
</el-form-item>
</el-col>
@ -306,7 +306,7 @@
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="技术注意事项" style="height: 90px">
<el-form-item label="备注" style="height: 90px">
<el-input type="textarea" :disabled="testInformationFlag('technicalConsiderations') === 'N' && modalData.flag === '2'"
v-model="modalData.technicalConsiderations" :rows="3" resize='none' show-word-limit></el-input>
</el-form-item>
@ -323,7 +323,32 @@
<test-properties v-if="modalFlag" v-model:data-list="copyTestPropertiesList" ref="dialogTestAttribute" :test-no="modalData.testNo"></test-properties>
</el-tab-pane>
<el-tab-pane label="物料属性" :disabled="!activeTabList.includes('partAttribute')" name="partAttribute">
<test-attribute v-if="modalFlag" :attribute-list="dialogProperties" ref="dialogAttribute" :test-no="modalData.testNo"></test-attribute>
<el-table
:data="partItemList1"
:height="secondHeight - 10"
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>
</el-tab-pane>
<el-tab-pane label="物料信息" name="part" v-if="false">
<el-form label-position="top" :model="projectPartData">
@ -598,7 +623,7 @@
<!-- 测试详细信息页签 -->
<el-tab-pane label="测试详细信息" name="test_detail_information" v-if="false">
<el-form :inline="true" label-position="top" :model="testDetailData" style="margin-left: 10px;margin-top: 10px;">
<el-form-item label="技术注意事项">
<el-form-item label="备注">
<el-input type="textarea" v-model="testDetailData.technicalConsiderations" readonly :rows="3" resize='none' show-word-limit style="width: 600px;height: 30px"></el-input>
</el-form-item>
</el-form>
@ -722,7 +747,32 @@
<test-properties ref="tabProperties" v-model:data-list="testPropertiesList" :test-no="testCurrentRow.testNo" :height="500"></test-properties>
</el-tab-pane>
<el-tab-pane label="物料属性" name="test_attribute" style="padding: 5px">
<test-attribute ref="tabAttribute" :attribute-list="attributeList" :test-no="testCurrentRow.testNo" :height="500"></test-attribute>
<el-table
:data="partItemList2"
:height="500"
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>
</el-tab-pane>
<el-tab-pane label="材料信息" name="test_so_bom" style="padding: 5px">
<test-table ref="tabSoBom" :test-number="testCurrentRow.testNumber" :test-no="testCurrentRow.testNo" :height="500" v-model:data-list="testSoBomList"></test-table>
@ -1113,7 +1163,7 @@
import TestRoutingTable from "./testSoRouting/testRoutingTable.vue";
import {selectTestSoRoutingList} from "../../../api/test/testSoRouting";
import TestAttribute from "./testSoAttribute/testAttribute.vue";
import {partPropertiesList} from "../../../api/base/properties";
import {partPropertiesList,getPartItemWithPartNo} from "@/api/base/properties.js";
import TestProperties from "./testAttribute/testProperties.vue";
import {getTestPropertiesList,searchTestPropertiesItem} from "../../../api/test/testProperties";
import TestFile from "./file/testFile.vue";
@ -1189,6 +1239,8 @@
},
data () {
return {
partItemList1:[],
partItemList2:[],
testFileList:[],
dialogProperties:[],
attributeList:[],
@ -2191,7 +2243,89 @@
// 项目集合
projectList:[],
addressModelFlag: false,
contactModelFlag: false
contactModelFlag: false,
columnItemList: [
{
userId: this.$store.state.user.name,
functionId: 103001,
serialNumber: '103001Table2PropertiesItemID',
tableId: "103001Table2",
tableName: "物料属性表",
columnProp: 'propertiesItemNo',
headerAlign: "center",
align: "center",
columnLabel: '属性编码',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 103001,
serialNumber: '103001Table2PropertiesItemDesc',
tableId: "103001Table2",
tableName: "物料属性表",
columnProp: 'itemDesc',
headerAlign: "center",
align: "left",
columnLabel: '属性名称',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 103001,
serialNumber: '103001Table2ValueType',
tableId: "103001Table2",
tableName: "物料属性表",
columnProp: 'valueType',
headerAlign: "center",
align: "center",
columnLabel: '属性类型',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 103001,
serialNumber: '103001Table2ValueChooseFlag',
tableId: "103001Table2",
tableName: "物料属性表",
columnProp: 'textValue',
headerAlign: "center",
align: "left",
columnLabel: '实测值',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
columnWidth: 100,
},
// {
// userId: this.$store.state.user.name,
// functionId: 103001,
// serialNumber: '103001Table2ValueChooseFlag',
// tableId: "103001Table2",
// tableName: "物料属性表",
// columnProp: 'numValue',
// headerAlign: "center",
// align: "center",
// columnLabel: '数字值',
// columnHidden: false,
// columnImage: false,
// status: true,
// fixed: '',
// columnWidth: 70,
// },
],
}
},
mounted () {
@ -2334,9 +2468,9 @@
this.refreshCurrentTabTable()
},
dialogTabClick(){
// if (this.activeTab === 'attribute') {
// this.getTestProperties();
// }
if (this.activeTab === 'partAttribute') {
this.getPartItem(this.modalData.site,this.modalData.testPartNo,1);
}
},
/**
* 当前值发生变化的时候修改
@ -2376,6 +2510,9 @@
this.getProjectInformation()
} else if (this.activeTable === 'customer_information') {
this.getCustomerInformation()
}else if (this.activeTable === 'test_attribute') {
console.log(this.testCurrentRow)
this.getPartItem(this.testCurrentRow.site,this.testCurrentRow.testPartNo,2);
}
},
@ -3463,6 +3600,28 @@
})
},
getPartItem(site,partNo,type) {
let tempData = {
site: site,
partNo: partNo,
recordType: 'IP'
}
getPartItemWithPartNo(tempData).then(({data}) => {
if (data && data.code === 0) {
if(type==1){
this.partItemList1 = data.rows
}else {
this.partItemList2 = data.rows
}
} else {
if(type==1){
this.partItemList1 = []
}else {
this.partItemList2 = []
}
}
})
},
}
}

Loading…
Cancel
Save