Browse Source

检验标准

master
han\hanst 2 weeks ago
parent
commit
84b2fab29f
  1. 2
      src/api/qc/qc.js
  2. 5
      src/api/sift/queryUserSetting.js
  3. 2
      src/views/modules/eam/eamProjectPartInfo.vue
  4. 97
      src/views/modules/qc/PQCResultEntry.vue
  5. 131
      src/views/modules/qc/qcPartAttribute.vue

2
src/api/qc/qc.js

@ -83,6 +83,8 @@ export const uploadPartAttributeExcel = data => createAPI(`/pms/qc/uploadPartAtt
export const getOperationDescList = data => createAPI(`/pms/qc/getOperationDescList`,'post',data) export const getOperationDescList = data => createAPI(`/pms/qc/getOperationDescList`,'post',data)
export const getManufacturerList = data => createAPI(`/pms/qc/getManufacturerList`,'post',data) export const getManufacturerList = data => createAPI(`/pms/qc/getManufacturerList`,'post',data)
export const getPartTemplateLists = data => createAPI(`/pms/qc/getPartTemplateLists`,'post',data) export const getPartTemplateLists = data => createAPI(`/pms/qc/getPartTemplateLists`,'post',data)
export const qcAttributeTemplateItemDetailsSearch = data => createAPI(`/pms/qc/qcAttributeTemplateItemDetailsSearch`,'post',data)
export const qcAttributeTemplateItemSave = data => createAPI(`/pms/qc/qcAttributeTemplateItemSave`,'post',data)
export const qcPartAttributeEdit = data => createAPI(`/pms/qc/qcPartAttributeEdit`,'post',data) export const qcPartAttributeEdit = data => createAPI(`/pms/qc/qcPartAttributeEdit`,'post',data)
export const overLoadSearchPartInfo = data => createAPI(`/pms/qc/overLoadSearchPartInfo`,'post',data) export const overLoadSearchPartInfo = data => createAPI(`/pms/qc/overLoadSearchPartInfo`,'post',data)

5
src/api/sift/queryUserSetting.js

@ -7,3 +7,8 @@ export const saveOrUpdateBatch = (data) => createAPI(`/sift/saveOrUpdateBatch`,'
export const saveQueryHeaderDetail = (data) => createAPI(`/sift/saveRecord`,'post',data) export const saveQueryHeaderDetail = (data) => createAPI(`/sift/saveRecord`,'post',data)
export const removeQueryHeaderDetail = (data) => createAPI(`/sift/record/remove`,'post',data) export const removeQueryHeaderDetail = (data) => createAPI(`/sift/record/remove`,'post',data)
export const updateQueryHeaderDetail = (data) => createAPI(`/sift/record/update`,'post',data) export const updateQueryHeaderDetail = (data) => createAPI(`/sift/record/update`,'post',data)
export const searchSavedSchemeSummary = (data) => createAPI(`/sift/center/summary`,'post',data)
export const searchSavedSchemeCount = (data) => createAPI(`/sift/center/count`,'post',data)
export const resolveSavedSchemeRoute = (data) => createAPI(`/sift/center/resolveRoute`,'post',data)
export const searchCenterMenuSearchFields = (data) => createAPI(`/sift/center/menuSearchFields`,'post',data)
export const saveCenterScheme = (data) => createAPI(`/sift/center/saveScheme`,'post',data)

2
src/views/modules/eam/eamProjectPartInfo.vue

@ -96,7 +96,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="'ERP正式料号'"> <el-form-item :label="'ERP正式料号'">
<el-select v-model="searchData.finalPartNo" placeholder="请选择" clearable style="width: 130px">
<el-select v-model="searchData.finalPartNo" filterable placeholder="请选择" clearable style="width: 130px">
<el-option <el-option
v-for = "i in finalPartNosList" v-for = "i in finalPartNosList"
:key = "i.finalPartNoId" :key = "i.finalPartNoId"

97
src/views/modules/qc/PQCResultEntry.vue

@ -891,7 +891,7 @@
<el-dialog title="人员清单" :close-on-click-modal="false" v-drag :visible.sync="operatorModelFlag" width="820px"> <el-dialog title="人员清单" :close-on-click-modal="false" v-drag :visible.sync="operatorModelFlag" width="820px">
<div class="rq"> <div class="rq">
<el-form :inline="true" label-position="top" :model="operatorData"> <el-form :inline="true" label-position="top" :model="operatorData">
<el-form-item v-if="operatorData.flag !== '2'" :label="'所属角色'">
<el-form-item :label="'所属角色'">
<el-select v-model="operatorData.roleId" placeholder="请选择" style="width: 120px"> <el-select v-model="operatorData.roleId" placeholder="请选择" style="width: 120px">
<el-option <el-option
v-for = "i in roleList" v-for = "i in roleList"
@ -1167,6 +1167,7 @@ export default {
eamObjectList:[], eamObjectList:[],
queryResourceData:[], queryResourceData:[],
partList2:[], partList2:[],
partList2CacheMap: {},
// //
favorite: false, favorite: false,
// start // start
@ -1223,7 +1224,10 @@ export default {
dataListSelections: [], dataListSelections: [],
partFlag: false, partFlag: false,
pdfDialogVisible: false, pdfDialogVisible: false,
partModalData:{},
partModalData: {
partNo: '',
partDesc: ''
},
modalData: { modalData: {
flag: '', flag: '',
site: '', site: '',
@ -2766,12 +2770,10 @@ export default {
}) })
}, },
//
getOperatorList () {
this.operatorData.flag = '1'
this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo
// 线
setDefaultLineInspectionRole () {
if (this.roleList.length > 0) { if (this.roleList.length > 0) {
let filterList = this.roleList.filter(item => item.roleName === '机修人员')
let filterList = this.roleList.filter(item => item.roleName && item.roleName.indexOf('换线点检') > -1)
if (filterList.length > 0) { if (filterList.length > 0) {
this.operatorData.roleId = filterList[0].roleId this.operatorData.roleId = filterList[0].roleId
} else { } else {
@ -2780,6 +2782,13 @@ export default {
} else { } else {
this.operatorData.roleId = '' this.operatorData.roleId = ''
} }
},
//
getOperatorList () {
this.operatorData.flag = '1'
this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo
this.setDefaultLineInspectionRole()
// //
this.$nextTick(() => this.$refs.operatorTable.clearSelection()) this.$nextTick(() => this.$refs.operatorTable.clearSelection())
// //
@ -2806,6 +2815,7 @@ export default {
getResponsiblePersonList () { getResponsiblePersonList () {
this.operatorData.flag = '2' this.operatorData.flag = '2'
this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo
this.setDefaultLineInspectionRole()
// //
this.$nextTick(() => this.$refs.operatorTable.clearSelection()) this.$nextTick(() => this.$refs.operatorTable.clearSelection())
@ -2934,6 +2944,42 @@ export default {
} }
}, },
// BURFID
getDefaultBuNo () {
if (!this.userBuList || this.userBuList.length === 0) {
return ''
}
// RFID&RFID
let exactRfidBu = this.userBuList.find(item => (item.buDesc || '').trim().toUpperCase() === 'RFID')
if (exactRfidBu) {
return exactRfidBu.buNo
}
let fuzzyRfidBu = this.userBuList.find(item => (item.buDesc || '').toUpperCase().indexOf('RFID') > -1)
return fuzzyRfidBu ? fuzzyRfidBu.buNo : this.userBuList[0].buNo
},
// busitebuNo
resolveSiteAndBuNoByBu (bu) {
if (!bu) {
return {
site: '',
buNo: ''
}
}
const buVal = String(bu)
if (buVal.indexOf('_') > -1) {
const buArr = buVal.split('_')
return {
site: buArr[0],
buNo: buArr[1] || ''
}
}
return {
site: this.$store.state.user.site,
buNo: buVal
}
},
// bu // bu
getSiteAndBuByUserName () { getSiteAndBuByUserName () {
let tempData = { let tempData = {
@ -2942,6 +2988,9 @@ export default {
getSiteAndBuByUserName(tempData).then(({data}) => { getSiteAndBuByUserName(tempData).then(({data}) => {
if (data.code === 0) { if (data.code === 0) {
this.userBuList = data.rows this.userBuList = data.rows
if (!this.modalData.bu) {
this.modalData.bu = this.getDefaultBuNo()
}
} }
}) })
}, },
@ -3203,10 +3252,29 @@ export default {
}) })
}, },
queryALLPartList(){ queryALLPartList(){
queryPartDescByNo(this.partModalData).then(({data})=>{
if (data.code==0){
this.partList2 = data.rows
this.partFlag = true this.partFlag = true
const partNo = (this.partModalData.partNo || '').trim()
const partDesc = (this.partModalData.partDesc || '').trim()
const buInfo = this.resolveSiteAndBuNoByBu(this.modalData.bu)
if (!buInfo.site || !buInfo.buNo) {
this.$message.warning('请先选择BU!')
return
}
const queryData = {
site: buInfo.site,
sourceBu: buInfo.buNo,
partNo: partNo,
partDesc: partDesc
}
const cacheKey = `${queryData.site}|${queryData.sourceBu}|${queryData.partNo}|${queryData.partDesc}`
if (this.partList2CacheMap[cacheKey]) {
this.partList2 = this.partList2CacheMap[cacheKey]
return
}
queryPartDescByNo(queryData).then(({data})=>{
if (data.code==0){
this.partList2 = data.rows || []
this.partList2CacheMap[cacheKey] = this.partList2
}else { }else {
this.$message.error("系统异常") this.$message.error("系统异常")
} }
@ -3277,7 +3345,7 @@ export default {
this.modalData = { this.modalData = {
flag: '1', flag: '1',
site: '', site: '',
bu: this.userBuList[0].buNo,
bu: this.getDefaultBuNo(),
inspectionNo: '', inspectionNo: '',
partNo: '', partNo: '',
partDesc: '', partDesc: '',
@ -3541,7 +3609,7 @@ export default {
this.modalData = { this.modalData = {
flag: '1', flag: '1',
site: '', site: '',
bu: this.userBuList[0].buNo,
bu: this.getDefaultBuNo(),
inspectionNo: '', inspectionNo: '',
partNo: '', partNo: '',
partDesc: '', partDesc: '',
@ -3576,6 +3644,11 @@ export default {
changePeople:[this.$store.state.user.name], changePeople:[this.$store.state.user.name],
sopType: 'SOP-ST', sopType: 'SOP-ST',
} }
this.partModalData = {
partNo: '',
partDesc: ''
}
this.partList2 = []
this.operationList = [] this.operationList = []
this.resourceList = [] this.resourceList = []
this.partList = [] this.partList = []

131
src/views/modules/qc/qcPartAttribute.vue

@ -254,9 +254,10 @@
fixed="right" fixed="right"
header-align="center" header-align="center"
align="center" align="center"
width="80"
width="150"
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<a type="text" size="small" style="margin-right: 8px" @click="inspectionStandardListModal(scope.row)">检验标准</a>
<a type="text" size="small" @click="deletePartAttributeDetails(scope.row)">删除模板</a> <a type="text" size="small" @click="deletePartAttributeDetails(scope.row)">删除模板</a>
</template> </template>
</el-table-column> </el-table-column>
@ -268,6 +269,42 @@
</el-footer> </el-footer>
</el-dialog> </el-dialog>
<!-- 物料模板检验标准 -->
<el-dialog title="检验标准清单" :close-on-click-modal="false" v-drag :visible.sync="inspectionStandardListFlag" width="1200px">
<el-form :inline="true" label-position="top">
<el-form-item label="物料编码">
<el-input v-model="standardHeader.attributeNo" readonly style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="物料名称">
<el-input v-model="standardHeader.partDesc" readonly style="width: 300px"></el-input>
</el-form-item>
<el-form-item label="模板编码">
<el-input v-model="standardHeader.templateId" readonly style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="检验类型">
<el-input v-model="standardHeader.inspectionTypeName" readonly style="width: 120px"></el-input>
</el-form-item>
</el-form>
<el-table :height="360" :data="standardList" border style="width: 100%;">
<el-table-column prop="itemNo" header-align="center" align="center" width="130" label="检验项目编码"></el-table-column>
<el-table-column prop="itemDesc" header-align="center" align="left" min-width="260" label="检验项目名称"></el-table-column>
<el-table-column prop="valueType" header-align="center" align="center" width="110" label="检测值类型"></el-table-column>
<el-table-column prop="" header-align="center" align="right" width="140" label="标准值">
<template slot-scope="scope"><el-input v-model="scope.row.defaultValue" style="width: 100%"></el-input></template>
</el-table-column>
<el-table-column prop="" header-align="center" align="right" width="120" label="最大值">
<template slot-scope="scope"><el-input v-model="scope.row.maxValue" style="width: 100%"></el-input></template>
</el-table-column>
<el-table-column prop="" header-align="center" align="right" width="120" label="最小值">
<template slot-scope="scope"><el-input v-model="scope.row.minValue" style="width: 100%"></el-input></template>
</el-table-column>
</el-table>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="saveStandardList()">保存</el-button>
<el-button type="primary" @click="inspectionStandardListFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- 检验模板->快速新增append-to-body 避免嵌套弹窗关闭后父弹窗表格不刷新/空白 --> <!-- 检验模板->快速新增append-to-body 避免嵌套弹窗关闭后父弹窗表格不刷新/空白 -->
<el-dialog title="新增" append-to-body @close="refreshDetailList" :close-on-click-modal="false" v-drag :visible.sync="fastAddFlag" width="1100px"> <el-dialog title="新增" append-to-body @close="refreshDetailList" :close-on-click-modal="false" v-drag :visible.sync="fastAddFlag" width="1100px">
<div style="font-size: 12px"> <div style="font-size: 12px">
@ -678,6 +715,8 @@
deletePartAttributeDetails, // deletePartAttributeDetails, //
saveAttributeDetailed, // saveAttributeDetailed, //
getPartTemplateLists, // getPartTemplateLists, //
qcAttributeTemplateItemDetailsSearch, //
qcAttributeTemplateItemSave, //
inspectionTypeSearch, // inspectionTypeSearch, //
getOperationDescList, // getOperationDescList, //
getManufacturerList, // getManufacturerList, //
@ -1251,6 +1290,18 @@
// //
operationCurrent: -1, operationCurrent: -1,
resourceCurrent: -1, resourceCurrent: -1,
inspectionStandardListFlag: false,
standardHeader: {
site: '',
buNo: '',
attributeNo: '',
attributeType: 'A',
partDesc: '',
templateId: '',
inspectionTypeNo: '',
inspectionTypeName: ''
},
standardList: [],
sopData: { sopData: {
site: '', site: '',
buNo: '', buNo: '',
@ -1685,6 +1736,7 @@
this.detailData.buNo = row.buNo this.detailData.buNo = row.buNo
this.detailData.partNo = row.partNo this.detailData.partNo = row.partNo
this.detailData.attributeNo = row.partNo this.detailData.attributeNo = row.partNo
this.detailData.attributeType = row.attributeType || 'A'
this.detailData.partDesc = row.partDesc this.detailData.partDesc = row.partDesc
this.detailModelFlag = true this.detailModelFlag = true
this.loadTemplateDetailList() this.loadTemplateDetailList()
@ -1784,7 +1836,9 @@
resourceID: this.resourceId, resourceID: this.resourceId,
manufacturerList: this.selectionManufacturer, manufacturerList: this.selectionManufacturer,
attributeType: this.detailData.attributeType, attributeType: this.detailData.attributeType,
inspectionTypeNo: this.detailData.inspectionTypeNo
inspectionTypeNo: this.detailData.inspectionTypeNo,
createBy: this.$store.state.user.name,
updateBy: this.$store.state.user.name
} }
savePartAttributeDetails(inData).then(({data}) => { savePartAttributeDetails(inData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
@ -1866,6 +1920,79 @@
}) })
}, },
//
inspectionStandardListModal (row) {
this.standardHeader = {
site: row.site || this.detailData.site,
buNo: row.buNo || this.detailData.buNo,
attributeNo: this.detailData.partNo,
attributeType: this.detailData.attributeType || 'A',
partDesc: this.detailData.partDesc,
templateId: row.templateId,
inspectionTypeNo: row.inspectionTypeNo || '',
inspectionTypeName: row.inspectionTypeName || ''
}
let req = {
site: this.standardHeader.site,
buNo: this.standardHeader.buNo,
attributeNo: this.standardHeader.attributeNo,
templateId: this.standardHeader.templateId
}
qcAttributeTemplateItemDetailsSearch(req).then(({data}) => {
if (data && data.code === 0) {
this.standardList = data.rows || []
this.inspectionStandardListFlag = true
} else {
this.$alert(data.msg || '查询失败', '错误', {
confirmButtonText: '确定'
})
}
})
},
//
saveStandardList () {
if (!this.standardHeader.templateId) {
this.$message.warning('请先选择模板!')
return
}
if (this.standardList == null || this.standardList.length === 0) {
this.$message.warning('当前模板没有可保存的检验项目!')
return
}
let req = {
site: this.standardHeader.site,
buNo: this.standardHeader.buNo,
attributeNo: this.standardHeader.attributeNo,
attributeType: this.standardHeader.attributeType,
templateId: this.standardHeader.templateId,
createBy: this.$store.state.user.name,
updateBy: this.$store.state.user.name,
itemList: this.standardList.map(item => ({
itemNo: item.itemNo,
defaultValue: item.defaultValue,
maxValue: item.maxValue,
minValue: item.minValue,
orderId: item.orderId
}))
}
qcAttributeTemplateItemSave(req).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
this.inspectionStandardListFlag = false
} else {
this.$alert(data.msg || '保存失败', '错误', {
confirmButtonText: '确定'
})
}
})
},
// //
favoriteIsOk () { favoriteIsOk () {
let userFavorite = { let userFavorite = {

Loading…
Cancel
Save