Commit 21992199 authored by 何远江's avatar 何远江

添加刀模版具,质检弹窗

parent 6020ec22
<template>
<el-dialog
title="质检选择"
v-if="showFlag"
:visible.sync="showFlag"
:modal="true"
width="80%"
center
>
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="100px"
>
<el-form-item label="检测项编码" prop="indexCode">
<el-input
v-model="queryParams.indexCode"
placeholder="请输入检测项编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="检测项名称" prop="indexName">
<el-input
v-model="queryParams.indexName"
placeholder="请输入检测项名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="检测项类型" prop="indexType">
<el-select
v-model="queryParams.indexType"
placeholder="请选择检测项类型"
clearable
>
<el-option
v-for="dict in dict.type.mes_index_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table
v-loading="loading"
:data="qualityList"
@current-change="handleCurrent"
@row-dblclick="handleRowDbClick"
>
<el-table-column width="50" align="center">
<template v-slot="scope">
<el-radio
v-model="selectedQualityId"
:label="scope.row.indexId"
@change="handleRowChange(scope.row)"
>{{ "" }}</el-radio
>
</template>
</el-table-column>
<el-table-column label="检测项编码" align="center" prop="indexCode" />
<el-table-column label="检测项名称" align="center" prop="indexName" />
<el-table-column label="检测项类型" align="center" prop="indexType">
<template slot-scope="scope">
<dict-tag
:options="dict.type.mes_index_type"
:value="scope.row.indexType"
/>
</template>
</el-table-column>
<el-table-column label="检测工具" align="center" prop="qcTool" />
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="confirmSelect">确 定</el-button>
<el-button @click="showFlag = false">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
import { listQcindex } from "@/api/mes/qc/qcindex";
export default {
name: "QualityTestSelect",
dicts: ["mes_index_type"],
components: {},
data() {
return {
showFlag: false,
// 选中数组
selectedQualityId: undefined,
selectedRows: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 品牌表格数据
qualityList: [],
// // 品牌名称
// brandName: undefined,
defaultProps: {
children: "children",
label: "label",
},
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
brandCode: null,
brandName: null,
indexId: null,
},
// 列信息
columns: [
{ key: 0, label: `品牌编码`, visible: true },
{ key: 1, label: `品牌名称`, visible: true },
{ key: 2, label: `集团`, visible: true },
// { key: 3, label: `地址`, visible: true },
{ key: 3, label: `销售对接人`, visible: true },
{ key: 4, label: `开发对接人`, visible: true },
// { key: 6, label: `品牌背景`, visible: true },
{ key: 5, label: `经营范围`, visible: true },
{ key: 6, label: `潜力项目`, visible: true },
// { key: 6, label: `廉洁规定`, visible: true },
],
};
},
// watch: {
// // 根据名称筛选分类树
// itemTypeName(val) {
// this.$refs.tree.filter(val);
// },
// },
created() {
console.log("日志:已进入brandSingle页面的列表查询方法"); // 在created钩子函数中输出日志
this.getList();
},
methods: {
// /** 查询物料编码列表 */
// getList() {
// this.loading = true;
// listMdItem(this.queryParams).then((response) => {
// this.itemList = response.rows;
// this.total = response.total;
// this.loading = false;
// });
// },
/** 查询品牌列表 */
getList() {
this.loading = true;
listQcindex(this.queryParams).then((response) => {
this.qualityList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
handleCurrent(row) {
if (row) {
this.selectedRows = row;
}
},
// 单选选中数据
handleRowChange(row) {
if (row) {
this.selectedRows = row;
}
},
//双击选中
handleRowDbClick(row) {
if (row) {
this.selectedRows = row;
this.$emit("onSelected", this.selectedRows);
this.showFlag = false;
}
},
//确定选中
confirmSelect() {
if (this.selectedQualityId == null || this.selectedQualityId == 0) {
this.$notify({
title: "提示",
type: "warning",
message: "请至少选择一条数据!",
});
return;
}
this.$emit("onSelected", this.selectedRows);
this.showFlag = false;
},
},
};
</script>
<template>
<el-dialog
title="刀模版具选择"
v-if="showFlag"
:visible.sync="showFlag"
:modal="true"
width="80%"
center
>
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="100px"
>
<el-form-item label="工装夹具编码" prop="toolCode">
<el-input
v-model="queryParams.toolCode"
placeholder="请输入工装夹具编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工装夹具名称" prop="toolName">
<el-input
v-model="queryParams.toolName"
placeholder="请输入工装夹具名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工装夹具类型" prop="toolTypeId">
<el-select v-model="form.toolTypeId" placeholder="请选择类型">
<el-option
v-for="dict in toolTypeOptions"
:key="dict.toolTypeId"
:label="dict.toolTypeName"
:value="dict.toolTypeId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="品牌" label-width="60px" prop="brand">
<el-input
v-model="queryParams.brand"
placeholder="请输入品牌"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="型号" label-width="60px" prop="spec">
<el-input
v-model="queryParams.spec"
placeholder="请输入型号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" label-width="60px" prop="status">
<el-select
v-model="queryParams.status"
placeholder="请选择状态"
clearable
>
<el-option
v-for="dict in dict.type.mes_tool_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table
v-loading="loading"
:data="toolList"
@current-change="handleCurrent"
@row-dblclick="handleRowDbClick"
>
<el-table-column width="50" align="center">
<template v-slot="scope">
<el-radio
v-model="selectedToolId"
:label="scope.row.toolId"
@change="handleRowChange(scope.row)"
>{{ "" }}</el-radio
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="confirmSelect">确 定</el-button>
<el-button @click="showFlag = false">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
import { listTool } from "@/api/mes/tm/tool";
export default {
name: "TmToolSelect",
dicts: ['mes_tool_status'],
components: {},
data() {
return {
showFlag: false,
// 选中数组
selectedToolId: undefined,
selectedRows: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 品牌表格数据
toolList: [],
// // 品牌名称
// brandName: undefined,
defaultProps: {
children: "children",
label: "label",
},
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
brandCode: null,
brandName: null,
toolId: null,
},
};
},
// watch: {
// // 根据名称筛选分类树
// itemTypeName(val) {
// this.$refs.tree.filter(val);
// },
// },
created() {
console.log("日志:已进入brandSingle页面的列表查询方法"); // 在created钩子函数中输出日志
this.getList();
},
methods: {
// /** 查询物料编码列表 */
// getList() {
// this.loading = true;
// listMdItem(this.queryParams).then((response) => {
// this.itemList = response.rows;
// this.total = response.total;
// this.loading = false;
// });
// },
/** 查询品牌列表 */
getList() {
this.loading = true;
listTool(this.queryParams).then((response) => {
this.toolList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
handleCurrent(row) {
if (row) {
this.selectedRows = row;
}
},
// 单选选中数据
handleRowChange(row) {
if (row) {
this.selectedRows = row;
}
},
//双击选中
handleRowDbClick(row) {
if (row) {
this.selectedRows = row;
this.$emit("onSelected", this.selectedRows);
this.showFlag = false;
}
},
//确定选中
confirmSelect() {
if (this.selectedToolId == null || this.selectedToolId == 0) {
this.$notify({
title: "提示",
type: "warning",
message: "请至少选择一条数据!",
});
return;
}
this.$emit("onSelected", this.selectedRows);
this.showFlag = false;
},
},
};
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment