工艺V1.0

master
zhaoxiaolin 1 year ago
parent 15459e8bb8
commit 0ebb2136cb

@ -1,44 +0,0 @@
import request from '@/utils/request'
// 查询生产报工列表
export function listBg(query) {
return request({
url: '/mes/bg/list',
method: 'get',
params: query
});
}
// 查询生产报工详细
export function getBg(ID) {
return request({
url: '/mes/bg/' + ID,
method: 'get'
});
}
// 新增生产报工
export function addBg(data) {
return request({
url: '/mes/bg',
method: 'post',
data: data
});
}
// 修改生产报工
export function updateBg(data) {
return request({
url: '/mes/bg',
method: 'put',
data: data
});
}
// 删除生产报工
export function delBg(ID) {
return request({
url: '/mes/bg/' + ID,
method: 'delete'
});
}

@ -1,44 +0,0 @@
import request from '@/utils/request'
// 查询车间/产线管理列表
export function listCopy1(query) {
return request({
url: '/mes/copy1/list',
method: 'get',
params: query
});
}
// 查询车间/产线管理详细
export function getCopy1(id) {
return request({
url: '/mes/copy1/' + id,
method: 'get'
});
}
// 新增车间/产线管理
export function addCopy1(data) {
return request({
url: '/mes/copy1',
method: 'post',
data: data
});
}
// 修改车间/产线管理
export function updateCopy1(data) {
return request({
url: '/mes/copy1',
method: 'put',
data: data
});
}
// 删除车间/产线管理
export function delCopy1(id) {
return request({
url: '/mes/copy1/' + id,
method: 'delete'
});
}

@ -1,44 +0,0 @@
import request from '@/utils/request'
// 查询粉料采购计划列表
export function listOrder(query) {
return request({
url: '/mes/order/list',
method: 'get',
params: query
});
}
// 查询粉料采购计划详细
export function getOrder(ID) {
return request({
url: '/mes/order/' + ID,
method: 'get'
});
}
// 新增粉料采购计划
export function addOrder(data) {
return request({
url: '/mes/order',
method: 'post',
data: data
});
}
// 修改粉料采购计划
export function updateOrder(data) {
return request({
url: '/mes/order',
method: 'put',
data: data
});
}
// 删除粉料采购计划
export function delOrder(ID) {
return request({
url: '/mes/order/' + ID,
method: 'delete'
});
}

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询工艺路线列表
export function listProroute(query) {
return request({
url: '/mes/pro/proroute/list',
method: 'get',
params: query
})
}
// 查询工艺路线详细
export function getProroute(routeId) {
return request({
url: '/mes/pro/proroute/' + routeId,
method: 'get'
})
}
// 新增工艺路线
export function addProroute(data) {
return request({
url: '/mes/pro/proroute',
method: 'post',
data: data
})
}
// 修改工艺路线
export function updateProroute(data) {
return request({
url: '/mes/pro/proroute',
method: 'put',
data: data
})
}
// 删除工艺路线
export function delProroute(routeId) {
return request({
url: '/mes/pro/proroute/' + routeId,
method: 'delete'
})
}

@ -0,0 +1,54 @@
import request from '@/utils/request'
// 查询工艺组成列表
export function listRouteprocess(query) {
return request({
url: '/mes/pro/routeprocess/list',
method: 'get',
params: query
})
}
// 查询产品的工艺组成列表
export function listProductprocess(productId) {
return request({
url: '/mes/pro/routeprocess/listProductProcess/'+productId,
method: 'get'
})
}
// 查询工艺组成详细
export function getRouteprocess(recordId) {
return request({
url: '/mes/pro/routeprocess/' + recordId,
method: 'get'
})
}
// 新增工艺组成
export function addRouteprocess(data) {
return request({
url: '/mes/pro/routeprocess',
method: 'post',
data: data
})
}
// 修改工艺组成
export function updateRouteprocess(data) {
return request({
url: '/mes/pro/routeprocess',
method: 'put',
data: data
})
}
// 删除工艺组成
export function delRouteprocess(recordId) {
return request({
url: '/mes/pro/routeprocess/' + recordId,
method: 'delete'
})
}

@ -1,381 +0,0 @@
<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="ID">-->
<!-- <el-input-->
<!-- v-model="queryParams.ID"-->
<!-- placeholder="请输入主键"-->
<!-- 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="OrderID">
<el-input
v-model="queryParams.OrderID"
placeholder="请输入工位"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产品编码" prop="Code">
<el-input
v-model="queryParams.Code"
placeholder="请输入产品编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工单编码" prop="CSA">
<el-input
v-model="queryParams.CSA"
placeholder="请输入工单编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产品名称" prop="COS">
<el-input
v-model="queryParams.COS"
placeholder="请输入产品名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="规格型号" prop="Name">
<el-input
v-model="queryParams.Name"
placeholder="请输入规格型号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="报工数量" prop="prodId">
<el-input
v-model="queryParams.prodId"
placeholder="请输入报工数量"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="报工人" prop="prodCode">
<el-input
v-model="queryParams.prodCode"
placeholder="请输入报工人"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="报工时间" prop="barcodeClearDate">
<el-date-picker clearable
v-model="queryParams.barcodeClearDate"
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="['mes:bg: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:bg: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:bg: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:bg:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="bgList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="主键" align="center" prop="ID" />-->
<el-table-column label="报工类型" align="center" prop="siteCode" />
<el-table-column label="工位" align="center" prop="OrderID" />
<el-table-column label="产品编码" align="center" prop="Code" />
<el-table-column label="工单编码" align="center" prop="CSA" />
<el-table-column label="产品名称" align="center" prop="COS" />
<el-table-column label="规格型号" align="center" prop="Name" />
<el-table-column label="报工数量" align="center" prop="prodId" />
<el-table-column label="报工人" align="center" prop="prodCode" />
<el-table-column label="报工时间" align="center" prop="barcodeClearDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.barcodeClearDate, '{y}-{m}-{d}') }}</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:bg:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['mes:bg: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="ID">-->
<!-- <el-input v-model="form.ID" placeholder="请输入主键" />-->
<!-- </el-form-item>-->
<el-form-item label="报工类型" prop="siteCode">
<el-input v-model="form.siteCode" placeholder="请输入报工类型" />
</el-form-item>
<el-form-item label="工位" prop="OrderID">
<el-input v-model="form.OrderID" placeholder="请输入工位" />
</el-form-item>
<el-form-item label="产品编码" prop="Code">
<el-input v-model="form.Code" placeholder="请输入产品编码" />
</el-form-item>
<el-form-item label="工单编码" prop="CSA">
<el-input v-model="form.CSA" placeholder="请输入工单编码" />
</el-form-item>
<el-form-item label="产品名称" prop="COS">
<el-input v-model="form.COS" placeholder="请输入产品名称" />
</el-form-item>
<el-form-item label="规格型号" prop="Name">
<el-input v-model="form.Name" placeholder="请输入规格型号" />
</el-form-item>
<el-form-item label="报工数量" prop="prodId">
<el-input v-model="form.prodId" placeholder="请输入报工数量" />
</el-form-item>
<el-form-item label="报工人" prop="prodCode">
<el-input v-model="form.prodCode" placeholder="请输入报工人" />
</el-form-item>
<el-form-item label="报工时间" prop="barcodeClearDate">
<el-date-picker clearable
v-model="form.barcodeClearDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择报工时间">
</el-date-picker>
</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 { listBg, getBg, delBg, addBg, updateBg } from "@/api/mes/bg";
export default {
name: "Bg",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
bgList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
ID: null,
siteCode: null,
OrderID: null,
Code: null,
CSA: null,
COS: null,
Name: null,
prodId: null,
prodCode: null,
barcodeClearDate: null
},
//
form: {},
//
rules: {
ID: [
{ required: true, message: "主键不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询生产报工列表 */
getList() {
this.loading = true;
listBg(this.queryParams).then(response => {
this.bgList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
ID: null,
siteCode: null,
OrderID: null,
Code: null,
CSA: null,
COS: null,
Name: null,
prodId: null,
prodCode: null,
barcodeClearDate: 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.title = "添加生产报工";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const ID = row.ID || this.ids
getBg(ID).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改生产报工";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.ID != null) {
updateBg(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addBg(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 delBg(IDs);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('mes/bg/export', {
...this.queryParams
}, `bg_${new Date().getTime()}.xlsx`)
}
}
};
</script>

@ -1,305 +0,0 @@
<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="baofeiCode">
<el-input
v-model="queryParams.baofeiCode"
placeholder="请输入部门名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="排序" prop="baofeiDesc">
<el-input
v-model="queryParams.baofeiDesc"
placeholder="请输入排序"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="chejian">
<el-input
v-model="queryParams.chejian"
placeholder="请输入状态"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-input
v-model="queryParams.createTime"
placeholder="请输入创建时间"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="操作" prop="reason">-->
<!-- <el-input-->
<!-- v-model="queryParams.reason"-->
<!-- 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="['mes:copy1: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:copy1: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:copy1: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:copy1:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="copy1List" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="${comment}" align="center" prop="id" />-->
<el-table-column label="部门名称" align="center" prop="baofeiCode" />
<el-table-column label="排序" align="center" prop="baofeiDesc" />
<el-table-column label="状态" align="center" prop="chejian" />
<el-table-column label="创建时间" align="center" prop="createTime" />
<!-- <el-table-column label="操作" align="center" prop="reason" />-->
<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:copy1:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['mes:copy1: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="baofeiCode">
<el-input v-model="form.baofeiCode" placeholder="请输入部门名称" />
</el-form-item>
<el-form-item label="排序" prop="baofeiDesc">
<el-input v-model="form.baofeiDesc" placeholder="请输入排序" />
</el-form-item>
<el-form-item label="状态" prop="chejian">
<el-input v-model="form.chejian" placeholder="请输入状态" />
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-input v-model="form.createTime" placeholder="请输入创建时间" />
</el-form-item>
<!-- <el-form-item label="操作" prop="reason">-->
<!-- <el-input v-model="form.reason" 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 { listCopy1, getCopy1, delCopy1, addCopy1, updateCopy1 } from "@/api/mes/copy1";
export default {
name: "Copy1",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// /线
copy1List: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
baofeiCode: null,
baofeiDesc: null,
chejian: null,
createTime: null,
reason: null,
},
//
form: {},
//
rules: {
baofeiCode: [
{ required: true, message: "部门名称不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询车间/产线管理列表 */
getList() {
this.loading = true;
listCopy1(this.queryParams).then(response => {
this.copy1List = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
baofeiCode: null,
baofeiDesc: null,
chejian: null,
xianti: null,
reason: null,
createTime: 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.title = "添加车间/产线管理";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getCopy1(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改车间/产线管理";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateCopy1(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addCopy1(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 delCopy1(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('mes/copy1/export', {
...this.queryParams
}, `copy1_${new Date().getTime()}.xlsx`)
}
}
};
</script>

@ -1,401 +0,0 @@
<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="orderCode">
<el-input
v-model="queryParams.orderCode"
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="materialDesc">
<el-input
v-model="queryParams.materialDesc"
placeholder="请输入物料描述"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="计划日期" prop="planDate">
<el-date-picker clearable
v-model="queryParams.planDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择计划日期">
</el-date-picker>
</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>
<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:order: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:order: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:order: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:order:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="工厂编码" align="center" prop="siteCode" v-if="false" />
<el-table-column label="id" align="center" prop="id" v-if="false" />
<el-table-column label="采购单号" align="center" prop="orderCode" />
<el-table-column label="物料编码" align="center" prop="materialCode" />
<el-table-column label="物料描述" align="center" prop="materialDesc" />
<el-table-column label="计划日期" align="center" prop="planDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.planDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="计划数量" align="center" prop="planNumber" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="订单状态" align="center" prop="orderStatus" />
<el-table-column label="供应商编码" align="center" prop="supplierCode" />
<el-table-column label="供应商名称" align="center" prop="supplierName" />
<el-table-column label="创建人" align="center" prop="createBy" />
<el-table-column label="创建时间" align="center" prop="createDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createDate, '{y}-{m}-{d}') }}</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:order:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['mes:order: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="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="物料编码" prop="materialCode">
<el-input v-model="form.materialCode" placeholder="请输入物料编码" />
</el-form-item>
<el-form-item label="物料描述" prop="materialDesc">
<el-input v-model="form.materialDesc" placeholder="请输入物料描述" />
</el-form-item>
<el-form-item label="计划日期" prop="planDate">
<el-date-picker clearable
v-model="form.planDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择计划日期">
</el-date-picker>
</el-form-item>
<el-form-item label="计划数量" prop="planNumber">
<el-input v-model="form.planNumber" 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="remark">
<el-input v-model="form.remark" 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 { listOrder, getOrder, delOrder, addOrder, updateOrder } from "@/api/mes/order";
export default {
name: "Order",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
orderList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
siteCode: null,
orderCode: null,
materialCode: null,
materialDesc: null,
planDate: null,
planNumber: null,
unit: null,
realityNumber: null,
orderStatus: null,
userDefined1: null,
userDefined2: null,
userDefined3: null,
userDefined4: null,
userDefined5: null,
userDefined6: null,
userDefined7: null,
userDefined8: null,
userDefined9: null,
userDefined10: null,
userDefined11: null,
supplierCode: null,
supplierName: null,
remark: null,
createBy: null,
createDate: null,
lastUpdateBy: null,
lastUpdateDate: null,
Active: null,
enterpriseId: null,
enterpriseCode: null,
lssuedNumber: null
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询粉料采购计划列表 */
getList() {
this.loading = true;
listOrder(this.queryParams).then(response => {
this.orderList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
siteCode: null,
id: null,
orderCode: null,
materialCode: null,
materialDesc: null,
planDate: null,
planNumber: null,
unit: null,
realityNumber: null,
orderStatus: null,
userDefined1: null,
userDefined2: null,
userDefined3: null,
userDefined4: null,
userDefined5: null,
userDefined6: null,
userDefined7: null,
userDefined8: null,
userDefined9: null,
userDefined10: null,
userDefined11: null,
supplierCode: null,
supplierName: null,
remark: null,
createBy: null,
createDate: null,
lastUpdateBy: null,
lastUpdateDate: null,
Active: null,
enterpriseId: null,
enterpriseCode: null,
lssuedNumber: 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.title = "新增";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const ID = row.ID || this.ids
getOrder(ID).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改粉料采购计划";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateOrder(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addOrder(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 delOrder(IDs);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('mes/order/export', {
...this.queryParams
}, `order_${new Date().getTime()}.xlsx`)
}
}
};
</script>

@ -211,7 +211,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="工作时间" prop="workTime">
<el-input v-model="form.workTime" type="input" placeholder="请输入工作时长" />
<el-input-number :min="0" :step="1" v-model="form.workTime" placeholder="请输入工作时长" />
</el-form-item>
</el-col>
</el-row>
@ -404,6 +404,11 @@ export default {
},
/** 提交按钮 */
submitForm() {
if(Array.isArray(this.form.fileList)){
this.form.fileList = this.listToString(this.form.fileList);
}
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.processId != null) {
@ -438,9 +443,14 @@ export default {
...this.queryParams
}, `process_${new Date().getTime()}.xlsx`)
},
//
handleAutoGenChange(autoGenFlag){
//
listToString(list, separator) {
let strs = "";
separator = separator || ",";
for (let i in list) {
strs += list[i].url + separator;
}
return strs != '' ? strs.substr(0, strs.length - 1) : '';
}
}
};

@ -0,0 +1,401 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="工艺路线编号" prop="routeCode">
<el-input
v-model="queryParams.routeCode"
placeholder="请输入工艺路线编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工艺路线名称" prop="routeName">
<el-input
v-model="queryParams.routeName"
placeholder="请输入工艺路线名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="是否启用" prop="enableFlag">
<el-input
v-model="queryParams.enableFlag"
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="['mes:pro:proroute: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:pro:proroute: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:pro:proroute: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:pro:proroute:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="prorouteList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="工艺路线编号" align="center" prop="routeCode" >
<template slot-scope="scope">
<el-button
type="text"
@click="handleView(scope.row)"
v-hasPermi="['mes:pro:proroute:query']"
>{{scope.row.routeCode}}</el-button>
</template>
</el-table-column>
<el-table-column label="工艺路线名称" align="center" prop="routeName" />
<el-table-column label="工艺路线说明" align="center" prop="routeDesc" />
<el-table-column label="是否启用" align="center" prop="enableFlag">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.enableFlag"/>
</template>
</el-table-column>
<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="['pro:proroute:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['pro:proroute: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="960px" 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="routeCode">
<el-input v-model="form.routeCode" placeholder="请输入工艺路线编号" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="名称" prop="routeName">
<el-input v-model="form.routeName" placeholder="请输入工艺路线名称" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="是否启用" prop="enableFlag">
<el-radio-group v-model="form.enableFlag" disabled v-if="optType=='view'">
<el-radio
v-for="dict in dict.type.sys_yes_no"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
<el-radio-group v-model="form.enableFlag" v-else>
<el-radio
v-for="dict in dict.type.sys_yes_no"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="版本" prop="routeVersion">
<el-input v-model="form.routeVersion" :disabled="true"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="工艺SOP" prop="fileList">
<FileUpload v-model="form.fileList"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="说明" prop="routeDesc">
<el-input v-model="form.routeDesc" type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-tabs type="border-card" v-if="form.routeId != null">
<el-tab-pane label="组成工序">
<Routeprocess v-if="form.routeId !=null" :optType="optType" :routeId="form.routeId"></Routeprocess>
</el-tab-pane>
</el-tabs>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="cancel" v-if="optType =='view'"></el-button>
<el-button type="primary" @click="submitForm" v-else> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listProroute, getProroute, delProroute, addProroute, updateProroute } from "@/api/mes/pro/proroute";
import Routeprocess from "./routeprocess";
export default {
name: "Proroute",
dicts: ['sys_yes_no'],
components: {Routeprocess},
data() {
return {
optType: undefined,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// 线
prorouteList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
routeCode: null,
routeName: null,
routeDesc: null,
enableFlag: null,
},
//
form: {},
//
rules: {
routeCode: [
{ required: true, message: "工艺路线编号不能为空", trigger: "blur" }
],
routeName: [
{ required: true, message: "工艺路线名称不能为空", trigger: "blur" }
],
enableFlag: [
{ required: true, message: "是否启用不能为空", trigger: "blur" }
],
},
fileList:''
};
},
created() {
this.getList();
},
methods: {
/** 查询工艺路线列表 */
getList() {
this.loading = true;
listProroute(this.queryParams).then(response => {
this.prorouteList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
routeId: null,
routeCode: null,
routeName: null,
routeDesc: null,
enableFlag: 'Y',
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
fileList:''
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.routeId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加工艺路线";
this.optType = "add";
},
//
handleView(row){
this.reset();
const routeId = row.routeId || this.ids;
getProroute(routeId).then(response => {
this.form = response.data;
this.open = true;
this.title = "查看工艺线路信息";
this.optType = "view";
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const routeId = row.routeId || this.ids
getProroute(routeId).then(response => {
this.form = response.data;
if(response.data.files != null){
var newFiles = [];
response.data.files.forEach(item =>{
var newfile = {};
newfile.name = item.fileName;
newfile.url = item.fileAddress;
newFiles.push(newfile);
})
this.form.fileList = newFiles;
}
this.open = true;
this.title = "修改工艺路线";
this.optType = "edit";
});
},
/** 提交按钮 */
submitForm() {
if(Array.isArray(this.form.fileList)){
this.form.fileList = this.listToString(this.form.fileList);
}
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.routeId != null) {
updateProroute(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
this.form.routeVersion = 'V.0.0.1';
addProroute(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const routeIds = row.routeId || this.ids;
this.$modal.confirm('是否确认删除工艺路线编号为"' + routeIds + '"的数据项?').then(function() {
return delProroute(routeIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('pro/proroute/export', {
...this.queryParams
}, `proroute_${new Date().getTime()}.xlsx`)
},
//
listToString(list, separator) {
let strs = "";
separator = separator || ",";
for (let i in list) {
strs += list[i].url + separator;
}
return strs != '' ? strs.substr(0, strs.length - 1) : '';
}
}
};
</script>

@ -0,0 +1,323 @@
<template>
<div class="app-container">
<el-row :gutter="10" v-if="optType !='view'" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['pro:routeprocess: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="['pro:routeprocess: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="['pro:routeprocess:remove']"
>删除</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="routeprocessList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" width="100px" align="center" fixed prop="orderNum" />
<el-table-column label="工序编码" width="120px" fixed align="center" prop="processCode" />
<el-table-column label="工序名称" width="150px" fixed align="center" prop="processName" />
<el-table-column label="关键工序" align="center" prop="keyFlag">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.keyFlag"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" fixed="right" width="150px" v-if="optType !='view'" 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:pro:routeprocess:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['mes:pro:routeprocess: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="1100px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
<el-row>
<el-col :span="12">
<el-form-item label="序号" prop="orderNum">
<el-input-number :min="1" v-model="form.orderNum" placeholder="请输入序号" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="工序" prop="processId">
<el-select v-model="form.processId" placeholder="请选择工序">
<el-option
v-for="item in processOptions"
:key="item.processId"
:label="item.processName"
:value="item.processId"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="是否关键工序" prop="keyFlag">
<el-tooltip effect="dark" placement="right">
<div slot="content">
关键工序
</div>
<el-select v-model="form.keyFlag">
<el-option
v-for="dict in dict.type.sys_yes_no"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-tooltip>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="cancel" v-if="optType =='view'"></el-button>
<el-button type="primary" @click="submitForm" v-else> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listRouteprocess, getRouteprocess, delRouteprocess, addRouteprocess, updateRouteprocess } from "@/api/mes/pro/routeprocess";
import {listAllProcess} from "@/api/mes/pro/process";
export default {
name: "Routeprocess",
dicts: ['mes_link_type','sys_yes_no'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
routeprocessList: [],
//
processOptions:[],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
routeId: this.routeId,
processId: null,
processCode: null,
processName: null,
orderNum: null,
nextProcessId: null,
nextProcessCode: null,
nextProcessName: null,
linkType: null,
defaultPreTime: null,
defaultSufTime: null,
colorCode: null,
},
//
form: {},
//
rules: {
routeId: [
{ required: true, message: "工艺路线ID不能为空", trigger: "blur" }
],
processId: [
{ required: true, message: "工序ID不能为空", trigger: "blur" }
],
nextProcessId: [
{ required: true, message: "工序ID不能为空", trigger: "blur" }
]
}
};
},
props :{
routeId: undefined,
optType: undefined
},
created() {
this.getList();
this.getProcess();
},
methods: {
/** 查询工艺组成列表 */
getList() {
this.loading = true;
listRouteprocess(this.queryParams).then(response => {
this.routeprocessList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
getProcess(){
listAllProcess().then( response =>{
this.processOptions = response.data;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
recordId: null,
routeId: this.routeId,
processId: null,
processCode: null,
processName: null,
orderNum: 1,
nextProcessId: null,
nextProcessCode: null,
nextProcessName: null,
linkType: null,
defaultPreTime: 0,
defaultSufTime: 0,
colorCode: '#00AEF3',
remark: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: 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
getRouteprocess(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) {
updateRouteprocess(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addRouteprocess(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 delRouteprocess(recordIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('mes/pro/routeprocess/export', {
...this.queryParams
}, `routeprocess_${new Date().getTime()}.xlsx`)
}
}
};
</script>
Loading…
Cancel
Save