检测方案选择修改

yangwl
shaoyong 7 months ago
parent 1c0d6887df
commit ffac3edab4

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

Loading…
Cancel
Save