更新工作台页面,优化交易数据展示,修复核销订单金额等数据展示错误,并调整相关API接口路径
This commit is contained in:
parent
716a653d28
commit
73612923ac
|
@ -1,6 +1,4 @@
|
|||
<!-- 门店流水 -->
|
||||
<!-- 门店流水 -->
|
||||
<!-- 门店流水 -->
|
||||
<!--
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
|
@ -29,7 +27,7 @@
|
|||
<el-form-item>
|
||||
<el-button type="primary" @click="handleResetPage">查询</el-button>
|
||||
<el-button @click="handleResetParams">重置</el-button>
|
||||
<!-- <el-button @click="showDialog = true">重置</el-button> -->
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -46,7 +44,7 @@
|
|||
<el-table-column label="关联店员" prop="staff_name" show-overflow-tooltip />
|
||||
<el-table-column label="交易类型" prop="financial_type_name" show-overflow-tooltip />
|
||||
<el-table-column label="支付方式" prop="pay_type_name" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="备注" prop="progress" show-overflow-tooltip /> -->
|
||||
|
||||
<el-table-column label="操作" width="170" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button @click="handleRe(row)" link type="primary">备注</el-button>
|
||||
|
@ -80,7 +78,7 @@ import useUserStore from "@/stores/modules/user"
|
|||
const userInfo = useUserStore().userInfo;
|
||||
|
||||
|
||||
// 查询条件
|
||||
|
||||
const queryParams = reactive({
|
||||
keyword: "",
|
||||
start_time: "",
|
||||
|
@ -92,7 +90,7 @@ const queryParams = reactive({
|
|||
|
||||
const date = ref(null)
|
||||
|
||||
// 分页相关
|
||||
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiStorFinanceFlowLists,
|
||||
params: queryParams
|
||||
|
@ -140,4 +138,164 @@ const getStaffList = async () => {
|
|||
getStaffList()
|
||||
|
||||
getLists()
|
||||
</script>
|
||||
</script> -->
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="时间筛选">
|
||||
<el-date-picker v-model="date" type="daterange" range-separator="-" start-placeholder="开始时间"
|
||||
end-placeholder="结束时间" value-format="YYYY-MM-DD" :clearable="false" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="订单搜索">
|
||||
<el-input v-model="queryParams.keyword" clearable placeholder="请输入交易单号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="店员">
|
||||
<el-select class="flex-1" v-model="queryParams.staff_id" placeholder="请选择店员">
|
||||
<el-option :label="item.staff_name" :value="item.id" v-for="(item, index) in staffList" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleResetPage">查询</el-button>
|
||||
<el-button @click="handleResetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<!-- <el-button v-perms="['store_finance_flow.store_finance_flow/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-perms="['store_finance_flow.store_finance_flow/delete']" :disabled="!selectData.length"
|
||||
@click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button> -->
|
||||
<div>
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange" row-key="id"
|
||||
:tree-props="{ children: 'list' }">
|
||||
<el-table-column label="ID" prop="id" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column label="交易单号" prop="order_sn" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column label="交易时间" prop="create_time" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column label="金额" prop="number" min-width="100" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.number > 0" class="text-success">{{ row.number }}</span>
|
||||
<span v-else class="text-danger">{{ row.number }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="门店名称" prop="store_name" show-overflow-tooltip />
|
||||
<el-table-column label="用户" prop="nickname" min-width="80" show-overflow-tooltip />
|
||||
<el-table-column label="收益/扣除" prop="financial_type_name" show-overflow-tooltip />
|
||||
<el-table-column label="支付方式" prop="pay_type_name" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="remark" 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="storeFinanceFlowLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiStorFinanceFlowLists } from '@/api/store_finance_flow.ts'
|
||||
import { apiStaffLists } from '@/api/goodsList.ts'
|
||||
|
||||
import useUserStore from "@/stores/modules/user"
|
||||
const userInfo = useUserStore().userInfo;
|
||||
|
||||
const queryParams = reactive({
|
||||
keyword: "",
|
||||
start_time: "",
|
||||
end_time: "",
|
||||
order: "",
|
||||
staff_id: "",
|
||||
store_id: userInfo.store_id
|
||||
})
|
||||
|
||||
const date = ref(null)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const handleResetParams = () => {
|
||||
date.value = []
|
||||
resetParams()
|
||||
}
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiStorFinanceFlowLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
|
||||
|
||||
getLists()
|
||||
|
||||
const storeloading = ref(false);
|
||||
const storeList = ref([]);
|
||||
const remoteMethod = (e: string = '') => {
|
||||
storeloading.value = true;
|
||||
apiSystemStoreLists({
|
||||
name: e,
|
||||
page_size: 50
|
||||
}).then(res => {
|
||||
storeList.value = res.lists;
|
||||
setTimeout(() => {
|
||||
storeloading.value = false;
|
||||
}, 300)
|
||||
}).catch(err => {
|
||||
setTimeout(() => {
|
||||
storeloading.value = false;
|
||||
}, 300)
|
||||
})
|
||||
}
|
||||
|
||||
const userList = ref([]);
|
||||
|
||||
const handleResetPage = () => {
|
||||
if (date.value?.length) {
|
||||
queryParams.start_time = date.value[0] + ' 00:00:00'
|
||||
queryParams.end_time = date.value[1] + ' 23:59:59'
|
||||
} else {
|
||||
queryParams.start_time = ''
|
||||
queryParams.end_time = ''
|
||||
}
|
||||
resetPage()
|
||||
}
|
||||
|
||||
|
||||
const staffList = ref([])
|
||||
const getStaffList = async () => {
|
||||
let res = await apiStaffLists({ page_no: 1, page_size: 100 })
|
||||
staffList.value = res.lists
|
||||
}
|
||||
getStaffList()
|
||||
</script>
|
||||
|
|
|
@ -23,9 +23,8 @@
|
|||
<el-table-column label="备注" prop="mark" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-if="row.status == 0"
|
||||
v-perms="['system_store_storage.system_store_storage/edit']" type="success" link
|
||||
@click="handleEdit(row)">
|
||||
<el-button v-if="row.status == 0" v-perms="['system_store_storage.system_store_storage/edit']"
|
||||
type="success" link @click="handleEdit(row)">
|
||||
确认入库
|
||||
</el-button>
|
||||
</template>
|
||||
|
@ -85,6 +84,7 @@ const handleAdd = async () => {
|
|||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
await feedback.confirm('确定要入库吗?')
|
||||
apiSystemStoreStorageInfoEdit({
|
||||
id: data.id
|
||||
}).then(res => {
|
||||
|
|
Loading…
Reference in New Issue