Merge branch 'master' of https://gitea.lihaink.cn/weipengfei/moreShopAdmin
This commit is contained in:
commit
74dc84386d
|
@ -2,5 +2,5 @@ NODE_ENV = 'development'
|
||||||
VITE_NOW_TYPE = 'dist'
|
VITE_NOW_TYPE = 'dist'
|
||||||
|
|
||||||
# Base API
|
# Base API
|
||||||
VITE_APP_BASE_URL='http://192.168.1.22:8545'
|
# VITE_APP_BASE_URL='http://192.168.1.22:8545'
|
||||||
# VITE_APP_BASE_URL='https://test-multi-store.lihaink.cn'
|
VITE_APP_BASE_URL='https://test-multi-store.lihaink.cn'
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"path": {
|
||||||
|
"root": "@=src",
|
||||||
|
"api": "src/api",
|
||||||
|
"request": "../utils/request"
|
||||||
|
},
|
||||||
|
"api": []
|
||||||
|
}
|
|
@ -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 })
|
||||||
|
}
|
|
@ -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>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="600px" @confirm="handleSubmit"
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="600px" @confirm="handleSubmit" @close="handleClose">
|
||||||
@close="handleClose">
|
|
||||||
<el-form ref="formRef" :model="formDataInfo" label-width="90px" :rules="formRules">
|
<el-form ref="formRef" :model="formDataInfo" label-width="90px" :rules="formRules">
|
||||||
<el-form-item label="门店logo" prop="image">
|
<el-form-item label="门店logo" prop="image">
|
||||||
<material-picker v-model="formDataInfo.image" :limit="1" />
|
<material-picker v-model="formDataInfo.image" :limit="1" />
|
||||||
|
@ -10,8 +9,8 @@
|
||||||
<el-input v-model="formDataInfo.name" clearable placeholder="请输入门店名称" :readonly="false" />
|
<el-input v-model="formDataInfo.name" clearable placeholder="请输入门店名称" :readonly="false" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="简介" prop="introduction">
|
<el-form-item label="简介" prop="introduction">
|
||||||
<el-input v-model="formDataInfo.introduction" clearable placeholder="请输入简介" type="textarea"
|
<el-input v-model="formDataInfo.introduction" clearable placeholder="请输入简介" type="textarea" :rows="3"
|
||||||
:rows="3" :readonly="false" />
|
:readonly="false" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="负责人" prop="staff_name">
|
<el-form-item label="负责人" prop="staff_name">
|
||||||
<el-input v-model="formDataInfo.staff_name" clearable placeholder="请输入负责人姓名" :readonly="false" />
|
<el-input v-model="formDataInfo.staff_name" clearable placeholder="请输入负责人姓名" :readonly="false" />
|
||||||
|
@ -21,13 +20,25 @@
|
||||||
:readonly="mode == 'edit'" />
|
:readonly="mode == 'edit'" />
|
||||||
<div class="text-sm text-orange-400">输入的手机号将作为管理员账户登录</div>
|
<div class="text-sm text-orange-400">输入的手机号将作为管理员账户登录</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="登录密码" prop="password" v-if="mode=='add'">
|
<el-form-item label="登录密码" prop="password" v-if="mode == 'add'">
|
||||||
<el-input v-model="formDataInfo.password" clearable placeholder="请输入登录密码" :readonly="false" />
|
<el-input v-model="formDataInfo.password" clearable placeholder="请输入登录密码" :readonly="false" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="登录密码" v-else>
|
<el-form-item label="登录密码" v-else>
|
||||||
<el-input v-model="formDataInfo.password" clearable placeholder="请输入登录密码" :readonly="false" />
|
<el-input v-model="formDataInfo.password" clearable placeholder="请输入登录密码" :readonly="false" />
|
||||||
<div class="text-sm text-orange-400">不修改请留空</div>
|
<div class="text-sm text-orange-400">不修改请留空</div>
|
||||||
</el-form-item>
|
</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-form-item label="营业状态" prop="is_show">
|
||||||
<el-switch v-model="formDataInfo.is_show" :active-value="1" :inactive-value="0" active-text="营业"
|
<el-switch v-model="formDataInfo.is_show" :active-value="1" :inactive-value="0" active-text="营业"
|
||||||
inactive-text="打烊" inline-prompt />
|
inactive-text="打烊" inline-prompt />
|
||||||
|
@ -38,12 +49,11 @@
|
||||||
start-placeholder="开始时间" end-placeholder="结束时间" />
|
start-placeholder="开始时间" end-placeholder="结束时间" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="门店地址" prop="selectedValues">
|
<el-form-item label="门店地址" prop="selectedValues">
|
||||||
<el-cascader v-model="formDataInfo.selectedValues" :options="options" :props="props"
|
<el-cascader v-model="formDataInfo.selectedValues" :options="options" :props="props" :load="loadOptions"
|
||||||
:load="loadOptions" class="w-full" />
|
class="w-full" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="详细地址" prop="detailed_address">
|
<el-form-item label="详细地址" prop="detailed_address">
|
||||||
<el-input v-model="formDataInfo.detailed_address" clearable placeholder="请输入详细地址"
|
<el-input v-model="formDataInfo.detailed_address" clearable placeholder="请输入详细地址" :readonly="false" />
|
||||||
:readonly="false" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="到店自提" prop="is_store">
|
<el-form-item label="到店自提" prop="is_store">
|
||||||
<el-switch v-model="formDataInfo.is_store" :active-value="1" :inactive-value="0" active-text="开启"
|
<el-switch v-model="formDataInfo.is_store" :active-value="1" :inactive-value="0" active-text="开启"
|
||||||
|
@ -103,7 +113,11 @@ const formData = reactive({
|
||||||
password: "",
|
password: "",
|
||||||
staff_name: "",
|
staff_name: "",
|
||||||
is_store: 1,
|
is_store: 1,
|
||||||
is_send: 0
|
is_send: 0,
|
||||||
|
bank: "",
|
||||||
|
bank_code: "",
|
||||||
|
bank_address: "",
|
||||||
|
realname: ""
|
||||||
})
|
})
|
||||||
|
|
||||||
const formDataInfo = reactive({
|
const formDataInfo = reactive({
|
||||||
|
@ -120,7 +134,11 @@ const formDataInfo = reactive({
|
||||||
is_send: 0,
|
is_send: 0,
|
||||||
coord: '',
|
coord: '',
|
||||||
startEndTime: [],
|
startEndTime: [],
|
||||||
selectedValues: []
|
selectedValues: [],
|
||||||
|
bank: "",
|
||||||
|
bank_code: "",
|
||||||
|
bank_address: "",
|
||||||
|
realname: ""
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@ -208,10 +226,10 @@ const getDetail = async (row: Record<string, any>) => {
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
await formRef.value?.validate()
|
await formRef.value?.validate()
|
||||||
Object.keys(formData).forEach((key: string) => {
|
Object.keys(formData).forEach((key: string) => {
|
||||||
if (formDataInfo[key]!==''&&formDataInfo[key]!==null&&formDataInfo[key]!==undefined) formData[key] = formDataInfo[key];
|
if (formDataInfo[key] !== '' && formDataInfo[key] !== null && formDataInfo[key] !== undefined) formData[key] = formDataInfo[key];
|
||||||
})
|
})
|
||||||
const data = { ...formData };
|
const data = { ...formData };
|
||||||
if(mode.value=='edit' && !data.password) data.password = '';
|
if (mode.value == 'edit' && !data.password) data.password = '';
|
||||||
const test = /^[+-]?\d*(\.\d+)?$/;
|
const test = /^[+-]?\d*(\.\d+)?$/;
|
||||||
let latlng = formDataInfo.coord.split(',');
|
let latlng = formDataInfo.coord.split(',');
|
||||||
if (latlng.length < 2 || !test.test(latlng[0]) || !test.test(latlng[1])) return ElMessage.error('请输入正确的坐标');
|
if (latlng.length < 2 || !test.test(latlng[0]) || !test.test(latlng[1])) return ElMessage.error('请输入正确的坐标');
|
||||||
|
|
Loading…
Reference in New Issue