Browse Source

修改

master
shenzhouyu 4 weeks ago
parent
commit
bcc5265467
  1. 12
      src/views/modules/dm/DMQcPartAttribute.vue
  2. 2
      src/views/modules/qc/IPQCResultEntry.vue
  3. 48
      src/views/modules/qc/qcPartAttribute.vue

12
src/views/modules/dm/DMQcPartAttribute.vue

@ -178,8 +178,8 @@
<!-- 检验标准清单物料+模板覆盖检验项目 --> <!-- 检验标准清单物料+模板覆盖检验项目 -->
<el-dialog title="检验标准清单" :close-on-click-modal="false" v-drag :visible.sync="inspectionStandardListFlag" width="1200px"> <el-dialog title="检验标准清单" :close-on-click-modal="false" v-drag :visible.sync="inspectionStandardListFlag" width="1200px">
<el-form :inline="true" label-position="top"> <el-form :inline="true" label-position="top">
<el-form-item :label="'物料编码'"><el-input v-model="standardHeader.attributeNo" readonly style="width: 140px"></el-input></el-form-item>
<el-form-item :label="'物料名称'"><el-input v-model="standardHeader.partDesc" readonly style="width: 260px"></el-input></el-form-item>
<el-form-item :label="'工具ID'"><el-input v-model="standardHeader.attributeNo" readonly style="width: 140px"></el-input></el-form-item>
<el-form-item :label="'工具名称'"><el-input v-model="standardHeader.partDesc" readonly style="width: 260px"></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-item label="检验类型"><el-input v-model="standardHeader.inspectionTypeName" readonly style="width: 120px"></el-input></el-form-item>
<el-form-item :label="' '"><el-button type="primary" @click="openStandardFastAdd()">新增</el-button></el-form-item> <el-form-item :label="' '"><el-button type="primary" @click="openStandardFastAdd()">新增</el-button></el-form-item>
</el-form> </el-form>
@ -869,7 +869,7 @@ export default {
resourceCurrent: -1, resourceCurrent: -1,
inspectionStandardListFlag: false, inspectionStandardListFlag: false,
standardFastAddFlag: false, standardFastAddFlag: false,
standardHeader: { site: "", buNo: "", attributeNo: "", partDesc: "", templateId: "", inspectionTypeName: "" },
standardHeader: { site: "", buNo: "", attributeNo: "", partDesc: "", templateId: "", inspectionTypeName: "",inspectionTypeNo: "" },
standardList: [], standardList: [],
standardRow1: [], standardRow1: [],
standardRow2: [], standardRow2: [],
@ -1080,6 +1080,7 @@ export default {
deletePropertiesModel(row) { deletePropertiesModel(row) {
this.$confirm(`是否删除这个检验模板?`, "提示", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }) this.$confirm(`是否删除这个检验模板?`, "提示", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" })
.then(() => { .then(() => {
row.bu = row.site + "_" + row.buNo;
dmPartAttributeDelete(row).then(({ data }) => { dmPartAttributeDelete(row).then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.getDataList(); this.getDataList();
@ -1149,6 +1150,7 @@ export default {
this.resourceId = ""; this.resourceId = "";
this.operationCurrent = -1; this.operationCurrent = -1;
this.resourceCurrent = -1; this.resourceCurrent = -1;
this.$set(this.detailDataAdd,'inspectionTypeNo','823')
this.checkInspectionType(); this.checkInspectionType();
this.fastAddFlag = true; this.fastAddFlag = true;
}, },
@ -1159,6 +1161,7 @@ export default {
this.detailDataAdd.site = this.detailData.site this.detailDataAdd.site = this.detailData.site
this.detailDataAdd.partDesc = this.detailData.partDesc this.detailDataAdd.partDesc = this.detailData.partDesc
this.detailDataAdd.partNo = this.detailData.partNo this.detailDataAdd.partNo = this.detailData.partNo
dmAttributeTemplateList(this.detailDataAdd).then(({ data }) => { dmAttributeTemplateList(this.detailDataAdd).then(({ data }) => {
this.operation = ""; this.operation = "";
this.resourceId = ""; this.resourceId = "";
@ -1563,6 +1566,7 @@ export default {
// ======================= + ======================= // ======================= + =======================
inspectionStandardListModal(row) { inspectionStandardListModal(row) {
console.log("inspectionStandardListModal", row);
this.standardHeader = { this.standardHeader = {
site: row.site, site: row.site,
buNo: row.buNo, buNo: row.buNo,
@ -1570,6 +1574,7 @@ export default {
partDesc: this.detailData.partDesc, partDesc: this.detailData.partDesc,
templateId: row.templateId, templateId: row.templateId,
inspectionTypeName: row.inspectionTypeName, inspectionTypeName: row.inspectionTypeName,
inspectionTypeNo: row.inspectionTypeNo
}; };
const req = { site: row.site, buNo: row.buNo, attributeNo: this.detailData.partNo, templateId: row.templateId }; const req = { site: row.site, buNo: row.buNo, attributeNo: this.detailData.partNo, templateId: row.templateId };
dmAttributeTemplateItemDetailsSearch(req).then(({ data }) => { dmAttributeTemplateItemDetailsSearch(req).then(({ data }) => {
@ -1632,6 +1637,7 @@ export default {
templateId: this.standardHeader.templateId, templateId: this.standardHeader.templateId,
itemNo: this.standardSearch.itemNo, itemNo: this.standardSearch.itemNo,
itemDesc: this.standardSearch.itemDesc, itemDesc: this.standardSearch.itemDesc,
inspectionTypeNo: this.standardHeader.inspectionTypeNo,
}; };
dmAttributeTemplateItemGetItemList(req).then(({ data }) => { dmAttributeTemplateItemGetItemList(req).then(({ data }) => {
this.standardRow1 = data.row1 || []; this.standardRow1 = data.row1 || [];

2
src/views/modules/qc/IPQCResultEntry.vue

@ -2640,7 +2640,7 @@
}) })
} else { } else {
this.$message({ this.$message({
message: data.msg,
message: "暂无获取到异常数据",
type: 'warning', type: 'warning',
duration: 1500 duration: 1500
}) })

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

@ -268,8 +268,8 @@
</el-footer> </el-footer>
</el-dialog> </el-dialog>
<!-- 检验模板->快速新增 -->
<el-dialog title="新增" @close="refreshDetailList" :close-on-click-modal="false" v-drag :visible.sync="fastAddFlag" width="1100px">
<!-- 检验模板->快速新增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"> <div style="font-size: 12px">
<el-form :inline="true" label-position="top" :model="detailData"> <el-form :inline="true" label-position="top" :model="detailData">
<el-form-item :label="'模板编码'"> <el-form-item :label="'模板编码'">
@ -1643,6 +1643,27 @@
} }
}, },
/**
* 加载检验模板清单表格使用序号丢弃过期响应避免打开弹框时的请求晚于新增关闭后的刷新而把列表覆盖成旧数据
*/
loadTemplateDetailList () {
this._detailListLoadSeq = (this._detailListLoadSeq || 0) + 1
const seq = this._detailListLoadSeq
const param = {
site: this.detailData.site,
buNo: this.detailData.buNo,
partNo: this.detailData.partNo,
attributeNo: this.detailData.attributeNo || this.detailData.partNo,
attributeType: this.detailData.attributeType || 'A',
createBy: this.detailData.createBy
}
return searchPartAttributeDetails(param).then(({ data }) => {
if (seq !== this._detailListLoadSeq) return
const rows = (data && data.rows) ? data.rows : []
this.detailList = rows.slice()
})
},
// //
detailModal (row) { detailModal (row) {
this.detailData.site = row.site this.detailData.site = row.site
@ -1650,12 +1671,8 @@
this.detailData.partNo = row.partNo this.detailData.partNo = row.partNo
this.detailData.attributeNo = row.partNo this.detailData.attributeNo = row.partNo
this.detailData.partDesc = row.partDesc this.detailData.partDesc = row.partDesc
let detailDataTemp = JSON.parse(JSON.stringify(this.detailData));
detailDataTemp.inspectionTypeNo='';
searchPartAttributeDetails(detailDataTemp).then(({data}) => {
this.detailList = data.rows
})
this.detailModelFlag = true this.detailModelFlag = true
this.loadTemplateDetailList()
}, },
checkInspectionType () { checkInspectionType () {
@ -1748,6 +1765,7 @@
this.itemList1 = data.row1 this.itemList1 = data.row1
this.itemList2 = data.row2 this.itemList2 = data.row2
}) })
this.loadTemplateDetailList()
this.itemSelections1 = [] this.itemSelections1 = []
this.operation = '' this.operation = ''
this.resourceId = '' this.resourceId = ''
@ -1779,6 +1797,7 @@
this.itemList1 = data.row1 this.itemList1 = data.row1
this.itemList2 = data.row2 this.itemList2 = data.row2
}) })
this.loadTemplateDetailList()
this.itemSelections2 = [] this.itemSelections2 = []
} else { } else {
this.$alert(data.msg, '错误', { this.$alert(data.msg, '错误', {
@ -1788,13 +1807,10 @@
}) })
}, },
//
// loadTemplateDetailList
refreshDetailList () { refreshDetailList () {
let detailDataTemp = JSON.parse(JSON.stringify(this.detailData));
detailDataTemp.inspectionTypeNo='';
searchPartAttributeDetails(detailDataTemp).then(({data}) => {
this.detailList = data.rows
})
if (!this.detailModelFlag) return
this.loadTemplateDetailList()
}, },
// //
@ -1806,11 +1822,7 @@
}).then(() => { }).then(() => {
deletePartAttributeDetails(row).then(({data}) => { deletePartAttributeDetails(row).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
let detailDataTemp = JSON.parse(JSON.stringify(this.detailData));
detailDataTemp.inspectionTypeNo='';
searchPartAttributeDetails(detailDataTemp).then(({data}) => {
this.detailList = data.rows
})
this.loadTemplateDetailList()
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',

Loading…
Cancel
Save