|
|
@ -75,6 +75,7 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="' '"> |
|
|
<el-form-item :label="' '"> |
|
|
<el-button v-if="!authSearch" type="primary" @click="getDataList()">查询</el-button> |
|
|
<el-button v-if="!authSearch" type="primary" @click="getDataList()">查询</el-button> |
|
|
|
|
|
<el-button v-if="!authDoInspection" type="primary" @click="batchDoInspectionModal()">批量生成检验任务</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
|
|
|
|
|
|
@ -85,7 +86,14 @@ |
|
|
border |
|
|
border |
|
|
:row-style="rowStyle" |
|
|
:row-style="rowStyle" |
|
|
@row-click="clickRow" |
|
|
@row-click="clickRow" |
|
|
|
|
|
@selection-change="selectionOrder" |
|
|
style="width: 100%;"> |
|
|
style="width: 100%;"> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
type="selection" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="center" |
|
|
|
|
|
width="50"> |
|
|
|
|
|
</el-table-column> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
v-for="(item,index) in columnList" :key="index" |
|
|
v-for="(item,index) in columnList" :key="index" |
|
|
:sortable="item.columnSortable" |
|
|
:sortable="item.columnSortable" |
|
|
@ -127,7 +135,7 @@ |
|
|
<el-dialog title="新增检验记录" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="495px"> |
|
|
<el-dialog title="新增检验记录" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="495px"> |
|
|
<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;"> |
|
|
<el-form-item label="BU" prop="bu" :rules="rules.bu"> |
|
|
<el-form-item label="BU" prop="bu" :rules="rules.bu"> |
|
|
<el-select v-model="modalData.bu" placeholder="请选择" @change="buChange" style="width: 221px"> |
|
|
|
|
|
|
|
|
<el-select v-model="modalData.bu" placeholder="请选择" style="width: 221px"> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for = "i in userBuList" |
|
|
v-for = "i in userBuList" |
|
|
:key = "i.buNo" |
|
|
:key = "i.buNo" |
|
|
@ -152,14 +160,7 @@ |
|
|
</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;"> |
|
|
<el-form-item label="工序" prop="operationDesc" :rules="rules.operationDescType"> |
|
|
<el-form-item label="工序" prop="operationDesc" :rules="rules.operationDescType"> |
|
|
<el-select v-model="modalData.operationDesc" placeholder="请选择" style="width: 221px"> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for = "i in operationList" |
|
|
|
|
|
:key = "i.operationDesc" |
|
|
|
|
|
:label = "i.operationDesc" |
|
|
|
|
|
:value = "i.operationDesc"> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
|
<el-input v-model="modalData.operationDesc" readonly style="width: 221px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item> |
|
|
<el-form-item> |
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(505)"><a herf="#">机台</a></span> |
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(505)"><a herf="#">机台</a></span> |
|
|
@ -226,6 +227,55 @@ |
|
|
</el-footer> |
|
|
</el-footer> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 批量新增巡检记录 --> |
|
|
|
|
|
<el-dialog title="新增检验记录" :close-on-click-modal="false" v-drag :visible.sync="batchModalFlag" width="495px"> |
|
|
|
|
|
<el-form :inline="true" label-position="top" :model="batchModalData" :rules="batchRules" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
|
|
<el-form-item label="BU" prop="bu"> |
|
|
|
|
|
<el-select v-model="batchModalData.bu" placeholder="请选择" style="width: 221px"> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for = "i in userBuList" |
|
|
|
|
|
:key = "i.buNo" |
|
|
|
|
|
:label = "i.buNo" |
|
|
|
|
|
:value = "i.buNo"> |
|
|
|
|
|
<span style="float: left;width: 100px">{{ i.sitename }}</span> |
|
|
|
|
|
<span style="float: right; color: #8492a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; font-size: 11px;width: 60px"> |
|
|
|
|
|
{{ i.buDesc }} |
|
|
|
|
|
</span> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<el-form :inline="true" label-position="top" :model="batchModalData" :rules="batchRules" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
|
|
<el-form-item label="检验类型" prop="inspectionTypeNo"> |
|
|
|
|
|
<el-select v-model="batchModalData.inspectionTypeNo" style="width: 104px"> |
|
|
|
|
|
<el-option label="首件检" value="首件检"></el-option> |
|
|
|
|
|
<el-option label="自检" value="自检"></el-option> |
|
|
|
|
|
<el-option label="巡检" value="巡检"></el-option> |
|
|
|
|
|
<el-option label="末件检" value="末件检"></el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label=" "> |
|
|
|
|
|
<el-checkbox v-model="batchModalData.importantFlag" true-label="Y">重点检验</el-checkbox> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<el-form :inline="true" label-position="top" :model="batchModalData" :rules="batchRules" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
|
|
<el-form-item prop="templateId"> |
|
|
|
|
|
<span style="cursor: pointer" v-if="this.controlData.baseData === '控制'" slot="label" @click="queryTemplateList"><a>检验模板</a></span> |
|
|
|
|
|
<span v-else slot="label">检验模板</span> |
|
|
|
|
|
<el-input v-model="batchModalData.templateName" readonly style="width: 221px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<el-form :inline="true" label-position="top" :model="batchModalData" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
|
|
<el-form-item label="特殊要求"> |
|
|
|
|
|
<el-input type="textarea" v-model="batchModalData.specialRequirements" :rows="3" resize='none' show-word-limit style="width: 456px;height: 30px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<el-footer style="height:40px;margin-top: 55px;text-align:center"> |
|
|
|
|
|
<el-button :loading="saveLoading" type="primary" @click="batchSaveData">保存</el-button> |
|
|
|
|
|
<el-button type="primary" @click="batchModalFlag=false">关闭</el-button> |
|
|
|
|
|
</el-footer> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
<!-- 检验模板 --> |
|
|
<!-- 检验模板 --> |
|
|
<el-dialog title="检验模板清单" :close-on-click-modal="false" v-drag :visible.sync="templateModelFlag" width="520px"> |
|
|
<el-dialog title="检验模板清单" :close-on-click-modal="false" v-drag :visible.sync="templateModelFlag" width="520px"> |
|
|
<div class="rq"> |
|
|
<div class="rq"> |
|
|
@ -275,13 +325,13 @@ |
|
|
import { |
|
|
import { |
|
|
getSiteAndBuByUserName, // 获取site、bu |
|
|
getSiteAndBuByUserName, // 获取site、bu |
|
|
searchSeqInfo2, // 派工单号查询 |
|
|
searchSeqInfo2, // 派工单号查询 |
|
|
getOperationList, // 查询工序列表 |
|
|
|
|
|
umSearch, // 查询单位列表 |
|
|
umSearch, // 查询单位列表 |
|
|
queryController, // 检查动控 |
|
|
queryController, // 检查动控 |
|
|
queryTemplateList, // 获取检验模板列表 |
|
|
queryTemplateList, // 获取检验模板列表 |
|
|
saveOsInspection, // 新增检验记录 |
|
|
saveOsInspection, // 新增检验记录 |
|
|
inspectionTypeSearch, // 搜索所有检验类型 |
|
|
inspectionTypeSearch, // 搜索所有检验类型 |
|
|
getShiftList, // 获取班次 |
|
|
getShiftList, // 获取班次 |
|
|
|
|
|
batchSaveOsInspection, // 批量新增检验记录 |
|
|
} 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 {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' |
|
|
import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' |
|
|
@ -322,6 +372,7 @@ |
|
|
height: 200, |
|
|
height: 200, |
|
|
dataList: [], |
|
|
dataList: [], |
|
|
modalFlag: false, |
|
|
modalFlag: false, |
|
|
|
|
|
batchModalFlag: false, |
|
|
modalDisableFlag: false, |
|
|
modalDisableFlag: false, |
|
|
modalData: { |
|
|
modalData: { |
|
|
flag: '', |
|
|
flag: '', |
|
|
@ -356,78 +407,113 @@ |
|
|
createBy: '', |
|
|
createBy: '', |
|
|
importantFlag: '' |
|
|
importantFlag: '' |
|
|
}, |
|
|
}, |
|
|
|
|
|
batchModalData: { |
|
|
|
|
|
flag: '', |
|
|
|
|
|
bu: '', |
|
|
|
|
|
inspectionTypeNo: '', |
|
|
|
|
|
inspectionTypeName: '', |
|
|
|
|
|
specialRequirements: '', |
|
|
|
|
|
templateId: '', |
|
|
|
|
|
templateName: '', |
|
|
|
|
|
createBy: '', |
|
|
|
|
|
importantFlag: '', |
|
|
|
|
|
submitList: [] |
|
|
|
|
|
}, |
|
|
rules: { |
|
|
rules: { |
|
|
seqNoType: [ |
|
|
seqNoType: [ |
|
|
{ |
|
|
{ |
|
|
required: true, |
|
|
required: true, |
|
|
message: ' ', |
|
|
message: ' ', |
|
|
trigger: 'change' |
|
|
|
|
|
|
|
|
trigger: ['blur','change'] |
|
|
} |
|
|
} |
|
|
], |
|
|
], |
|
|
orderNoType: [ |
|
|
orderNoType: [ |
|
|
{ |
|
|
{ |
|
|
required: true, |
|
|
required: true, |
|
|
message: ' ', |
|
|
message: ' ', |
|
|
trigger: 'change' |
|
|
|
|
|
|
|
|
trigger: ['blur','change'] |
|
|
} |
|
|
} |
|
|
], |
|
|
], |
|
|
operationDescType: [ |
|
|
operationDescType: [ |
|
|
{ |
|
|
{ |
|
|
required: true, |
|
|
required: true, |
|
|
message: ' ', |
|
|
message: ' ', |
|
|
trigger: 'change' |
|
|
|
|
|
|
|
|
trigger: ['blur','change'] |
|
|
} |
|
|
} |
|
|
], |
|
|
], |
|
|
resourceIdType: [ |
|
|
resourceIdType: [ |
|
|
{ |
|
|
{ |
|
|
required: true, |
|
|
required: true, |
|
|
message: ' ', |
|
|
message: ' ', |
|
|
trigger: 'change' |
|
|
|
|
|
|
|
|
trigger: ['blur','change'] |
|
|
} |
|
|
} |
|
|
], |
|
|
], |
|
|
rollQtyType: [ |
|
|
rollQtyType: [ |
|
|
{ |
|
|
{ |
|
|
required: true, |
|
|
required: true, |
|
|
message: ' ', |
|
|
message: ' ', |
|
|
trigger: 'change' |
|
|
|
|
|
|
|
|
trigger: ['blur','change'] |
|
|
} |
|
|
} |
|
|
], |
|
|
], |
|
|
inspectionTypeNoType: [ |
|
|
inspectionTypeNoType: [ |
|
|
{ |
|
|
{ |
|
|
required: true, |
|
|
required: true, |
|
|
message: ' ', |
|
|
message: ' ', |
|
|
trigger: 'change' |
|
|
|
|
|
|
|
|
trigger: ['blur','change'] |
|
|
} |
|
|
} |
|
|
], |
|
|
], |
|
|
partNoType: [ |
|
|
partNoType: [ |
|
|
{ |
|
|
{ |
|
|
required: true, |
|
|
required: true, |
|
|
message: ' ', |
|
|
message: ' ', |
|
|
trigger: 'change' |
|
|
|
|
|
|
|
|
trigger: ['blur','change'] |
|
|
} |
|
|
} |
|
|
], |
|
|
], |
|
|
umIdType: [ |
|
|
umIdType: [ |
|
|
{ |
|
|
{ |
|
|
required: true, |
|
|
required: true, |
|
|
message: ' ', |
|
|
message: ' ', |
|
|
trigger: 'change' |
|
|
|
|
|
|
|
|
trigger: ['blur','change'] |
|
|
} |
|
|
} |
|
|
], |
|
|
], |
|
|
templateId: [ |
|
|
templateId: [ |
|
|
{ |
|
|
{ |
|
|
required: true, |
|
|
required: true, |
|
|
message: ' ', |
|
|
message: ' ', |
|
|
trigger: 'change' |
|
|
|
|
|
|
|
|
trigger: ['blur','change'] |
|
|
} |
|
|
} |
|
|
], |
|
|
], |
|
|
bu:[ |
|
|
bu:[ |
|
|
{ |
|
|
{ |
|
|
required: true, |
|
|
required: true, |
|
|
message: ' ', |
|
|
message: ' ', |
|
|
trigger: 'change' |
|
|
|
|
|
|
|
|
trigger: ['blur','change'] |
|
|
} |
|
|
} |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
|
|
|
batchRules: { |
|
|
|
|
|
bu: [ |
|
|
|
|
|
{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: ' ', |
|
|
|
|
|
trigger: ['blur','change'] |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
|
|
|
inspectionTypeNo: [ |
|
|
|
|
|
{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: ' ', |
|
|
|
|
|
trigger: ['blur','change'] |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
|
|
|
templateId: [ |
|
|
|
|
|
{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: ' ', |
|
|
|
|
|
trigger: ['blur','change'] |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
|
|
|
}, |
|
|
templateData: { |
|
|
templateData: { |
|
|
site: '', |
|
|
site: '', |
|
|
bu: '', |
|
|
bu: '', |
|
|
@ -855,7 +941,6 @@ |
|
|
fixed: '', |
|
|
fixed: '', |
|
|
}, |
|
|
}, |
|
|
], |
|
|
], |
|
|
operationList: [], |
|
|
|
|
|
userBuList: [], |
|
|
userBuList: [], |
|
|
umList: [], |
|
|
umList: [], |
|
|
templateList: [], |
|
|
templateList: [], |
|
|
@ -869,6 +954,7 @@ |
|
|
typeOptions: [], |
|
|
typeOptions: [], |
|
|
currentRow: {}, |
|
|
currentRow: {}, |
|
|
shiftList: [], |
|
|
shiftList: [], |
|
|
|
|
|
orderSelections: [] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -1033,7 +1119,6 @@ |
|
|
createBy: this.$store.state.user.name, |
|
|
createBy: this.$store.state.user.name, |
|
|
importantFlag: '' |
|
|
importantFlag: '' |
|
|
} |
|
|
} |
|
|
this.getOperationList() |
|
|
|
|
|
this.modalDisableFlag = false |
|
|
this.modalDisableFlag = false |
|
|
this.modalFlag = true |
|
|
this.modalFlag = true |
|
|
this.checked = false |
|
|
this.checked = false |
|
|
@ -1081,7 +1166,6 @@ |
|
|
saveOsInspection(this.modalData).then(({data}) => { |
|
|
saveOsInspection(this.modalData).then(({data}) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
this.getDataList() |
|
|
this.getDataList() |
|
|
this.operationList = [] |
|
|
|
|
|
this.modalFlag = false |
|
|
this.modalFlag = false |
|
|
// 跳转IPQC任务 |
|
|
// 跳转IPQC任务 |
|
|
this.checkOutToIPQC(data.no) |
|
|
this.checkOutToIPQC(data.no) |
|
|
@ -1096,14 +1180,55 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 获取工序列表 |
|
|
|
|
|
getOperationList () { |
|
|
|
|
|
getOperationList(this.modalData).then(({data}) => { |
|
|
|
|
|
|
|
|
// 生成检验任务 |
|
|
|
|
|
batchDoInspectionModal () { |
|
|
|
|
|
if (this.orderSelections.length === 0) { |
|
|
|
|
|
this.$message.warning('请勾选单据!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
if (!this.orderSelections.every(item => item.workCenterNo === this.orderSelections[0].workCenterNo)) { |
|
|
|
|
|
this.$message.warning('所选单据的加工中心必须相同!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
this.batchModalData = { |
|
|
|
|
|
flag: 'doInspection', |
|
|
|
|
|
bu: this.userBuList[0].buNo, |
|
|
|
|
|
inspectionTypeNo: '', |
|
|
|
|
|
inspectionTypeName: '', |
|
|
|
|
|
templateId: '', |
|
|
|
|
|
templateName: '', |
|
|
|
|
|
createBy: this.$store.state.user.name, |
|
|
|
|
|
importantFlag: '', |
|
|
|
|
|
specialRequirements: '', |
|
|
|
|
|
submitList: [] |
|
|
|
|
|
} |
|
|
|
|
|
this.batchModalFlag = true |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 批量新增IPQC巡检记录 |
|
|
|
|
|
batchSaveData () { |
|
|
|
|
|
if (this.batchModalData.bu === '' || this.batchModalData.bu == null) { |
|
|
|
|
|
this.$message.warning('请选择BU!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
if (this.controlData.baseData === '控制' && (this.batchModalData.templateId == null || this.batchModalData.templateId === '')) { |
|
|
|
|
|
this.$message.warning('请选择检验模板!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
this.batchModalData.submitList = this.orderSelections |
|
|
|
|
|
this.saveLoading = true |
|
|
|
|
|
batchSaveOsInspection(this.batchModalData).then(({data}) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
this.operationList = data.rows |
|
|
|
|
|
|
|
|
this.getDataList() |
|
|
|
|
|
this.batchModalFlag = false |
|
|
} else { |
|
|
} else { |
|
|
this.operationList = [] |
|
|
|
|
|
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
this.saveLoading = false |
|
|
|
|
|
}).catch(()=>{ |
|
|
|
|
|
this.saveLoading = false |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -1123,7 +1248,11 @@ |
|
|
|
|
|
|
|
|
// 获取检验模板列表 |
|
|
// 获取检验模板列表 |
|
|
queryTemplateList () { |
|
|
queryTemplateList () { |
|
|
this.templateData.bu = this.modalData.bu |
|
|
|
|
|
|
|
|
if (this.batchModalFlag) { |
|
|
|
|
|
this.templateData.bu = this.batchModalData.bu |
|
|
|
|
|
} else { |
|
|
|
|
|
this.templateData.bu = this.modalData.bu |
|
|
|
|
|
} |
|
|
// 查询所有检验模板 |
|
|
// 查询所有检验模板 |
|
|
queryTemplateList(this.templateData).then(({data}) => { |
|
|
queryTemplateList(this.templateData).then(({data}) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
@ -1135,10 +1264,20 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 复选 |
|
|
|
|
|
selectionOrder (val) { |
|
|
|
|
|
this.orderSelections = val |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// 选中检验模板 |
|
|
// 选中检验模板 |
|
|
getRowData (row) { |
|
|
getRowData (row) { |
|
|
this.modalData.templateId = row.templateId |
|
|
|
|
|
this.modalData.templateName = row.templateName |
|
|
|
|
|
|
|
|
if (this.batchModalFlag) { |
|
|
|
|
|
this.batchModalData.templateId = row.templateId |
|
|
|
|
|
this.batchModalData.templateName = row.templateName |
|
|
|
|
|
} else { |
|
|
|
|
|
this.modalData.templateId = row.templateId |
|
|
|
|
|
this.modalData.templateName = row.templateName |
|
|
|
|
|
} |
|
|
this.templateModelFlag = false |
|
|
this.templateModelFlag = false |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|