feat: 新增轧线系统日志、停机和实绩功能模块
- 新增日志、停机和实绩三个功能模块的API接口和页面 - 在计划页面添加完成按钮及相关逻辑 - 更新工艺方案页面,修复ID字段命名问题 - 调整导航栏样式和图标颜色 - 修改代理配置端口为8090 - 更新favicon图标 - 添加package-lock.json文件
This commit is contained in:
6
package-lock.json
generated
Normal file
6
package-lock.json
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "double-rack",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {}
|
||||
}
|
||||
@@ -94,5 +94,8 @@
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions"
|
||||
]
|
||||
],
|
||||
"volta": {
|
||||
"node": "16.20.2"
|
||||
}
|
||||
}
|
||||
|
||||
BIN
ruoyi-ui/public/favicon.png
Normal file
BIN
ruoyi-ui/public/favicon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
@@ -5,7 +5,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.png">
|
||||
<title><%= webpackConfig.name %></title>
|
||||
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
|
||||
<style>
|
||||
|
||||
44
ruoyi-ui/src/api/mill/actual.js
Normal file
44
ruoyi-ui/src/api/mill/actual.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询轧线生产实绩列表
|
||||
export function listActual(query) {
|
||||
return request({
|
||||
url: '/mill/actual/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询轧线生产实绩详细
|
||||
export function getActual(actualId) {
|
||||
return request({
|
||||
url: '/mill/actual/' + actualId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增轧线生产实绩
|
||||
export function addActual(data) {
|
||||
return request({
|
||||
url: '/mill/actual',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改轧线生产实绩
|
||||
export function updateActual(data) {
|
||||
return request({
|
||||
url: '/mill/actual',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除轧线生产实绩
|
||||
export function delActual(actualId) {
|
||||
return request({
|
||||
url: '/mill/actual/' + actualId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
ruoyi-ui/src/api/mill/log.js
Normal file
44
ruoyi-ui/src/api/mill/log.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询轧线系统日志列表
|
||||
export function listLog(query) {
|
||||
return request({
|
||||
url: '/mill/log/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询轧线系统日志详细
|
||||
export function getLog(logId) {
|
||||
return request({
|
||||
url: '/mill/log/' + logId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增轧线系统日志
|
||||
export function addLog(data) {
|
||||
return request({
|
||||
url: '/mill/log',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改轧线系统日志
|
||||
export function updateLog(data) {
|
||||
return request({
|
||||
url: '/mill/log',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除轧线系统日志
|
||||
export function delLog(logId) {
|
||||
return request({
|
||||
url: '/mill/log/' + logId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@@ -21,3 +21,6 @@ export function moveUpPlan(id) {
|
||||
export function moveDownPlan(id) {
|
||||
return request({ url: `/mill/production-plan/moveDown/${id}`, method: 'put' })
|
||||
}
|
||||
export function finishPlan(id) {
|
||||
return request({ url: `/mill/production-plan/complete/${id}`, method: 'put' })
|
||||
}
|
||||
|
||||
44
ruoyi-ui/src/api/mill/stop.js
Normal file
44
ruoyi-ui/src/api/mill/stop.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询轧线生产停机列表
|
||||
export function listStop(query) {
|
||||
return request({
|
||||
url: '/mill/stop/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询轧线生产停机详细
|
||||
export function getStop(stopId) {
|
||||
return request({
|
||||
url: '/mill/stop/' + stopId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增轧线生产停机
|
||||
export function addStop(data) {
|
||||
return request({
|
||||
url: '/mill/stop',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改轧线生产停机
|
||||
export function updateStop(data) {
|
||||
return request({
|
||||
url: '/mill/stop',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除轧线生产停机
|
||||
export function delStop(stopId) {
|
||||
return request({
|
||||
url: '/mill/stop/' + stopId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 19 KiB |
@@ -6,6 +6,7 @@
|
||||
viewBox="0 0 1024 1024"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="64"
|
||||
fill="currentColor"
|
||||
height="64"
|
||||
>
|
||||
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z" />
|
||||
@@ -36,6 +37,7 @@ export default {
|
||||
vertical-align: middle;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.hamburger.is-active {
|
||||
|
||||
@@ -9,14 +9,6 @@
|
||||
<template v-if="device!=='mobile'">
|
||||
<search id="header-search" class="right-menu-item" />
|
||||
|
||||
<el-tooltip content="源码地址" effect="dark" placement="bottom">
|
||||
<ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />
|
||||
</el-tooltip>
|
||||
|
||||
<el-tooltip content="文档地址" effect="dark" placement="bottom">
|
||||
<ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />
|
||||
</el-tooltip>
|
||||
|
||||
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
||||
|
||||
<el-tooltip content="布局大小" effect="dark" placement="bottom">
|
||||
@@ -123,6 +115,7 @@ export default {
|
||||
cursor: pointer;
|
||||
transition: background .3s;
|
||||
-webkit-tap-highlight-color:transparent;
|
||||
color: #ccc;
|
||||
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, .025)
|
||||
@@ -157,7 +150,7 @@ export default {
|
||||
padding: 0 8px;
|
||||
height: 100%;
|
||||
font-size: 18px;
|
||||
color: #5a5e66;
|
||||
color: #ccc;
|
||||
vertical-align: text-bottom;
|
||||
|
||||
&.hover-effect {
|
||||
|
||||
@@ -68,6 +68,7 @@ export default {
|
||||
& .sidebar-logo {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
background-color: #fff;
|
||||
vertical-align: middle;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
286
ruoyi-ui/src/views/mill/log.vue
Normal file
286
ruoyi-ui/src/views/mill/log.vue
Normal file
@@ -0,0 +1,286 @@
|
||||
<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="seqid">
|
||||
<el-input v-model="queryParams.seqid" placeholder="请输入原始序列号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="日志时间" prop="timestamp">
|
||||
<el-date-picker clearable v-model="queryParams.timestamp" type="date" value-format="yyyy-MM-dd"
|
||||
placeholder="请选择日志时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="模块名称" prop="module">
|
||||
<el-input v-model="queryParams.module" placeholder="请输入模块名称" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="确认时间" prop="confirmTime">
|
||||
<el-date-picker clearable v-model="queryParams.confirmTime" 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="['mill:log: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="['mill:log: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="['mill:log: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="['mill:log:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="logList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="原始序列号" align="center" prop="seqid" />
|
||||
<el-table-column label="日志时间" align="center" prop="timestamp" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.timestamp, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="模块名称" align="center" prop="module" />
|
||||
<el-table-column label="日志类型" align="center" prop="logType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.mill_log_type" :value="scope.row.logType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="日志状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.mill_log_status" :value="scope.row.status.toString()" />
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="日志内容" align="center" prop="logText" />
|
||||
|
||||
<el-table-column label="确认时间" align="center" prop="confirmTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.confirmTime, '{y}-{m}-{d}') }}</span>
|
||||
</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="['mill:log:edit']">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['mill:log: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="seqid">
|
||||
<el-input v-model="form.seqid" placeholder="请输入原始序列号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="日志时间" prop="timestamp">
|
||||
<el-date-picker clearable v-model="form.timestamp" type="date" value-format="yyyy-MM-dd"
|
||||
placeholder="请选择日志时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="模块名称" prop="module">
|
||||
<el-input v-model="form.module" placeholder="请输入模块名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="日志类型" prop="logType">
|
||||
<el-select v-model="form.logType" placeholder="请选择日志类型">
|
||||
<el-option v-for="item in dict.type.mill_log_type" :key="item.value" :label="item.label"
|
||||
:value="item.value" />
|
||||
</el-select>
|
||||
<!-- <el-input v-model="form.logType" placeholder="请输入日志类型" /> -->
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="日志状态" prop="status">
|
||||
<el-select v-model="form.status" placeholder="请选择日志状态">
|
||||
<el-option v-for="item in dict.type.mill_log_status" :key="item.value" :label="item.label"
|
||||
:value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="日志内容" prop="logText">
|
||||
<el-input v-model="form.logText" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="确认时间" prop="confirmTime">
|
||||
<el-date-picker clearable v-model="form.confirmTime" type="date" value-format="yyyy-MM-dd"
|
||||
placeholder="请选择确认时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listLog, getLog, delLog, addLog, updateLog } from "@/api/mill/log";
|
||||
|
||||
export default {
|
||||
name: "Log",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 轧线系统日志表格数据
|
||||
logList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
seqid: null,
|
||||
timestamp: null,
|
||||
module: null,
|
||||
logType: null,
|
||||
logText: null,
|
||||
status: null,
|
||||
confirmTime: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
dicts: ['mill_log_type', 'mill_log_status'],
|
||||
methods: {
|
||||
/** 查询轧线系统日志列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listLog(this.queryParams).then(response => {
|
||||
this.logList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
logId: null,
|
||||
seqid: null,
|
||||
timestamp: null,
|
||||
module: null,
|
||||
logType: null,
|
||||
logText: null,
|
||||
status: 0,
|
||||
confirmTime: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
remark: 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.logId)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加轧线系统日志";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const logId = row.logId || this.ids
|
||||
getLog(logId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改轧线系统日志";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.logId != null) {
|
||||
updateLog(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addLog(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const logIds = row.logId || this.ids;
|
||||
this.$modal.confirm('是否确认删除轧线系统日志编号为"' + logIds + '"的数据项?').then(function () {
|
||||
return delLog(logIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('mill/log/export', {
|
||||
...this.queryParams
|
||||
}, `log_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
614
ruoyi-ui/src/views/mill/pdo.vue
Normal file
614
ruoyi-ui/src/views/mill/pdo.vue
Normal file
@@ -0,0 +1,614 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-card shadow="never">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="成品卷号" prop="exitMatId">
|
||||
<el-input
|
||||
v-model="queryParams.exitMatId"
|
||||
placeholder="请输入成品卷号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="来料卷号" prop="entryMatId">
|
||||
<el-input
|
||||
v-model="queryParams.entryMatId"
|
||||
placeholder="请输入来料卷号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划号" prop="planNo">
|
||||
<el-input
|
||||
v-model="queryParams.planNo"
|
||||
placeholder="请输入计划号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="班号" prop="groupNo">
|
||||
<el-input
|
||||
v-model="queryParams.groupNo"
|
||||
placeholder="请输入班号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="组号" prop="shiftNo">
|
||||
<el-input
|
||||
v-model="queryParams.shiftNo"
|
||||
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="['mill:actual: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="['mill:actual: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="['mill:actual: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="['mill:actual:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="actualList" @selection-change="handleSelectionChange" @row-click="handleRowClick" highlight-current-row>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="成品卷号" align="center" prop="exitMatId" />
|
||||
<el-table-column label="来料卷号" align="center" prop="entryMatId" />
|
||||
<el-table-column label="计划号" align="center" prop="planNo" />
|
||||
<el-table-column label="产品类型" align="center" prop="prodCode" />
|
||||
<el-table-column label="班号" align="center" prop="groupNo" />
|
||||
<el-table-column label="组号" align="center" prop="shiftNo" />
|
||||
<el-table-column label="钢种" align="center" prop="steelGrade" />
|
||||
<el-table-column label="成品厚度" align="center" prop="exitThickness" />
|
||||
<el-table-column label="成品宽度" align="center" prop="exitWidth" />
|
||||
<el-table-column label="实际重量" align="center" prop="actualWeight" />
|
||||
<el-table-column label="上线时间" align="center" prop="onlineTime" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.onlineTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="状态" align="center" prop="status" /> -->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click.stop="handleUpdate(scope.row)"
|
||||
v-hasPermi="['mill:actual:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click.stop="handleDelete(scope.row)"
|
||||
v-hasPermi="['mill:actual: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-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" style="margin-top: 20px;">
|
||||
<el-col :span="24">
|
||||
<el-card shadow="never" v-if="currentRow">
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="font-size: 16px; font-weight: bold;">明细信息</span>
|
||||
</div>
|
||||
<el-descriptions :column="4" border>
|
||||
<el-descriptions-item label="成品卷号">{{ currentRow.exitMatId }}</el-descriptions-item>
|
||||
<el-descriptions-item label="来料卷号">{{ currentRow.entryMatId }}</el-descriptions-item>
|
||||
<el-descriptions-item label="分切数">{{ currentRow.subId }}</el-descriptions-item>
|
||||
<el-descriptions-item label="开始位置">{{ currentRow.startPosition }}</el-descriptions-item>
|
||||
<el-descriptions-item label="结束位置">{{ currentRow.endPosition }}</el-descriptions-item>
|
||||
<el-descriptions-item label="计划id">{{ currentRow.planId }}</el-descriptions-item>
|
||||
<el-descriptions-item label="计划号">{{ currentRow.planNo }}</el-descriptions-item>
|
||||
<el-descriptions-item label="产品类型">{{ currentRow.prodCode }}</el-descriptions-item>
|
||||
<el-descriptions-item label="班号">{{ currentRow.groupNo }}</el-descriptions-item>
|
||||
<el-descriptions-item label="组号">{{ currentRow.shiftNo }}</el-descriptions-item>
|
||||
<el-descriptions-item label="状态">{{ currentRow.status }}</el-descriptions-item>
|
||||
<el-descriptions-item label="钢种">{{ currentRow.steelGrade }}</el-descriptions-item>
|
||||
<el-descriptions-item label="来料厚度">{{ currentRow.entryThick }}</el-descriptions-item>
|
||||
<el-descriptions-item label="来料宽度">{{ currentRow.entryWidth }}</el-descriptions-item>
|
||||
<el-descriptions-item label="来料长度">{{ currentRow.entryLength }}</el-descriptions-item>
|
||||
<el-descriptions-item label="来料重量">{{ currentRow.entryWeight }}</el-descriptions-item>
|
||||
<el-descriptions-item label="上表面镀锌量">{{ currentRow.weightTop }}</el-descriptions-item>
|
||||
<el-descriptions-item label="下表面镀锌量">{{ currentRow.weightBottom }}</el-descriptions-item>
|
||||
<el-descriptions-item label="成品长度">{{ currentRow.exitLength }}</el-descriptions-item>
|
||||
<el-descriptions-item label="成品带涂料重量">{{ currentRow.exitNetWeight }}</el-descriptions-item>
|
||||
<el-descriptions-item label="理论重量">{{ currentRow.theoryWeight }}</el-descriptions-item>
|
||||
<el-descriptions-item label="实际重量">{{ currentRow.actualWeight }}</el-descriptions-item>
|
||||
<el-descriptions-item label="成品外径">{{ currentRow.exitOuterDiameter }}</el-descriptions-item>
|
||||
<el-descriptions-item label="成品厚度">{{ currentRow.exitThickness }}</el-descriptions-item>
|
||||
<el-descriptions-item label="成品宽度">{{ currentRow.exitWidth }}</el-descriptions-item>
|
||||
<el-descriptions-item label="客户">{{ currentRow.customer }}</el-descriptions-item>
|
||||
<el-descriptions-item label="上线时间">{{ parseTime(currentRow.onlineTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</el-descriptions-item>
|
||||
<el-descriptions-item label="开始时间">{{ parseTime(currentRow.startTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</el-descriptions-item>
|
||||
<el-descriptions-item label="结束时间">{{ parseTime(currentRow.endTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</el-descriptions-item>
|
||||
<el-descriptions-item label="机组号">{{ currentRow.unitCode }}</el-descriptions-item>
|
||||
<el-descriptions-item label="工序号">{{ currentRow.processCode }}</el-descriptions-item>
|
||||
<el-descriptions-item label="是否尾卷">{{ currentRow.lastFlag === 1 ? '是' : '否' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="是否分卷">{{ currentRow.separateFlag === 1 ? '是' : '否' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="计划来源">{{ currentRow.planOrigin }}</el-descriptions-item>
|
||||
<el-descriptions-item label="锌层厚度">{{ currentRow.zincCoatingThickness }}</el-descriptions-item>
|
||||
<el-descriptions-item label="入场钢卷号">{{ currentRow.enterCoilNo }}</el-descriptions-item>
|
||||
<el-descriptions-item label="备注" :span="4">{{ currentRow.remark }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
<el-card shadow="never" v-else>
|
||||
<div style="text-align: center; padding: 40px; color: #909399;">
|
||||
请点击表格行查看明细信息
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="成品卷号" prop="exitMatId">
|
||||
<el-input v-model="form.exitMatId" placeholder="请输入成品卷号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="来料卷号" prop="entryMatId">
|
||||
<el-input v-model="form.entryMatId" placeholder="请输入来料卷号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="分切数" prop="subId">
|
||||
<el-input v-model="form.subId" placeholder="请输入分切数" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="计划号" prop="planNo">
|
||||
<el-input v-model="form.planNo" placeholder="请输入计划号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产品类型" prop="prodCode">
|
||||
<el-input v-model="form.prodCode" placeholder="请输入产品类型" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="钢种" prop="steelGrade">
|
||||
<el-input v-model="form.steelGrade" placeholder="请输入钢种" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="班号" prop="groupNo">
|
||||
<el-input v-model="form.groupNo" placeholder="请输入班号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="组号" prop="shiftNo">
|
||||
<el-input v-model="form.shiftNo" placeholder="请输入组号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider content-position="left">来料信息</el-divider>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="来料厚度" prop="entryThick">
|
||||
<el-input v-model="form.entryThick" placeholder="请输入来料厚度" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="来料宽度" prop="entryWidth">
|
||||
<el-input v-model="form.entryWidth" placeholder="请输入来料宽度" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="来料长度" prop="entryLength">
|
||||
<el-input v-model="form.entryLength" placeholder="请输入来料长度" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="来料重量" prop="entryWeight">
|
||||
<el-input v-model="form.entryWeight" placeholder="请输入来料重量" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider content-position="left">成品信息</el-divider>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="成品厚度" prop="exitThickness">
|
||||
<el-input v-model="form.exitThickness" placeholder="请输入成品厚度" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="成品宽度" prop="exitWidth">
|
||||
<el-input v-model="form.exitWidth" placeholder="请输入成品宽度" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="成品长度" prop="exitLength">
|
||||
<el-input v-model="form.exitLength" placeholder="请输入成品长度" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="成品外径" prop="exitOuterDiameter">
|
||||
<el-input v-model="form.exitOuterDiameter" placeholder="请输入成品外径" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="成品带涂料重量" prop="exitNetWeight">
|
||||
<el-input v-model="form.exitNetWeight" placeholder="请输入成品带涂料重量" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="理论重量" prop="theoryWeight">
|
||||
<el-input v-model="form.theoryWeight" placeholder="请输入理论重量" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="实际重量" prop="actualWeight">
|
||||
<el-input v-model="form.actualWeight" placeholder="请输入实际重量" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户" prop="customer">
|
||||
<el-input v-model="form.customer" placeholder="请输入客户" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider content-position="left">时间信息</el-divider>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="上线时间" prop="onlineTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.onlineTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择上线时间"
|
||||
style="width: 100%;">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开始时间" prop="startTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.startTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择开始时间"
|
||||
style="width: 100%;">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="结束时间" prop="endTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.endTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择结束时间"
|
||||
style="width: 100%;">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="机组号" prop="unitCode">
|
||||
<el-input v-model="form.unitCode" placeholder="请输入机组号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider content-position="left">其他信息</el-divider>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工序号" prop="processCode">
|
||||
<el-input v-model="form.processCode" placeholder="请输入工序号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否尾卷" prop="lastFlag">
|
||||
<el-switch v-model="form.lastFlag" :active-value="1" :inactive-value="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否分卷" prop="separateFlag">
|
||||
<el-switch v-model="form.separateFlag" :active-value="1" :inactive-value="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="计划来源" prop="planOrigin">
|
||||
<el-input v-model="form.planOrigin" placeholder="请输入计划来源" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="锌层厚度" prop="zincCoatingThickness">
|
||||
<el-input v-model="form.zincCoatingThickness" placeholder="请输入锌层厚度" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="入场钢卷号" prop="enterCoilNo">
|
||||
<el-input v-model="form.enterCoilNo" placeholder="请输入入场钢卷号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<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="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listActual, getActual, delActual, addActual, updateActual } from "@/api/mill/actual";
|
||||
|
||||
export default {
|
||||
name: "Actual",
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
ids: [],
|
||||
single: true,
|
||||
multiple: true,
|
||||
showSearch: true,
|
||||
total: 0,
|
||||
actualList: [],
|
||||
title: "",
|
||||
open: false,
|
||||
currentRow: null,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
exitMatId: null,
|
||||
entryMatId: null,
|
||||
subId: null,
|
||||
startPosition: null,
|
||||
endPosition: null,
|
||||
planId: null,
|
||||
planNo: null,
|
||||
prodCode: null,
|
||||
groupNo: null,
|
||||
shiftNo: null,
|
||||
status: null,
|
||||
steelGrade: null,
|
||||
entryThick: null,
|
||||
entryWidth: null,
|
||||
entryLength: null,
|
||||
entryWeight: null,
|
||||
weightTop: null,
|
||||
weightBottom: null,
|
||||
exitLength: null,
|
||||
exitNetWeight: null,
|
||||
theoryWeight: null,
|
||||
actualWeight: null,
|
||||
exitOuterDiameter: null,
|
||||
exitThickness: null,
|
||||
exitWidth: null,
|
||||
customer: null,
|
||||
onlineTime: null,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
unitCode: null,
|
||||
processCode: null,
|
||||
planOrigin: null,
|
||||
zincCoatingThickness: null,
|
||||
enterCoilNo: null,
|
||||
},
|
||||
form: {},
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listActual(this.queryParams).then(response => {
|
||||
this.actualList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
reset() {
|
||||
this.form = {
|
||||
actualId: null,
|
||||
exitMatId: null,
|
||||
entryMatId: null,
|
||||
subId: null,
|
||||
startPosition: null,
|
||||
endPosition: null,
|
||||
planId: null,
|
||||
planNo: null,
|
||||
prodCode: null,
|
||||
groupNo: null,
|
||||
shiftNo: null,
|
||||
status: null,
|
||||
steelGrade: null,
|
||||
entryThick: null,
|
||||
entryWidth: null,
|
||||
entryLength: null,
|
||||
entryWeight: null,
|
||||
weightTop: null,
|
||||
weightBottom: null,
|
||||
exitLength: null,
|
||||
exitNetWeight: null,
|
||||
theoryWeight: null,
|
||||
actualWeight: null,
|
||||
exitOuterDiameter: null,
|
||||
exitThickness: null,
|
||||
exitWidth: null,
|
||||
customer: null,
|
||||
onlineTime: null,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
unitCode: null,
|
||||
processCode: null,
|
||||
lastFlag: 0,
|
||||
separateFlag: 0,
|
||||
planOrigin: null,
|
||||
zincCoatingThickness: null,
|
||||
enterCoilNo: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
remark: 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.actualId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
handleRowClick(row) {
|
||||
this.currentRow = row;
|
||||
},
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加轧线生产实绩";
|
||||
},
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const actualId = row.actualId || this.ids
|
||||
getActual(actualId).then(response => {
|
||||
this.form = response.data;
|
||||
// 确保这两个字段是数字类型
|
||||
this.form.lastFlag = this.form.lastFlag === 1 || this.form.lastFlag === '1' ? 1 : 0;
|
||||
this.form.separateFlag = this.form.separateFlag === 1 || this.form.separateFlag === '1' ? 1 : 0;
|
||||
this.open = true;
|
||||
this.title = "修改轧线生产实绩";
|
||||
});
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.actualId != null) {
|
||||
updateActual(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addActual(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
handleDelete(row) {
|
||||
const actualIds = row.actualId || this.ids;
|
||||
this.$modal.confirm('是否确认删除轧线生产实绩编号为"' + actualIds + '"的数据项?').then(function() {
|
||||
return delActual(actualIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
handleExport() {
|
||||
this.download('mill/actual/export', {
|
||||
...this.queryParams
|
||||
}, `actual_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -27,6 +27,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺方案" prop="recipeNo" min-width="100" />
|
||||
</el-table>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 下方 -->
|
||||
@@ -171,6 +172,8 @@
|
||||
<div class="op-buttons">
|
||||
<el-button size="mini" type="primary" icon="el-icon-plus" @click="handleAdd">钢卷增加</el-button>
|
||||
<el-button size="mini" icon="el-icon-edit" :disabled="!selectedPlan" @click="handleEdit">修改</el-button>
|
||||
<!-- <el-button size="mini" icon="el-icon-edit" :disabled="!selectedPlan" @click="handleFinish"></el-button> -->
|
||||
<el-button size="mini" icon="el-icon-document" :disabled="!selectedPlan" @click="handleFinish">完成</el-button>
|
||||
<el-button size="mini" type="danger" icon="el-icon-delete" :disabled="!selectedPlan" @click="handleDelete">删除</el-button>
|
||||
<el-button size="mini" icon="el-icon-top" :disabled="!selectedPlan" @click="handleMoveUp">Up 上移</el-button>
|
||||
<el-button size="mini" icon="el-icon-bottom" :disabled="!selectedPlan" @click="handleMoveDown">Down 下移</el-button>
|
||||
@@ -318,7 +321,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listPlan, addPlan, updatePlan, delPlan, moveUpPlan, moveDownPlan } from '@/api/mill/plan'
|
||||
import { listPlan, addPlan, updatePlan, delPlan, moveUpPlan, moveDownPlan, finishPlan } from '@/api/mill/plan'
|
||||
import { listAllRecipe, getRecipeDetail, addRecipe } from '@/api/mill/recipe'
|
||||
|
||||
const emptyForm = () => ({
|
||||
@@ -390,9 +393,21 @@ export default {
|
||||
refreshRecipeOptions() {
|
||||
listAllRecipe({}).then(res => { this.recipeOptions = res.data || [] })
|
||||
},
|
||||
handleFinish() {
|
||||
const planId = this.selectedPlan.planId
|
||||
if (!planId) return this.$message.warning('请先选择钢卷')
|
||||
finishPlan(planId).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('完成成功')
|
||||
this.loadList()
|
||||
} else {
|
||||
this.$message.error(res.msg || '完成失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
loadList() {
|
||||
const params = { inMatNo: this.query.inMatNo }
|
||||
if (this.query.hideFinished) params.planStatus = '0'
|
||||
if (this.query.hideFinished) params.Idle = 'Idle'
|
||||
if (this.query.dateRange && this.query.dateRange.length === 2) {
|
||||
params.beginTime = this.query.dateRange[0]
|
||||
params.endTime = this.query.dateRange[1]
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
<!-- 列表 -->
|
||||
<div class="recipe-list">
|
||||
<div v-for="r in recipeList" :key="r.id"
|
||||
:class="['recipe-item', { active: selectedId === r.id }]"
|
||||
<div v-for="r in recipeList" :key="r.recipeId"
|
||||
:class="['recipe-item', { active: selectedId === r.recipeId }]"
|
||||
@click="handleSelect(r)">
|
||||
<div class="recipe-item__no">{{ r.recipeNo }}</div>
|
||||
<div class="recipe-item__info">
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
<!-- 右侧:方案详情 -->
|
||||
<div class="right-panel">
|
||||
<div v-if="!form.id && !isNew" class="no-select">
|
||||
<div v-if="!form.recipeId && !isNew" class="no-select">
|
||||
<i class="el-icon-document"></i>
|
||||
<p>请在左侧选择工艺方案</p>
|
||||
</div>
|
||||
@@ -205,9 +205,9 @@ export default {
|
||||
})
|
||||
},
|
||||
handleSelect(r) {
|
||||
this.selectedId = r.id
|
||||
this.selectedId = r.recipeId
|
||||
this.isNew = false
|
||||
getRecipeDetail(r.id).then(res => {
|
||||
getRecipeDetail(r.recipeId).then(res => {
|
||||
this.form = { ...res.data }
|
||||
this.passList = res.data.passList || []
|
||||
})
|
||||
@@ -237,7 +237,7 @@ export default {
|
||||
},
|
||||
handleDelete() {
|
||||
this.$confirm('确定删除该方案?', '提示', { type: 'warning' }).then(() => {
|
||||
delRecipe([this.form.id]).then(() => {
|
||||
delRecipe([this.form.recipeId]).then(() => {
|
||||
this.$message.success('删除成功')
|
||||
this.form = emptyForm(); this.passList = []
|
||||
this.selectedId = null; this.isNew = false
|
||||
|
||||
370
ruoyi-ui/src/views/mill/stoppage.vue
Normal file
370
ruoyi-ui/src/views/mill/stoppage.vue
Normal file
@@ -0,0 +1,370 @@
|
||||
<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="coilId">
|
||||
<el-input
|
||||
v-model="queryParams.coilId"
|
||||
placeholder="请输入钢卷号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="班次" prop="shift">
|
||||
<el-input
|
||||
v-model="queryParams.shift"
|
||||
placeholder="请输入班次"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="班组" prop="crew">
|
||||
<el-input
|
||||
v-model="queryParams.crew"
|
||||
placeholder="请输入班组"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="区域" prop="area">
|
||||
<el-input
|
||||
v-model="queryParams.area"
|
||||
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>
|
||||
<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="['mill:stop: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="['mill:stop: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="['mill:stop: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="['mill:stop:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="stopList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="钢卷号" align="center" prop="coilId" />
|
||||
<el-table-column label="班次" align="center" prop="shift" />
|
||||
<el-table-column label="班组" align="center" prop="crew" />
|
||||
<el-table-column label="区域" align="center" prop="area" />
|
||||
<el-table-column label="机组" align="center" prop="unit" />
|
||||
<el-table-column label="设置人" align="center" prop="setOn" />
|
||||
<el-table-column label="停机开始时间" align="center" prop="startDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.startDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="停机结束时间" align="center" prop="endDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="停机时长" align="center" prop="duration" />
|
||||
<el-table-column label="录入时间" align="center" prop="insDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.insDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="停机类型" align="center" prop="stopType" /> -->
|
||||
<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="['mill:stop:edit']"
|
||||
>修正</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['mill:stop: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="coilId">
|
||||
<el-input v-model="form.coilId" placeholder="请输入钢卷号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="班次" prop="shift">
|
||||
<el-input v-model="form.shift" placeholder="请输入班次" />
|
||||
</el-form-item>
|
||||
<el-form-item label="班组" prop="crew">
|
||||
<el-input v-model="form.crew" placeholder="请输入班组" />
|
||||
</el-form-item>
|
||||
<el-form-item label="区域" prop="area">
|
||||
<el-input v-model="form.area" 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="setOn">
|
||||
<el-input v-model="form.setOn" placeholder="请输入设置人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="停机开始时间" prop="startDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.startDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择停机开始时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="停机结束时间" prop="endDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.endDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择停机结束时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="停机时长" prop="duration">
|
||||
<el-input v-model="form.duration" placeholder="请输入停机时长" />
|
||||
</el-form-item>
|
||||
<el-form-item label="录入时间" prop="insDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.insDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择录入时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listStop, getStop, delStop, addStop, updateStop } from "@/api/mill/stop";
|
||||
|
||||
export default {
|
||||
name: "Stop",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 轧线生产停机表格数据
|
||||
stopList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
coilId: null,
|
||||
shift: null,
|
||||
crew: null,
|
||||
area: null,
|
||||
unit: null,
|
||||
setOn: null,
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
duration: null,
|
||||
insDate: null,
|
||||
stopType: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询轧线生产停机列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listStop(this.queryParams).then(response => {
|
||||
this.stopList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
stopId: null,
|
||||
coilId: null,
|
||||
shift: null,
|
||||
crew: null,
|
||||
area: null,
|
||||
unit: null,
|
||||
setOn: null,
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
duration: null,
|
||||
insDate: null,
|
||||
stopType: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
remark: 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.stopId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加轧线生产停机";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const stopId = row.stopId || this.ids
|
||||
getStop(stopId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改轧线生产停机";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.stopId != null) {
|
||||
updateStop(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addStop(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const stopIds = row.stopId || this.ids;
|
||||
this.$modal.confirm('是否确认删除轧线生产停机编号为"' + stopIds + '"的数据项?').then(function() {
|
||||
return delStop(stopIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('mill/stop/export', {
|
||||
...this.queryParams
|
||||
}, `stop_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -36,7 +36,7 @@ module.exports = {
|
||||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
target: `http://localhost:8080`,
|
||||
target: `http://localhost:8090`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
|
||||
Reference in New Issue
Block a user