<template>
|
<div class="app-container">
|
<el-card class="box-card">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form-item label="固定值:AEI.EI.SUPPLIERMODULEPRODUCTION.UPLOAD" prop="serviceId">
|
<el-input
|
v-model="queryParams.serviceId"
|
placeholder="请输入固定值:AEI.EI.SUPPLIERMODULEPRODUCTION.UPLOAD"
|
clearable
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
<el-form-item label="工厂代码" prop="siteCode">
|
<el-input
|
v-model="queryParams.siteCode"
|
placeholder="请输入工厂代码"
|
clearable
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
<el-form-item label="模组序号" prop="moduleSerial">
|
<el-input
|
v-model="queryParams.moduleSerial"
|
placeholder="请输入模组序号"
|
clearable
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
<el-form-item label="模组型号" prop="moduleModel">
|
<el-input
|
v-model="queryParams.moduleModel"
|
placeholder="请输入模组型号"
|
clearable
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
<el-form-item label="A/B模组" prop="ABModule">
|
<el-input
|
v-model="queryParams.ABModule"
|
placeholder="请输入A/B模组"
|
clearable
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
<el-form-item label="包装箱号" prop="packageNo">
|
<el-input
|
v-model="queryParams.packageNo"
|
placeholder="请输入包装箱号"
|
clearable
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
<el-form-item label="供应商模组条码" prop="supplierModuleBarcode">
|
<el-input
|
v-model="queryParams.supplierModuleBarcode"
|
placeholder="请输入供应商模组条码"
|
clearable
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
<el-form-item label="客户企标模组追溯码" prop="customerModuleBarcode">
|
<el-input
|
v-model="queryParams.customerModuleBarcode"
|
placeholder="请输入客户企标模组追溯码"
|
clearable
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
<el-form-item label="电芯编号" prop="cellSerial">
|
<el-input
|
v-model="queryParams.cellSerial"
|
placeholder="请输入电芯编号"
|
clearable
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
<el-form-item label="电芯型号" prop="cellModel">
|
<el-input
|
v-model="queryParams.cellModel"
|
placeholder="请输入电芯型号"
|
clearable
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
<el-form-item label="模组串码" prop="bgmoduleCode">
|
<el-input
|
v-model="queryParams.bgmoduleCode"
|
placeholder="请输入模组串码"
|
clearable
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
<el-form-item label="电芯条码" prop="gbcellCode">
|
<el-input
|
v-model="queryParams.gbcellCode"
|
placeholder="请输入电芯条码"
|
clearable
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
<el-form-item label="电芯测试项中文描述" prop="cellItem">
|
<el-input
|
v-model="queryParams.cellItem"
|
placeholder="请输入电芯测试项中文描述"
|
clearable
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
<el-form-item label="电芯测试结果" prop="cellValue">
|
<el-input
|
v-model="queryParams.cellValue"
|
placeholder="请输入电芯测试结果"
|
clearable
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
<el-form-item label="创建用户" prop="createUser">
|
<el-input
|
v-model="queryParams.createUser"
|
placeholder="请输入创建用户"
|
clearable
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
<el-form-item label="备用字段1" prop="spareField1">
|
<el-input
|
v-model="queryParams.spareField1"
|
placeholder="请输入备用字段1"
|
clearable
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
<el-form-item label="备用字段2" prop="spareField2">
|
<el-input
|
v-model="queryParams.spareField2"
|
placeholder="请输入备用字段2"
|
clearable
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
<el-form-item label="备用字段3" prop="spareField3">
|
<el-input
|
v-model="queryParams.spareField3"
|
placeholder="请输入备用字段3"
|
clearable
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
<el-form-item label="备用字段4" prop="spareField4">
|
<el-input
|
v-model="queryParams.spareField4"
|
placeholder="请输入备用字段4"
|
clearable
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
<el-form-item style="float: right">
|
<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-card>
|
|
<el-card style="margin-top: 10px" class="box-card">
|
<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="['da:cellData: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="['da:cellData: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="['da:cellData: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="['da:cellData:export']"
|
>导出</el-button>
|
</el-col>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
</el-row>
|
|
<el-table border v-loading="loading" :data="cellDataList" @selection-change="handleSelectionChange">
|
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column label="固定值:AEI.EI.SUPPLIERMODULEPRODUCTION.UPLOAD" align="center" prop="serviceId">
|
</el-table-column>
|
<el-table-column label="工厂代码" align="center" prop="siteCode">
|
</el-table-column>
|
<el-table-column label="模组序号" align="center" prop="moduleSerial">
|
</el-table-column>
|
<el-table-column label="模组型号" align="center" prop="moduleModel">
|
</el-table-column>
|
<el-table-column label="A/B模组" align="center" prop="ABModule">
|
</el-table-column>
|
<el-table-column label="包装箱号" align="center" prop="packageNo">
|
</el-table-column>
|
<el-table-column label="供应商模组条码" align="center" prop="supplierModuleBarcode">
|
</el-table-column>
|
<el-table-column label="客户企标模组追溯码" align="center" prop="customerModuleBarcode">
|
</el-table-column>
|
<el-table-column label="电芯编号" align="center" prop="cellSerial">
|
</el-table-column>
|
<el-table-column label="电芯型号" align="center" prop="cellModel">
|
</el-table-column>
|
<el-table-column label="模组串码" align="center" prop="bgmoduleCode">
|
</el-table-column>
|
<el-table-column label="电芯条码" align="center" prop="gbcellCode">
|
</el-table-column>
|
<el-table-column label="电芯测试项中文描述" align="center" prop="cellItem">
|
</el-table-column>
|
<el-table-column label="电芯测试结果" align="center" prop="cellValue">
|
</el-table-column>
|
<el-table-column label="创建用户" align="center" prop="createUser">
|
</el-table-column>
|
<el-table-column label="备用字段1" align="center" prop="spareField1">
|
</el-table-column>
|
<el-table-column label="备用字段2" align="center" prop="spareField2">
|
</el-table-column>
|
<el-table-column label="备用字段3" align="center" prop="spareField3">
|
</el-table-column>
|
<el-table-column label="备用字段4" align="center" prop="spareField4">
|
</el-table-column>
|
<el-table-column fixed="right" width="200" label="操作" align="center" class-name="small-padding fixed-width">
|
<template slot-scope="scope">
|
<el-button
|
size="mini"
|
type="success"
|
plain
|
style="width: 72px"
|
icon="el-icon-edit"
|
@click="handleUpdate(scope.row)"
|
v-hasPermi="['da:cellData:edit']"
|
>修改</el-button>
|
<el-button
|
size="mini"
|
type="danger"
|
plain
|
style="width: 72px"
|
icon="el-icon-delete"
|
@click="handleDelete(scope.row)"
|
v-hasPermi="['da:cellData:remove']"
|
>删除</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
</el-card>
|
|
<pagination
|
v-show="total>0"
|
:total="total"
|
:page.sync="queryParams.pageNum"
|
:limit.sync="queryParams.pageSize"
|
@pagination="getList"
|
/>
|
|
<!-- 添加或修改电芯数据对话框 -->
|
<el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body>
|
<span slot="title">
|
<i class="el-icon-s-order"></i>
|
{{titleName}}
|
</span>
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form-item label="主键id" prop="id">
|
<el-input v-model="form.id" placeholder="请输入主键id" />
|
</el-form-item>
|
<el-form-item label="固定值:AEI.EI.SUPPLIERMODULEPRODUCTION.UPLOAD" prop="serviceId">
|
<el-input v-model="form.serviceId" placeholder="请输入固定值:AEI.EI.SUPPLIERMODULEPRODUCTION.UPLOAD" />
|
</el-form-item>
|
<el-form-item label="工厂代码" prop="siteCode">
|
<el-input v-model="form.siteCode" placeholder="请输入工厂代码" />
|
</el-form-item>
|
<el-form-item label="模组序号" prop="moduleSerial">
|
<el-input v-model="form.moduleSerial" placeholder="请输入模组序号" />
|
</el-form-item>
|
<el-form-item label="模组型号" prop="moduleModel">
|
<el-input v-model="form.moduleModel" placeholder="请输入模组型号" />
|
</el-form-item>
|
<el-form-item label="A/B模组" prop="ABModule">
|
<el-input v-model="form.ABModule" placeholder="请输入A/B模组" />
|
</el-form-item>
|
<el-form-item label="包装箱号" prop="packageNo">
|
<el-input v-model="form.packageNo" placeholder="请输入包装箱号" />
|
</el-form-item>
|
<el-form-item label="供应商模组条码" prop="supplierModuleBarcode">
|
<el-input v-model="form.supplierModuleBarcode" placeholder="请输入供应商模组条码" />
|
</el-form-item>
|
<el-form-item label="客户企标模组追溯码" prop="customerModuleBarcode">
|
<el-input v-model="form.customerModuleBarcode" placeholder="请输入客户企标模组追溯码" />
|
</el-form-item>
|
<el-form-item label="电芯编号" prop="cellSerial">
|
<el-input v-model="form.cellSerial" placeholder="请输入电芯编号" />
|
</el-form-item>
|
<el-form-item label="电芯型号" prop="cellModel">
|
<el-input v-model="form.cellModel" placeholder="请输入电芯型号" />
|
</el-form-item>
|
<el-form-item label="模组串码" prop="bgmoduleCode">
|
<el-input v-model="form.bgmoduleCode" placeholder="请输入模组串码" />
|
</el-form-item>
|
<el-form-item label="电芯条码" prop="gbcellCode">
|
<el-input v-model="form.gbcellCode" placeholder="请输入电芯条码" />
|
</el-form-item>
|
<el-form-item label="电芯测试项中文描述" prop="cellItem">
|
<el-input v-model="form.cellItem" placeholder="请输入电芯测试项中文描述" />
|
</el-form-item>
|
<el-form-item label="电芯测试结果" prop="cellValue">
|
<el-input v-model="form.cellValue" placeholder="请输入电芯测试结果" />
|
</el-form-item>
|
<el-form-item label="创建用户" prop="createUser">
|
<el-input v-model="form.createUser" placeholder="请输入创建用户" />
|
</el-form-item>
|
<el-form-item label="备用字段1" prop="spareField1">
|
<el-input v-model="form.spareField1" placeholder="请输入备用字段1" />
|
</el-form-item>
|
<el-form-item label="备用字段2" prop="spareField2">
|
<el-input v-model="form.spareField2" placeholder="请输入备用字段2" />
|
</el-form-item>
|
<el-form-item label="备用字段3" prop="spareField3">
|
<el-input v-model="form.spareField3" placeholder="请输入备用字段3" />
|
</el-form-item>
|
<el-form-item label="备用字段4" prop="spareField4">
|
<el-input v-model="form.spareField4" placeholder="请输入备用字段4" />
|
</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 { listCellData, getCellData, delCellData, addCellData, updateCellData } from "@/api/main/da/cellData/cellData";
|
|
export default {
|
name: "CellData",
|
data() {
|
return {
|
// 遮罩层
|
loading: true,
|
titleName: "",
|
// 选中数组
|
ids: [],
|
// 非单个禁用
|
single: true,
|
// 非多个禁用
|
multiple: true,
|
// 显示搜索条件
|
showSearch: true,
|
// 总条数
|
total: 0,
|
// 电芯数据表格数据
|
cellDataList: [],
|
// 弹出层标题
|
title: "",
|
// 是否显示弹出层
|
open: false,
|
// 查询参数
|
queryParams: {
|
pageNum: 1,
|
pageSize: 10,
|
serviceId: null,
|
siteCode: null,
|
moduleSerial: null,
|
moduleModel: null,
|
ABModule: null,
|
packageNo: null,
|
supplierModuleBarcode: null,
|
customerModuleBarcode: null,
|
cellSerial: null,
|
cellModel: null,
|
bgmoduleCode: null,
|
gbcellCode: null,
|
cellItem: null,
|
cellValue: null,
|
createUser: null,
|
spareField1: null,
|
spareField2: null,
|
spareField3: null,
|
spareField4: null
|
},
|
// 表单参数
|
form: {},
|
// 表单校验
|
rules: {
|
id: [
|
{ required: true, message: "主键id不能为空", trigger: "blur" }
|
],
|
}
|
};
|
},
|
created() {
|
this.getList();
|
},
|
methods: {
|
/** 查询电芯数据列表 */
|
getList() {
|
this.loading = true;
|
listCellData(this.queryParams).then(response => {
|
this.cellDataList = response.rows;
|
this.total = response.total;
|
this.loading = false;
|
});
|
},
|
// 取消按钮
|
cancel() {
|
this.open = false;
|
this.reset();
|
},
|
// 表单重置
|
reset() {
|
this.form = {
|
id: null,
|
serviceId: null,
|
siteCode: null,
|
moduleSerial: null,
|
moduleModel: null,
|
ABModule: null,
|
packageNo: null,
|
supplierModuleBarcode: null,
|
customerModuleBarcode: null,
|
cellSerial: null,
|
cellModel: null,
|
bgmoduleCode: null,
|
gbcellCode: null,
|
cellItem: null,
|
cellValue: null,
|
createTime: null,
|
createUser: null,
|
spareField1: null,
|
spareField2: null,
|
spareField3: null,
|
spareField4: 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.id)
|
this.single = selection.length!==1
|
this.multiple = !selection.length
|
},
|
/** 新增按钮操作 */
|
handleAdd() {
|
this.reset();
|
this.open = true;
|
this.titleName = "添加电芯数据";
|
},
|
/** 修改按钮操作 */
|
handleUpdate(row) {
|
this.reset();
|
const id = row.id || this.ids
|
getCellData(id).then(response => {
|
this.form = response.data;
|
this.open = true;
|
this.titleName = "修改电芯数据";
|
});
|
},
|
/** 提交按钮 */
|
submitForm() {
|
this.$refs["form"].validate(valid => {
|
if (valid) {
|
if (this.form.id != null) {
|
updateCellData(this.form).then(response => {
|
this.$modal.msgSuccess("修改成功");
|
this.open = false;
|
this.getList();
|
});
|
} else {
|
addCellData(this.form).then(response => {
|
this.$modal.msgSuccess("新增成功");
|
this.open = false;
|
this.getList();
|
});
|
}
|
}
|
});
|
},
|
/** 删除按钮操作 */
|
handleDelete(row) {
|
const ids = row.id || this.ids;
|
this.$modal.confirm('是否确认删除电芯数据编号为"' + ids + '"的数据项?').then(function() {
|
return delCellData(ids);
|
}).then(() => {
|
this.getList();
|
this.$modal.msgSuccess("删除成功");
|
}).catch(() => {});
|
},
|
/** 导出按钮操作 */
|
handleExport() {
|
this.download('da/cellData/export', {
|
...this.queryParams
|
}, `cellData_${new Date().getTime()}.xlsx`)
|
}
|
}
|
};
|
</script>
|