库存产品占比表和产品可销库存表加上合计 以及去掉分页

This commit is contained in:
mll
2026-04-17 10:02:41 +08:00
parent 0920e55ee2
commit 911909c72f

View File

@@ -181,6 +181,7 @@ import { assembleLengObj } from '@/utils/lowDesign'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import Avue from '@smallwei/avue' import Avue from '@smallwei/avue'
import { Console } from 'console' import { Console } from 'console'
import { ruleLeng } from '../utils/util'
defineOptions({ name: 'LowReport' }) defineOptions({ name: 'LowReport' })
interface Props { interface Props {
@@ -211,7 +212,8 @@ const transferFields={
'goodsName':'goodsname', 'goodsName':'goodsname',
'customName':'customname', 'customName':'customname',
'dosageName':'dosagename', 'dosageName':'dosagename',
'stdGoodsName':'stdGoodsIdName' 'stdGoodsName':'stdGoodsIdName',
'effectName':'effectname'
} }
const loading = ref(false) // 列表的加载中 const loading = ref(false) // 列表的加载中
const isInit = ref(false) const isInit = ref(false)
@@ -330,6 +332,12 @@ const remoteMethod= async(query,column)=>{
const crudBind = computed(() => { const crudBind = computed(() => {
const obj = {} const obj = {}
if (tableInfo.value.isPage) obj['page'] = tablePage.value if (tableInfo.value.isPage) obj['page'] = tablePage.value
else{
tablePage.value={
currentPage: 1, pageSize: 999999, total: 0
}
obj['page'] = tablePage.value
}
return obj return obj
}) })
@@ -384,10 +392,11 @@ const summaryMethod1=({columns,data})=>{
let keys=Object.values(amountFieds.value).map(item=>item.prop) let keys=Object.values(amountFieds.value).map(item=>item.prop)
columns.forEach((item,index)=>{ columns.forEach((item,index)=>{
if(keys.includes(item.property)){ if(keys.includes(item.property)&&index!==0){
result[index]=amountObj.value[item.property] result[index]=amountObj.value[item.property]
} }
}) })
return result; return result;
} }
const rowStyleMethod=({row,rowIndex})=>{ const rowStyleMethod=({row,rowIndex})=>{
@@ -581,7 +590,7 @@ const initTable = async () => {
'业务员':'ywyxx', '业务员':'ywyxx',
'业务区域':'ywqy', '业务区域':'ywqy',
'标准品名':'bzpm', '标准品名':'bzpm',
'疗效分类':'zhxs-lxfl' '疗效分类':'effect'
} }
@@ -713,11 +722,11 @@ const sortChange = ({ order, prop }) => {
const getSearchData = () => { const getSearchData = () => {
return new Promise(async (resolve) => { return new Promise(async (resolve) => {
let searchObj: any = {} let searchObj: any = {}
if (tableInfo.value.isPage) { // if (tableInfo.value.isPage) {
const { currentPage, pageSize } = tablePage.value const { currentPage, pageSize } = tablePage.value
searchObj.pageNo = currentPage searchObj.pageNo = currentPage
searchObj.pageSize = pageSize searchObj.pageSize = pageSize
} // }
for (let key in tableSearch.value) { for (let key in tableSearch.value) {
if (tableSearch.value[key] instanceof Array) searchObj[key] = tableSearch.value[key].join(',') if (tableSearch.value[key] instanceof Array) searchObj[key] = tableSearch.value[key].join(',')
else searchObj[key] = tableSearch.value[key] else searchObj[key] = tableSearch.value[key]
@@ -769,7 +778,8 @@ const getTableData = async (isLoading = true) => {
total: 6 total: 6
} }
} }
if (tablePage.value) tablePage.value['total'] = data.total
if (tablePage.value&&tableInfo.value.isPage) tablePage.value['total'] = data.total
// 查找动态分组字段(用于生成一级表头) // 查找动态分组字段(用于生成一级表头)
const groupField = fieldList.value.find(f => f.isDynamicGroup === 'Y') const groupField = fieldList.value.find(f => f.isDynamicGroup === 'Y')