From 6ec7f029e13497aecdbf094e89dfbe0c27ebc7eb Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Mon, 25 Dec 2023 11:47:14 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=92=8C=E7=9B=98=E7=82=B9=E6=98=8E=E7=BB=86=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Detail/src/Detail.vue | 6 + src/views/Home/components/material.vue | 126 +++++++++++------- src/views/Home/components/produce.vue | 67 ++++------ src/views/Home/components/product.vue | 123 ++++++++++------- src/views/Home/echarts-data.ts | 14 +- .../countadjustRequestMain.data.ts | 1 + .../countadjustRequestMain/index.vue | 1 + src/views/wms/reportList/index.vue | 9 +- 8 files changed, 193 insertions(+), 154 deletions(-) diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index e9e337867..ef5164a6f 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -405,6 +405,12 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: defaultButtons.defaultFilterBtn(null) // 筛选 ] } + //盘点调整申请筛选 + if (props.fromeWhere == 'countadjustRequest') { + HeadButttondata.value = [ + defaultButtons.defaultFilterBtn(null) // 筛选 + ] + } } // 动态显示操作列按钮 diff --git a/src/views/Home/components/material.vue b/src/views/Home/components/material.vue index fd8d5a2bf..5bae1d6bf 100644 --- a/src/views/Home/components/material.vue +++ b/src/views/Home/components/material.vue @@ -148,19 +148,63 @@
高低储预警
- - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
待处理任务
- - - - - +
@@ -169,55 +213,41 @@ import * as IndexApi from '@/api/home' import { formatDate } from '@/utils/formatTime' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' -const tableData = [ - { - date: '2016-05-03', - name: 'Tom', - title: 'Tom', - text: 'No. 189, Grove St, Los Angeles' - }, - { - date: '2016-05-02', - title: 'Tom', - name: 'Tom', - text: 'No. 189, Grove St, Los Angeles' - }, - { - date: '2016-05-04', - title: 'Tom', - name: 'Tom', - text: 'No. 189, Grove St, Los Angeles' - }, - { - date: '2016-05-01', - title: 'Tom', - name: 'Tom', - text: 'No. 189, Grove St, Los Angeles' - }, - { - date: '2016-05-01', - title: 'Tom', - name: 'Tom', - text: 'No. 189, Grove St, Los Angeles' - }, - { - date: '2016-05-01', - title: 'Tom', - name: 'Tom', - text: 'No. 189, Grove St, Los Angeles' - } -] +import { set } from 'lodash-es' +import { EChartsOption } from 'echarts' +import { barOptions } from '../echarts-data' +const lineIndex = ref(0) + const materialData = ref() // 获取原料管理员数据 const getMaterialData = async () => { - IndexApi.getMaterialData().then((res) => { + await IndexApi.getMaterialData().then((res) => { materialData.value = res + getJobCharts() }) } const formatter = (type, dict) => { let str = getStrDictOptions(dict).filter((item) => type == item.value)[0].label return str } +const barOptionsData = reactive(barOptions) as EChartsOption +const getJobCharts = async () => { + set( + barOptionsData, + 'xAxis.data', + Object.keys( materialData.value.jobCount) + ) + set(barOptionsData, 'legend.data', ['待处理任务']) + set(barOptionsData, 'series', [ + { + name:'待处理任务', + data: Object.values( materialData.value.jobCount), + type: 'bar', + barMaxWidth:30 + } + ]) + lineIndex.value++ +} onMounted(async () => { await getMaterialData() }) diff --git a/src/views/Home/components/produce.vue b/src/views/Home/components/produce.vue index 8046930a2..3e8701807 100644 --- a/src/views/Home/components/produce.vue +++ b/src/views/Home/components/produce.vue @@ -156,11 +156,7 @@
待处理任务
- - - - - +
@@ -169,55 +165,40 @@ import * as IndexApi from '@/api/home' import { formatDate } from '@/utils/formatTime' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' -const tableData = [ - { - date: '2016-05-03', - name: 'Tom', - title: 'Tom', - text: 'No. 189, Grove St, Los Angeles' - }, - { - date: '2016-05-02', - title: 'Tom', - name: 'Tom', - text: 'No. 189, Grove St, Los Angeles' - }, - { - date: '2016-05-04', - title: 'Tom', - name: 'Tom', - text: 'No. 189, Grove St, Los Angeles' - }, - { - date: '2016-05-01', - title: 'Tom', - name: 'Tom', - text: 'No. 189, Grove St, Los Angeles' - }, - { - date: '2016-05-01', - title: 'Tom', - name: 'Tom', - text: 'No. 189, Grove St, Los Angeles' - }, - { - date: '2016-05-01', - title: 'Tom', - name: 'Tom', - text: 'No. 189, Grove St, Los Angeles' - } -] +import { set } from 'lodash-es' +import { EChartsOption } from 'echarts' +import { barOptions } from '../echarts-data' +const lineIndex = ref(0) const produceData = ref() // 获取生产管理员首页数据 const getProduceData = async () => { IndexApi.getProduceData().then((res) => { produceData.value = res + getJobCharts() }) } const formatter = (type, dict) => { let str = getStrDictOptions(dict).filter((item) => type == item.value)[0].label return str } +const barOptionsData = reactive(barOptions) as EChartsOption +const getJobCharts = async () => { + set( + barOptionsData, + 'xAxis.data', + Object.keys( produceData.value.jobCount) + ) + set(barOptionsData, 'legend.data', ['待处理任务']) + set(barOptionsData, 'series', [ + { + name:'待处理任务', + data: Object.values( produceData.value.jobCount), + type: 'bar', + barMaxWidth:30 + } + ]) + lineIndex.value++ +} onMounted(async () => { await getProduceData() }) diff --git a/src/views/Home/components/product.vue b/src/views/Home/components/product.vue index 560e3a990..f1d7b4353 100644 --- a/src/views/Home/components/product.vue +++ b/src/views/Home/components/product.vue @@ -127,19 +127,63 @@
高低储预警
- - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
待处理任务
- - - - - +
@@ -148,55 +192,40 @@ import * as IndexApi from '@/api/home' import { formatDate } from '@/utils/formatTime' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' -const tableData = [ - { - date: '2016-05-03', - name: 'Tom', - title: 'Tom', - text: 'No. 189, Grove St, Los Angeles' - }, - { - date: '2016-05-02', - title: 'Tom', - name: 'Tom', - text: 'No. 189, Grove St, Los Angeles' - }, - { - date: '2016-05-04', - title: 'Tom', - name: 'Tom', - text: 'No. 189, Grove St, Los Angeles' - }, - { - date: '2016-05-01', - title: 'Tom', - name: 'Tom', - text: 'No. 189, Grove St, Los Angeles' - }, - { - date: '2016-05-01', - title: 'Tom', - name: 'Tom', - text: 'No. 189, Grove St, Los Angeles' - }, - { - date: '2016-05-01', - title: 'Tom', - name: 'Tom', - text: 'No. 189, Grove St, Los Angeles' - } -] +import { set } from 'lodash-es' +import { EChartsOption } from 'echarts' +import { barOptions } from '../echarts-data' +const lineIndex = ref(0) // 获取成品管理员首页首页数据 const productData = ref() const getProductData = async () => { IndexApi.getProductData().then((res) => { productData.value = res + getJobCharts() }) } const formatter = (type, dict) => { let str = getStrDictOptions(dict).filter((item) => type == item.value)[0].label return str } +const barOptionsData = reactive(barOptions) as EChartsOption +const getJobCharts = async () => { + set( + barOptionsData, + 'xAxis.data', + Object.keys( productData.value.jobCount) + ) + set(barOptionsData, 'legend.data', ['待处理任务']) + set(barOptionsData, 'series', [ + { + name:'待处理任务', + data: Object.values( productData.value.jobCount), + type: 'bar', + barMaxWidth:30 + } + ]) + lineIndex.value++ +} onMounted(async () => { await getProductData() }) diff --git a/src/views/Home/echarts-data.ts b/src/views/Home/echarts-data.ts index 9e6474d65..15c7b4afd 100644 --- a/src/views/Home/echarts-data.ts +++ b/src/views/Home/echarts-data.ts @@ -96,7 +96,7 @@ export const pieOptions: EChartsOption = { export const barOptions: EChartsOption = { title: { - text: t('analysis.weeklyUserActivity'), + text: '', left: 'center' }, tooltip: { @@ -112,15 +112,7 @@ export const barOptions: EChartsOption = { }, xAxis: { type: 'category', - data: [ - t('analysis.monday'), - t('analysis.tuesday'), - t('analysis.wednesday'), - t('analysis.thursday'), - t('analysis.friday'), - t('analysis.saturday'), - t('analysis.sunday') - ], + data: [], axisTick: { alignWithLabel: true } @@ -131,7 +123,7 @@ export const barOptions: EChartsOption = { series: [ { name: t('analysis.activeQuantity'), - data: [13253, 34235, 26321, 12340, 24643, 1322, 1324], + data: [], type: 'bar' } ] diff --git a/src/views/wms/countManage/countadjust/countadjustRequestMain/countadjustRequestMain.data.ts b/src/views/wms/countManage/countadjust/countadjustRequestMain/countadjustRequestMain.data.ts index 6072b3f32..493fd7d22 100644 --- a/src/views/wms/countManage/countadjust/countadjustRequestMain/countadjustRequestMain.data.ts +++ b/src/views/wms/countManage/countadjust/countadjustRequestMain/countadjustRequestMain.data.ts @@ -658,6 +658,7 @@ export const CountadjustRequestDetail = useCrudSchemas(reactive([ field: 'action', isDetail: false, isForm: false , + isTable:false, table: { width: 150, fixed: 'right' diff --git a/src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue b/src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue index f952089db..c1b1a6dd5 100644 --- a/src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue +++ b/src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue @@ -67,6 +67,7 @@ :apiUpdate="CountadjustRequestDetailApi.updateCountadjustRequestDetail" :apiPage="CountadjustRequestDetailApi.getCountadjustRequestDetailPage" :apiDelete="CountadjustRequestDetailApi.deleteCountadjustRequestDetail" + fromeWhere="countadjustRequest" :Echo="Echo" @searchTableSuccessDetail="searchTableSuccessDetail" /> diff --git a/src/views/wms/reportList/index.vue b/src/views/wms/reportList/index.vue index ec719b6ee..e0e04bb8d 100644 --- a/src/views/wms/reportList/index.vue +++ b/src/views/wms/reportList/index.vue @@ -1,9 +1,8 @@