This commit is contained in:
weipengfei 2024-06-15 19:03:24 +08:00
commit 74dc84386d
5 changed files with 198 additions and 15 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,15 @@
import request from '@/utils/request'
// 财务转账表列表
export function apiFinancialTransfersLists(params: any) {
return request.get({ url: '/financial_transfers/financialtransfers/lists', params })
}
// 发送
export function apiFinancialTransfersSend(params: any) {
return request.post({ url: '/financial_transfers/FinancialTransfers/send_transfers', params })
}
export function apiFinancialTransfersConfirm(params: any) {
return request.post({ url: '/financial_transfers/FinancialTransfers/success_send', params })
}

View File

@ -0,0 +1,142 @@
<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>
<template #default="{ row }">
{{ timeFormat(row.initiation_time, 'yyyy-mm-dd') }}
</template>
</el-table-column>
<el-table-column label="操作" width="120" fixed="right">
<template #default="{ row }">
<el-button link type="primary" @click="handleDelete(row.id)" v-if="row.status == 0">
发送
</el-button>
<el-button link type="primary" @click="handleClick(row)" v-if="row.status == 2">
确认
</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>
<el-dialog v-model="showDialog" title="确认结算" width="680px">
<el-descriptions :column="1" border>
<el-descriptions-item label="姓名"> {{ rowDate.store_realName }} </el-descriptions-item>
<el-descriptions-item label="银行卡号"> {{ rowDate.store_bank_code }} </el-descriptions-item>
<el-descriptions-item label="银行名称"> {{ rowDate.store_bank }} </el-descriptions-item>
<el-descriptions-item label="开户地址"> {{ rowDate.store_bank_address }} </el-descriptions-item>
<el-descriptions-item label="操作">
<el-radio-group v-model="form.status">
<el-radio label="1">通过</el-radio>
<el-radio label="0">不通过</el-radio>
</el-radio-group>
</el-descriptions-item>
<el-descriptions-item label="附件">
<material-picker v-model="form.transfer_picture" />
</el-descriptions-item>
<el-descriptions-item label="备注">
<el-input class="w-[280px]" v-model="form.fail_msg" clearable placeholder="请输入备注" type="textarea" />
</el-descriptions-item>
</el-descriptions>
<el-form class="mt-4">
<el-form-item>
<el-button type="primary" @click="handleConfirm">确定</el-button>
<el-button @click="showDialog = false">取消</el-button>
</el-form-item>
</el-form>
</el-dialog>
</div>
</template>
<script lang="ts" setup name="financialTransfersLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiFinancialTransfersLists, apiFinancialTransfersSend, apiFinancialTransfersConfirm } from '@/api/financial_transfers'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
//
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 apiFinancialTransfersSend({ id })
getLists()
}
const showDialog = ref(false)
const rowDate = ref('')
const handleClick = (row: any) => {
rowDate.value = row
showDialog.value = true
}
const form = reactive({
id: "",
transfer_picture: "",
status: "",
fail_msg: ""
})
//
const handleConfirm = async (id: number | any[]) => {
form.id = rowDate.value.id
await apiFinancialTransfersConfirm({ ...form })
getLists()
showDialog.value = false
}
getLists()
</script>

View File

@ -1,7 +1,6 @@
<template>
<div class="edit-popup">
<popup ref="popupRef" :title="popupTitle" :async="true" width="600px" @confirm="handleSubmit"
@close="handleClose">
<popup ref="popupRef" :title="popupTitle" :async="true" width="600px" @confirm="handleSubmit" @close="handleClose">
<el-form ref="formRef" :model="formDataInfo" label-width="90px" :rules="formRules">
<el-form-item label="门店logo" prop="image">
<material-picker v-model="formDataInfo.image" :limit="1" />
@ -10,8 +9,8 @@
<el-input v-model="formDataInfo.name" clearable placeholder="请输入门店名称" :readonly="false" />
</el-form-item>
<el-form-item label="简介" prop="introduction">
<el-input v-model="formDataInfo.introduction" clearable placeholder="请输入简介" type="textarea"
:rows="3" :readonly="false" />
<el-input v-model="formDataInfo.introduction" clearable placeholder="请输入简介" type="textarea" :rows="3"
:readonly="false" />
</el-form-item>
<el-form-item label="负责人" prop="staff_name">
<el-input v-model="formDataInfo.staff_name" clearable placeholder="请输入负责人姓名" :readonly="false" />
@ -28,6 +27,18 @@
<el-input v-model="formDataInfo.password" clearable placeholder="请输入登录密码" :readonly="false" />
<div class="text-sm text-orange-400">不修改请留空</div>
</el-form-item>
<el-form-item label="银行卡号" prop="bank_code">
<el-input v-model="formDataInfo.bank_code" clearable placeholder="请输入银行卡号" />
</el-form-item>
<el-form-item label="银行名称" prop="bank_code">
<el-input v-model="formDataInfo.bank" clearable placeholder="请输入银行名称" />
</el-form-item>
<el-form-item label="开户地址" prop="bank_address">
<el-input v-model="formDataInfo.bank_address" clearable placeholder="请输入开户地址" />
</el-form-item>
<el-form-item label="姓名" prop="realname">
<el-input v-model="formDataInfo.realname" clearable placeholder="请输入姓名" />
</el-form-item>
<el-form-item label="营业状态" prop="is_show">
<el-switch v-model="formDataInfo.is_show" :active-value="1" :inactive-value="0" active-text="营业"
inactive-text="打烊" inline-prompt />
@ -38,12 +49,11 @@
start-placeholder="开始时间" end-placeholder="结束时间" />
</el-form-item>
<el-form-item label="门店地址" prop="selectedValues">
<el-cascader v-model="formDataInfo.selectedValues" :options="options" :props="props"
:load="loadOptions" class="w-full" />
<el-cascader v-model="formDataInfo.selectedValues" :options="options" :props="props" :load="loadOptions"
class="w-full" />
</el-form-item>
<el-form-item label="详细地址" prop="detailed_address">
<el-input v-model="formDataInfo.detailed_address" clearable placeholder="请输入详细地址"
:readonly="false" />
<el-input v-model="formDataInfo.detailed_address" clearable placeholder="请输入详细地址" :readonly="false" />
</el-form-item>
<el-form-item label="到店自提" prop="is_store">
<el-switch v-model="formDataInfo.is_store" :active-value="1" :inactive-value="0" active-text="开启"
@ -103,7 +113,11 @@ const formData = reactive({
password: "",
staff_name: "",
is_store: 1,
is_send: 0
is_send: 0,
bank: "",
bank_code: "",
bank_address: "",
realname: ""
})
const formDataInfo = reactive({
@ -120,7 +134,11 @@ const formDataInfo = reactive({
is_send: 0,
coord: '',
startEndTime: [],
selectedValues: []
selectedValues: [],
bank: "",
bank_code: "",
bank_address: "",
realname: ""
})