| | |
| | | import { exportExcell } from '@/utils/utils'; |
| | | import { PageContainer, ProTable } from '@ant-design/pro-components'; |
| | | import { Button, message, Modal, Select, Space, Upload } from 'antd'; |
| | | import moment from 'moment'; |
| | | import { useEffect, useRef, useState } from 'react'; |
| | | import Detail from './components/detail'; |
| | | import Expenses from './components/expenses'; |
| | |
| | | getWarehouseList, |
| | | update, |
| | | } from './service'; |
| | | |
| | | const formatDate = (value) => (value ? moment(value).format('YYYY-MM-DD') : '-'); |
| | | |
| | | const Role = () => { |
| | | const actionRef = useRef(); |
| | | const addViewRef = useRef(); |
| | |
| | | title: '流水号', |
| | | dataIndex: 'serialNumber', |
| | | hideInSearch: true, |
| | | width: 100, |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: '收支数据名称', |
| | |
| | | title: '支付/收入时间', |
| | | dataIndex: 'payTime', |
| | | hideInSearch: true, |
| | | width: 110, |
| | | render: (text) => formatDate(text), |
| | | }, |
| | | { |
| | | title: '商品', |
| | |
| | | { |
| | | title: '操作人', |
| | | dataIndex: 'updateBy', |
| | | width: 64, |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: '操作时间', |
| | |
| | | title: '操作时间', |
| | | dataIndex: 'updateTime', |
| | | hideInSearch: true, |
| | | width: 110, |
| | | render: (text) => formatDate(text), |
| | | }, |
| | | { |
| | | title: '操作', |
| | | hideInSearch: true, |
| | | width: 138, |
| | | render: (text, record) => { |
| | | return ( |
| | | <Space> |
| | | <Space size={0}> |
| | | <Button |
| | | type="link" |
| | | style={{ paddingInline: 6 }} |
| | | onClick={() => { |
| | | addViewRef2.current.refreshData(record); |
| | | handleModalVisible2(true); |
| | |
| | | </Button> |
| | | <Button |
| | | type="link" |
| | | style={{ paddingInline: 6 }} |
| | | onClick={() => { |
| | | if (record.revenueType == 1) { |
| | | addViewRef1.current.refreshData(record); |
| | |
| | | </Button> |
| | | <Button |
| | | type="link" |
| | | style={{ paddingInline: 6 }} |
| | | onClick={() => { |
| | | showDelConfirmWithPassword(async (password) => { |
| | | // 这里可以添加密码验证逻辑 |
| | |
| | | reportData: { |
| | | type: Object, |
| | | default: () => ({}) |
| | | }, |
| | | showLabels: { |
| | | type: Boolean, |
| | | default: true |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | center: ['40%', '65%'], |
| | | data: this.getChartData(), |
| | | label: { |
| | | show: true, |
| | | show: this.showLabels, |
| | | formatter: '{b}\n{c}', |
| | | alignTo: 'labelLine', |
| | | edgeDistance: 10 |
| | | }, |
| | | labelLine: { |
| | | show: true, |
| | | show: this.showLabels, |
| | | length: 15, |
| | | length2: 10 |
| | | }, |
| | |
| | | |
| | | <el-row :gutter="20" style="margin-top: 10px;"> |
| | | <el-col :span="24"> |
| | | <pie-chart :title="'出库数据占比'" :report-data="reportData ? reportData.outStoreCart : {}" /> |
| | | <pie-chart :title="'出库数据占比'" :report-data="reportData ? reportData.outStoreCart : {}" :show-labels="false" /> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <pie-chart :title="'入库数据占比'" :report-data="reportData ? reportData.inStoreCart : {}" /> |
| | | <pie-chart :title="'入库数据占比'" :report-data="reportData ? reportData.inStoreCart : {}" :show-labels="false" /> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | |
| | | <!-- Right Column --> |
| | | <el-col :xs="24" :sm="24" :lg="16"> |
| | | <div style="padding: 0 10px; height: 100%;"> |
| | | <el-row :gutter="20" style="margin-bottom: 20px;"> |
| | | <el-col :xs="24" :sm="12"> |
| | | <pie-chart |
| | | :title="'仓库在库库存占比'" |
| | | :report-data="reportData ? reportData.storeInStoreCart : {}" |
| | | :show-labels="false" |
| | | /> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12"> |
| | | <pie-chart |
| | | :title="'仓库占用资金占比'" |
| | | :report-data="reportData ? reportData.storeOccupiedFundsCart : {}" |
| | | :show-labels="false" |
| | | /> |
| | | </el-col> |
| | | </el-row> |
| | | <bar-chart |
| | | :occupied-funds-data="reportData ? reportData.occupiedFundsCart : {}" |
| | | /> |