中航光电热表web
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

644 lines
26 KiB

<template>
6 months ago
<basic-container>
<!-- 添加量填报 -->
<avue-crud :option="option" :table-loading="loading" :data="data" v-model="form" v-model:page="page" ref="crud"
@row-update="rowUpdate" @row-save="rowSave" @search-change="searchChange" @search-reset="searchReset"
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
@refresh-change="refreshChange" @on-load="onLoad">
<template #menu-left>
<el-button type="primary" @click="handleAdd">新增</el-button>
6 months ago
</template>
<template #menu="scope">
<el-button type="text" @click="editRow(scope.row)">修改</el-button>
<el-button type="text" @click="deleteRow(scope.row)">删除</el-button>
</template>
</avue-crud>
<el-dialog :title="title" append-to-body v-model="showDialog" width="80%">
<div style="margin-bottom: 10px;">
<el-button type="primary" icon="el-icon-plus" @click="insertEvent()">插入一行</el-button>
<el-button plain type="danger" @click="remove">删除选择行</el-button>
<el-button type="primary" @click="handleSave">保存</el-button>
</div>
<el-table :data="tableData" @select="selectChange">
<el-table-column type="selection"></el-table-column>
<el-table-column align="center" label="作业中心" prop="bsWorkCenter.wcId">
<template #default="scope">
<el-select v-model="scope.row.bsWorkCenter.wcId">
<el-option v-for="item in wcData" :key="item.wcId" :value="item.wcId"
:label="item.wcName"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column align="center" label="槽号槽名" prop="batchNo">
<template #default="scope">
<!-- <el-input v-model="scope.row.batchNo"></el-input> -->
<el-select v-model="scope.row.batchNo">
<el-option label="#21" value="1"></el-option>
<el-option label="11" value="11"></el-option>
<el-option label="1234" value="1234"></el-option>
<el-option label="123" value="123"></el-option>
<el-option label="#22" value="3"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column align="center" label="添加量" prop="addValue">
<template #default="scope">
<el-input v-model="scope.row.addValue"></el-input>
</template>
</el-table-column>
<el-table-column align="center" label="添加日期" prop="addTime">
<template #default="scope">
<el-date-picker v-model="scope.row.addTime" type="datetime" placeholder="选择日期时间">
</el-date-picker>
</template>
</el-table-column>
</el-table>
</el-dialog>
</basic-container>
</template>
<script>
export default {
data() {
return {
query: {},
loading: false,
title: '新增',
tableData: [],
showDialog: false,
data: [],
form: {},
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
wcData: [
{
"area": 13000.0,
"batchNo": null,
"bigBatch": false,
"checkout": false,
"craftAbility": "化学镀镍",
"createTime": "2023-02-06 12:31:36",
"deleted": false,
"describe": null,
"endPoint": null,
"keyValue": 81,
"limitType": 0,
"processes": "上挂、下挂、交检、化学镀镍、喷砂",
"quantity": null,
"roundCycle": null,
"saturation": 85.0,
"sign": "4",
"startPoint": null,
"team": "化学镀镍一班崔胜伟、化学镀镍一班郭家梁",
"updateTime": "2023-03-06 18:42:47",
"wcCode": "001",
"wcId": 81,
"wcName": "化学镀镍作业中心",
"whetherPlate": false
},
{
"area": 0.0,
"batchNo": null,
"bigBatch": false,
"checkout": false,
"craftAbility": "镀后接收",
"createTime": "2023-02-06 12:48:41",
"deleted": false,
"describe": null,
"endPoint": null,
"keyValue": 85,
"limitType": 0,
"processes": "镀后接收",
"quantity": null,
"roundCycle": null,
"saturation": null,
"sign": "4",
"startPoint": null,
"team": "零件管理班",
"updateTime": "2023-03-06 18:23:20",
"wcCode": "004",
"wcId": 85,
"wcName": "镀后库作业中心",
"whetherPlate": true
},
{
"area": 0.0,
"batchNo": null,
"bigBatch": false,
"checkout": true,
"craftAbility": "镀后检验",
"createTime": "2023-02-06 12:49:33",
"deleted": false,
"describe": null,
"endPoint": null,
"keyValue": 86,
"limitType": 0,
"processes": "镀后检验、性能检测、镀后自检外观检验、镀后自检尺寸检验",
"quantity": null,
"roundCycle": null,
"saturation": null,
"sign": "4",
"startPoint": null,
"team": "检验班",
"updateTime": "2023-06-06 15:07:27",
"wcCode": "005",
"wcId": 86,
"wcName": "检验作业中心",
"whetherPlate": false
},
{
"area": 20000.0,
"batchNo": null,
"bigBatch": false,
"checkout": false,
"craftAbility": "涂色标、清洗",
"createTime": "2023-02-07 10:30:14",
"deleted": false,
"describe": null,
"endPoint": null,
"keyValue": 87,
"limitType": 0,
"processes": "涂色标、涂色标(带)",
"quantity": null,
"roundCycle": null,
"saturation": 90.0,
"sign": "4",
"startPoint": null,
"team": "涂色标班组",
"updateTime": "2023-03-06 18:16:54",
"wcCode": "006",
"wcId": 87,
"wcName": "涂色标作业中心",
"whetherPlate": false
}
],
option: {
height: 'auto',
calcHeight: 32,
rowKey: 'keyValue',
tip: false,
size: 'medium',
simplePage: true,
searchShow: true,
searchMenuSpan: 6,
searchIcon: true,
searchIndex: 3,
tree: false,
border: true,
index: true,
selection: false,
viewBtn: false,
delBtn: false,
addBtn: false,
editBtn: false,
editBtnText: '修改',
addBtnIcon: ' ',
6 months ago
viewBtnIcon: ' ',
delBtnIcon: ' ',
editBtnIcon: ' ',
viewBtnText: '详情',
labelWidth: 120,
searchLabelWidth: 120,
menu: true,
menuWidth: 140,
6 months ago
dialogWidth: 1200,
dialogClickModal: false,
searchEnter: true,
excelBtn: false,
filterBtn: true,
searchShowBtn: false,
columnSort: true,
excelBtn: true,
columnSort: true,
showOverflowTooltip: true,
menuAlign: 'left',
gridBtn:false,
searchLabelPosition: 'left',
searchGutter: 24,
searchSpan: 6,
searchMenuPosition:'right',
6 months ago
align: 'center',
6 months ago
column: [
{
label: '作业中心',
prop: 'wcName',
type: 'select',
bind: 'bsWorkCenter.wcName',
search: true,
sortable: true,
overHidden: true,
headerAlign: 'center',
align: 'left',
searchLabelWidth: 80,
6 months ago
rules: [
{
required: true,
message: '请输入作业中心',
trigger: 'blur',
},
],
props: {
label: 'wcName',
value: 'wcId'
},
dicData: [
{
"area": 13000.0,
"batchNo": null,
"bigBatch": false,
"checkout": false,
"craftAbility": "化学镀镍",
"createTime": "2023-02-06 12:31:36",
"deleted": false,
"describe": null,
"endPoint": null,
"keyValue": 81,
"limitType": 0,
"processes": "上挂、下挂、交检、化学镀镍、喷砂",
"quantity": null,
"roundCycle": null,
"saturation": 85.0,
"sign": "4",
"startPoint": null,
"team": "化学镀镍一班崔胜伟、化学镀镍一班郭家梁",
"updateTime": "2023-03-06 18:42:47",
"wcCode": "001",
"wcId": 81,
"wcName": "化学镀镍作业中心",
"whetherPlate": false
},
{
"area": 0.0,
"batchNo": null,
"bigBatch": false,
"checkout": false,
"craftAbility": "镀后接收",
"createTime": "2023-02-06 12:48:41",
"deleted": false,
"describe": null,
"endPoint": null,
"keyValue": 85,
"limitType": 0,
"processes": "镀后接收",
"quantity": null,
"roundCycle": null,
"saturation": null,
"sign": "4",
"startPoint": null,
"team": "零件管理班",
"updateTime": "2023-03-06 18:23:20",
"wcCode": "004",
"wcId": 85,
"wcName": "镀后库作业中心",
"whetherPlate": true
},
]
},
{
label: '作业槽',
6 months ago
prop: 'batchNo',
search: true,
sortable: true,
overHidden: true,
type: 'select',
headerAlign: 'center',
align: 'center',
searchLabelWidth: 80,
6 months ago
rules: [
{
required: true,
message: '请输入作业槽',
6 months ago
trigger: 'blur',
},
],
dicData: [
{ label: "#21", value: '1' },
{ label: "11", value: '11' },
{ label: "#22", value: '3' },
]
},
{
label: '维护内容',
prop: 'preserveContent',
search: false,
6 months ago
hide: true,
sortable: true,
overHidden: true,
headerAlign: 'center',
align: 'left',
searchLabelWidth: 80,
6 months ago
rules: [
{
required: true,
message: '请输入维护内容',
trigger: 'blur',
},
],
},
{
label: '添加量',
prop: 'addValue',
search: false,
sortable: true,
overHidden: true,
headerAlign: 'center',
align: 'center',
6 months ago
rules: [
{
required: true,
message: '请输入添加量',
trigger: 'blur',
},
],
},
{
label: '添加时间',
prop: 'addTime',
search: true,
6 months ago
sortable: true,
overHidden: true,
headerAlign: 'center',
align: 'center',
type:'date',
searchRange:true,
startPlaceholder:'开始时间',
endPlaceholder:"结束时间",
6 months ago
rules: [
{
required: true,
message: '请输入添加时间',
trigger: 'blur',
},
],
},
]
}
}
},
mounted() {
},
methods: {
handleAdd() {
this.title = '新增'
this.tableData = []
this.showDialog = true
},
editRow(row) {
this.tableData = []
this.tableData.push(row)
this.title = '修改'
this.showDialog = true
},
deleteRow(row) {
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => { })
},
insertEvent() {
const record = { bsWorkCenter: { wcId: '' }, _select: false }
this.tableData.push(record)
},
selectChange(list, row) {
row._select = !row._select
},
//删除所选行
remove() {
let arr = this.tableData.filter(item => item._select)
if (arr.length != 0) {
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
if (this.rowId) {
let deleteData = this.tableData.filter(item => item._select)
this.deleteProcessArr = deleteData.filter(item => item.tidId)
}
let deleteArr = this.tableData.filter(item => !item._select)
this.tableData = deleteArr
})
} else {
this.$message.error('请至少选择一条数据进行操作!')
}
},
handleSave() {
this.showDialog = false
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
// this.query = params;
// this.page.currentPage = 1;
// this.onLoad(this.page, params);
done();
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad() {
this.data = [
{
"addTime": "2024-03-05 13:54:40",
"addValue": 11.0,
"batchNo": "1234",
"bsWorkCenter": {
"area": 20000.0,
"batchNo": null,
"bigBatch": false,
"bsJfCenter": {
"createMan": {
"userId": 1,
"userName": "admin"
},
"createTime": "2024-12-09 00:00:00",
"deleted": false,
"jcCode": "RBZX",
"jcId": 1,
"jcName": "热表中心",
"keyValue": 1,
"updateTime": "2024-12-09 00:00:00"
},
"checkout": false,
"craftAbility": "涂色标、清洗",
"createMan": {
"userId": 1,
"userName": "admin"
},
"createTime": "2023-02-07 10:30:14",
"deleted": false,
"describe": null,
"endPoint": null,
"keyValue": 87,
"leaderUser": {
"userId": 541,
"userName": "崔殿龙"
},
"limitType": 0,
"processes": "涂色标、涂色标(带)",
"quantity": null,
"roundCycle": null,
"saturation": 90.0,
"sign": "4",
"startPoint": null,
"team": "涂色标班组",
"updateTime": "2023-03-06 18:16:54",
"wcCode": "006",
"wcId": 87,
"wcName": "涂色标作业中心",
"whetherPlate": false
},
"keepMan": {
"userId": 541,
"userName": "崔殿龙"
},
"keepTime": "2024-03-05 13:55:47",
"keyValue": 7,
"msaqId": 7,
"msaqType": 1,
"voided": false
},
{
"addTime": "2024-03-05 13:54:40",
"addValue": 22.0,
"batchNo": "123",
"bsWorkCenter": {
"area": 0.0,
"batchNo": null,
"bigBatch": false,
"bsJfCenter": {
"createMan": {
"userId": 1,
"userName": "admin"
},
"createTime": "2024-12-09 00:00:00",
"deleted": false,
"jcCode": "RBZX",
"jcId": 1,
"jcName": "热表中心",
"keyValue": 1,
"updateTime": "2024-12-09 00:00:00"
},
"checkout": true,
"craftAbility": "镀后检验",
"createMan": {
"userId": 1,
"userName": "admin"
},
"createTime": "2023-02-06 12:49:33",
"deleted": false,
"describe": null,
"endPoint": null,
"keyValue": 86,
"leaderUser": {
"userId": 541,
"userName": "崔殿龙"
},
"limitType": 0,
"processes": "镀后检验、性能检测、镀后自检外观检验、镀后自检尺寸检验",
"quantity": null,
"roundCycle": null,
"saturation": null,
"sign": "4",
"startPoint": null,
"team": "检验班",
"updateTime": "2023-06-06 15:07:27",
"wcCode": "005",
"wcId": 86,
"wcName": "检验作业中心",
"whetherPlate": false
},
"keepMan": {
"userId": 541,
"userName": "崔殿龙"
},
"keepTime": "2024-03-05 13:54:40",
"keyValue": 6,
"msaqId": 6,
"msaqType": 1,
"voided": false
},
{
"addTime": "2024-03-06 03:03:03",
"addValue": 22.0,
"batchNo": "11",
"bsWorkCenter": {
"area": 13000.0,
"batchNo": null,
"bigBatch": false,
"bsJfCenter": {
"createMan": {
"userId": 1,
"userName": "admin"
},
"createTime": "2024-12-09 00:00:00",
"deleted": false,
"jcCode": "RBZX",
"jcId": 1,
"jcName": "热表中心",
"keyValue": 1,
"updateTime": "2024-12-09 00:00:00"
},
"checkout": false,
"craftAbility": "化学镀镍",
"createMan": {
"userId": 1,
"userName": "admin"
},
"createTime": "2023-02-06 12:31:36",
"deleted": false,
"describe": null,
"endPoint": null,
"keyValue": 81,
"leaderUser": {
"userId": 541,
"userName": "崔殿龙"
},
"limitType": 0,
"processes": "上挂、下挂、交检、化学镀镍、喷砂",
"quantity": null,
"roundCycle": null,
"saturation": 85.0,
"sign": "4",
"startPoint": null,
"team": "化学镀镍一班崔胜伟、化学镀镍一班郭家梁",
"updateTime": "2023-03-06 18:42:47",
"wcCode": "001",
"wcId": 81,
"wcName": "化学镀镍作业中心",
"whetherPlate": false
},
"keepMan": {
"userId": 541,
"userName": "崔殿龙"
},
"keepTime": "2024-03-05 14:03:21",
"keyValue": 4,
"msaqId": 4,
"msaqType": 1,
"voided": false
}
]
this.page.total = this.data.length
}
}
}
</script>
<style></style>