检测方案选择修改

yangwl
shaoyong 7 months ago
parent 1c0d6887df
commit ffac3edab4

@ -3,10 +3,9 @@
v-if="showFlag"
:visible.sync="showFlag"
:modal= false
width="1000px"
width="1100px"
>
<el-row :gutter="20">
<el-col :span="24" :xs="24">
<el-form :model="queryParams" ref="queryProjectForm" size="small" :inline="true" v-show="showSearch" label-width="105px" align="left">
<el-form-item label="检测项目名称" prop="ruleName">
@ -18,16 +17,13 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="检测方案名称" prop="projectType">
<el-select v-model="queryParams.projectType" filterable clearable placeholder="请选择检测方案">
<el-option
v-for="(item,index) in projectTypeOptions"
:key="index"
:label="item.projectTypeName"
:value="item.projectTypeCode">
</el-option>
</el-select>
<el-form-item v-show="false" label="检测项目名称" prop="projectType">
<el-input
v-model="queryParams.projectType"
placeholder="检测方案代码"
clearable
style="width: 240px"
/>
</el-form-item>
<el-form-item>
@ -35,49 +31,63 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="itemList" @selection-change="handleBomSelectionChange" ref="myTable" >
<el-table-column width="50" align="center" type="selection">
</el-table-column>
<!-- 序号 -->
<el-table-column label="检测项目Id" align="left" key="id" prop="id" v-if="false" />
<el-table-column label="检测项目编号" align="left" key="orderNum" prop="orderNum" width="110"/>
<el-table-column label="检测项目名称" align="left" key="ruleName" prop="ruleName" width="250" :show-overflow-tooltip="true" />
<el-table-column label="规则属性" align="left" prop="propertyCode">
<template slot-scope="scope">
<dict-tag
:options="dict.type.qc_rule_prop"
:value="scope.row.propertyCode"
/>
</template>
</el-table-column>
<el-table-column label="检测标准" align="left" prop="checkStandard" width="250" :show-overflow-tooltip="true"/>
<el-table-column label="上差值" align="center" prop="upperDiff" width="100">
<template slot-scope="scope">
<el-input type="number" size="small" v-model="scope.row.upperDiff" @change="handleEdit(scope.$index,scope.row)"
:disabled='scope.row.propertyCode=="0"'></el-input>
</template>
</el-table-column>
<el-table-column label="下差值" align="center" prop="downDiff" width="100">
<template slot-scope="scope">
<el-input type="number" size="small" v-model="scope.row.downDiff" @change="handleEdit(scope.$index,scope.row)"
:disabled='scope.row.propertyCode=="0"'
></el-input>
</template>
</el-table-column>
<el-table-column label="测量单位" align="left" prop="unitCode" width="90"/>
<el-table-column label="抽样方案" align="left" prop="samplePlan" width="100" :show-overflow-tooltip="true"/>
<el-table-column label="合格判定" align="left" prop="judge" width="100" :show-overflow-tooltip="true"/>
<el-table-column label="缺陷等级" align="left" prop="defectLevel" width="90"/>
<el-table-column label="检验方式" align="left" prop="checkMode" width="90" :show-overflow-tooltip="true"/>
<el-table-column label="检验工具" align="left" prop="checkTool" width="90"/>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<el-row :gutter="20">
<el-col :span="5" :xs="24">
<el-tabs v-model="editTabsValue" @tab-click="handleClick" :tab-position="'right'" style="height: 600px;">
<el-tab-pane
v-for="(item) in projectTypeOptions"
:key="item.projectTypeCode"
:label="item.projectTypeName"
:name="item.projectTypeCode"
>{{ item.projectTypeName }}</el-tab-pane>
</el-tabs>
</el-col>
<el-col :span="19" :xs="24">
<el-table v-loading="loading" :data="itemList" @selection-change="handleBomSelectionChange" ref="myTable" >
<el-table-column width="50" align="center" type="selection">
</el-table-column>
<!-- 序号 -->
<el-table-column label="检测项目Id" align="left" key="id" prop="id" v-if="false" />
<el-table-column label="检测项目编号" align="left" key="orderNum" prop="orderNum" width="110"/>
<el-table-column label="检测项目名称" align="left" key="ruleName" prop="ruleName" width="250" :show-overflow-tooltip="true" />
<el-table-column label="规则属性" align="left" prop="propertyCode">
<template slot-scope="scope">
<dict-tag
:options="dict.type.qc_rule_prop"
:value="scope.row.propertyCode"
/>
</template>
</el-table-column>
<el-table-column label="检测标准" align="left" prop="checkStandard" width="250" :show-overflow-tooltip="true"/>
<el-table-column label="上差值" align="center" prop="upperDiff" width="100">
<template slot-scope="scope">
<el-input type="number" size="small" v-model="scope.row.upperDiff" @change="handleEdit(scope.$index,scope.row)"
:disabled='scope.row.propertyCode=="0"'></el-input>
</template>
</el-table-column>
<el-table-column label="下差值" align="center" prop="downDiff" width="100">
<template slot-scope="scope">
<el-input type="number" size="small" v-model="scope.row.downDiff" @change="handleEdit(scope.$index,scope.row)"
:disabled='scope.row.propertyCode=="0"'
></el-input>
</template>
</el-table-column>
<el-table-column label="测量单位" align="left" prop="unitCode" width="90"/>
<el-table-column label="抽样方案" align="left" prop="samplePlan" width="100" :show-overflow-tooltip="true"/>
<el-table-column label="合格判定" align="left" prop="judge" width="100" />
<el-table-column label="缺陷等级" align="left" prop="defectLevel" width="90"/>
<el-table-column label="检验方式" align="left" prop="checkMode" width="90" :show-overflow-tooltip="true"/>
<el-table-column label="检验工具" align="left" prop="checkTool" width="90"/>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
</el-row>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
@ -109,6 +119,8 @@ export default {
itemList: null,
ruleName: null,
projectType:null,
editTabsValue: '',
tabIndex: null,
//
bomCode: undefined,
defaultProps: {
@ -120,6 +132,8 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
ruleName: null,
projectType: null,
groupId:null,
materialCode:null,
typeCode:null
@ -136,6 +150,7 @@ export default {
getProjectList() {
getProjectOptions(this.queryParams).then(response => {
this.projectTypeOptions = response;
this.tabIndex = response.length;
});
},
@ -166,13 +181,15 @@ export default {
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryProjectForm");
this.queryParams.projectType = '';
this.editTabsValue = '';
this.handleQuery();
},
//
handleBomSelectionChange(selection) {
this.selectionRows = selection
},
handleBomSelectionChange(selection) {
this.selectionRows = selection
},
handleEdit(index, row) {
console.log('row:',index, row);
},
@ -187,6 +204,11 @@ export default {
this.ruleName = '';
this.projectType = '';
},
handleClick(tab,event) {
this.queryParams.projectType = tab.name;
this.getList();
}
}
};
</script>

Loading…
Cancel
Save