更新工作台API,添加负库存列表统计;修改库存统计页面,添加排序功能;调整提现记录页面,增加openid列。

This commit is contained in:
mkm 2024-08-24 15:13:18 +08:00
parent 6aba4b76db
commit 0c55c61c21
4 changed files with 120 additions and 1 deletions

View File

@ -63,3 +63,7 @@ export function total_warehouse_list(params: any) {
export function total_warehouse_product_list(params: any) { export function total_warehouse_product_list(params: any) {
return request.get({ url: '/workbench/total_warehouse_product_list', params }) return request.get({ url: '/workbench/total_warehouse_product_list', params })
} }
// 负库存列表统计
export function negative_inventory(params: any) {
return request.get({ url: '/workbench/negative_inventory', params })
}

View File

@ -57,6 +57,7 @@
<el-table-column label="名称" prop="nickname" show-overflow-tooltip /> <el-table-column label="名称" prop="nickname" show-overflow-tooltip />
<!-- <el-table-column label="收款方式" prop="extract_type" show-overflow-tooltip /> --> <!-- <el-table-column label="收款方式" prop="extract_type" show-overflow-tooltip /> -->
<el-table-column label="提现金额" prop="extract_price" show-overflow-tooltip /> <el-table-column label="提现金额" prop="extract_price" show-overflow-tooltip />
<el-table-column label="openid" prop="openid" show-overflow-tooltip />
<el-table-column label="备注" prop="mark" show-overflow-tooltip /> <el-table-column label="备注" prop="mark" show-overflow-tooltip />
<el-table-column label="审核状态" prop="status" show-overflow-tooltip /> <el-table-column label="审核状态" prop="status" show-overflow-tooltip />
<el-table-column label="转账状态" prop="pay_status" show-overflow-tooltip /> <el-table-column label="转账状态" prop="pay_status" show-overflow-tooltip />

View File

@ -0,0 +1,94 @@
<template>
<div>
<el-card class="!border-none mb-4" shadow="never">
<el-form class="mb-[-16px]" :model="queryParams" inline>
<el-form-item label="商品名称" prop="store_name">
<el-input
class="w-[280px]"
@keydown.enter="resetPage"
v-model="queryParams.store_name"
clearable
placeholder="请输入商品名称"
/>
</el-form-item>
<el-form-item label="类型" prop="type">
<el-input
class="w-[280px]"
@keydown.enter="resetPage"
v-model="queryParams.type"
clearable
placeholder="请输入类型"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="resetPage">查询</el-button>
<el-button @click="resetParams">重置</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
<div class="mt-4">
<el-table :data="pager.lists">
<el-table-column type="selection" width="55" />
<el-table-column label="商品ID" prop="id" show-overflow-tooltip />
<el-table-column label="商品图片" prop="image" min-width="80">
<template #default="{ row }">
<el-image
style="width: 50px; height: 50px"
:src="row.image"
:preview-teleported="true"
/>
</template>
</el-table-column>
<el-table-column
label="商品名称"
prop="store_name"
min-width="200"
show-overflow-tooltip
/>
<el-table-column
label="库存"
prop="stock"
min-width="100"
show-overflow-tooltip
/>
<el-table-column
label="备注"
prop="remark"
min-width="200"
show-overflow-tooltip
/>
</el-table>
</div>
<div class="flex mt-4 justify-end">
<pagination v-model="pager" @change="getLists" />
</div>
</el-card>
</div>
</template>
<script lang="ts" setup name="storeProductLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { negative_inventory } from '@/api/workbench'
import { useRoute } from 'vue-router'
//
const queryParams = reactive({
store_name: '',
type: 1
})
//
const { dictData } = useDictData('')
//
const { pager, getLists, resetParams, resetPage } = usePaging({
fetchFun: negative_inventory,
params: queryParams
})
onMounted(() => {
getLists()
})
</script>

View File

@ -31,6 +31,24 @@
@change="resetPage" @change="resetPage"
/> />
</el-form-item> </el-form-item>
<el-form-item label="排序" prop="order_by">
<el-select
v-model="queryParams.order_by"
placeholder="请选择排序"
style="width: 240px"
@change="resetPage"
>
<el-option
v-for="item in [
{ id: 'asc', name: '升序' },
{ id: 'desc', name: '降序' }
]"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="resetPage">查询</el-button> <el-button type="primary" @click="resetPage">查询</el-button>
<el-button @click="resetParams">重置</el-button> <el-button @click="resetParams">重置</el-button>
@ -238,7 +256,9 @@ const warehouseProductRef = ref(null)
const queryParams = reactive({ const queryParams = reactive({
store_name: '', store_name: '',
class_all: '', class_all: '',
bar_code: '' bar_code: '',
field: 'stock',
order_by: ''
}) })
// //
const handleDetai = async (data: any) => { const handleDetai = async (data: any) => {