Commit ec4fcb2d authored by chenzj's avatar chenzj

刀模版、到模板申请单、刀模版入库完善

parent e6b73f6c
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="刀模版具编码" prop="toolCode"> <el-form-item label="刀模SN" prop="toolCode">
<el-input <el-input
v-model="queryParams.toolCode" v-model="queryParams.toolCode"
placeholder="请输入刀模版具编码" placeholder="请输入刀模版具编码"
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
>{{scope.row.toolName}}</el-button> >{{scope.row.toolName}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="编号" width="80" align="center" prop="toolCode" > <el-table-column label="刀模SN" width="80" align="center" prop="toolCode" >
</el-table-column> </el-table-column>
...@@ -368,6 +368,7 @@ export default { ...@@ -368,6 +368,7 @@ export default {
loading: true, loading: true,
// 选中数组 // 选中数组
ids: [], ids: [],
codes: [],
selectRow: [], selectRow: [],
// 非单个禁用 // 非单个禁用
single: true, single: true,
...@@ -515,6 +516,7 @@ export default { ...@@ -515,6 +516,7 @@ export default {
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.toolId); this.ids = selection.map(item => item.toolId);
this.codes = selection.map(item => item.toolCode);
this.selectRow = selection; this.selectRow = selection;
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
...@@ -572,7 +574,8 @@ export default { ...@@ -572,7 +574,8 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const toolIds = row.toolId || this.ids; const toolIds = row.toolId || this.ids;
this.$modal.confirm('是否确认删除刀模版具清单编号为"' + toolIds + '"的数据项?').then(function() { const toolCodes = row.toolCode || this.codes;
this.$modal.confirm('是否确认删除刀模版具清单SN为"' + toolCodes + '"的数据项?').then(function() {
return delTool(toolIds); return delTool(toolIds);
}).then(() => { }).then(() => {
this.getList(); this.getList();
......
...@@ -355,6 +355,8 @@ export default { ...@@ -355,6 +355,8 @@ export default {
loading: true, loading: true,
// 选中数组 // 选中数组
ids: [], ids: [],
codes: [],
// 非单个禁用 // 非单个禁用
single: true, single: true,
// 非多个禁用 // 非多个禁用
...@@ -456,6 +458,7 @@ export default { ...@@ -456,6 +458,7 @@ export default {
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map((item) => item.toolRequestUseId); this.ids = selection.map((item) => item.toolRequestUseId);
this.codes = selection.map((item) => item.toolRequestUseCode);
this.single = selection.length !== 1; this.single = selection.length !== 1;
this.multiple = !selection.length; this.multiple = !selection.length;
}, },
...@@ -527,9 +530,10 @@ export default { ...@@ -527,9 +530,10 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const toolRequestUseIds = row.toolRequestUseId || this.ids; const toolRequestUseIds = row.toolRequestUseId || this.ids;
const toolRequestUseCodes = row.toolRequestUseCode || this.codes;
this.$modal this.$modal
.confirm( .confirm(
'是否确认删除刀模版领用单编号为"' + toolRequestUseIds + '"的数据项?' '是否确认删除刀模版领用单编号为"' + toolRequestUseCodes + '"的数据项?'
) )
.then(function () { .then(function () {
return delTmToolRequestUse(toolRequestUseIds); return delTmToolRequestUse(toolRequestUseIds);
......
<template> <template>
<el-dialog <el-dialog
title="请选择下机的刀模版" title="请选择要退的刀模版"
v-if="showFlag" v-if="showFlag"
:visible.sync="showFlag" :visible.sync="showFlag"
:modal="true" :modal="true"
...@@ -12,13 +12,22 @@ ...@@ -12,13 +12,22 @@
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="工作单元名称" prop="workunitName"> <el-form-item label="工作单元名称" prop="workunitName">
<el-input <el-input
v-model="queryParams.taskid" v-model="queryParams.workunitName"
placeholder="请输入工作单元名称" placeholder="请输入工作单元名称"
style="width:220px;" style="width:220px;"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="刀模SN" prop="toolCode">
<el-input
v-model="queryParams.toolCode"
placeholder="请输入刀模SN"
style="width:220px;"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
...@@ -89,7 +98,7 @@ export default { ...@@ -89,7 +98,7 @@ export default {
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
typeStr: '2', typeStr: '',
warehouseStr: '1' warehouseStr: '1'
}, },
}; };
......
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