Commit 072d05d4 authored by chenzj's avatar chenzj

生产工单的新增生产工艺换成生产版本

parent 06864dea
<template>
<el-dialog
title="工艺路线选择"
v-if="showFlag"
:visible.sync="showFlag"
:modal="true"
width="80%"
append-to-body
center
>
<el-form
:model="queryParams"
ref="queryForm"
size="small"
inline
v-show="showSearch"
label-width="110px"
>
<el-form-item label="生产版本编码" prop="productionSolutionCode">
<el-input
v-model="queryParams.productionSolutionCode"
placeholder="请输入生产版本编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="生产用途" prop="productionSolutionName">
<el-input
v-model="queryParams.productionSolutionName"
placeholder="请输入生产用途"
clearable
@keyup.enter.native="handleQuery"
/>
</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="processRoutesList"
highlight-current-row
@current-change="handleCurrent"
@row-dblclick="handleRowDbClick"
height="400"
>
<el-table-column width="50" align="center">
<template v-slot="scope">
<el-radio
v-model="selectedRouteId"
:label="scope.row.productionSolutionId"
@change="handleRowChange(scope.row)"
>{{ "" }}</el-radio
>
</template>
</el-table-column>
<el-table-column label="生产版本编码" align="center" prop="productionSolutionCode" />
<el-table-column label="组件号" align="center" prop="groupCounter" />
<el-table-column label="生产用途" align="center" prop="usageName" />
<el-table-column label="备注" align="center" prop="remark" />
</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 {
listProductionSolution,
} from "@/api/mes/pro/productionSolution";
export default {
name: "RoutesProcessSelectSingle",
components: {},
data() {
return {
showFlag: false,
// 选中数组
selectedRouteId: undefined,
selectedRows: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
processList: [],
// 品牌表格数据
processRoutesList: [],
// // 品牌名称
// brandName: undefined,
defaultProps: {
children: "children",
label: "label",
},
processLoading: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
productionSolutionId: null, // 可以查简称与英文名
productionSolutionCode: null,
productionSolutionName: null,
statsu: "PREPARE",
itemId: null,
routeId: null,
usageId: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询工厂列表 */
getList() {
this.loading = true;
listProductionSolution(this.queryParams).then((response) => {
this.processRoutesList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
handleCurrent(row) {
const params = {
pageNum: 1,
pageSize: 1000,
routeId: row.productionSolutionId,
};
this.processLoading = true;
listProductionSolution(params)
.then(({ rows }) => {
this.processList = rows;
this.processLoading = false;
})
.catch(() => {
this.processLoading = false;
});
if (row) {
this.selectedRows = row;
}
},
getProcess() {},
// 单选选中数据
handleRowChange(row) {
if (row) {
this.selectedRows = row;
}
},
//双击选中
handleRowDbClick(row) {
if (row) {
this.selectedRows = row;
this.$emit("onSelected", this.selectedRows);
this.showFlag = false;
}
},
// 表单重置
reset() {
this.form = {
productionSolutionId: null,
productionSolutionCode: null,
productionSolutionName: null,
itemId: null,
routeId: null,
usageId: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
};
this.resetForm("form");
},
//确定选中
confirmSelect() {
if (this.selectedRouteId == null || this.selectedRouteId == 0) {
this.$notify({
title: "提示",
type: "warning",
message: "请至少选择一条数据!",
});
return;
}
this.$emit("onSelected", this.selectedRows);
this.showFlag = false;
},
},
};
</script>
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form <!-- <el-form
:model="queryParams" :model="queryParams"
ref="queryForm" ref="queryForm"
size="small" size="small"
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
>重置</el-button >重置</el-button
> >
</el-form-item> </el-form-item>
</el-form> </el-form> -->
<el-table <el-table
v-loading="loading" v-loading="loading"
...@@ -77,24 +77,27 @@ ...@@ -77,24 +77,27 @@
> >
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="组件号" align="center" prop="groupCounter" />
<el-table-column <el-table-column
label="产品版本名称" label="产品版本名称"
align="center" align="center"
prop="productionSolutionName" prop="productionSolutionName"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column label="生产用途" align="center" prop="usageName" /> <el-table-column label="生产用途" align="center" prop="usageName" />
<el-table-column label="状态" align="center" width="100" prop="status"> <el-table-column label="备注" align="center" prop="remark" />
<!-- <el-table-column label="状态" align="center" width="100" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
:options="dict.type.production_solution_status" :options="dict.type.production_solution_status"
:value="scope.row.status" :value="scope.row.status"
/> />
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column label="备注" align="center" prop="remark" />
<!-- <el-table-column label="备注" align="center" prop="usageName" width="180"/> --> <!-- <el-table-column label="备注" align="center" prop="usageName" width="180"/> -->
<!--
<el-table-column <el-table-column
label="操作" label="操作"
width="200px" width="200px"
...@@ -113,7 +116,7 @@ ...@@ -113,7 +116,7 @@
>确认</el-button >确认</el-button
> >
</template> </template>
</el-table-column> </el-table-column> -->
</el-table> </el-table>
<pagination <pagination
v-show="total > 0" v-show="total > 0"
......
...@@ -64,9 +64,9 @@ ...@@ -64,9 +64,9 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :lg="6" :md="8" :sm="12" :xs="12"> <el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="工艺名称" prop="routeId"> <el-form-item label="生产版本" prop="productionSolutionCode">
<el-input <el-input
v-model="form.routeName" v-model="form.productionSolutionCode"
readonly readonly
:disabled="mode == 'make'" :disabled="mode == 'make'"
placeholder="请选择工艺路线" placeholder="请选择工艺路线"
...@@ -308,7 +308,7 @@ import WorkOrderSize from "./components/WorkOrderSize.vue"; ...@@ -308,7 +308,7 @@ import WorkOrderSize from "./components/WorkOrderSize.vue";
import ItemSelect from "@/components/itemSelect/single.vue"; import ItemSelect from "@/components/itemSelect/single.vue";
import ClientSelect from "@/components/clientSelect/single.vue"; import ClientSelect from "@/components/clientSelect/single.vue";
import VendorSelect from "@/components/vendorSelect/single.vue"; import VendorSelect from "@/components/vendorSelect/single.vue";
import RoutesProcessSelect from "@/components/routesProcessSelect/index.vue"; import RoutesProcessSelect from "@/components/productionSolution/index.vue";
import { listRouteprocess } from "@/api/mes/pro/routeprocess"; import { listRouteprocess } from "@/api/mes/pro/routeprocess";
import tabPlugins from "@/plugins/tab"; import tabPlugins from "@/plugins/tab";
import { import {
...@@ -396,6 +396,9 @@ export default { ...@@ -396,6 +396,9 @@ export default {
packUnitOfMeasure: null, packUnitOfMeasure: null,
lossIndividuallyWrap: null, lossIndividuallyWrap: null,
packNum: null, packNum: null,
productionSolutionId: null,
productionSolutionCode: null,
productionSolutionName: null,
}, },
// 表单校验 // 表单校验
rules: { rules: {
...@@ -622,15 +625,15 @@ export default { ...@@ -622,15 +625,15 @@ export default {
// } // }
// }, // },
//物料选择弹出框 //物料选择弹出框
onRoutesProcessSelect(row) { onRoutesProcessSelect(row) {
if (row != undefined && row != null) { if (row != undefined && row != null) {
this.form.routeId = row.routeId; this.form.productionSolutionId = row.productionSolutionId;
this.form.routeName = row.routeName; this.form.productionSolutionCode = row.productionSolutionCode;
const params = { const params = {
pageNum: 1, pageNum: 1,
pageSize: 1000, pageSize: 1000,
routeId: row.routeId, routeId: row.productionSolutionId,
}; };
listRouteprocess(params).then(({ rows }) => { listRouteprocess(params).then(({ rows }) => {
this.$refs["ProogingProcessRef"].setList(rows); this.$refs["ProogingProcessRef"].setList(rows);
......
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