From 157ddaf4e6f1f57edbd1d6ade4d93ea14d8da6e7 Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期一, 29 七月 2024 14:23:33 +0800
Subject: [PATCH] 大理片笼新增钢化开关,仓储中心、报工管理样式,中英文
---
UI-Project/src/views/GlassStorage/MaterialRackManagement.vue | 176 ++++++----------------------------------------------------
1 files changed, 20 insertions(+), 156 deletions(-)
diff --git a/UI-Project/src/views/GlassStorage/MaterialRackManagement.vue b/UI-Project/src/views/GlassStorage/MaterialRackManagement.vue
index 0f132b5..089c05b 100644
--- a/UI-Project/src/views/GlassStorage/MaterialRackManagement.vue
+++ b/UI-Project/src/views/GlassStorage/MaterialRackManagement.vue
@@ -1,38 +1,31 @@
<template>
- <div class="app-container">
- <el-card style="flex: 1; margin-left: 10px; " :loading="loading">
+ <div class="app-container" style="height: 600px;">
+ <!-- <el-card style="flex: 1; margin-left: 10px; " :loading="loading"> -->
<div slot="header" class="clearfix" style="display: flex; align-items: center;">
-
<!-- 宸︿晶鎸夐挳缁� -->
<div >
- <el-button type="success" size="mini" @click="storage()">鍘熺墖浠撳偍璇︽儏</el-button>
+ <el-button type="success" size="mini" style="margin-left: 10px;" @click="storage()">鍘熺墖浠撳偍璇︽儏</el-button>
<el-button type="success" size="mini" @click="handleInbound()">鍏ュ簱</el-button>
<el-button type="success" size="mini" >鍚婅浣嶅叆搴�</el-button>
-
</div>
-
<!-- 鍙充晶閫夋嫨妗� -->
-<el-form-item style="margin-top: 15px; width: 150px;">
+<el-form-item style="margin-top: 15px; width: 150px;margin-left: 10px;">
<el-select v-model="formData2.dzw" placeholder="璇烽�夋嫨鍚婅浣�">
<el-option label="鍚婅浣�1" value="鍚婅浣�1"></el-option>
<el-option label="鍚婅浣�2" value="鍚婅浣�2"></el-option>
<!-- 鏍规嵁瀹為檯鎯呭喌娣诲姞鏇村閫夐」 -->
</el-select>
</el-form-item>
-
</div>
<el-dialog v-model="Hidden" top="10vh" width="80%" >
<el-table
:data="tableData" v-model="dialogVisible3"
-
style="width: 98%; height: 200px"
@selection-change="handleSelectionChange"
:header-cell-style="{ background: '#F2F3F5', color: '#1D2129' }"
ref="table"
-
empty-text="No Data"
>
-
<el-table-column prop="location" label="搴撲綅鍙�"></el-table-column>
<el-table-column prop="type" label="绫诲瀷"></el-table-column>
<el-table-column prop="length" label="闀垮害(mm)"></el-table-column>
@@ -41,20 +34,18 @@
<el-table-column prop="quantity" label="鏁伴噺"></el-table-column>
<el-table-column prop="entry_time" label="鍏ュ簱鏃堕棿"></el-table-column>
<el-table-column prop="batchnumber" label="鎵规鍙�"></el-table-column>
-
<el-table-column
- align="center"
- label="鏂欐灦鐘舵��"
- min-width="80"
- prop="shelf_status"
->
-<template #default="scope">
+ align="center"
+ label="鏂欐灦鐘舵��"
+ min-width="80"
+ prop="shelf_status"
+ >
+ <template #default="scope">
<el-tag :type="getTagType(scope.row.shelf_status)" @click="toggleStatus(scope.row)">
{{ scope.row.shelf_status === 1 ? '鍚敤' : '鏈惎鐢�' }}
</el-tag>
</template>
-</el-table-column>
-
+ </el-table-column>
<!-- 鎿嶄綔鍒� -->
<el-table-column label="鎿嶄綔" width="250">
<template #default="{ row }">
@@ -64,8 +55,6 @@
<!-- <el-button type="success" size="mini" @click="addglass()">娣诲姞鍘熺墖</el-button> -->
</template>
</el-table-column>
-
-
</el-table>
<el-pagination
v-if="totalItems > 0"
@@ -75,25 +64,20 @@
:page-size="pageSize"
@current-change="handleCurrentChange"
></el-pagination>
-
-
</el-dialog>
-
-
+ <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;" v-loading="loading">
+ <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
<el-table
:data="tasktableData"
- style="width: 98%; height: 150px"
+ height="240"
@selection-change="handleSelectionChange"
:header-cell-style="{ background: '#F2F3F5', color: '#1D2129' }"
ref="table"
empty-text="No Data"
>
-
-
<template #header>
<div style="display: flex; align-items: center;">
<span style="font-size: 16px; font-weight: bold; margin-right: 20px;">浠诲姟鍒楄〃</span>
-
</div>
</template>
<el-table-column prop="Glassid" label="Glassid"></el-table-column>
@@ -101,7 +85,6 @@
<el-table-column prop="glassThickness" label="鐜荤拑鍘氬害"></el-table-column>
<el-table-column prop="glassFilm" label="鐜荤拑鑶滅郴"></el-table-column>
<el-table-column prop="creationTime" label="鍒涘缓鏃堕棿"></el-table-column>
-
<el-table-column
align="center"
label="浠诲姟鐘舵��"
@@ -114,7 +97,6 @@
</el-tag>
</template>
</el-table-column>
-
<!-- 鎿嶄綔鍒� -->
<el-table-column label="鎿嶄綔" width="350">
<template #default="{ row }">
@@ -124,21 +106,14 @@
</template>
</el-table-column>
</el-table>
- </el-card>
-
-
-
-
-
+ </div>
+ </el-card>
+ <!-- </el-card> -->
<div class="img-ypcc" >
-
-
<div class="img-car1" :style="'z-index:999;left:397px;top:205px;position:absolute;'">
<div v-show="cellshow1" style="margin-top:10px;width:200px;height:5px;background-color:#409EFF;"></div>
</div>
-
</div>
-
<!-- 鍏ュ簱瀵硅瘽妗� -->
<el-dialog
title="鍏ュ簱"
@@ -174,14 +149,11 @@
<el-input v-model.number="formData.quantity" placeholder="璇疯緭鍏ユ暟閲�"></el-input>
</el-form-item>
</el-form>
-
<div slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">鍙� 娑�</el-button>
<el-button type="primary" @click="handleConfirmInbound">纭� 瀹�</el-button>
</div>
</el-dialog>
-
-
<el-dialog title="娣诲姞鍘熺墖" v-model="dialogVisible3" width="50%">
<el-form :model="formData3" ref="form" label-width="80px">
<el-form-item label="棰滆壊鑶滅郴">
@@ -197,30 +169,24 @@
</el-dropdown-menu>
</el-dropdown>
</el-form-item>
-
<el-form-item label="闀垮害">
<el-input v-model="formData.width" required style="width: 250px; font-size: 20px" @focus="clearInput('wid')"></el-input>
</el-form-item>
-
<el-form-item label="楂樺害">
<el-input v-model="formData.height" required style="width: 250px; font-size: 20px" @focus="clearInput('heig')"></el-input>
</el-form-item>
-
<el-form-item label="鍘氬害">
<el-input v-model="formData.thickness" required style="width: 250px; font-size: 20px" @focus="clearInput('thinkness')"></el-input>
</el-form-item>
-
<el-form-item label="鏁伴噺">
<el-input-number v-model="formData.quantity" required :min="0" :max="9000" style="width: 250px; font-size: 20px" @focus="clearInput('num')"></el-input-number>
</el-form-item>
</el-form>
-
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible3 = false">鍏抽棴</el-button>
<el-button type="primary" @click="submitForm">鎻愪氦</el-button>
</span>
</el-dialog>
-
<el-dialog title="缂栬緫" v-model="editdialogVisible" width="30%" @close="edithandleDialogClose">
<el-form :model="editForm" ref="editFormRef" label-width="80px">
<el-form-item label="鏁伴噺">
@@ -239,44 +205,27 @@
<el-input v-model="editForm.thickness"></el-input>
</el-form-item>
</el-form>
-
<div class="dialog-footer">
<el-button @click="editdialogVisible = false">鍙栨秷</el-button>
<el-button type="primary" @click="editsaveEdit">淇濆瓨</el-button>
</div>
</el-dialog>
-
-
</div>
</template>
-
-
-
-
<script setup>
import { ref, onMounted, onBeforeUnmount } from 'vue'; // 瀵煎叆 Vue 3 鐨勬ā鍧�
import * as echarts from 'echarts';
import { ElMessage, ElMessageBox } from 'element-plus'
import {tableData} from '@/stores/tableData.js';
-
-
-
const loading = ref(false);
-
-
const Hidden = ref(false)
-
-
const totalItems = ref(0);
totalItems.value = 10;
const pageSize = 10;
let currentPage = ref(1);
const handleCurrentChange = (val) => {
-
currentPage.value = val;
-
};
-
const getTagType2 =(status) => {
switch (status) {
case 'completed':
@@ -291,20 +240,16 @@
return '';
}
}
-
const getTagType =(status) => {
return status === 1 ? 'success' : 'danger';
// 鏍规嵁鐘舵�佸�煎喅瀹氭爣绛剧被鍨嬶紝杩欓噷鍋囪鐘舵�佷负1鏃朵负鎴愬姛锛堢豢鑹诧級锛屽惁鍒欎负澶辫触锛堢孩鑹诧級
}
-
const toggleStatus = (row) => {
// 鍒囨崲鏂欐灦鐘舵�佺殑閫昏緫
row.shelf_status = 1 - row.shelf_status; // Toggle between 0 and 1
// 姝ゅ鍙互娣诲姞淇濆瓨鐘舵�佺殑閫昏緫锛屾瘮濡傝皟鐢� API 鏇存柊鏁版嵁
};
-
const tasktableData=ref([
-
{
Glassid: 'G001',
taskDescription: '浠庡悐瑁呬綅銆�99銆戝埌浠撲綅銆�56銆�',
@@ -322,7 +267,6 @@
creationTime: '2024-06-19 11:00:00'
}
]);
-
const dialogVisible = ref(false);
const formData = ref({
shelf: '',
@@ -332,13 +276,9 @@
thickness: '',
quantity: ''
});
-
const formData2 = ref({
dzw: '',
-
});
-
-
const handleDelete = (row) => {
// 浣跨敤 Element UI 鐨� MessageBox.confirm 鏂规硶杩涜浜屾纭
ElMessageBox.confirm('纭畾瑕佹墽琛屽垹闄ゆ搷浣滃悧锛�', '纭鍒犻櫎', {
@@ -353,8 +293,6 @@
console.log('鍙栨秷鍒犻櫎鎿嶄綔');
});
};
-
-
const handleCheckout = (row) => {
// 浣跨敤 Element UI 鐨� MessageBox.confirm 鏂规硶杩涜浜屾纭
ElMessageBox.confirm('纭畾瑕佹墽琛屽嚭搴撴搷浣滃悧锛�', '纭鍑哄簱', {
@@ -369,19 +307,14 @@
console.log('鍙栨秷鍑哄簱鎿嶄綔');
});
};
-
-
const handleInbound = () => {
// 鎵撳紑鍏ュ簱瀵硅瘽妗�
dialogVisible.value = true;
};
-
const storage = () => {
// 鎵撳紑鍏ュ簱瀵硅瘽妗�
Hidden.value = true;
};
-
-
const handleCloseDialog = () => {
// 鍏抽棴瀵硅瘽妗嗘椂閲嶇疆琛ㄥ崟鏁版嵁
formData.value = {
@@ -394,18 +327,12 @@
};
dialogVisible.value = false;
};
-
const handleConfirmInbound = () => {
// 澶勭悊纭鍏ュ簱閫昏緫锛屽彲浠ュ湪杩欓噷鎻愪氦琛ㄥ崟鎴栬�呮墽琛屽叾浠栨搷浣�
console.log('Confirm Inbound:', formData.value);
// 鍏抽棴瀵硅瘽妗�
dialogVisible.value = false;
};
-
-
-
-
-
const dialogVisible3 = ref(false);
const colors = ref([
{ '0_glass_id': 'Red' },
@@ -413,7 +340,6 @@
{ '0_glass_id': 'Blue' }
// Add more colors as needed
]);
-
const formData3 = ref({
selectedColor: '',
wid: '',
@@ -421,8 +347,6 @@
thinkness: '',
num: ''
});
-
-
const addglass = () => {
// 鎵撳紑鍏ュ簱瀵硅瘽妗�
dialogVisible3.value = true;
@@ -430,20 +354,14 @@
const handleCommand = (command) => {
formData.value.selectedColor = command;
};
-
const clearInput = (field) => {
formData.value[field] = '';
};
-
const submitForm = () => {
console.log('鎻愪氦鏁版嵁:', formData.value);
dialogVisible3.value = false;
// Add your submit logic here
};
-
-
-
-
const editdialogVisible = ref(false);
const editForm = ref({
quantity: '',
@@ -454,7 +372,6 @@
});
const editFormRef = ref(null);
let currentRow = ref(null);
-
// 澶勭悊琛岀偣鍑讳簨浠�
const edithandleRowClick = (row) => {
currentRow.value = row;
@@ -467,19 +384,15 @@
editdialogVisible.value = true;
console.log(editForm.value)
};
-
// 娣诲姞淇濆瓨缂栬緫鍐呭
const editsaveEdit = () => {
if (!currentRow.value) return;
-
// 鏇存柊褰撳墠琛屾暟鎹�
currentRow.value.quantity = parseInt(editForm.value.quantity);
currentRow.value.batchnumber = editForm.value.batchnumber;
-
// 鍏抽棴瀵硅瘽妗�
editdialogVisible.value = false;
};
-
// 瀵硅瘽妗嗗叧闂椂閲嶇疆缂栬緫琛ㄥ崟鍜屽綋鍓嶈鏁版嵁
const edithandleDialogClose = () => {
editForm.value.quantity = '';
@@ -487,18 +400,8 @@
editForm.value.width = '';
editForm.value.height = '';
editForm.value.thickness = '';
-
-
currentRow.value = null;
};
-
-
-
-
-
-
-
-
const handleRestart = (row) => {
// 浣跨敤 Element UI 鐨� MessageBox.confirm 鏂规硶杩涜浜屾纭
ElMessageBox.confirm('纭畾瑕佹墽琛岄噸鏂板紑濮嬫搷浣滃悧锛�', '纭閲嶆柊寮�濮�', {
@@ -513,8 +416,6 @@
console.log('鍙栨秷閲嶆柊寮�濮嬫搷浣�');
});
};
-
-
const handleDeletetask = (row) => {
// 浣跨敤 Element UI 鐨� MessageBox.confirm 鏂规硶杩涜浜屾纭
ElMessageBox.confirm('纭畾瑕佹墽琛屽垹闄や换鍔℃搷浣滃悧锛�', '纭鍒犻櫎浠诲姟', {
@@ -529,9 +430,6 @@
console.log('鍙栨秷鍒犻櫎浠诲姟鎿嶄綔');
});
};
-
-
-
const handleComplete = (row) => {
// 浣跨敤 Element UI 鐨� MessageBox.confirm 鏂规硶杩涜浜屾纭
ElMessageBox.confirm('纭畾瑕佹墽琛屼换鍔″畬鎴愭搷浣滃悧锛�', '纭浠诲姟瀹屾垚', {
@@ -546,48 +444,16 @@
console.log('鍙栨秷浠诲姟瀹屾垚鎿嶄綔');
});
};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
</script>
-
<style scoped>
-
-
#dt { display:block; float:left;line-height: 20px;margin-left: 100px;}
#dta { display:block; float:left;line-height: 20px;margin-left: 80%;}
#dialog-footer{
text-align: center;
margin-top: -15px;
}
-
-
-
.img-ypcc{
- margin-left: 80px;
+ margin-left: -40px;
background-image:url('../../assets/ypcc.png');
background-repeat: no-repeat;
background-attachment: local;
@@ -597,9 +463,8 @@
background-size: 1400px 600px;
overflow: hidden;
position:relative;
- margin-top:0px
+ margin-top: -30px
}
-
.img-car1{
background-image:url('../../assets/ypccche.png');
position: absolute;
@@ -612,9 +477,8 @@
overflow: hidden;
position:relative
}
-
.custom-dialog {
max-height: 90vh; /* 鏈�澶ч珮搴︿负瑙嗗彛楂樺害鐨�90% */
overflow-y: auto; /* 瀵硅瘽妗嗗唴閮ㄥ嚭鐜板瀭鐩存粴鍔ㄦ潯 */
}
-</style>
+</style>
\ No newline at end of file
--
Gitblit v1.8.0