Merge remote-tracking branch 'origin/master'
commit
22cb5cb27c
@ -0,0 +1,71 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询来料检验列表
|
||||
export function listIncome(query) {
|
||||
return request({
|
||||
url: '/quality/qcIncome/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询来料检验详细
|
||||
export function getIncome(recordId) {
|
||||
return request({
|
||||
url: '/quality/qcIncome/' + recordId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增来料检验
|
||||
export function addIncome(data) {
|
||||
return request({
|
||||
url: '/quality/qcIncome',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改来料检验
|
||||
export function updateIncome(data) {
|
||||
return request({
|
||||
url: '/quality/qcIncome',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除来料检验
|
||||
export function delIncome(recordId) {
|
||||
return request({
|
||||
url: '/quality/qcIncome/' + recordId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 查询BOM物料管理列表
|
||||
export function getQcListBom(query) {
|
||||
return request({
|
||||
url: '/quality/qcIncome/getQcListBom',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询供应商管理列表
|
||||
export function getQcListSupplier(query) {
|
||||
return request({
|
||||
url: '/quality/qcIncome/getQcListSupplier',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询人员列表
|
||||
export function getQcListUser(query) {
|
||||
return request({
|
||||
url: '/quality/qcIncome/getQcListUser',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询生产过程检验任务列表
|
||||
export function listQcProduce(query) {
|
||||
return request({
|
||||
url: '/quality/qcProduce/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询生产过程检验任务详细
|
||||
export function getQcProduce(recordId) {
|
||||
return request({
|
||||
url: '/quality/qcProduce/' + recordId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增生产过程检验任务
|
||||
export function addQcProduce(data) {
|
||||
return request({
|
||||
url: '/quality/qcProduce',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改生产过程检验任务
|
||||
export function updateQcProduce(data) {
|
||||
return request({
|
||||
url: '/quality/qcProduce',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除生产过程检验任务
|
||||
export function delQcProduce(recordId) {
|
||||
return request({
|
||||
url: '/quality/qcProduce/' + recordId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询成品入库检验任务列表
|
||||
export function listWarehousing(query) {
|
||||
return request({
|
||||
url: '/quality/qcWarehousing/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询成品入库检验任务详细
|
||||
export function getWarehousing(recordId) {
|
||||
return request({
|
||||
url: '/quality/qcWarehousing/' + recordId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增成品入库检验任务
|
||||
export function addWarehousing(data) {
|
||||
return request({
|
||||
url: '/quality/qcWarehousing',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改成品入库检验任务
|
||||
export function updateWarehousing(data) {
|
||||
return request({
|
||||
url: '/quality/qcWarehousing',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除成品入库检验任务
|
||||
export function delWarehousing(recordId) {
|
||||
return request({
|
||||
url: '/quality/qcWarehousing/' + recordId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
@ -0,0 +1,498 @@
|
||||
<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="incomeBatchNo">
|
||||
<el-input
|
||||
v-model="queryParams.incomeBatchNo"
|
||||
placeholder="请输入来料批次号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料号" prop="materialCode">
|
||||
<el-input
|
||||
v-model="queryParams.materialCode"
|
||||
placeholder="请输入物料号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称" prop="materialName">
|
||||
<el-input
|
||||
v-model="queryParams.materialName"
|
||||
placeholder="请输入物料名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="来料时间" prop="incomeTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.incomeTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择来料时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测地点" prop="checkLoc">
|
||||
<el-input
|
||||
v-model="queryParams.checkLoc"
|
||||
placeholder="请输入检测地点"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="检验时间" prop="checkTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.checkTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
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="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['quality:qcIncome: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="['quality:qcIncome: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="['quality:qcIncome: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="['quality:qcIncome: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 type="selection" width="55" align="center" />
|
||||
<el-table-column label="id" align="center" prop="recordId" v-if="false"/>
|
||||
<el-table-column label="检验任务编号" align="center" prop="checkNo" />
|
||||
<el-table-column label="来料批次号" align="center" prop="incomeBatchNo" />
|
||||
<el-table-column label="订单号" align="center" prop="orderNo" />
|
||||
<el-table-column label="物料号" align="center" prop="materialCode" />
|
||||
<el-table-column label="物料名称" align="center" prop="materialName" />
|
||||
<el-table-column label="收货数量" align="center" prop="quality" />
|
||||
<el-table-column label="单位" align="center" prop="unit" />
|
||||
<el-table-column label="供应商编码" align="center" prop="supplierCode" />
|
||||
<el-table-column label="供应商名称" align="center" prop="supplierName" />
|
||||
<el-table-column label="来料时间" align="center" prop="incomeTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.incomeTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检测地点" align="center" prop="checkLoc" />
|
||||
<el-table-column label="检测状态" align="center" prop="checkStatus" />
|
||||
<el-table-column label="检测人工号" align="center" prop="checkManCode" />
|
||||
<el-table-column label="检测人姓名" align="center" prop="checkManName" />
|
||||
<el-table-column label="检验时间" align="center" prop="checkTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检验结果" align="center" prop="checkResult" />
|
||||
<el-table-column label="是否启用" align="center" prop="status" />
|
||||
<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="['quality:qcIncome:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['quality:qcIncome: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="1000px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="检验任务编号" prop="checkNo">
|
||||
<el-input v-model="form.checkNo" placeholder="请输入检验任务编号" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="来料批次号" prop="incomeBatchNo">
|
||||
<el-input v-model="form.incomeBatchNo" placeholder="请输入来料批次号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="订单号" prop="orderNo">
|
||||
<el-input v-model="form.orderNo" placeholder="请输入订单号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料名称" prop="materialName">
|
||||
<el-input v-model="form.materialName" placeholder="请输入物料名称" disabled>
|
||||
<el-button slot="append" @click="handleSelectMaterial" icon="el-icon-search"></el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料号" prop="materialCode">
|
||||
<el-input v-model="form.materialCode" placeholder="请输入物料号" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="收货数量" prop="quality">
|
||||
<el-input type="number" v-model="form.quality" placeholder="请输入收货数量" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单位" prop="unit" >
|
||||
<el-select v-model="form.unit" placeholder="请选择单位" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="dict in dict.type.unit"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="供应商名称" prop="supplierName">
|
||||
<el-input v-model="form.supplierName" placeholder="请输入供应商名称" disabled>
|
||||
<el-button slot="append" @click="handleSelectSupplier" icon="el-icon-search"></el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="供应商编码" prop="supplierCode">
|
||||
<el-input v-model="form.supplierCode" placeholder="请输入供应商编码" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="来料时间" prop="incomeTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.incomeTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择来料时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="检测人姓名" prop="checkManName">
|
||||
<el-input v-model="form.checkManName" placeholder="请输入检测人姓名" disabled>
|
||||
<el-button slot="append" @click="handleSelectUser" icon="el-icon-search"></el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="检测人工号" prop="checkManCode" >
|
||||
<el-input v-model="form.checkManCode" placeholder="请输入检测人工号" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="检测地点" prop="checkLoc">
|
||||
<el-input v-model="form.checkLoc" placeholder="请输入检测地点" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</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>
|
||||
<!--产品物料选择弹窗-->
|
||||
<ItemSelectMaterial
|
||||
ref="itemSelectMaterial"
|
||||
@onSelected="onSelectMaterial"
|
||||
></ItemSelectMaterial>
|
||||
<!--供应商选择弹窗-->
|
||||
<ItemSelectSupplier
|
||||
ref="itemSelectSupplier"
|
||||
@onSelected="onSelectSupplier"
|
||||
></ItemSelectSupplier>
|
||||
<!--人员选择弹窗-->
|
||||
<ItemSelectUser
|
||||
ref="itemSelectUser"
|
||||
@onSelected="onSelectUser"
|
||||
></ItemSelectUser>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listIncome, getIncome, delIncome, addIncome, updateIncome } from "@/api/quality/income";
|
||||
import ItemSelectMaterial from "./selectMaterial.vue";
|
||||
import ItemSelectSupplier from "./selectSupplier.vue";
|
||||
import ItemSelectUser from "./selectUser.vue";
|
||||
export default {
|
||||
name: "Income",
|
||||
components: { ItemSelectMaterial,ItemSelectSupplier,ItemSelectUser },
|
||||
dicts: ["unit"],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 来料检验表格数据
|
||||
incomeList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
checkNo: null,
|
||||
incomeBatchNo: null,
|
||||
orderNo: null,
|
||||
materialCode: null,
|
||||
materialName: null,
|
||||
quality: null,
|
||||
unit: null,
|
||||
supplierCode: null,
|
||||
supplierName: null,
|
||||
incomeTime: null,
|
||||
checkLoc: null,
|
||||
checkStatus: null,
|
||||
checkManCode: null,
|
||||
checkManName: null,
|
||||
checkTime: null,
|
||||
checkResult: null,
|
||||
status: null,
|
||||
attr1: null,
|
||||
attr2: null,
|
||||
attr3: null,
|
||||
attr4: null,
|
||||
factoryCode: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
factoryCode: [
|
||||
{ required: true, message: "工厂编码不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询来料检验列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listIncome(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,
|
||||
checkNo: null,
|
||||
incomeBatchNo: null,
|
||||
orderNo: null,
|
||||
materialCode: null,
|
||||
materialName: null,
|
||||
quality: null,
|
||||
unit: null,
|
||||
supplierCode: null,
|
||||
supplierName: null,
|
||||
incomeTime: null,
|
||||
checkLoc: null,
|
||||
checkStatus: null,
|
||||
checkManCode: null,
|
||||
checkManName: null,
|
||||
checkTime: null,
|
||||
checkResult: null,
|
||||
status: null,
|
||||
attr1: null,
|
||||
attr2: null,
|
||||
attr3: null,
|
||||
attr4: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
factoryCode: null,
|
||||
delFlag: 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 = "添加来料检验";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const recordId = row.recordId || this.ids
|
||||
getIncome(recordId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改来料检验";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.recordId != null) {
|
||||
updateIncome(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addIncome(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const recordIds = row.recordId || this.ids;
|
||||
this.$modal.confirm('是否确认删除来料检验编号为"' + recordIds + '"的数据项?').then(function() {
|
||||
return delIncome(recordIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('qcIncome/income/export', {
|
||||
...this.queryParams
|
||||
}, `income_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
/**物料选择弹出框**/
|
||||
handleSelectMaterial() {
|
||||
this.$refs.itemSelectMaterial.showFlag = true;
|
||||
},
|
||||
//物料选择确认
|
||||
onSelectMaterial(obj) {
|
||||
this.form.materialCode = obj.code;
|
||||
this.form.materialName = obj.name;
|
||||
},
|
||||
|
||||
/**供应商选择弹出框**/
|
||||
handleSelectSupplier() {
|
||||
this.$refs.itemSelectSupplier.showFlag = true;
|
||||
},
|
||||
//供应商选择确认
|
||||
onSelectSupplier(obj) {
|
||||
this.form.supplierCode = obj.code;
|
||||
this.form.supplierName = obj.name;
|
||||
},
|
||||
|
||||
/**人员选择弹出框**/
|
||||
handleSelectUser() {
|
||||
this.$refs.itemSelectUser.showFlag = true;
|
||||
},
|
||||
//人员选择确认
|
||||
onSelectUser(obj) {
|
||||
this.form.checkManCode = obj.code;
|
||||
this.form.checkManName = obj.name;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,164 @@
|
||||
<template>
|
||||
<el-dialog title="BOM物料选择"
|
||||
v-if="showFlag"
|
||||
:visible.sync="showFlag"
|
||||
:modal= false
|
||||
width="1000px"
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
<!--BOM数据-->
|
||||
<el-col :span="24" :xs="24">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="105px" align="center">
|
||||
<el-form-item label="BOM物料编码" prop="itemCode">
|
||||
<el-input
|
||||
v-model="queryParams.component"
|
||||
placeholder="请输入物料编码"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="产品名称" prop="itemName">
|
||||
<el-input
|
||||
v-model="queryParams.componentName"
|
||||
placeholder="请输入物料名称"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@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="itemList" @selection-change="handleBomSelectionChange" ref="myTable" >
|
||||
<el-table-column width="50" align="center" type="selection">
|
||||
</el-table-column>
|
||||
<!-- 序号 -->
|
||||
<el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号"></el-table-column>
|
||||
<el-table-column label="BOM物料组件编码" align="left" key="component" prop="component" v-if="columns[2].visible" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="BOM物料组件名称" align="left" key="componentName" prop="componentName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitBomForm">确 定</el-button>
|
||||
<el-button @click="showFlag=false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import {getQcListBom } from "@/api/quality/income";
|
||||
export default {
|
||||
name: "itemSelectMaterial",
|
||||
data() {
|
||||
return {
|
||||
showFlag:false,
|
||||
// 选中数组
|
||||
selectedRows: {},
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// BOM产品表格数据
|
||||
itemList: null,
|
||||
// 树选项
|
||||
itemTypeOptions: undefined,
|
||||
//树名称
|
||||
bomCode: undefined,
|
||||
defaultProps: {
|
||||
id: "id",
|
||||
label: "label"
|
||||
},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
component: '',
|
||||
componentName : ''
|
||||
},
|
||||
// 列信息
|
||||
columns: [
|
||||
{ key: 0, label: `BOM物料编码`, visible: true },
|
||||
{ key: 1, label: `产品名称`, visible: true },
|
||||
{ key: 2, label: `BOM物料组件编码`, visible: true },
|
||||
{ key: 3, label: `BOM物料组件名称`, visible: true }
|
||||
]
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
|
||||
methods: {
|
||||
handleEquipmentSelectionChange (val) {
|
||||
this.itemList = val
|
||||
},
|
||||
|
||||
/** 查询BOM列表*/
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.bomCode = this.queryParams.itemCode;
|
||||
this.queryParams.productDescZh = this.queryParams.itemName;
|
||||
getQcListBom(this.queryParams).then(response => {
|
||||
this.itemList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
// 筛选节点
|
||||
filterNode(value, data) {
|
||||
console.log(value, data);
|
||||
if (!value) return true;
|
||||
return data.label.indexOf(value) !== -1;
|
||||
},
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
|
||||
// 多选框选中数据
|
||||
handleBomSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.component);
|
||||
this.idsName = selection.map(item => item.componentName);
|
||||
this.single = selection.length!==1;
|
||||
this.multiple = !selection.length;
|
||||
console.log("多选框",this.ids);
|
||||
},
|
||||
|
||||
|
||||
submitBomForm() {
|
||||
this.selectedRows.code = this.ids;
|
||||
this.selectedRows.name = this.idsName;
|
||||
this.$emit('onSelected', this.selectedRows);
|
||||
this.showFlag = false;
|
||||
this.queryParams.itemCodeGet = "";
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,148 @@
|
||||
<template>
|
||||
<el-dialog title="供应商选择"
|
||||
v-if="showFlag"
|
||||
:visible.sync="showFlag"
|
||||
:modal= false
|
||||
width="1000px"
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
<!--BOM数据-->
|
||||
<el-col :span="24" :xs="24">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="105px" align="center">
|
||||
<el-form-item label="供应商编码" prop="itemCode">
|
||||
<el-input
|
||||
v-model="queryParams.supplierCode"
|
||||
placeholder="供应商编码"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商名称" prop="itemName">
|
||||
<el-input
|
||||
v-model="queryParams.supplierName"
|
||||
placeholder="供应商名称"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@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="itemList" @selection-change="handleBomSelectionChange" ref="myTable" >
|
||||
<el-table-column width="50" align="center" type="selection">
|
||||
</el-table-column>
|
||||
<!-- 序号 -->
|
||||
<el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号"></el-table-column>
|
||||
<el-table-column label="供应商编码" align="left" key="supplierCode" prop="supplierCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="供应商名称" align="left" key="supplierName" prop="supplierName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="地址" align="left" key="address" prop="address" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="联系方式" align="left" key="contactPhone" prop="contactPhone" :show-overflow-tooltip="true" />
|
||||
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitBomForm">确 定</el-button>
|
||||
<el-button @click="showFlag=false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import { getQcListSupplier } from "@/api/quality/income";
|
||||
export default {
|
||||
name: "itemSelectSupplier",
|
||||
data() {
|
||||
return {
|
||||
showFlag:false,
|
||||
// 选中数组
|
||||
selectedRows: {},
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// BOM产品表格数据
|
||||
itemList: null,
|
||||
// 树选项
|
||||
itemTypeOptions: undefined,
|
||||
//树名称
|
||||
supplierCode: undefined,
|
||||
defaultProps: {
|
||||
id: "id",
|
||||
label: "label"
|
||||
},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
supplierCode: '',
|
||||
supplierName : ''
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
/** 查询表格列表*/
|
||||
getList() {
|
||||
this.loading = true;
|
||||
getQcListSupplier(this.queryParams).then(response => {
|
||||
this.itemList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
|
||||
// 多选框选中数据
|
||||
handleBomSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.supplierCode);
|
||||
this.idsName = selection.map(item => item.supplierName);
|
||||
this.single = selection.length!==1;
|
||||
this.multiple = !selection.length;
|
||||
console.log("多选框",this.ids);
|
||||
},
|
||||
|
||||
|
||||
submitBomForm() {
|
||||
this.selectedRows.code = this.ids;
|
||||
this.selectedRows.name = this.idsName;
|
||||
this.$emit('onSelected', this.selectedRows);
|
||||
this.showFlag = false;
|
||||
this.queryParams.itemCodeGet = "";
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,146 @@
|
||||
<template>
|
||||
<el-dialog title="人员选择"
|
||||
v-if="showFlag"
|
||||
:visible.sync="showFlag"
|
||||
:modal= false
|
||||
width="1000px"
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
|
||||
<el-col :span="24" :xs="24">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="105px" align="center">
|
||||
<el-form-item label="员工工号">
|
||||
<el-input
|
||||
v-model="queryParams.userCoe"
|
||||
placeholder="员工工号"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="员工姓名">
|
||||
<el-input
|
||||
v-model="queryParams.userName"
|
||||
placeholder="员工姓名"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@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="itemList" @selection-change="handleBomSelectionChange" ref="myTable" >
|
||||
<el-table-column width="50" align="center" type="selection">
|
||||
</el-table-column>
|
||||
<!-- 序号 -->
|
||||
<el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号"></el-table-column>
|
||||
<el-table-column label="员工姓名" align="left" key="userId" prop="userId" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="员工工号" align="left" key="userCode" prop="userCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="员工姓名" align="left" key="userName" prop="userName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="手机号" align="left" key="phonenumber" prop="phonenumber" :show-overflow-tooltip="true" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitBomForm">确 定</el-button>
|
||||
<el-button @click="showFlag=false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import { getQcListUser } from "@/api/quality/income";
|
||||
export default {
|
||||
name: "itemSelectUser",
|
||||
data() {
|
||||
return {
|
||||
showFlag:false,
|
||||
// 选中数组
|
||||
selectedRows: {},
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// BOM产品表格数据
|
||||
itemList: null,
|
||||
|
||||
//树名称
|
||||
bomCode: undefined,
|
||||
defaultProps: {
|
||||
id: "id",
|
||||
label: "label"
|
||||
},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
userCode: '',
|
||||
userName : ''
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
/** 查询表格列表*/
|
||||
getList() {
|
||||
this.loading = true;
|
||||
getQcListUser(this.queryParams).then(response => {
|
||||
this.itemList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
|
||||
// 多选框选中数据
|
||||
handleBomSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.userCode);
|
||||
this.idsName = selection.map(item => item.userName);
|
||||
this.single = selection.length!==1;
|
||||
this.multiple = !selection.length;
|
||||
console.log("多选框",this.ids);
|
||||
},
|
||||
|
||||
|
||||
submitBomForm() {
|
||||
this.selectedRows.code = this.ids;
|
||||
this.selectedRows.name = this.idsName;
|
||||
this.$emit('onSelected', this.selectedRows);
|
||||
this.showFlag = false;
|
||||
this.queryParams.itemCodeGet = "";
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,546 @@
|
||||
<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="checkNo">
|
||||
<el-input
|
||||
v-model="queryParams.checkNo"
|
||||
placeholder="请输入检验任务编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次号" prop="batchNo">
|
||||
<el-input
|
||||
v-model="queryParams.batchNo"
|
||||
placeholder="请输入批次号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单号" prop="orderNo">
|
||||
<el-input
|
||||
v-model="queryParams.orderNo"
|
||||
placeholder="请输入订单号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料号" prop="materialCode">
|
||||
<el-input
|
||||
v-model="queryParams.materialCode"
|
||||
placeholder="请输入物料号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称" prop="materialName">
|
||||
<el-input
|
||||
v-model="queryParams.materialName"
|
||||
placeholder="请输入物料名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="数量" prop="quality">
|
||||
<el-input
|
||||
v-model="queryParams.quality"
|
||||
placeholder="请输入数量"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-input
|
||||
v-model="queryParams.unit"
|
||||
placeholder="请输入单位"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属车间编码" prop="carCode">
|
||||
<el-input
|
||||
v-model="queryParams.carCode"
|
||||
placeholder="请输入所属车间编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属车间名称" prop="carName">
|
||||
<el-input
|
||||
v-model="queryParams.carName"
|
||||
placeholder="请输入所属车间名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产时间" prop="produceDate">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.produceDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择生产时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测地点" prop="checkLoc">
|
||||
<el-input
|
||||
v-model="queryParams.checkLoc"
|
||||
placeholder="请输入检测地点"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测人工号" prop="checkManCode">
|
||||
<el-input
|
||||
v-model="queryParams.checkManCode"
|
||||
placeholder="请输入检测人工号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测人姓名" prop="checkManName">
|
||||
<el-input
|
||||
v-model="queryParams.checkManName"
|
||||
placeholder="请输入检测人姓名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="检验时间" prop="checkTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.checkTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择检验时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="检验结果Y合格" prop="checkResult">
|
||||
<el-input
|
||||
v-model="queryParams.checkResult"
|
||||
placeholder="请输入检验结果Y合格"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="预留字段1" prop="attr1">
|
||||
<el-input
|
||||
v-model="queryParams.attr1"
|
||||
placeholder="请输入预留字段1"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="预留字段2" prop="attr2">
|
||||
<el-input
|
||||
v-model="queryParams.attr2"
|
||||
placeholder="请输入预留字段2"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="预留字段3" prop="attr3">
|
||||
<el-input
|
||||
v-model="queryParams.attr3"
|
||||
placeholder="请输入预留字段3"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="预留字段4" prop="attr4">
|
||||
<el-input
|
||||
v-model="queryParams.attr4"
|
||||
placeholder="请输入预留字段4"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工厂编码" prop="factoryCode">
|
||||
<el-input
|
||||
v-model="queryParams.factoryCode"
|
||||
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-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="['quality:qcProduce: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="['quality:qcProduce: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="['quality:qcProduce: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="['quality:qcProduce:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="qcProduceList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="id" align="center" prop="recordId" />
|
||||
<el-table-column label="检验任务编号" align="center" prop="checkNo" />
|
||||
<el-table-column label="批次号" align="center" prop="batchNo" />
|
||||
<el-table-column label="订单号" align="center" prop="orderNo" />
|
||||
<el-table-column label="物料号" align="center" prop="materialCode" />
|
||||
<el-table-column label="物料名称" align="center" prop="materialName" />
|
||||
<el-table-column label="数量" align="center" prop="quality" />
|
||||
<el-table-column label="单位" align="center" prop="unit" />
|
||||
<el-table-column label="所属车间编码" align="center" prop="carCode" />
|
||||
<el-table-column label="所属车间名称" align="center" prop="carName" />
|
||||
<el-table-column label="生产时间" align="center" prop="produceDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.produceDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检测地点" align="center" prop="checkLoc" />
|
||||
<el-table-column label="检测状态" align="center" prop="checkStatus" />
|
||||
<el-table-column label="检测人工号" align="center" prop="checkManCode" />
|
||||
<el-table-column label="检测人姓名" align="center" prop="checkManName" />
|
||||
<el-table-column label="检验时间" align="center" prop="checkTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检验结果Y合格" align="center" prop="checkResult" />
|
||||
<el-table-column label="是否启用1启用0停用" align="center" prop="status" />
|
||||
<el-table-column label="预留字段1" align="center" prop="attr1" />
|
||||
<el-table-column label="预留字段2" align="center" prop="attr2" />
|
||||
<el-table-column label="预留字段3" align="center" prop="attr3" />
|
||||
<el-table-column label="预留字段4" align="center" prop="attr4" />
|
||||
<el-table-column label="工厂编码" align="center" prop="factoryCode" />
|
||||
<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="['quality:qcProduce:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['quality:qcProduce: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="checkNo">
|
||||
<el-input v-model="form.checkNo" placeholder="请输入检验任务编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="批次号" prop="batchNo">
|
||||
<el-input v-model="form.batchNo" placeholder="请输入批次号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="订单号" prop="orderNo">
|
||||
<el-input v-model="form.orderNo" placeholder="请输入订单号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料号" prop="materialCode">
|
||||
<el-input v-model="form.materialCode" placeholder="请输入物料号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称" prop="materialName">
|
||||
<el-input v-model="form.materialName" placeholder="请输入物料名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数量" prop="quality">
|
||||
<el-input v-model="form.quality" placeholder="请输入数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-input v-model="form.unit" placeholder="请输入单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属车间编码" prop="carCode">
|
||||
<el-input v-model="form.carCode" placeholder="请输入所属车间编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属车间名称" prop="carName">
|
||||
<el-input v-model="form.carName" placeholder="请输入所属车间名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="生产时间" prop="produceDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.produceDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择生产时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测地点" prop="checkLoc">
|
||||
<el-input v-model="form.checkLoc" placeholder="请输入检测地点" />
|
||||
</el-form-item>
|
||||
<el-form-item label="检测人工号" prop="checkManCode">
|
||||
<el-input v-model="form.checkManCode" placeholder="请输入检测人工号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="检测人姓名" prop="checkManName">
|
||||
<el-input v-model="form.checkManName" placeholder="请输入检测人姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="检验时间" prop="checkTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.checkTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择检验时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="检验结果Y合格" prop="checkResult">
|
||||
<el-input v-model="form.checkResult" placeholder="请输入检验结果Y合格" />
|
||||
</el-form-item>
|
||||
<el-form-item label="预留字段1" prop="attr1">
|
||||
<el-input v-model="form.attr1" placeholder="请输入预留字段1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="预留字段2" prop="attr2">
|
||||
<el-input v-model="form.attr2" placeholder="请输入预留字段2" />
|
||||
</el-form-item>
|
||||
<el-form-item label="预留字段3" prop="attr3">
|
||||
<el-input v-model="form.attr3" placeholder="请输入预留字段3" />
|
||||
</el-form-item>
|
||||
<el-form-item label="预留字段4" prop="attr4">
|
||||
<el-input v-model="form.attr4" placeholder="请输入预留字段4" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工厂编码" prop="factoryCode">
|
||||
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="删除标识1删除0正常" prop="delFlag">
|
||||
<el-input v-model="form.delFlag" placeholder="请输入删除标识1删除0正常" />
|
||||
</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 { listQcProduce, getQcProduce, delQcProduce, addQcProduce, updateQcProduce } from "@/api/quality/qcProduce";
|
||||
|
||||
export default {
|
||||
name: "QcProduce",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 生产过程检验任务表格数据
|
||||
qcProduceList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
checkNo: null,
|
||||
batchNo: null,
|
||||
orderNo: null,
|
||||
materialCode: null,
|
||||
materialName: null,
|
||||
quality: null,
|
||||
unit: null,
|
||||
carCode: null,
|
||||
carName: null,
|
||||
produceDate: null,
|
||||
checkLoc: null,
|
||||
checkStatus: null,
|
||||
checkManCode: null,
|
||||
checkManName: null,
|
||||
checkTime: null,
|
||||
checkResult: null,
|
||||
status: null,
|
||||
attr1: null,
|
||||
attr2: null,
|
||||
attr3: null,
|
||||
attr4: null,
|
||||
factoryCode: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
factoryCode: [
|
||||
{ required: true, message: "工厂编码不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询生产过程检验任务列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listQcProduce(this.queryParams).then(response => {
|
||||
this.qcProduceList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
recordId: null,
|
||||
checkNo: null,
|
||||
batchNo: null,
|
||||
orderNo: null,
|
||||
materialCode: null,
|
||||
materialName: null,
|
||||
quality: null,
|
||||
unit: null,
|
||||
carCode: null,
|
||||
carName: null,
|
||||
produceDate: null,
|
||||
checkLoc: null,
|
||||
checkStatus: null,
|
||||
checkManCode: null,
|
||||
checkManName: null,
|
||||
checkTime: null,
|
||||
checkResult: null,
|
||||
status: null,
|
||||
attr1: null,
|
||||
attr2: null,
|
||||
attr3: null,
|
||||
attr4: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
factoryCode: null,
|
||||
delFlag: 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 = "添加生产过程检验任务";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const recordId = row.recordId || this.ids
|
||||
getQcProduce(recordId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改生产过程检验任务";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.recordId != null) {
|
||||
updateQcProduce(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addQcProduce(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const recordIds = row.recordId || this.ids;
|
||||
this.$modal.confirm('是否确认删除生产过程检验任务编号为"' + recordIds + '"的数据项?').then(function() {
|
||||
return delQcProduce(recordIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('qcProduce/qcProduce/export', {
|
||||
...this.queryParams
|
||||
}, `qcProduce_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,546 @@
|
||||
<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="checkNo">
|
||||
<el-input
|
||||
v-model="queryParams.checkNo"
|
||||
placeholder="请输入检验任务编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次号" prop="batchNo">
|
||||
<el-input
|
||||
v-model="queryParams.batchNo"
|
||||
placeholder="请输入批次号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单号" prop="orderNo">
|
||||
<el-input
|
||||
v-model="queryParams.orderNo"
|
||||
placeholder="请输入订单号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料号" prop="materialCode">
|
||||
<el-input
|
||||
v-model="queryParams.materialCode"
|
||||
placeholder="请输入物料号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称" prop="materialName">
|
||||
<el-input
|
||||
v-model="queryParams.materialName"
|
||||
placeholder="请输入物料名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="数量" prop="quality">
|
||||
<el-input
|
||||
v-model="queryParams.quality"
|
||||
placeholder="请输入数量"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-input
|
||||
v-model="queryParams.unit"
|
||||
placeholder="请输入单位"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商编码" prop="supplierCode">
|
||||
<el-input
|
||||
v-model="queryParams.supplierCode"
|
||||
placeholder="请输入供应商编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商名称" prop="supplierName">
|
||||
<el-input
|
||||
v-model="queryParams.supplierName"
|
||||
placeholder="请输入供应商名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="来料时间" prop="incomeTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.incomeTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择来料时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测地点" prop="checkLoc">
|
||||
<el-input
|
||||
v-model="queryParams.checkLoc"
|
||||
placeholder="请输入检测地点"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测人工号" prop="checkManCode">
|
||||
<el-input
|
||||
v-model="queryParams.checkManCode"
|
||||
placeholder="请输入检测人工号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测人姓名" prop="checkManName">
|
||||
<el-input
|
||||
v-model="queryParams.checkManName"
|
||||
placeholder="请输入检测人姓名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="检验时间" prop="checkTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.checkTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择检验时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="检验结果Y合格" prop="checkResult">
|
||||
<el-input
|
||||
v-model="queryParams.checkResult"
|
||||
placeholder="请输入检验结果Y合格"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="预留字段1" prop="attr1">
|
||||
<el-input
|
||||
v-model="queryParams.attr1"
|
||||
placeholder="请输入预留字段1"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="预留字段2" prop="attr2">
|
||||
<el-input
|
||||
v-model="queryParams.attr2"
|
||||
placeholder="请输入预留字段2"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="预留字段3" prop="attr3">
|
||||
<el-input
|
||||
v-model="queryParams.attr3"
|
||||
placeholder="请输入预留字段3"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="预留字段4" prop="attr4">
|
||||
<el-input
|
||||
v-model="queryParams.attr4"
|
||||
placeholder="请输入预留字段4"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工厂编码" prop="factoryCode">
|
||||
<el-input
|
||||
v-model="queryParams.factoryCode"
|
||||
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-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="['quality:qcWarehousing: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="['quality:qcWarehousing: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="['quality:qcWarehousing: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="['quality:qcWarehousing:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="warehousingList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="id" align="center" prop="recordId" />
|
||||
<el-table-column label="检验任务编号" align="center" prop="checkNo" />
|
||||
<el-table-column label="批次号" align="center" prop="batchNo" />
|
||||
<el-table-column label="订单号" align="center" prop="orderNo" />
|
||||
<el-table-column label="物料号" align="center" prop="materialCode" />
|
||||
<el-table-column label="物料名称" align="center" prop="materialName" />
|
||||
<el-table-column label="数量" align="center" prop="quality" />
|
||||
<el-table-column label="单位" align="center" prop="unit" />
|
||||
<el-table-column label="供应商编码" align="center" prop="supplierCode" />
|
||||
<el-table-column label="供应商名称" align="center" prop="supplierName" />
|
||||
<el-table-column label="来料时间" align="center" prop="incomeTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.incomeTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检测地点" align="center" prop="checkLoc" />
|
||||
<el-table-column label="检测状态" align="center" prop="checkStatus" />
|
||||
<el-table-column label="检测人工号" align="center" prop="checkManCode" />
|
||||
<el-table-column label="检测人姓名" align="center" prop="checkManName" />
|
||||
<el-table-column label="检验时间" align="center" prop="checkTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检验结果Y合格" align="center" prop="checkResult" />
|
||||
<el-table-column label="是否启用1启用0停用" align="center" prop="status" />
|
||||
<el-table-column label="预留字段1" align="center" prop="attr1" />
|
||||
<el-table-column label="预留字段2" align="center" prop="attr2" />
|
||||
<el-table-column label="预留字段3" align="center" prop="attr3" />
|
||||
<el-table-column label="预留字段4" align="center" prop="attr4" />
|
||||
<el-table-column label="工厂编码" align="center" prop="factoryCode" />
|
||||
<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="['quality:qcWarehousing:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['quality:qcWarehousing: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="checkNo">
|
||||
<el-input v-model="form.checkNo" placeholder="请输入检验任务编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="批次号" prop="batchNo">
|
||||
<el-input v-model="form.batchNo" placeholder="请输入批次号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="订单号" prop="orderNo">
|
||||
<el-input v-model="form.orderNo" placeholder="请输入订单号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料号" prop="materialCode">
|
||||
<el-input v-model="form.materialCode" placeholder="请输入物料号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称" prop="materialName">
|
||||
<el-input v-model="form.materialName" placeholder="请输入物料名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数量" prop="quality">
|
||||
<el-input v-model="form.quality" placeholder="请输入数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-input v-model="form.unit" placeholder="请输入单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商编码" prop="supplierCode">
|
||||
<el-input v-model="form.supplierCode" placeholder="请输入供应商编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商名称" prop="supplierName">
|
||||
<el-input v-model="form.supplierName" placeholder="请输入供应商名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="来料时间" prop="incomeTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.incomeTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择来料时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测地点" prop="checkLoc">
|
||||
<el-input v-model="form.checkLoc" placeholder="请输入检测地点" />
|
||||
</el-form-item>
|
||||
<el-form-item label="检测人工号" prop="checkManCode">
|
||||
<el-input v-model="form.checkManCode" placeholder="请输入检测人工号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="检测人姓名" prop="checkManName">
|
||||
<el-input v-model="form.checkManName" placeholder="请输入检测人姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="检验时间" prop="checkTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.checkTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择检验时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="检验结果Y合格" prop="checkResult">
|
||||
<el-input v-model="form.checkResult" placeholder="请输入检验结果Y合格" />
|
||||
</el-form-item>
|
||||
<el-form-item label="预留字段1" prop="attr1">
|
||||
<el-input v-model="form.attr1" placeholder="请输入预留字段1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="预留字段2" prop="attr2">
|
||||
<el-input v-model="form.attr2" placeholder="请输入预留字段2" />
|
||||
</el-form-item>
|
||||
<el-form-item label="预留字段3" prop="attr3">
|
||||
<el-input v-model="form.attr3" placeholder="请输入预留字段3" />
|
||||
</el-form-item>
|
||||
<el-form-item label="预留字段4" prop="attr4">
|
||||
<el-input v-model="form.attr4" placeholder="请输入预留字段4" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工厂编码" prop="factoryCode">
|
||||
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="删除标识1删除0正常" prop="delFlag">
|
||||
<el-input v-model="form.delFlag" placeholder="请输入删除标识1删除0正常" />
|
||||
</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 { listWarehousing, getWarehousing, delWarehousing, addWarehousing, updateWarehousing } from "@/api/quality/warehousing";
|
||||
|
||||
export default {
|
||||
name: "Warehousing",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 成品入库检验任务表格数据
|
||||
warehousingList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
checkNo: null,
|
||||
batchNo: null,
|
||||
orderNo: null,
|
||||
materialCode: null,
|
||||
materialName: null,
|
||||
quality: null,
|
||||
unit: null,
|
||||
supplierCode: null,
|
||||
supplierName: null,
|
||||
incomeTime: null,
|
||||
checkLoc: null,
|
||||
checkStatus: null,
|
||||
checkManCode: null,
|
||||
checkManName: null,
|
||||
checkTime: null,
|
||||
checkResult: null,
|
||||
status: null,
|
||||
attr1: null,
|
||||
attr2: null,
|
||||
attr3: null,
|
||||
attr4: null,
|
||||
factoryCode: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
factoryCode: [
|
||||
{ required: true, message: "工厂编码不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询成品入库检验任务列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listWarehousing(this.queryParams).then(response => {
|
||||
this.warehousingList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
recordId: null,
|
||||
checkNo: null,
|
||||
batchNo: null,
|
||||
orderNo: null,
|
||||
materialCode: null,
|
||||
materialName: null,
|
||||
quality: null,
|
||||
unit: null,
|
||||
supplierCode: null,
|
||||
supplierName: null,
|
||||
incomeTime: null,
|
||||
checkLoc: null,
|
||||
checkStatus: null,
|
||||
checkManCode: null,
|
||||
checkManName: null,
|
||||
checkTime: null,
|
||||
checkResult: null,
|
||||
status: null,
|
||||
attr1: null,
|
||||
attr2: null,
|
||||
attr3: null,
|
||||
attr4: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
factoryCode: null,
|
||||
delFlag: 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 = "添加成品入库检验任务";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const recordId = row.recordId || this.ids
|
||||
getWarehousing(recordId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改成品入库检验任务";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.recordId != null) {
|
||||
updateWarehousing(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addWarehousing(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const recordIds = row.recordId || this.ids;
|
||||
this.$modal.confirm('是否确认删除成品入库检验任务编号为"' + recordIds + '"的数据项?').then(function() {
|
||||
return delWarehousing(recordIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('qcWarehousing/warehousing/export', {
|
||||
...this.queryParams
|
||||
}, `warehousing_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue