Merge remote-tracking branch 'origin/master'
commit
bc1fe00dd9
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询箱体类型列表
|
||||
export function listMesBox(query) {
|
||||
return request({
|
||||
url: '/mes/mesBox/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询箱体类型详细
|
||||
export function getMesBox(boxId) {
|
||||
return request({
|
||||
url: '/mes/mesBox/' + boxId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 新增箱体类型
|
||||
export function addMesBox(data) {
|
||||
return request({
|
||||
url: '/mes/mesBox',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改箱体类型
|
||||
export function updateMesBox(data) {
|
||||
return request({
|
||||
url: '/mes/mesBox',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除箱体类型
|
||||
export function delMesBox(boxId) {
|
||||
return request({
|
||||
url: '/mes/mesBox/' + boxId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 获取字典选择框列表
|
||||
export function optionSelect() {
|
||||
return request({
|
||||
url: '/mes/mesBox/optionSelect',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询字典数据列表
|
||||
export function listMesBoxDetail(query) {
|
||||
return request({
|
||||
url: '/mes/mesBoxDetail/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询字典数据详细
|
||||
export function getMesBoxDetail(boxCode) {
|
||||
return request({
|
||||
url: '/mes/mesBoxDetail/' + boxCode,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增字典数据
|
||||
export function addMesBoxDetail(data) {
|
||||
return request({
|
||||
url: '/mes/mesBoxDetail',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改字典数据
|
||||
export function updateMesBoxDetail(data) {
|
||||
return request({
|
||||
url: '/mes/mesBoxDetail',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除字典数据
|
||||
export function delMesBoxDetail(boxCode) {
|
||||
return request({
|
||||
url: '/mes/mesBoxDetail/' + boxCode,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
@ -0,0 +1,415 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="箱型名称" prop="boxType">
|
||||
<el-select v-model="queryParams.boxType">
|
||||
<el-option
|
||||
v-for="item in typeOptions"
|
||||
:key="item.boxId"
|
||||
:label="item.boxName"
|
||||
:value="item.boxType"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="箱型标签" prop="boxLabel">
|
||||
<el-input
|
||||
v-model="queryParams.boxLabel"
|
||||
placeholder="请输入箱型标签"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="数据状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_normal_disable"
|
||||
: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-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['mes:mesBoxDetail:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['mes:mesBoxDetail:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['mes:mesBoxDetail:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['mes:mesBoxDetail:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-close"
|
||||
size="mini"
|
||||
@click="handleClose"
|
||||
>关闭</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="箱型编码" align="center" prop="boxCode" />
|
||||
<el-table-column label="数据标签" align="center" prop="boxLabel">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.listClass == '' || scope.row.listClass == 'default'">{{scope.row.boxLabel}}</span>
|
||||
<el-tag v-else :type="scope.row.listClass == 'primary' ? '' : scope.row.listClass">{{scope.row.boxLabel}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数据关键字" align="center" prop="boxKey" />
|
||||
<el-table-column label="数据值" align="center" prop="boxValue" />
|
||||
<el-table-column label="数据排序" align="center" prop="boxSort" />
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['mes:mesBoxDetail:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['mes:mesBoxDetail:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="箱型类型">
|
||||
<el-input v-model="form.boxType" :disabled="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数据标签" prop="boxLabel">
|
||||
<el-input v-model="form.boxLabel" placeholder="请输入数据标签" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数据关键字" prop="boxKey">
|
||||
<el-input v-model="form.boxKey" placeholder="请输入数据键值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数据键值" prop="boxValue">
|
||||
<el-input v-model="form.boxValue" placeholder="请输入数据键值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="样式属性" prop="cssClass">
|
||||
<el-input v-model="form.cssClass" placeholder="请输入样式属性" />
|
||||
</el-form-item>
|
||||
<el-form-item label="显示排序" prop="boxSort">
|
||||
<el-input-number v-model="form.boxSort" controls-position="right" :min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="回显样式" prop="listClass">
|
||||
<el-select v-model="form.listClass">
|
||||
<el-option
|
||||
v-for="item in listClassOptions"
|
||||
:key="item.value"
|
||||
:label="item.label + '(' + item.value + ')'"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listMesBoxDetail,
|
||||
getMesBoxDetail,
|
||||
delMesBoxDetail,
|
||||
addMesBoxDetail,
|
||||
updateMesBoxDetail } from "@/api/mes/mesBoxDetail";
|
||||
import { optionSelect as getDictOptionselect, getMesBox } from "@/api/mes/mesBox";
|
||||
|
||||
export default {
|
||||
name: "Detail",
|
||||
dicts: ['sys_normal_disable'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 箱型表格数据
|
||||
dataList: [],
|
||||
// 默认箱型类型
|
||||
defaultDictType: "",
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 数据标签回显样式
|
||||
listClassOptions: [
|
||||
{
|
||||
value: "default",
|
||||
label: "默认"
|
||||
},
|
||||
{
|
||||
value: "primary",
|
||||
label: "主要"
|
||||
},
|
||||
{
|
||||
value: "success",
|
||||
label: "成功"
|
||||
},
|
||||
{
|
||||
value: "info",
|
||||
label: "信息"
|
||||
},
|
||||
{
|
||||
value: "warning",
|
||||
label: "警告"
|
||||
},
|
||||
{
|
||||
value: "danger",
|
||||
label: "危险"
|
||||
}
|
||||
],
|
||||
// 类型数据箱型
|
||||
typeOptions: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
boxName: undefined,
|
||||
boxType: undefined,
|
||||
status: undefined
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
boxLabel: [
|
||||
{ required: true, message: "数据标签不能为空", trigger: "blur" }
|
||||
],
|
||||
boxKey: [
|
||||
{ required: true, message: "数据关键字不能为空", trigger: "blur" }
|
||||
],
|
||||
boxValue: [
|
||||
{ required: true, message: "数据值不能为空", trigger: "blur" }
|
||||
],
|
||||
boxSort: [
|
||||
{ required: true, message: "数据顺序不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
const boxId = this.$route.params && this.$route.params.boxId;
|
||||
this.getType(boxId);
|
||||
this.getTypeList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询箱型类型详细 */
|
||||
getType(boxId) {
|
||||
getMesBox(boxId).then(response => {
|
||||
this.queryParams.boxType = response.data.boxType;
|
||||
this.defaultDictType = response.data.boxType;
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
/** 查询箱型类型列表 */
|
||||
getTypeList() {
|
||||
getDictOptionselect().then(response => {
|
||||
this.typeOptions = response.data;
|
||||
});
|
||||
},
|
||||
/** 查询箱型数据列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listMesBoxDetail(this.queryParams).then(response => {
|
||||
this.dataList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
boxCode: undefined,
|
||||
boxLabel: undefined,
|
||||
boxValue: undefined,
|
||||
cssClass: undefined,
|
||||
listClass: 'default',
|
||||
boxSort: 0,
|
||||
status: "0",
|
||||
remark: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 返回按钮操作 */
|
||||
handleClose() {
|
||||
const obj = { path: "/mes/mesBox"};
|
||||
this.$tab.closeOpenPage(obj);
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams.boxType = this.defaultDictType;
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加箱型数据";
|
||||
this.form.boxType = this.queryParams.boxType;
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.boxCode)
|
||||
this.single = selection.length!=1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const boxCode = row.boxCode || this.ids
|
||||
getMesBoxDetail(boxCode).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改箱型数据";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: _.debounce(function() {
|
||||
// 提交逻辑
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.boxCode != undefined) {
|
||||
updateMesBoxDetail(this.form).then(response => {
|
||||
this.$store.dispatch('box/removeDict', this.queryParams.boxType);
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addMesBoxDetail(this.form).then(response => {
|
||||
this.$store.dispatch('box/removeDict', this.queryParams.boxType);
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}, 300),
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const boxCodes = row.boxCode || this.ids;
|
||||
this.$modal.confirm('是否确认删除箱型编码为"' + boxCodes + '"的数据项?').then(function() {
|
||||
return delMesBoxDetail(boxCodes);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
this.$store.dispatch('box/removeDict', this.queryParams.boxType);
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('mes/mesBoxDetail/export', {
|
||||
...this.queryParams
|
||||
}, `mesBoxDetail_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,280 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="箱体名称" prop="boxName">
|
||||
<el-input
|
||||
v-model="queryParams.boxName"
|
||||
placeholder="请输入箱体名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="箱体类型" prop="boxType">
|
||||
<el-input
|
||||
v-model="queryParams.boxType"
|
||||
placeholder="请输入箱体类型"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status"
|
||||
placeholder="箱体状态"
|
||||
clearable
|
||||
style="width: 240px">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_normal_disable"
|
||||
: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-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
||||
v-hasPermi="['mes:mesBox:add']">新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['mes:mesBox:edit']">修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['mes:mesBox:remove']">删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
v-hasPermi="['mes:mesBox:export']">导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="mesBoxList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="箱体主键" align="center" prop="boxId" />
|
||||
<el-table-column label="箱体名称" align="center" prop="boxName" />
|
||||
<el-table-column label="箱体类型" align="center" prop="boxType" >
|
||||
<template slot-scope="scope">
|
||||
<router-link :to="'/mes/box-detail/index/' + scope.row.boxId" class="link-type">
|
||||
<span>{{ scope.row.boxType }}</span>
|
||||
</router-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="status" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['mes:mesBox:edit']">修改
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['mes:mesBox:remove']">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
<!-- 添加或修改箱体类型对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="箱体名称" prop="boxName">
|
||||
<el-input v-model="form.boxName" placeholder="请输入箱体名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="字典类型" prop="boxType">
|
||||
<el-input v-model="form.boxType" placeholder="请输入字典类型" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listMesBox,
|
||||
getMesBox,
|
||||
delMesBox,
|
||||
addMesBox,
|
||||
updateMesBox
|
||||
} from "@/api/mes/mesBox"
|
||||
export default {
|
||||
name: "MesBox",
|
||||
dicts: ['sys_normal_disable'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 箱体类型表格数据
|
||||
mesBoxList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
boxName: null,
|
||||
boxType: null,
|
||||
status: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
boxName: [
|
||||
{ required: true, message: "字典名称不能为空", trigger: "blur" }
|
||||
],
|
||||
boxType: [
|
||||
{ required: true, message: "字典类型不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询箱体类型列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listMesBox(this.queryParams).then(response => {
|
||||
this.mesBoxList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
boxId: null,
|
||||
boxName: null,
|
||||
boxType: null,
|
||||
status: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
remark: null
|
||||
}
|
||||
;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.boxId)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加箱体类型";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const boxId =
|
||||
row.boxId || this.ids
|
||||
getMesBox(boxId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改箱体类型";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function () {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.boxId != undefined) {
|
||||
updateMesBox(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addMesBox(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const boxIds = row.boxId || this.ids;
|
||||
this.$modal.confirm('是否确认删除箱体编号为"' + boxIds + '"的数据项?').then(function () {
|
||||
return delMesBox(boxIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
},
|
||||
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('mes/mesBox/export', {
|
||||
...this.queryParams
|
||||
}, `箱体类型导出_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
@ -0,0 +1,291 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="检验类型" prop="typeCode">
|
||||
<el-select v-model="queryParams.typeCode" clearable placeholder="请选择类型" @change="getCheckTypeList">
|
||||
<el-option
|
||||
v-for="dict in dict.type.check_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="检验节点" prop="checkType">
|
||||
<el-select v-model="queryParams.checkType" clearable placeholder="请选择检验节点">
|
||||
<el-option
|
||||
v-for="dict in checkTypeList"
|
||||
:key="dict.checkType"
|
||||
:label="dict.checkName"
|
||||
:value="dict.checkType"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="来料月份" prop="incomeTimeYM">
|
||||
<el-date-picker
|
||||
v-model="queryParams.incomeTimeYM"
|
||||
format="yyyy-MM"
|
||||
type="month"
|
||||
placeholder="选择月">
|
||||
</el-date-picker>
|
||||
</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-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['quality:project:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
|
||||
<el-table-column label="日期" align="center" prop="ymdms" width="150" />
|
||||
<template v-for="(column, index) in showTitles1">
|
||||
<el-table-column align="center" min-width="120" :prop="column.id" :key="column.id" :label="column.titleName"/>
|
||||
</template>
|
||||
<el-table-column label="抽样总数" align="center" prop="quantity" min-width="100" />
|
||||
<template v-for="(column, index) in showTitles2">
|
||||
<el-table-column align="center" min-width="120" :prop="column.id" :key="column.id" :label="column.titleName"/>
|
||||
</template>
|
||||
<el-table-column label="不良总数" align="center" prop="quantity" min-width="100" />
|
||||
<el-table-column label="不良率" align="center" prop="quantity" min-width="100" />
|
||||
<el-table-column label="抽检批数" align="center" prop="quantity" min-width="100" />
|
||||
<el-table-column label="不合格批数" align="center" prop="quantity" min-width="100" />
|
||||
<el-table-column label="不合格批次率" align="center" prop="quantity" min-width="100" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getTableHzTitle,
|
||||
getCheckTypeList,
|
||||
} from "@/api/quality/qcTable";
|
||||
import moment from 'moment';
|
||||
export default {
|
||||
name: "qcTableCheckHz",
|
||||
dicts: ["check_type"],
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
tableList: [],
|
||||
showTitles1: [],
|
||||
showTitles2: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
checkTypeList: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
incomeTimeYM:null,
|
||||
incomeTimeArray: [],
|
||||
checkTimeArray: [],
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
workorderId: null,
|
||||
rfid: null,
|
||||
factoryCode: null,
|
||||
machineCode: null,
|
||||
nowProcessId: null,
|
||||
nextProcessId: null,
|
||||
orderNum: null,
|
||||
inTime: null,
|
||||
outTime: null,
|
||||
status: null,
|
||||
shiftId: null,
|
||||
productCode: null,
|
||||
supplierName: '',
|
||||
supplierCode: ''
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted(){
|
||||
this.getDate();
|
||||
this.getList();
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
/**获取默认查询时间段**/
|
||||
getDate() {
|
||||
let start = this.Fungetdate (0)
|
||||
this.queryParams.incomeTimeYM=start
|
||||
},
|
||||
Fungetdate (num) {
|
||||
var dd = new Date();
|
||||
dd.setDate(dd.getDate() + num);
|
||||
var y = dd.getFullYear();
|
||||
var m = dd.getMonth() + 1;//获取当前月份的日期
|
||||
var d = dd.getDate();
|
||||
return y + "-" + m;
|
||||
},
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
if(this.queryParams.incomeTimeYM!=null){
|
||||
this.queryParams.yearMonth = moment(this.queryParams.incomeTimeYM).format('YYYY-MM');
|
||||
}
|
||||
//获取Table表头
|
||||
getTableHzTitle(this.queryParams).then(response => {
|
||||
this.showTitles1 = [];
|
||||
for(let i=0;i<response.columns1.length;i++){
|
||||
var pobj={};
|
||||
pobj.id="colone"+i;
|
||||
pobj.titleName = response[i];
|
||||
this.showTitles1.push(pobj)
|
||||
}
|
||||
|
||||
this.showTitles2 = [];
|
||||
for(let i=0;i<response.columns2.length;i++){
|
||||
var pobj={};
|
||||
pobj.id="coltwo"+i;
|
||||
pobj.titleName = response[i];
|
||||
this.showTitles2.push(pobj)
|
||||
}
|
||||
});
|
||||
//获取Table数据
|
||||
getTableData(this.queryParams).then(response => {
|
||||
this.hourProList = response;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
recordId: null,
|
||||
workorderId: null,
|
||||
rfid: null,
|
||||
factoryCode: null,
|
||||
machineCode: null,
|
||||
nowProcessId: null,
|
||||
nextProcessId: null,
|
||||
orderNum: null,
|
||||
inTime: null,
|
||||
outTime: null,
|
||||
status: null,
|
||||
remark: null,
|
||||
attr1: null,
|
||||
attr2: null,
|
||||
attr3: null,
|
||||
attr4: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
shiftId: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
getCheckTypeList(val) {
|
||||
//获取检验节点
|
||||
getCheckTypeList(val).then((response) => {
|
||||
this.checkTypeList = response;
|
||||
});
|
||||
},
|
||||
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('mes/rfidProcess/export', {
|
||||
...this.queryParams
|
||||
}, `rfidProcess_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.tagbox {
|
||||
display: flex;
|
||||
/* overflow: scroll; */
|
||||
position: relative;
|
||||
width: 80%;
|
||||
padding-left: 26px;
|
||||
margin-bottom: 15px;
|
||||
.tagboxlabel{
|
||||
width: 100px;
|
||||
text-align: right;
|
||||
vertical-align: middle;
|
||||
font-size: 14px;
|
||||
color: black;
|
||||
line-height: 40px;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
margin-right: 12px;
|
||||
}
|
||||
.tag {
|
||||
width: 720px;
|
||||
border: 1px #DCDFE6 solid;
|
||||
height: 60px;
|
||||
padding: 5px 15px;
|
||||
overflow-y: scroll;
|
||||
.tagitem{
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
.button1{
|
||||
width: 37px;
|
||||
height: 37px;
|
||||
position: absolute;
|
||||
right: -39px;
|
||||
top: 2px;
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,358 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" style="margin-bottom: -34px;">
|
||||
<el-form-item label="来料月份" prop="incomeTimeYM">
|
||||
<el-date-picker
|
||||
v-model="queryParams.incomeTimeYM"
|
||||
format="yyyy-MM"
|
||||
type="month"
|
||||
placeholder="选择月">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商" prop="supplierCodeArray">
|
||||
<div class="tagbox">
|
||||
<div class="tag" style="" placeholder="请选择供应商">
|
||||
<el-tag
|
||||
:key="index"
|
||||
class="tagitem"
|
||||
v-for="(tag, index) in selectMaterielListtag"
|
||||
closable
|
||||
:disable-transitions="false"
|
||||
@close="handleClose(tag)"
|
||||
>
|
||||
{{ tag.supplierName }}
|
||||
</el-tag>
|
||||
</div>
|
||||
<el-button
|
||||
slot="append"
|
||||
class="button1"
|
||||
@click="handleSelectSupplier"
|
||||
icon="el-icon-search"
|
||||
></el-button>
|
||||
<el-row style="display: none;">
|
||||
<el-input type="input" clearable v-model="queryParams.supplierCode" placeholder="点击选择物料"/>
|
||||
<el-input type="input"clearable v-model="queryParams.supplierName" placeholder="点击选择物料"/>
|
||||
</el-row>
|
||||
</div>
|
||||
</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-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['mes:rfidProcess:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="incomeList" @selection-change="handleSelectionChange">
|
||||
<el-table-column label="供应商编号" align="center" prop="supplierCode" width="120" fixed/>
|
||||
<el-table-column label="供应商名称" align="left" prop="supplierName" width="390" fixed/>
|
||||
<el-table-column label="总批数" align="center" prop="batchs" width="90"/>
|
||||
<el-table-column label="合格批次" align="center" prop="okBatchs" width="100"/>
|
||||
<el-table-column label="不合格批次" align="center" prop="noOkBatchs" width="100"/>
|
||||
<el-table-column label="批次不良率" align="center" prop="noOkBatchRate" width="100"/>
|
||||
<el-table-column label="总数量" align="center" prop="nums" width="90"/>
|
||||
<el-table-column label="合格数量" align="center" prop="okNums" width="100"/>
|
||||
<el-table-column label="不合格数量" align="center" prop="noOkNums" width="100"/>
|
||||
<el-table-column label="数量不良率" align="center" prop="noOkNumRate" width="100"/>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getIncomeTableList} from "@/api/quality/qcTable";
|
||||
import moment from 'moment';
|
||||
export default {
|
||||
name: "qcTableCheckOrder",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 生产rfid流程表格数据
|
||||
incomeList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 新增-物料选中listtag
|
||||
selectMaterielListtag:[],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
incomeTimeYM:null,
|
||||
incomeTimeArray: [],
|
||||
checkTimeArray: [],
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
workorderId: null,
|
||||
rfid: null,
|
||||
factoryCode: null,
|
||||
machineCode: null,
|
||||
nowProcessId: null,
|
||||
nextProcessId: null,
|
||||
orderNum: null,
|
||||
inTime: null,
|
||||
outTime: null,
|
||||
status: null,
|
||||
shiftId: null,
|
||||
productCode: null,
|
||||
supplierName: '',
|
||||
supplierCode: ''
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
workorderId: [
|
||||
{ required: true, message: "工单ID不能为空", trigger: "blur" }
|
||||
],
|
||||
rfid: [
|
||||
{ required: true, message: "rfid号不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted(){
|
||||
this.getDate();
|
||||
this.getList();
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
/**获取默认查询时间段**/
|
||||
getDate() {
|
||||
let start = this.Fungetdate (0)
|
||||
this.queryParams.incomeTimeYM=start
|
||||
},
|
||||
Fungetdate (num) {
|
||||
var dd = new Date();
|
||||
dd.setDate(dd.getDate() + num);
|
||||
var y = dd.getFullYear();
|
||||
var m = dd.getMonth() + 1;//获取当前月份的日期
|
||||
var d = dd.getDate();
|
||||
return y + "-" + m;
|
||||
},
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
if(this.queryParams.incomeTimeYM!=null){
|
||||
this.queryParams.yearMonth = moment(this.queryParams.incomeTimeYM).format('YYYY-MM');
|
||||
}
|
||||
getIncomeTableList(this.queryParams).then(response => {
|
||||
this.incomeList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
recordId: null,
|
||||
workorderId: null,
|
||||
rfid: null,
|
||||
factoryCode: null,
|
||||
machineCode: null,
|
||||
nowProcessId: null,
|
||||
nextProcessId: null,
|
||||
orderNum: null,
|
||||
inTime: null,
|
||||
outTime: null,
|
||||
status: null,
|
||||
remark: null,
|
||||
attr1: null,
|
||||
attr2: null,
|
||||
attr3: null,
|
||||
attr4: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
shiftId: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.recordId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加生产rfid流程";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const recordId = row.recordId || this.ids
|
||||
getRfidProcess(recordId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改生产rfid流程";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.recordId != null) {
|
||||
updateRfidProcess(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addRfidProcess(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const recordIds = row.recordId || this.ids;
|
||||
this.$modal.confirm('是否确认删除生产rfid流程编号为"' + recordIds + '"的数据项?').then(function() {
|
||||
return delRfidProcess(recordIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('mes/rfidProcess/export', {
|
||||
...this.queryParams
|
||||
}, `rfidProcess_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
/**供应商选择弹出框**/
|
||||
handleSelectSupplier() {
|
||||
this.$refs.itemSelectSupplier.showFlag = true;
|
||||
},
|
||||
//供应商选择确认
|
||||
onSelectSupplier(objs) {
|
||||
var code = '';
|
||||
var desc = '';
|
||||
for (let i = 0; i < objs.length; i++) {
|
||||
if(this.queryParams.supplierCode.indexOf(objs[i].supplierCode)<0){
|
||||
code = code + objs[i].supplierCode + ',';
|
||||
this.selectMaterielListtag.push(objs[i])
|
||||
}else{
|
||||
this.$message({
|
||||
message: objs[i].supplierName+'已经选择',
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
|
||||
if(this.queryParams.supplierName.indexOf(objs[i].supplierName)<0){
|
||||
desc = desc + objs[i].supplierName + ',';
|
||||
}
|
||||
}
|
||||
this.queryParams.supplierCode += code;
|
||||
this.queryParams.supplierName += desc;
|
||||
},
|
||||
// 新增—删除标签
|
||||
handleClose(tag) {
|
||||
this.selectMaterielListtag.splice(this.selectMaterielListtag.indexOf(tag.supplierName), 1);
|
||||
|
||||
var code = "";
|
||||
var desc = "";
|
||||
for (let i = 0; i < this.selectMaterielListtag.length; i++) {
|
||||
code = code + this.selectMaterielListtag[i].supplierCode + ",";
|
||||
desc = desc + this.selectMaterielListtag[i].supplierName + ",";
|
||||
}
|
||||
this.queryParams.supplierCode += code;
|
||||
this.queryParams.supplierName += desc;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.tagbox {
|
||||
display: flex;
|
||||
/* overflow: scroll; */
|
||||
position: relative;
|
||||
width: 80%;
|
||||
padding-left: 26px;
|
||||
margin-bottom: 15px;
|
||||
.tagboxlabel{
|
||||
width: 100px;
|
||||
text-align: right;
|
||||
vertical-align: middle;
|
||||
font-size: 14px;
|
||||
color: black;
|
||||
line-height: 40px;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
margin-right: 12px;
|
||||
}
|
||||
.tag {
|
||||
width: 720px;
|
||||
border: 1px #DCDFE6 solid;
|
||||
height: 60px;
|
||||
padding: 5px 15px;
|
||||
overflow-y: scroll;
|
||||
.tagitem{
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
.button1{
|
||||
width: 37px;
|
||||
height: 37px;
|
||||
position: absolute;
|
||||
right: -39px;
|
||||
top: 2px;
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue