|
|
|
@ -254,9 +254,10 @@ |
|
|
|
fixed="right" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="80" |
|
|
|
width="150" |
|
|
|
label="操作"> |
|
|
|
<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> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -268,6 +269,42 @@ |
|
|
|
</el-footer> |
|
|
|
</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 避免嵌套弹窗关闭后父弹窗表格不刷新/空白) --> |
|
|
|
<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"> |
|
|
|
@ -678,6 +715,8 @@ |
|
|
|
deletePartAttributeDetails, // 删除物料属性模板 |
|
|
|
saveAttributeDetailed, // 新增物料属性模板详情 |
|
|
|
getPartTemplateLists, // 获取模板列表 |
|
|
|
qcAttributeTemplateItemDetailsSearch, // 查询物料模板检验标准明细 |
|
|
|
qcAttributeTemplateItemSave, // 保存物料模板检验标准明细 |
|
|
|
inspectionTypeSearch, // 搜索所有检验类型 |
|
|
|
getOperationDescList, // 查询工序列表 |
|
|
|
getManufacturerList, // 查询供应商列表 |
|
|
|
@ -1251,6 +1290,18 @@ |
|
|
|
// 单选框绑定的值 |
|
|
|
operationCurrent: -1, |
|
|
|
resourceCurrent: -1, |
|
|
|
inspectionStandardListFlag: false, |
|
|
|
standardHeader: { |
|
|
|
site: '', |
|
|
|
buNo: '', |
|
|
|
attributeNo: '', |
|
|
|
attributeType: 'A', |
|
|
|
partDesc: '', |
|
|
|
templateId: '', |
|
|
|
inspectionTypeNo: '', |
|
|
|
inspectionTypeName: '' |
|
|
|
}, |
|
|
|
standardList: [], |
|
|
|
sopData: { |
|
|
|
site: '', |
|
|
|
buNo: '', |
|
|
|
@ -1685,6 +1736,7 @@ |
|
|
|
this.detailData.buNo = row.buNo |
|
|
|
this.detailData.partNo = row.partNo |
|
|
|
this.detailData.attributeNo = row.partNo |
|
|
|
this.detailData.attributeType = row.attributeType || 'A' |
|
|
|
this.detailData.partDesc = row.partDesc |
|
|
|
this.detailModelFlag = true |
|
|
|
this.loadTemplateDetailList() |
|
|
|
@ -1784,7 +1836,9 @@ |
|
|
|
resourceID: this.resourceId, |
|
|
|
manufacturerList: this.selectionManufacturer, |
|
|
|
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}) => { |
|
|
|
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 () { |
|
|
|
let userFavorite = { |
|
|
|
|