style:生产报表-列表添加刷新按钮

pull/1/head
黄伟杰 2 weeks ago
parent 242d933c62
commit 8eab07d761

@ -1,5 +1,10 @@
<template> <template>
<div class="baogong-info-container"> <div class="baogong-info-container">
<div class="action-bar">
<el-button @click="handleRefresh" :loading="loading">
<Icon icon="ep:refresh" class="mr-5px" /> 刷新
</el-button>
</div>
<el-table v-loading="loading" :data="baogongList" :stripe="true" :show-overflow-tooltip="true"> <el-table v-loading="loading" :data="baogongList" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="任务单编码" align="center" prop="taskCode" width="150px" /> <el-table-column label="任务单编码" align="center" prop="taskCode" width="150px" />
<el-table-column label="计划编码" align="center" prop="planCode" width="150px" /> <el-table-column label="计划编码" align="center" prop="planCode" width="150px" />
@ -82,6 +87,11 @@ watch(
{ immediate: true } { immediate: true }
) )
const handleRefresh = () => {
queryParams.pageNo = 1
getList()
}
/** 格式化日期时间 */ /** 格式化日期时间 */
const formatDateTime = (value: string | Date | null) => { const formatDateTime = (value: string | Date | null) => {
if (!value) return '-' if (!value) return '-'
@ -90,6 +100,12 @@ const formatDateTime = (value: string | Date | null) => {
</script> </script>
<style scoped> <style scoped>
.action-bar {
display: flex;
justify-content: flex-end;
margin-bottom: 12px;
}
.section-title { .section-title {
margin: 0 0 16px 0; margin: 0 0 16px 0;
font-size: 14px; font-size: 14px;

@ -1,5 +1,10 @@
<template> <template>
<div class="basic-info-container"> <div class="basic-info-container">
<div class="action-bar">
<el-button @click="handleRefresh" :loading="loading">
<Icon icon="ep:refresh" class="mr-5px" /> 刷新
</el-button>
</div>
<!-- 任务单信息 --> <!-- 任务单信息 -->
<el-table v-loading="loading" :data="taskDetailList" :stripe="true" :show-overflow-tooltip="true"> <el-table v-loading="loading" :data="taskDetailList" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="任务单编码" align="center" prop="taskCode" sortable /> <el-table-column label="任务单编码" align="center" prop="taskCode" sortable />
@ -74,6 +79,12 @@ watch(
const openProductInfo = (row: any) => { const openProductInfo = (row: any) => {
productInfoDialogRef.value?.open(row) productInfoDialogRef.value?.open(row)
} }
const handleRefresh = () => {
if (props.taskId) {
getTaskDetailList(props.taskId)
}
}
</script> </script>
<style scoped> <style scoped>
@ -83,6 +94,11 @@ const openProductInfo = (row: any) => {
gap: 20px; gap: 20px;
} }
.action-bar {
display: flex;
justify-content: flex-end;
}
.task-info-section { .task-info-section {
padding: 16px; padding: 16px;
background: #f5f7fa; background: #f5f7fa;

@ -1,5 +1,10 @@
<template> <template>
<div class="quality-info-container"> <div class="quality-info-container">
<div class="action-bar">
<el-button @click="handleRefresh" :loading="loading">
<Icon icon="ep:refresh" class="mr-5px" /> 刷新
</el-button>
</div>
<el-table v-loading="loading" :data="qualityList" :stripe="true" :show-overflow-tooltip="true"> <el-table v-loading="loading" :data="qualityList" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="质检编码" align="center" prop="code" width="150px" /> <el-table-column label="质检编码" align="center" prop="code" width="150px" />
<el-table-column label="质检名称" align="center" prop="name" width="150px" /> <el-table-column label="质检名称" align="center" prop="name" width="150px" />
@ -95,6 +100,11 @@ watch(
{ immediate: true } { immediate: true }
) )
const handleRefresh = () => {
queryParams.pageNo = 1
getList()
}
/** 格式化日期时间 */ /** 格式化日期时间 */
const formatDateTime = (value: string | Date | null) => { const formatDateTime = (value: string | Date | null) => {
if (!value) return '-' if (!value) return '-'
@ -103,6 +113,12 @@ const formatDateTime = (value: string | Date | null) => {
</script> </script>
<style scoped> <style scoped>
.action-bar {
display: flex;
justify-content: flex-end;
margin-bottom: 12px;
}
.section-title { .section-title {
margin: 0 0 16px 0; margin: 0 0 16px 0;
font-size: 14px; font-size: 14px;

@ -1,5 +1,11 @@
<template> <template>
<div class="related-plan-container"> <div class="related-plan-container">
<div class="action-bar">
<el-button @click="handleRefresh" :loading="loading">
<Icon icon="ep:refresh" class="mr-5px" /> 刷新
</el-button>
</div>
<!-- 加载中状态 --> <!-- 加载中状态 -->
<div v-if="loading" class="loading-wrapper"> <div v-if="loading" class="loading-wrapper">
<el-skeleton :rows="3" animated /> <el-skeleton :rows="3" animated />
@ -83,10 +89,21 @@ watch(
}, },
{ immediate: true } { immediate: true }
) )
const handleRefresh = () => {
queryParams.pageNo = 1
getList()
}
</script> </script>
<style scoped> <style scoped>
.action-bar {
display: flex;
justify-content: flex-end;
margin-bottom: 12px;
}
.section-title { .section-title {
margin: 0 0 16px 0; margin: 0 0 16px 0;
font-size: 14px; font-size: 14px;

Loading…
Cancel
Save