Browse Source

赫艾修改

master
shenzhouyu 3 weeks ago
parent
commit
f0bddf6c7a
  1. 22
      src/api/qc/qc.js
  2. 4
      src/views/modules/qc/FQCResultEntry.vue
  3. 4
      src/views/modules/qc/IQCResultEntry.vue
  4. 219
      src/views/modules/qc/SQCFileTable.vue
  5. 1054
      src/views/modules/qc/SQCResultEntry.vue
  6. 562
      src/views/modules/qc/qcPartAttribute.vue

22
src/api/qc/qc.js

@ -85,6 +85,14 @@ export const getManufacturerList = data => createAPI(`/pms/qc/getManufacturerLis
export const getPartTemplateLists = data => createAPI(`/pms/qc/getPartTemplateLists`,'post',data) export const getPartTemplateLists = data => createAPI(`/pms/qc/getPartTemplateLists`,'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)
export const partAttrDetailedSearch = data => createAPI(`/pms/qc/partAttrDetailedSearch`,'post',data)
export const getPartAttrItemList = data => createAPI(`/pms/qc/getPartAttrItemList`,'post',data)
export const getPartAttrItem = data => createAPI(`/pms/qc/getPartAttrItem`,'post',data)
export const addPartAttrItemDetails = data => createAPI(`/pms/qc/addPartAttrItemDetails`,'post',data)
export const delPartAttrItemDetails = data => createAPI(`/pms/qc/delPartAttrItemDetails`,'post',data)
export const savePartAttrDetailed = data => createAPI(`/pms/qc/savePartAttrDetailed`,'post',data)
export const goUpPartAttrItem = data => createAPI(`/pms/qc/goUpPartAttrItem`,'post',data)
export const goDownPartAttrItem = data => createAPI(`/pms/qc/goDownPartAttrItem`,'post',data)
// ===================================== 类别属性设置 ===================================== // ===================================== 类别属性设置 =====================================
export const qcFamilyAttributeSearch = data => createAPI(`/pms/qc/qcFamilyAttributeSearch`,'post',data) export const qcFamilyAttributeSearch = data => createAPI(`/pms/qc/qcFamilyAttributeSearch`,'post',data)
@ -211,6 +219,20 @@ export const addItemObject = data => createAPI(`/pms/qc/addItemObject`,'post',da
export const deleteItemObject = data => createAPI(`/pms/qc/deleteItemObject`,'post',data) export const deleteItemObject = data => createAPI(`/pms/qc/deleteItemObject`,'post',data)
export const updateItemObject = data => createAPI(`/pms/qc/updateItemObject`,'post',data) export const updateItemObject = data => createAPI(`/pms/qc/updateItemObject`,'post',data)
export const getIQCItemObjectList = data => createAPI(`/pms/qc/getIQCItemObjectList`,'post',data) export const getIQCItemObjectList = data => createAPI(`/pms/qc/getIQCItemObjectList`,'post',data)
// ===================================== SQC检验 =====================================
export const qcSQCInspectionSearch = data => createAPI(`/pms/qc/qcSQCInspectionSearch`,'post',data)
export const sqcDetailSearch = data => createAPI(`/pms/qc/sqcDetailSearch`,'post',data)
export const selectSQCSubDetailedRecord = data => createAPI(`/pms/qc/selectSQCSubDetailedRecord`,'post',data)
export const checkSQCSubDetailValue = data => createAPI(`/pms/qc/checkSQCSubDetailValue`,'post',data)
export const saveSQCDetailedRecord = data => createAPI(`/pms/qc/saveSQCDetailedRecord`,'post',data)
export const checkSQCIsSubmit = data => createAPI(`/pms/qc/checkSQCIsSubmit`,'post',data)
export const saveSQCSubDetailed = data => createAPI(`/pms/qc/saveSQCSubDetailed`,'post',data)
export const saveSQCSubmitResult = data => createAPI(`/pms/qc/saveSQCSubmitResult`,'post',data)
export const sqcRecordDelete = data => createAPI(`/pms/qc/sqcRecordDelete`,'post',data)
export const sqcRecordOverLoad = data => createAPI(`/pms/qc/sqcRecordOverLoad`,'post',data)
export const actionSQCInspection = data => createAPI(`/pms/qc/actionSQCInspection`,'post',data)
export const getSQCItemObjectList = data => createAPI(`/pms/qc/getSQCItemObjectList`,'post',data)
export const getFAIItemObjectList = data => createAPI(`/pms/qc/getFAIItemObjectList`,'post',data) export const getFAIItemObjectList = data => createAPI(`/pms/qc/getFAIItemObjectList`,'post',data)
export const getFQCItemObjectList = data => createAPI(`/pms/qc/getFQCItemObjectList`,'post',data) export const getFQCItemObjectList = data => createAPI(`/pms/qc/getFQCItemObjectList`,'post',data)
export const getIPQCItemObjectList = data => createAPI(`/pms/qc/getIPQCItemObjectList`,'post',data) export const getIPQCItemObjectList = data => createAPI(`/pms/qc/getIPQCItemObjectList`,'post',data)

4
src/views/modules/qc/FQCResultEntry.vue

@ -1089,10 +1089,10 @@
serialNumber: '301015Table1BuDesc', serialNumber: '301015Table1BuDesc',
tableId: "301015Table1", tableId: "301015Table1",
tableName: "FQC检验记录表", tableName: "FQC检验记录表",
columnProp: 'buDesc',
columnProp: 'site',
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
columnLabel: 'BU',
columnLabel: '工厂编号',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,

4
src/views/modules/qc/IQCResultEntry.vue

@ -961,10 +961,10 @@
serialNumber: '301006Table1BuDesc', serialNumber: '301006Table1BuDesc',
tableId: "301006Table1", tableId: "301006Table1",
tableName: "IQC检验记录表", tableName: "IQC检验记录表",
columnProp: 'buDesc',
columnProp: 'site',
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
columnLabel: 'BU',
columnLabel: '工厂编号',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,

219
src/views/modules/qc/SQCFileTable.vue

@ -0,0 +1,219 @@
<script>
import {downLoadObjectFile, downLoadObjectFileMes} from '@/api/eam/eam_object_list.js'
import {deleteObjectFile} from '@/api/eam/eam.js'
export default {
name: "sqcFileTable",
props:{
dataList:{
type:Array,
required:true
},
queryLoading:{
type:Boolean,
default:false,
},
columns:{
type:Array,
required: true,
}
},
methods: {
//
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())) {
this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
return
}
let pdf = ['pdf']
if (pdf.includes(row.fileType.toLowerCase())) {
type = 'application/pdf'
}
if (type === ''){
this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
return;
}
downLoadObjectFile(row).then(({data}) => {
const type = 'text/plain;charset=utf-8'; //
const blob = new Blob([data], { type });
const reader = new FileReader();
reader.onload = function(e) {
const content = e.target.result;
//
const newTab = window.open();
newTab.document.write('<pre>' + content + '</pre>');
};
reader.readAsText(blob, 'utf-8');
})
},
//
previewFileMes (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())) {
this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
return
}
let pdf = ['pdf']
if (pdf.includes(row.fileType.toLowerCase())) {
type = 'application/pdf'
}
if (type === ''){
this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
return;
}
downLoadObjectFileMes(row).then(({data}) => {
const blob = new Blob([data], { type: type });
// URL
const fileURL = URL.createObjectURL(blob);
//
window.open(fileURL, '_blank')
})
},
//
downloadFile (row) {
downLoadObjectFile(row)
.then(({data}) => {
//
const blob = new Blob([data], {type: "application/octet-stream"})
//
const fileName = row.fileName
// a
const linkNode = document.createElement('a')
// adownload
linkNode.download = fileName
linkNode.style.display = 'none'
// Blob URL
linkNode.href = URL.createObjectURL(blob)
document.body.appendChild(linkNode)
//
linkNode.click()
// URL
URL.revokeObjectURL(linkNode.href)
document.body.removeChild(linkNode)
})
},
//
downloadFileMes (row) {
downLoadObjectFileMes(row)
.then(({data}) => {
//
const blob = new Blob([data], {type: "application/octet-stream"})
//
const fileName = row.fileName
// a
const linkNode = document.createElement('a')
// adownload
linkNode.download = fileName
linkNode.style.display = 'none'
// Blob URL
linkNode.href = URL.createObjectURL(blob)
document.body.appendChild(linkNode)
//
linkNode.click()
// URL
URL.revokeObjectURL(linkNode.href)
document.body.removeChild(linkNode)
})
},
//
deleteFile (row) {
this.$confirm('确定要删除此文件?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteObjectFile(row).then(({data}) => {
if (data && data.code == 0) {
this.$emit('refresh')
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
},
}
}
</script>
<template>
<el-table
:height="350"
:data="dataList"
border
v-loading="queryLoading"
element-loading-text="拼命加载中"
style="width: 100%; ">
<el-table-column
v-for="(item,index) in columns" :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="100"
label="操作">
<template slot-scope="scope">
<el-link v-if="scope.row.orderReftype !== 'mes'" style="cursor: pointer" @click="previewFile(scope.row)">预览</el-link>
<el-link v-if="scope.row.orderReftype !== 'mes'" style="cursor: pointer" @click="downloadFile(scope.row)">下载</el-link>
<el-link v-if="scope.row.orderReftype !== 'mes'" style="cursor: pointer" @click="deleteFile(scope.row)">删除</el-link>
</template>
</el-table-column>
</el-table>
</template>
<style scoped>
</style>

1054
src/views/modules/qc/SQCResultEntry.vue
File diff suppressed because it is too large
View File

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

@ -83,11 +83,12 @@
fixed="right" fixed="right"
header-align="center" header-align="center"
align="center" align="center"
width="180"
width="240"
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<a v-if="!authDetail" type="text" size="small" @click="detailModal(scope.row)">检验模板</a> <a v-if="!authDetail" type="text" size="small" @click="detailModal(scope.row)">检验模板</a>
<a v-if="!authUpdate" type="text" size="small" @click="updateModal(scope.row)">编辑</a> <a v-if="!authUpdate" type="text" size="small" @click="updateModal(scope.row)">编辑</a>
<a v-if="!authUpdate" type="text" size="small" @click="standardDetailModal(scope.row)">检验标准</a>
<a v-if="!authDelete" type="text" size="small" @click="deletePropertiesModel(scope.row)">删除</a> <a v-if="!authDelete" type="text" size="small" @click="deletePropertiesModel(scope.row)">删除</a>
<a v-if="!authFile" type="text" size="small" @click="sopFileList(scope.row)">SOP文件</a> <a v-if="!authFile" type="text" size="small" @click="sopFileList(scope.row)">SOP文件</a>
</template> </template>
@ -126,7 +127,7 @@
<el-input v-model="modalData.site" disabled style="width: 250px"></el-input> <el-input v-model="modalData.site" disabled style="width: 250px"></el-input>
</el-form-item> </el-form-item>
<el-form-item style="margin-top: 23px;margin-left: 2px"> <el-form-item style="margin-top: 23px;margin-left: 2px">
<el-checkbox v-model="modalData.exemptInspection" true-label="Y">是否免检</el-checkbox><br>
<el-checkbox v-model="modalData.exemptInspection" true-label="Y" false-label="N">是否免检</el-checkbox><br>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
@ -161,6 +162,34 @@
<el-form-item label="累计巡检时长(h):" prop="cycleIPQCPatrolTime" > <el-form-item label="累计巡检时长(h):" prop="cycleIPQCPatrolTime" >
<el-input type="number" v-model="modalData.cycleIPQCPatrolTime" style="width: 117px"></el-input> <el-input type="number" v-model="modalData.cycleIPQCPatrolTime" style="width: 117px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="检验配置:" >
<el-row :gutter="12">
<el-col :span="6">
<el-checkbox v-model="modalData.iqcExempt" true-label="Y" false-label="N">IQC检验</el-checkbox>
</el-col>
<el-col :span="6">
<el-checkbox v-model="modalData.faiExempt" true-label="Y" false-label="N">FAI检验</el-checkbox>
</el-col>
<el-col :span="6">
<el-checkbox v-model="modalData.ipqcExempt" true-label="Y" false-label="N">IPQC检验</el-checkbox>
</el-col>
<el-col :span="6">
<el-checkbox v-model="modalData.pqcExempt" true-label="Y" false-label="N">PQC检验</el-checkbox>
</el-col>
</el-row>
<el-row :gutter="12">
<el-col :span="6">
<el-checkbox v-model="modalData.fqcExempt" true-label="Y" false-label="N">FQC检验</el-checkbox>
</el-col>
<el-col :span="6">
<el-checkbox v-model="modalData.rqcExempt" true-label="Y" false-label="N">RQC检验</el-checkbox>
</el-col>
<el-col :span="6">
<el-checkbox v-model="modalData.sqcExempt" true-label="Y" false-label="N">SQC检验</el-checkbox>
</el-col>
</el-row>
</el-form-item>
<el-form-item label="备注:"> <el-form-item label="备注:">
<el-input v-model="modalData.attributeRemark" style="width: 385px"></el-input> <el-input v-model="modalData.attributeRemark" style="width: 385px"></el-input>
</el-form-item> </el-form-item>
@ -439,6 +468,190 @@
</el-footer> </el-footer>
</el-dialog> </el-dialog>
<!-- 检验标准qc_part_attr_detailed -->
<el-dialog title="检验标准清单" @close="closeStandardDialog" :close-on-click-modal="false" v-drag :visible.sync="standardDetailModelFlag" width="940px">
<el-form :inline="true" label-position="top">
<el-form-item :label="'物料编码'">
<el-input v-model="standardDetailData.partNo" readonly style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'物料名称'">
<el-input v-model="standardDetailData.partDesc" readonly style="width: 240px"></el-input>
</el-form-item>
<el-form-item label="检验类型">
<el-select v-model="standardDetailData.inspectionTypeNo" @change="syncStandardInspectionTypeName" placeholder="请选择" style="width: 160px">
<el-option
v-for="i in options"
:key="i.inspectionTypeNo"
:label="i.inspectionTypeName"
:value="i.inspectionTypeNo">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="standardAddFastModal()">新增</el-button>
<!-- <el-button type="primary" @click="standardGoUp()">上移</el-button>
<el-button type="primary" @click="standardGoDown()">下移</el-button> -->
</el-form-item>
</el-form>
<div class="rq">
<el-table
:height="400"
:data="standardDetailList"
@row-click="standardItemClickRow"
ref="standardDetailTable"
highlight-current-row
border
style="width: 100%;">
<el-table-column
v-for="(item,index) in standardColumnDetailList"
:key="'std-col-' + 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>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="right"
min-width="60"
label="标准值">
<template slot-scope="scope">
<el-input v-model="scope.row.defaultValue" style="height: 11px;width:98%"></el-input>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="right"
min-width="60"
label="最大值">
<template slot-scope="scope">
<el-input v-model="scope.row.maxValue" style="height: 11px;width:98%"></el-input>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="right"
min-width="60"
label="最小值">
<template slot-scope="scope">
<el-input v-model="scope.row.minValue" style="height: 11px;width:98%"></el-input>
</template>
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="100"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="standardDelItemDetails(scope.row)">删除项目</a>
</template>
</el-table-column>
</el-table>
</div>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="saveStandardDetail()">保存</el-button>
<el-button type="primary" @click="standardDetailModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- 检验标准->快速新增 -->
<el-dialog title="新增检验项目" @close="standardRefreshDetailList" :close-on-click-modal="false" v-drag :visible.sync="standardFastAddFlag" width="1100px">
<div style="font-size: 12px">
<el-form :inline="true" label-position="top" :model="standardDetailData">
<el-form-item :label="'项目编码'">
<el-input v-model="standardDetailData.itemNo" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'项目名称'">
<el-input v-model="standardDetailData.itemDesc" clearable style="width: 200px"></el-input>
</el-form-item>
<el-form-item label="检验类型">
<el-select v-model="standardDetailData.inspectionTypeNo" @change="syncStandardInspectionTypeName" placeholder="请选择" style="width: 160px">
<el-option
v-for="i in options"
:key="i.inspectionTypeNo"
:label="i.inspectionTypeName"
:value="i.inspectionTypeNo">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="standardGetItem()">查询</el-button>
</el-form-item>
</el-form>
</div>
<el-container style="margin-top: 0px;">
<el-main style="width: 720px; padding: 1px">
<span style="font-size: 12px">可选项目</span>
<el-table
height="400px"
:data="standardItemList1"
border
ref="standardItemTable1"
@row-click="standardItemClickRow1"
@selection-change="standardSelectionItem1"
highlight-current-row
style="width: 100%">
<el-table-column
type="selection"
header-align="center"
align="center"
:selectable="selectFlag"
width="50">
</el-table-column>
<el-table-column prop="itemNo" header-align="center" align="center" min-width="80" label="项目编码"></el-table-column>
<el-table-column prop="itemDesc" header-align="center" align="center" min-width="120" label="项目名称"></el-table-column>
<el-table-column prop="defaultValue" header-align="center" align="center" min-width="100" label="标准值"></el-table-column>
<el-table-column prop="maxValue" header-align="center" align="center" min-width="60" label="最大值"></el-table-column>
<el-table-column prop="minValue" header-align="center" align="center" min-width="60" label="最小值"></el-table-column>
</el-table>
</el-main>
<el-main style="width: 111px;padding: 1px">
<div style="margin-top: 182px;margin-left: 18px">
<el-button type="primary" @click="standardAddItem()">添加>></el-button>
</div>
<div style="margin-top: 15px;margin-left: 18px">
<el-button type="primary" @click="standardDeleteItem()">删除<<</el-button>
</div>
</el-main>
<el-main style="width: 400px;padding: 1px">
<span style="font-size: 12px">已有项目</span>
<el-table
height="400px"
:data="standardItemList2"
border
ref="standardItemTable2"
@row-click="standardItemClickRow2"
@selection-change="standardSelectionItem2"
highlight-current-row
style="width: 100%">
<el-table-column
type="selection"
header-align="center"
align="center"
:selectable="selectFlag"
width="50">
</el-table-column>
<el-table-column prop="itemNo" header-align="center" align="center" min-width="80" label="项目编码"></el-table-column>
<el-table-column prop="itemDesc" header-align="center" align="center" min-width="200" label="项目名称"></el-table-column>
</el-table>
</el-main>
</el-container>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="standardFastAddFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- 工序 --> <!-- 工序 -->
<el-dialog title="工序清单" :close-on-click-modal="false" v-drag :visible.sync="operationModelFlag" width="420px"> <el-dialog title="工序清单" :close-on-click-modal="false" v-drag :visible.sync="operationModelFlag" width="420px">
<div class="rq"> <div class="rq">
@ -711,6 +924,14 @@
getAllResourceList, // getAllResourceList, //
getSiteAndBuByUserName, getSiteAndBuByUserName,
searchPartInfo, // searchPartInfo, //
partAttrDetailedSearch,
getPartAttrItemList,
getPartAttrItem,
addPartAttrItemDetails,
delPartAttrItemDetails,
savePartAttrDetailed,
goUpPartAttrItem,
goDownPartAttrItem
} from "@/api/qc/qc.js" } from "@/api/qc/qc.js"
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
import Chooselist from '@/views/modules/common/Chooselist_eam' import Chooselist from '@/views/modules/common/Chooselist_eam'
@ -776,7 +997,14 @@
createTime: '', createTime: '',
createBy: this.$store.state.user.name, createBy: this.$store.state.user.name,
attributeType: 'A', attributeType: 'A',
exemptInspection: ''
exemptInspection: 'N',
iqcExempt: 'N',
faiExempt: 'N',
ipqcExempt: 'N',
pqcExempt: 'N',
fqcExempt: 'N',
oqcExempt: 'N',
sqcExempt: 'N'
}, },
detailData: { detailData: {
site: '', site: '',
@ -792,6 +1020,60 @@
templateName: '', templateName: '',
createBy: this.$store.state.user.name createBy: this.$store.state.user.name
}, },
standardDetailModelFlag: false,
standardFastAddFlag: false,
standardDetailList: [],
standardItemList1: [],
standardItemList2: [],
standardItemSelections1: [],
standardItemSelections2: [],
standardCurrentRow: {},
standardDetailData: {
site: '',
buNo: '',
partNo: '',
partDesc: '',
attributeNo: '',
attributeType: 'A',
itemType: 'D',
itemNo: '',
itemDesc: '',
inspectionTypeNo: '',
inspectionTypeName: '',
createBy: this.$store.state.user.name
},
standardColumnDetailList: [
{
columnProp: 'itemNo',
headerAlign: 'center',
align: 'center',
columnLabel: '检验项目编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: 80
},
{
columnProp: 'itemDesc',
headerAlign: 'center',
align: 'left',
columnLabel: '检验项目名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: 250
},
{
columnProp: 'valueType',
headerAlign: 'center',
align: 'center',
columnLabel: '检测值类型',
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: 90
}
],
columnList: [ columnList: [
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -1528,6 +1810,7 @@
}, },
searchPartInfo () { searchPartInfo () {
this.partDetailData.site = this.modalData.site this.partDetailData.site = this.modalData.site
if (!this.partDetailData.partNo && !this.partDetailData.partDesc && !this.partDetailData.sku && !this.partDetailData.cinvSourceCode) { if (!this.partDetailData.partNo && !this.partDetailData.partDesc && !this.partDetailData.sku && !this.partDetailData.cinvSourceCode) {
this.partInfoList = [] this.partInfoList = []
@ -1672,7 +1955,14 @@
firstIPQCPatrolTime: '', firstIPQCPatrolTime: '',
lastIPQCPatrolTime: '', lastIPQCPatrolTime: '',
cycleIPQCPatrolTime: '', cycleIPQCPatrolTime: '',
exemptInspection: ''
exemptInspection: 'N',
iqcExempt: 'N',
faiExempt: 'N',
ipqcExempt: 'N',
pqcExempt: 'N',
fqcExempt: 'N',
oqcExempt: 'N',
sqcExempt: 'N'
} }
this.modalDisableFlag = false this.modalDisableFlag = false
this.modalFlag = true this.modalFlag = true
@ -1701,7 +1991,14 @@
firstIPQCPatrolTime: row.firstIPQCPatrolTime, firstIPQCPatrolTime: row.firstIPQCPatrolTime,
lastIPQCPatrolTime: row.lastIPQCPatrolTime, lastIPQCPatrolTime: row.lastIPQCPatrolTime,
cycleIPQCPatrolTime: row.cycleIPQCPatrolTime, cycleIPQCPatrolTime: row.cycleIPQCPatrolTime,
exemptInspection: row.exemptInspection
exemptInspection: row.exemptInspection || 'N',
iqcExempt: row.iqcExempt || 'N',
faiExempt: row.faiExempt || 'N',
ipqcExempt: row.ipqcExempt || 'N',
pqcExempt: row.pqcExempt || 'N',
fqcExempt: row.fqcExempt || 'N',
oqcExempt: row.oqcExempt || 'N',
sqcExempt: row.sqcExempt || 'N'
} }
this.modalDisableFlag = true this.modalDisableFlag = true
this.modalFlag = true this.modalFlag = true
@ -1967,6 +2264,261 @@
}) })
}, },
syncStandardInspectionTypeName () {
const o = this.options.find(i => i.inspectionTypeNo === this.standardDetailData.inspectionTypeNo)
if (o) {
this.standardDetailData.inspectionTypeName = o.inspectionTypeName
}
},
standardDetailModal (row) {
this.standardDetailData.site = row.site
this.standardDetailData.buNo = row.buNo
this.standardDetailData.partNo = row.partNo
this.standardDetailData.partDesc = row.partDesc
this.standardDetailData.attributeNo = row.partNo
this.standardDetailData.attributeType = 'A'
this.standardDetailData.itemType = 'D'
if (this.options && this.options.length > 0) {
this.standardDetailData.inspectionTypeNo = this.options[0].inspectionTypeNo
this.standardDetailData.inspectionTypeName = this.options[0].inspectionTypeName
}
partAttrDetailedSearch(this.standardDetailData).then(({data}) => {
if (data.code === 0) {
this.standardDetailList = data.rows || []
}
})
this.standardDetailModelFlag = true
},
closeStandardDialog () {
this.standardDetailList = []
this.standardItemList1 = []
this.standardItemList2 = []
},
standardAddFastModal () {
this.syncStandardInspectionTypeName()
this.standardItemSelections1 = null
this.standardItemSelections2 = null
getPartAttrItemList(this.standardDetailData).then(({data}) => {
if (data.code === 0) {
this.standardItemList1 = data.row1 || []
this.standardItemList2 = data.row2 || []
}
})
this.standardFastAddFlag = true
},
standardGetItem () {
this.syncStandardInspectionTypeName()
getPartAttrItem(this.standardDetailData).then(({data}) => {
if (data.code === 0) {
this.standardItemList1 = data.rows || []
}
})
},
standardItemClickRow (row) {
this.standardCurrentRow = JSON.parse(JSON.stringify(row))
},
standardItemClickRow1 (row) {
this.$refs.standardItemTable1.toggleRowSelection(row)
},
standardItemClickRow2 (row) {
this.$refs.standardItemTable2.toggleRowSelection(row)
},
standardSelectionItem1 (val) {
this.standardItemSelections1 = val
},
standardSelectionItem2 (val) {
this.standardItemSelections2 = val
},
standardAddItem () {
if (this.standardItemSelections1 == null || this.standardItemSelections1.length === 0) {
this.$message.warning('请选择可选项目!')
return
}
if (!this.standardDetailData.inspectionTypeName) {
this.syncStandardInspectionTypeName()
}
let inData = {
site: this.standardDetailData.site,
buNo: this.standardDetailData.buNo,
attributeNo: this.standardDetailData.attributeNo,
attributeType: 'A',
inspectionTypeNo: this.standardDetailData.inspectionTypeNo,
itemType: this.standardDetailData.itemType,
updateBy: this.$store.state.user.name,
itemList: this.standardItemSelections1
}
addPartAttrItemDetails(inData).then(({data}) => {
if (data && data.code === 0) {
getPartAttrItemList(this.standardDetailData).then(({data}) => {
if (data.code === 0) {
this.standardItemList1 = data.row1 || []
this.standardItemList2 = data.row2 || []
}
})
this.standardItemSelections1 = []
this.$message.success('操作成功')
} else {
this.$alert((data && data.msg) || '操作失败', '错误', { confirmButtonText: '确定' })
}
})
},
standardDeleteItem () {
if (this.standardItemSelections2 == null || this.standardItemSelections2.length === 0) {
this.$message.warning('请选择已有项目!')
return
}
let inData = {
site: this.standardDetailData.site,
buNo: this.standardDetailData.buNo,
attributeNo: this.standardDetailData.attributeNo,
attributeType: 'A',
updateBy: this.$store.state.user.name,
itemList: this.standardItemSelections2
}
delPartAttrItemDetails(inData).then(({data}) => {
if (data && data.code === 0) {
getPartAttrItemList(this.standardDetailData).then(({data}) => {
if (data.code === 0) {
this.standardItemList1 = data.row1 || []
this.standardItemList2 = data.row2 || []
}
})
this.standardItemSelections2 = []
this.$message.success('操作成功')
} else {
this.$alert((data && data.msg) || '操作失败', '错误', { confirmButtonText: '确定' })
}
})
},
standardRefreshDetailList () {
partAttrDetailedSearch(this.standardDetailData).then(({data}) => {
if (data.code === 0) {
this.standardDetailList = data.rows || []
}
})
},
saveStandardDetail () {
let tempData = {
site: this.standardDetailData.site,
buNo: this.standardDetailData.buNo,
attributeNo: this.standardDetailData.attributeNo,
attributeType: 'A',
inspectionTypeNo: this.standardDetailData.inspectionTypeNo,
updateBy: this.$store.state.user.name,
itemList: this.standardDetailList
}
savePartAttrDetailed(tempData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.standardDetailModelFlag = false
this.$message.success('操作成功')
} else {
this.$alert((data && data.msg) || '操作失败', '错误', { confirmButtonText: '确定' })
}
})
},
standardDelItemDetails (row) {
this.$confirm('是否删除该检验项目?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
delPartAttrItemDetails({
site: this.standardDetailData.site,
buNo: this.standardDetailData.buNo,
attributeNo: this.standardDetailData.attributeNo,
attributeType: 'A',
updateBy: this.$store.state.user.name,
itemList: [row]
}).then(({data}) => {
if (data && data.code === 0) {
partAttrDetailedSearch(this.standardDetailData).then(({data}) => {
if (data.code === 0) {
this.standardDetailList = data.rows || []
}
})
this.$message.success('操作成功')
} else {
this.$alert((data && data.msg) || '操作失败', '错误', { confirmButtonText: '确定' })
}
})
}).catch(() => {})
},
standardGoUp () {
if (!this.standardCurrentRow || !this.standardCurrentRow.itemNo) {
this.$message.warning('请先点击表格选择一行')
return
}
const row = {
...this.standardCurrentRow,
site: this.standardDetailData.site,
buNo: this.standardDetailData.buNo,
attributeNo: this.standardDetailData.attributeNo
}
goUpPartAttrItem(row).then(({data}) => {
if (data && data.code === 0) {
partAttrDetailedSearch(this.standardDetailData).then(({data}) => {
if (data.code === 0) {
this.standardDetailList = data.rows || []
for (let i = 0; i < this.standardDetailList.length; i++) {
if (this.standardDetailList[i].itemNo === row.itemNo) {
this.$refs.standardDetailTable.setCurrentRow(this.standardDetailList[i])
this.standardCurrentRow = JSON.parse(JSON.stringify(this.standardDetailList[i]))
break
}
}
this.$message.success('操作成功')
}
})
}
})
},
standardGoDown () {
if (!this.standardCurrentRow || !this.standardCurrentRow.itemNo) {
this.$message.warning('请先点击表格选择一行')
return
}
const row = {
...this.standardCurrentRow,
site: this.standardDetailData.site,
buNo: this.standardDetailData.buNo,
attributeNo: this.standardDetailData.attributeNo
}
goDownPartAttrItem(row).then(({data}) => {
if (data && data.code === 0) {
partAttrDetailedSearch(this.standardDetailData).then(({data}) => {
if (data.code === 0) {
this.standardDetailList = data.rows || []
for (let i = 0; i < this.standardDetailList.length; i++) {
if (this.standardDetailList[i].itemNo === row.itemNo) {
this.$refs.standardDetailTable.setCurrentRow(this.standardDetailList[i])
this.standardCurrentRow = JSON.parse(JSON.stringify(this.standardDetailList[i]))
break
}
}
this.$message.success('操作成功')
}
})
}
})
},
// //
deletePartAttributeDetails (row) { deletePartAttributeDetails (row) {
this.$confirm(`是否删除这个检验模板?`, '提示', { this.$confirm(`是否删除这个检验模板?`, '提示', {

Loading…
Cancel
Save