更新开发环境配置文件,切换API基础URL。

This commit is contained in:
zmj 2024-06-14 15:08:46 +08:00
parent 6cc78efbd0
commit 8e571a57e5
4 changed files with 128 additions and 2 deletions

View File

@ -2,5 +2,5 @@ NODE_ENV = 'development'
VITE_NOW_TYPE = 'dist'
# Base API
VITE_APP_BASE_URL='http://192.168.1.22:8545'
# VITE_APP_BASE_URL='https://test-multi-store.lihaink.cn'
# VITE_APP_BASE_URL='http://192.168.1.22:8545'
VITE_APP_BASE_URL='https://test-multi-store.lihaink.cn'

8
helper.json Normal file
View File

@ -0,0 +1,8 @@
{
"path": {
"root": "@=src",
"api": "src/api",
"request": "../utils/request"
},
"api": []
}

View File

@ -0,0 +1,26 @@
import request from '@/utils/request'
// 财务转账表列表
export function apiFinancialTransfersLists(params: any) {
return request.get({ url: '/financial_transfers/financialtransfers/lists', params })
}
// 添加财务转账表
export function apiFinancialTransfersAdd(params: any) {
return request.post({ url: '/financial_transfers/financialtransfers/add', params })
}
// 编辑财务转账表
export function apiFinancialTransfersEdit(params: any) {
return request.post({ url: '/financial_transfers/financialtransfers/edit', params })
}
// 删除财务转账表
export function apiFinancialTransfersDelete(params: any) {
return request.post({ url: '/financial_transfers/financialtransfers/delete', params })
}
// 财务转账表详情
export function apiFinancialTransfersDetail(params: any) {
return request.get({ url: '/financial_transfers/financialtransfers/detail', params })
}

View File

@ -0,0 +1,92 @@
<template>
<div>
<el-card class="!border-none mb-4" shadow="never">
<el-form class="mb-[-16px]" :model="queryParams" inline>
<el-form-item label="金额" prop="money">
<el-input class="w-[280px]" v-model="queryParams.money" 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" @selection-change="handleSelectionChange">
<el-table-column label="id" prop="store_id" show-overflow-tooltip />
<el-table-column label="时间" prop="create_time" show-overflow-tooltip />
<el-table-column label="收款方" prop="store_name" show-overflow-tooltip />
<el-table-column label="结算金额" prop="money" show-overflow-tooltip />
<el-table-column label="结算方式" prop="extract_type" show-overflow-tooltip />
<el-table-column label="确认时间" prop="initiation_time" show-overflow-tooltip />
<el-table-column label="操作" width="120" fixed="right">
<template #default="{ row }">
<el-button link type="primary" @click="handleDelete(row.id)">
起飞
</el-button>
</template>
</el-table-column>
</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="financialTransfersLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiFinancialTransfersLists } from '@/api/financial_transfers'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
//
const showEdit = ref(false)
//
const queryParams = reactive({
store_id: '',
admin_id: '',
uid: '',
status: '',
initiation_time: '',
confirmation_time: '',
mark: '',
money: '',
remark_time: ''
})
//
const selectData = ref<any[]>([])
//
const handleSelectionChange = (val: any[]) => {
selectData.value = val.map(({ id }) => id)
}
//
const { dictData } = useDictData('')
//
const { pager, getLists, resetParams, resetPage } = usePaging({
fetchFun: apiFinancialTransfersLists,
params: queryParams
})
//
const handleDelete = async (id: number | any[]) => {
await feedback.confirm('确定要起飞吗?')
// await apiFinancialTransfersDelete({ id })
getLists()
}
getLists()
</script>