| | |
| | | <!-- 左侧按钮组 -->
|
| | | <div >
|
| | | <el-button type="success" size="mini" @click="handleInbound()">入库</el-button>
|
| | | <el-button type="success" size="mini" @click="handleInbound()">吊装位入库</el-button>
|
| | | <el-button type="success" size="mini" >吊装位入库</el-button>
|
| | |
|
| | | </div>
|
| | |
|
| | |
| | | min-width="80"
|
| | | prop="shelf_status"
|
| | | >
|
| | | <template #default="scope">
|
| | | <el-tag :type="getTagType(scope.row.shelf_status)">
|
| | | {{ scope.row.shelf_status === 1 ? '启用' : '未启用' }}
|
| | | </el-tag>
|
| | | </template>
|
| | | <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 label="操作" width="350">
|
| | | <template #default="{ row }">
|
| | | <el-button type="primary" size="mini" @click="handleRestart(row)">重新开始</el-button>
|
| | | <el-button type="danger" size="mini" @click="handleDelete(row)">删除任务</el-button>
|
| | | <el-button type="danger" size="mini" @click="handleDeletetask(row)">删除任务</el-button>
|
| | | <el-button type="success" size="mini" @click="handleComplete(row)">任务完成</el-button>
|
| | | </template>
|
| | | </el-table-column>
|
| | |
| | | </el-dialog>
|
| | |
|
| | | <el-dialog title="编辑" v-model="editdialogVisible" width="30%" @close="edithandleDialogClose">
|
| | | <el-form :model="editForm" ref="editForm" label-width="80px">
|
| | | <el-form :model="editForm" ref="editFormRef" label-width="80px">
|
| | | <el-form-item label="数量">
|
| | | <el-input v-model="editForm.quantity"></el-input>
|
| | | </el-form-item>
|
| | |
| | | </el-form-item>
|
| | | </el-form>
|
| | |
|
| | | <div slot="footer" class="dialog-footer">
|
| | | <div class="dialog-footer">
|
| | | <el-button @click="editdialogVisible = false">取消</el-button>
|
| | | <el-button type="primary" @click="editsaveEdit">保存</el-button>
|
| | | </div>
|
| | |
| | | <script setup>
|
| | | import { ref, onMounted, onBeforeUnmount } from 'vue'; // 导入 Vue 3 的模块
|
| | | import * as echarts from 'echarts';
|
| | | import { ElMessage, ElMessageBox } from 'element-plus'
|
| | |
|
| | |
|
| | | const loading = ref(false);
|
| | |
| | | height: '50',
|
| | | thickness: '10',
|
| | | quantity: '5',
|
| | | entry_time: '2024-06-19',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber:"444",
|
| | | shelf_status: 1
|
| | | },
|
| | |
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-18',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber:"444",
|
| | | shelf_status: 0
|
| | | },
|
| | |
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-18',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber:"444",
|
| | | shelf_status: 1
|
| | | },
|
| | |
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-18',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber:"444",
|
| | | shelf_status: 1
|
| | | },
|
| | |
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-18',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber:"444",
|
| | | shelf_status: 1
|
| | | }
|
| | |
| | | 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([
|
| | |
|
| | |
| | | });
|
| | |
|
| | |
|
| | | const handleDelete = (row) => {
|
| | | // 使用 Element UI 的 MessageBox.confirm 方法进行二次确认
|
| | | ElMessageBox.confirm('确定要执行删除操作吗?', '确认删除', {
|
| | | confirmButtonText: '确认',
|
| | | cancelButtonText: '取消',
|
| | | type: 'warning',
|
| | | }).then(() => {
|
| | | // 点击确认按钮的回调,执行出库操作
|
| | | console.log('执行删除操作', row);
|
| | | }).catch(() => {
|
| | | // 点击取消按钮的回调,不执行任何操作
|
| | | console.log('取消删除操作');
|
| | | });
|
| | | };
|
| | |
|
| | |
|
| | | const handleCheckout = (row) => {
|
| | | // 处理出库逻辑
|
| | | console.log('Checkout:', row);
|
| | | };
|
| | | // 使用 Element UI 的 MessageBox.confirm 方法进行二次确认
|
| | | ElMessageBox.confirm('确定要执行出库操作吗?', '确认出库', {
|
| | | confirmButtonText: '确认',
|
| | | cancelButtonText: '取消',
|
| | | type: 'warning',
|
| | | }).then(() => {
|
| | | // 点击确认按钮的回调,执行出库操作
|
| | | console.log('执行出库操作', row);
|
| | | }).catch(() => {
|
| | | // 点击取消按钮的回调,不执行任何操作
|
| | | console.log('取消出库操作');
|
| | | });
|
| | | };
|
| | |
|
| | |
|
| | | const handleInbound = () => {
|
| | | // 打开入库对话框
|
| | |
| | | quantity: '',
|
| | | batchnumber: ''
|
| | | });
|
| | | const editFormRef = ref(null);
|
| | | let currentRow = ref(null);
|
| | |
|
| | | // 处理行点击事件
|
| | | const edithandleRowClick = (row) => {
|
| | | currentRow.value = row;
|
| | | editForm.value.quantity = row.quantity;
|
| | | editForm.value.quantity = row.quantity.toString();
|
| | | editForm.value.batchnumber = row.batchnumber;
|
| | | editdialogVisible.value = true;
|
| | | console.log(editForm.value)
|
| | |
| | | };
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | |
| | |
|
| | |
|
| | | const handleRestart = (row) => {
|
| | | // 使用 Element UI 的 MessageBox.confirm 方法进行二次确认
|
| | | ElMessageBox.confirm('确定要执行重新开始操作吗?', '确认重新开始', {
|
| | | confirmButtonText: '确认',
|
| | | cancelButtonText: '取消',
|
| | | type: 'warning',
|
| | | }).then(() => {
|
| | | // 点击确认按钮的回调
|
| | | console.log('执行重新开始操作', row);
|
| | | }).catch(() => {
|
| | | // 点击取消按钮的回调,不执行任何操作
|
| | | console.log('取消重新开始操作');
|
| | | });
|
| | | };
|
| | |
|
| | |
|
| | | const handleDeletetask = (row) => {
|
| | | // 使用 Element UI 的 MessageBox.confirm 方法进行二次确认
|
| | | ElMessageBox.confirm('确定要执行删除任务操作吗?', '确认删除任务', {
|
| | | confirmButtonText: '确认',
|
| | | cancelButtonText: '取消',
|
| | | type: 'warning',
|
| | | }).then(() => {
|
| | | // 点击确认按钮的回调
|
| | | console.log('执行删除任务操作', row);
|
| | | }).catch(() => {
|
| | | // 点击取消按钮的回调,不执行任何操作
|
| | | console.log('取消删除任务操作');
|
| | | });
|
| | | };
|
| | |
|
| | |
|
| | |
|
| | | const handleComplete = (row) => {
|
| | | // 使用 Element UI 的 MessageBox.confirm 方法进行二次确认
|
| | | ElMessageBox.confirm('确定要执行任务完成操作吗?', '确认任务完成', {
|
| | | confirmButtonText: '确认',
|
| | | cancelButtonText: '取消',
|
| | | type: 'warning',
|
| | | }).then(() => {
|
| | | // 点击确认按钮的回调
|
| | | console.log('执行任务完成操作', row);
|
| | | }).catch(() => {
|
| | | // 点击取消按钮的回调,不执行任何操作
|
| | | console.log('取消任务完成操作');
|
| | | });
|
| | | };
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | let chartInstance = null;
|
| | |
|
| | | onMounted(() => {
|