add
This commit is contained in:
parent
cdc6489fff
commit
c081f3269f
|
@ -1,5 +1,5 @@
|
||||||
NODE_ENV = 'development'
|
NODE_ENV = 'development'
|
||||||
VITE_NOW_TYPE = 'dist'
|
VITE_NOW_TYPE = 'dist'
|
||||||
# Base API
|
# Base API
|
||||||
# VITE_APP_BASE_URL='http://192.168.1.16:8546'
|
# VITE_APP_BASE_URL='http://192.168.1.21:8546'
|
||||||
VITE_APP_BASE_URL='https://erp.lihaink.cn'
|
VITE_APP_BASE_URL='https://erp.lihaink.cn'
|
|
@ -0,0 +1,36 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 商户供应商提现表列表
|
||||||
|
export function apiMerchantWithdrawLists(params: any) {
|
||||||
|
return request.get({ url: '/withdraw/merchantwithdraw/lists', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加商户供应商提现表
|
||||||
|
export function apiMerchantWithdrawAdd(params: any) {
|
||||||
|
return request.post({ url: '/withdraw/merchantwithdraw/add', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 编辑商户供应商提现表
|
||||||
|
export function apiMerchantWithdrawEdit(params: any) {
|
||||||
|
return request.post({ url: '/withdraw/merchantwithdraw/edit', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除商户供应商提现表
|
||||||
|
export function apiMerchantWithdrawDelete(params: any) {
|
||||||
|
return request.post({ url: '/withdraw/merchantwithdraw/delete', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 商户供应商提现表详情
|
||||||
|
export function apiMerchantWithdrawDetail(params: any) {
|
||||||
|
return request.get({ url: '/withdraw/merchantwithdraw/detail', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 删除商户供应商提现表
|
||||||
|
export function apimerchantwithdrawCheck(params: any) {
|
||||||
|
return request.post({ url: '/withdraw/merchantwithdraw/check', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
export function apimerchantwithdraw(params: any) {
|
||||||
|
return request.post({ url: '/withdraw/merchantwithdraw/arrival', params })
|
||||||
|
}
|
|
@ -1,31 +1,18 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="material-select">
|
<div class="material-select">
|
||||||
<popup
|
<popup ref="popupRef" width="830px" custom-class="body-padding" :title="`选择${tipsText}`" @confirm="handleConfirm"
|
||||||
ref="popupRef"
|
@close="handleClose">
|
||||||
width="830px"
|
|
||||||
custom-class="body-padding"
|
|
||||||
:title="`选择${tipsText}`"
|
|
||||||
@confirm="handleConfirm"
|
|
||||||
@close="handleClose"
|
|
||||||
>
|
|
||||||
<template v-if="!hiddenUpload" #trigger>
|
<template v-if="!hiddenUpload" #trigger>
|
||||||
<div class="material-select__trigger clearfix" @click.stop>
|
<div class="material-select__trigger clearfix" @click.stop>
|
||||||
<draggable class="draggable" v-model="fileList" animation="300" item-key="id">
|
<draggable class="draggable" v-model="fileList" animation="300" item-key="id">
|
||||||
<template v-slot:item="{ element, index }">
|
<template v-slot:item="{ element, index }">
|
||||||
<div
|
<div class="material-preview" :class="{
|
||||||
class="material-preview"
|
|
||||||
:class="{
|
|
||||||
'is-disabled': disabled,
|
'is-disabled': disabled,
|
||||||
'is-one': limit == 1
|
'is-one': limit == 1
|
||||||
}"
|
}" @click="showPopup(index)">
|
||||||
@click="showPopup(index)"
|
|
||||||
>
|
|
||||||
<del-wrap @close="deleteImg(index)">
|
<del-wrap @close="deleteImg(index)">
|
||||||
<file-item
|
<file-item :uri="excludeDomain ? getImageUrl(element) : element" :file-size="size"
|
||||||
:uri="excludeDomain ? getImageUrl(element) : element"
|
:type="type"></file-item>
|
||||||
:file-size="size"
|
|
||||||
:type="type"
|
|
||||||
></file-item>
|
|
||||||
</del-wrap>
|
</del-wrap>
|
||||||
<div class="operation-btns text-xs text-center">
|
<div class="operation-btns text-xs text-center">
|
||||||
<span>修改</span>
|
<span>修改</span>
|
||||||
|
@ -35,24 +22,16 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</draggable>
|
</draggable>
|
||||||
<div
|
<div class="material-upload" @click="showPopup(-1)" v-show="showUpload" :class="{
|
||||||
class="material-upload"
|
|
||||||
@click="showPopup(-1)"
|
|
||||||
v-show="showUpload"
|
|
||||||
:class="{
|
|
||||||
'is-disabled': disabled,
|
'is-disabled': disabled,
|
||||||
'is-one': limit == 1,
|
'is-one': limit == 1,
|
||||||
[uploadClass]: true
|
[uploadClass]: true
|
||||||
}"
|
}">
|
||||||
>
|
|
||||||
<slot name="upload">
|
<slot name="upload">
|
||||||
<div
|
<div class="upload-btn" :style="{
|
||||||
class="upload-btn"
|
|
||||||
:style="{
|
|
||||||
width: size,
|
width: size,
|
||||||
height: size
|
height: size
|
||||||
}"
|
}">
|
||||||
>
|
|
||||||
<icon :size="25" name="el-icon-Plus" />
|
<icon :size="25" name="el-icon-Plus" />
|
||||||
<span>添加</span>
|
<span>添加</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -62,13 +41,8 @@
|
||||||
</template>
|
</template>
|
||||||
<el-scrollbar>
|
<el-scrollbar>
|
||||||
<div class="material-wrap">
|
<div class="material-wrap">
|
||||||
<material
|
<material ref="materialRef" :type="type" :file-size="fileSize" :limit="meterialLimit"
|
||||||
ref="materialRef"
|
@change="selectChange" />
|
||||||
:type="type"
|
|
||||||
:file-size="fileSize"
|
|
||||||
:limit="meterialLimit"
|
|
||||||
@change="selectChange"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</popup>
|
</popup>
|
||||||
|
@ -259,6 +233,7 @@ export default defineComponent({
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.material-select {
|
.material-select {
|
||||||
|
|
||||||
.material-upload,
|
.material-upload,
|
||||||
.material-preview {
|
.material-preview {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -268,17 +243,21 @@ export default defineComponent({
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
float: left;
|
float: left;
|
||||||
|
|
||||||
&.is-disabled {
|
&.is-disabled {
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.is-one {
|
&.is-one {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
.operation-btns {
|
.operation-btns {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.operation-btns {
|
.operation-btns {
|
||||||
display: none;
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -290,12 +269,14 @@ export default defineComponent({
|
||||||
background-color: rgba(0, 0, 0, 0.3);
|
background-color: rgba(0, 0, 0, 0.3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.material-upload {
|
.material-upload {
|
||||||
:deep(.upload-btn) {
|
:deep(.upload-btn) {
|
||||||
@apply text-tx-secondary box-border rounded border-br border-dashed border flex flex-col justify-center items-center;
|
@apply text-tx-secondary box-border rounded border-br border-dashed border flex flex-col justify-center items-center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.material-wrap {
|
.material-wrap {
|
||||||
min-width: 720px;
|
min-width: 720px;
|
||||||
height: 430px;
|
height: 430px;
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
<template>
|
<template></template>
|
||||||
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style></style>
|
||||||
|
|
||||||
</style>
|
|
|
@ -62,9 +62,9 @@
|
||||||
<el-descriptions-item label="商品图片">
|
<el-descriptions-item label="商品图片">
|
||||||
<material-picker v-model="formData.imgs" disabled />
|
<material-picker v-model="formData.imgs" disabled />
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="商品详情">
|
<!-- <el-descriptions-item label="商品详情">
|
||||||
<material-picker v-model="formData.details" disabled />
|
<material-picker v-model="formData.details" disabled />
|
||||||
</el-descriptions-item>
|
</el-descriptions-item> -->
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</popup>
|
</popup>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -30,7 +30,8 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="商品分类" prop="class">
|
<el-form-item label="商品分类" prop="class">
|
||||||
<el-cascader style="width: 100%" v-model="formData.class" :props="props" placeholder="请选择商品分类" />
|
<el-cascader style="width: 100%" v-model="formData.class" class="caser" filterable
|
||||||
|
:before-filter="beforeFilter" :props="props" placeholder="请选择商品分类" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
|
@ -131,11 +132,11 @@
|
||||||
<material-picker v-model="formData.imgs" />
|
<material-picker v-model="formData.imgs" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<!-- <el-col :span="24">
|
||||||
<el-form-item label="商品详情" prop="details">
|
<el-form-item label="商品详情" prop="details">
|
||||||
<material-picker v-model="formData.details" :limit="9" />
|
<material-picker v-model="formData.details" :limit="9" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-dialog v-model="showDialog" title="选择标签" width="70%">
|
<el-dialog v-model="showDialog" title="选择标签" width="70%">
|
||||||
|
@ -239,7 +240,6 @@ const formData = reactive({
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const customEvent = (e) => {
|
const customEvent = (e) => {
|
||||||
formData.sys_labels = []
|
formData.sys_labels = []
|
||||||
let text = []
|
let text = []
|
||||||
|
@ -337,20 +337,67 @@ const formRules = reactive<any>({
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// 鉴于刘某无故缺席两次
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
let resolves;
|
||||||
|
let nodes;
|
||||||
|
let flag = ref(false);
|
||||||
|
let name;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
let dom = document.getElementsByClassName('caser')[0]
|
||||||
|
let ipt = dom.getElementsByClassName('el-input__inner')[0]
|
||||||
|
ipt.addEventListener('input', (e) => {
|
||||||
|
beforeFilter(e.target.value)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
const beforeFilter = (value) => {
|
||||||
|
name = value
|
||||||
|
flag.value = true
|
||||||
|
props.lazyLoad(nodes, resolves)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
const props = {
|
const props = {
|
||||||
value: "id",
|
value: "id",
|
||||||
label: "name",
|
label: "name",
|
||||||
emitPath: false,
|
emitPath: false,
|
||||||
lazy: true,
|
lazy: true,
|
||||||
lazyLoad(node, resolve) {
|
lazyLoad(node, resolve) {
|
||||||
|
if (!resolves) resolves = resolve;
|
||||||
|
if (!nodes) nodes = node;
|
||||||
let pid = node.value || 0;
|
let pid = node.value || 0;
|
||||||
apiGoodsclassLists({
|
let data = {}
|
||||||
|
if (flag.value) {
|
||||||
|
data = { name: name }
|
||||||
|
if (!name) {
|
||||||
|
data = {
|
||||||
pid: pid,
|
pid: pid,
|
||||||
page_size: 10000,
|
page_size: 10000,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
data = {
|
||||||
|
pid: pid,
|
||||||
|
page_size: 10000,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
apiGoodsclassLists({
|
||||||
|
...data
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
resolve(
|
resolve(
|
||||||
res.lists.map((item: any) => {
|
res.lists.map((item: any) => {
|
||||||
item.leaf = item.is_menu == 0;
|
item.leaf = item.is_menu == 0;
|
||||||
|
flag.value = false
|
||||||
return item;
|
return item;
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
@ -358,6 +405,23 @@ const props = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const classList = ref([]);
|
const classList = ref([]);
|
||||||
const getClassList = () => {
|
const getClassList = () => {
|
||||||
apiGoodsclassLists({}).then((res) => {
|
apiGoodsclassLists({}).then((res) => {
|
||||||
|
|
|
@ -1,13 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
<popup
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
|
||||||
ref="popupRef"
|
|
||||||
:title="popupTitle"
|
|
||||||
:async="true"
|
|
||||||
width="550px"
|
|
||||||
@confirm="handleSubmit"
|
|
||||||
@close="handleClose"
|
|
||||||
>
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||||
<el-form-item label="标签名" prop="name" required>
|
<el-form-item label="标签名" prop="name" required>
|
||||||
<el-input v-model="formData.name" clearable placeholder="请输入" :readonly="false" />
|
<el-input v-model="formData.name" clearable placeholder="请输入" :readonly="false" />
|
||||||
|
@ -100,6 +93,24 @@ const handleClose = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
let list = ['pingguo', 'xiangjiao', 'list', 'sadasd']
|
||||||
|
let i = 0
|
||||||
|
|
||||||
|
const handAdd = () => {
|
||||||
|
apiGoodsLabelAdd({ name: list[i] })
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// let timer = setInterval(() => {
|
||||||
|
// i++
|
||||||
|
// if (i > list.length) {
|
||||||
|
// clearTimeout(timer)
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
// handAdd()
|
||||||
|
// }, 2000)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
open,
|
open,
|
||||||
|
|
|
@ -73,9 +73,10 @@ import { useDictData } from '@/hooks/useDictOptions'
|
||||||
import { apiUnitLists, apiUnitDelete, apiUnitDetail } from '@/api/unit'
|
import { apiUnitLists, apiUnitDelete, apiUnitDetail } from '@/api/unit'
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import DetailPopup from './detail.vue'
|
import DetailPopup from './detail.vue'
|
||||||
|
import EditPopup from "./edit.vue";
|
||||||
|
|
||||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
const editRef = ref(null)
|
||||||
const detailRef = shallowRef<InstanceType<typeof EditPopup>>()
|
const detailRef = ref(null)
|
||||||
// 是否显示编辑框
|
// 是否显示编辑框
|
||||||
const showEdit = ref(false)
|
const showEdit = ref(false)
|
||||||
const showDetail = ref(false)
|
const showDetail = ref(false)
|
||||||
|
@ -117,6 +118,9 @@ const handleAdd = async () => {
|
||||||
|
|
||||||
// 编辑
|
// 编辑
|
||||||
const handleEdit = async (data: any) => {
|
const handleEdit = async (data: any) => {
|
||||||
|
|
||||||
|
|
||||||
|
console.log(editRef.value)
|
||||||
showEdit.value = true
|
showEdit.value = true
|
||||||
await nextTick()
|
await nextTick()
|
||||||
editRef.value?.open('edit')
|
editRef.value?.open('edit')
|
||||||
|
|
|
@ -0,0 +1,189 @@
|
||||||
|
<template>
|
||||||
|
<div class="edit-popup">
|
||||||
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
|
||||||
|
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <el-form-item label="用户类型 1-商户 2-供应商" prop="user_type">
|
||||||
|
<el-input v-model="formData.user_type" clearable placeholder="请输入用户类型 1-商户 2-供应商" :readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="商户id" prop="mer_id">
|
||||||
|
<el-input v-model="formData.mer_id" clearable placeholder="请输入商户id" :readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="供应商id" prop="supplier_id">
|
||||||
|
<el-input v-model="formData.supplier_id" clearable placeholder="请输入供应商id" :readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="提现账户id" prop="merchant_bank_id">
|
||||||
|
<el-input v-model="formData.merchant_bank_id" clearable placeholder="请输入提现账户id" :readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="提现金额" prop="amout">
|
||||||
|
<el-input v-model="formData.amout" clearable placeholder="请输入提现金额" :readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="审核状态 0-待审核 1-已审核 2-审核不通过" prop="is_check">
|
||||||
|
<el-input v-model="formData.is_check" clearable placeholder="请输入审核状态 0-待审核 1-已审核 2-审核不通过"
|
||||||
|
:readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否到账 0-未到账 1-已到账" prop="is_arrival">
|
||||||
|
<el-input v-model="formData.is_arrival" clearable placeholder="请输入是否到账 0-未到账 1-已到账" :readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="到账凭据" prop="arrival_proof">
|
||||||
|
<el-input v-model="formData.arrival_proof" clearable placeholder="请输入到账凭据" :readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="操作人员id" prop="admin_id">
|
||||||
|
<el-input v-model="formData.admin_id" clearable placeholder="请输入操作人员id" :readonly="false" />
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="审核意见" prop="is_check" v-if="formData.is_check == 0">
|
||||||
|
<el-radio-group v-model="formData.is_check" class="ml-4">
|
||||||
|
<el-radio :label="1" size="large">通过</el-radio>
|
||||||
|
<el-radio :label="2" size="large">不通过</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="拒绝原因" v-if="formData.is_check == 2" prop="fail_msg">
|
||||||
|
<el-input type="textarea" v-model="formData.fail_msg" clearable placeholder="请输入拒绝原因"
|
||||||
|
:readonly="false" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="上传凭证" prop="is_check" v-if="formData.is_check == 1">
|
||||||
|
<material-picker :limit="5" v-model="formData.arrival_proof" />
|
||||||
|
<!-- <el-radio-group v-model="formData.is_check" class="ml-4">
|
||||||
|
<el-radio :label="1" size="large">通过</el-radio>
|
||||||
|
<el-radio :label="2" size="large">不通过</el-radio>
|
||||||
|
</el-radio-group> -->
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
</popup>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup name="merchantWithdrawEdit">
|
||||||
|
import type { FormInstance } from 'element-plus'
|
||||||
|
import Popup from '@/components/popup/index.vue'
|
||||||
|
import { apiMerchantWithdrawAdd, apimerchantwithdraw, apiMerchantWithdrawDetail, apimerchantwithdrawCheck } from '@/api/merchant_withdraw'
|
||||||
|
import { timeFormat } from '@/utils/util'
|
||||||
|
import type { PropType } from 'vue'
|
||||||
|
defineProps({
|
||||||
|
dictData: {
|
||||||
|
type: Object as PropType<Record<string, any[]>>,
|
||||||
|
default: () => ({})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const emit = defineEmits(['success', 'close'])
|
||||||
|
const formRef = shallowRef<FormInstance>()
|
||||||
|
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||||
|
const mode = ref('add')
|
||||||
|
|
||||||
|
|
||||||
|
// 弹窗标题
|
||||||
|
const popupTitle = computed(() => {
|
||||||
|
return mode.value == 'edit' ? '编辑商户供应商提现表' : '新增商户供应商提现表'
|
||||||
|
})
|
||||||
|
|
||||||
|
// 表单数据
|
||||||
|
const formData = reactive({
|
||||||
|
id: "",
|
||||||
|
is_check: '',
|
||||||
|
fail_msg: "",
|
||||||
|
arrival_proof: []
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
// 表单验证
|
||||||
|
const formRules = reactive<any>({
|
||||||
|
user_type: [{
|
||||||
|
required: true,
|
||||||
|
message: '请输入用户类型 1-商户 2-供应商',
|
||||||
|
trigger: ['blur']
|
||||||
|
}],
|
||||||
|
mer_id: [{
|
||||||
|
required: true,
|
||||||
|
message: '请输入商户id',
|
||||||
|
trigger: ['blur']
|
||||||
|
}],
|
||||||
|
supplier_id: [{
|
||||||
|
required: true,
|
||||||
|
message: '请输入供应商id',
|
||||||
|
trigger: ['blur']
|
||||||
|
}],
|
||||||
|
merchant_bank_id: [{
|
||||||
|
required: true,
|
||||||
|
message: '请输入提现账户id',
|
||||||
|
trigger: ['blur']
|
||||||
|
}],
|
||||||
|
amout: [{
|
||||||
|
required: true,
|
||||||
|
message: '请输入提现金额',
|
||||||
|
trigger: ['blur']
|
||||||
|
}],
|
||||||
|
is_check: [{
|
||||||
|
required: true,
|
||||||
|
message: '请输入审核状态 0-待审核 1-已审核 2-审核不通过',
|
||||||
|
trigger: ['blur']
|
||||||
|
}],
|
||||||
|
is_arrival: [{
|
||||||
|
required: true,
|
||||||
|
message: '请输入是否到账 0-未到账 1-已到账',
|
||||||
|
trigger: ['blur']
|
||||||
|
}],
|
||||||
|
admin_id: [{
|
||||||
|
required: true,
|
||||||
|
message: '请输入操作人员id',
|
||||||
|
trigger: ['blur']
|
||||||
|
}]
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
// 获取详情
|
||||||
|
const setFormData = async (data: Record<any, any>) => {
|
||||||
|
for (const key in formData) {
|
||||||
|
if (data[key] != null && data[key] != undefined) {
|
||||||
|
//@ts-ignore
|
||||||
|
formData[key] = data[key]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log(data)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const getDetail = async (row: Record<string, any>) => {
|
||||||
|
const data = await apiMerchantWithdrawDetail({
|
||||||
|
id: row.id
|
||||||
|
})
|
||||||
|
setFormData(data)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 提交按钮
|
||||||
|
const handleSubmit = async () => {
|
||||||
|
await formRef.value?.validate()
|
||||||
|
const data = { ...formData, }
|
||||||
|
formData.is_check == 0 ?
|
||||||
|
await apimerchantwithdrawCheck(data)
|
||||||
|
: await apimerchantwithdraw(data)
|
||||||
|
popupRef.value?.close()
|
||||||
|
emit('success')
|
||||||
|
}
|
||||||
|
|
||||||
|
//打开弹窗
|
||||||
|
const open = (type = 'add') => {
|
||||||
|
mode.value = type
|
||||||
|
popupRef.value?.open()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 关闭回调
|
||||||
|
const handleClose = () => {
|
||||||
|
emit('close')
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
open,
|
||||||
|
setFormData,
|
||||||
|
getDetail
|
||||||
|
})
|
||||||
|
</script>
|
|
@ -0,0 +1,163 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card class="!border-none mb-4" shadow="never">
|
||||||
|
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||||
|
<el-form-item label="用户类型" prop="user_type">
|
||||||
|
<el-input class="w-[280px]" v-model="queryParams.user_type" clearable placeholder="请输入用户类型" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="审核状态" prop="is_check">
|
||||||
|
<el-input class="w-[280px]" v-model="queryParams.is_check" clearable placeholder="请输入审核状态" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否到账" prop="is_arrival">
|
||||||
|
<el-input class="w-[280px]" v-model="queryParams.is_arrival" 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">
|
||||||
|
<el-button v-perms="['withdraw.merchant_withdraw/add']" type="primary" @click="handleAdd">
|
||||||
|
<template #icon>
|
||||||
|
<icon name="el-icon-Plus" />
|
||||||
|
</template>
|
||||||
|
新增
|
||||||
|
</el-button>
|
||||||
|
<el-button v-perms="['withdraw.merchant_withdraw/delete']" :disabled="!selectData.length"
|
||||||
|
@click="handleDelete(selectData)">
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
<div class="mt-4">
|
||||||
|
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" />
|
||||||
|
<!-- <el-table-column label="用户类型" prop="user_type" show-overflow-tooltip>
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ row.user_type == 1 ? "商户" : "供应商" }}
|
||||||
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
|
<el-table-column label="提现商户" prop="mer_name" show-overflow-tooltip />
|
||||||
|
<!-- <el-table-column label="供应商id" prop="supplier_id" show-overflow-tooltip /> -->
|
||||||
|
<!-- <el-table-column label="提现账户id" prop="merchant_bank_id" show-overflow-tooltip /> -->
|
||||||
|
<el-table-column label="提现银行" prop="merchant_bank_info.bank_info.name" show-overflow-tooltip />
|
||||||
|
<el-table-column label="提现金额" prop="amount" show-overflow-tooltip />
|
||||||
|
<el-table-column label="提现账号" prop="merchant_bank_info.bank_code" show-overflow-tooltip />
|
||||||
|
<el-table-column label="开户网点" prop="merchant_bank_info.bank_branch" show-overflow-tooltip />
|
||||||
|
<el-table-column label="账户名称" prop="merchant_bank_info.name" show-overflow-tooltip />
|
||||||
|
<el-table-column label="账户类型" prop="merchant_bank_info.is_own" show-overflow-tooltip>
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ row.merchant_bank_info.is_own ? "对公账户" : "个人账户" }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="审核状态" prop="" show-overflow-tooltip>
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ row.is_check == 1 ? '审核通过' : row.is_check == 2 ? "审核不通过" : "待审核" }}
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="是否到账" prop="is_arrival" show-overflow-tooltip>
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ row.is_arrival ? "已到账" : "未到账" }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column label="到账凭据" prop="arrival_proof" show-overflow-tooltip>
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-image v-for="item in row.arrival_proof" :src="item" style="width: 50px;height: 50px" />
|
||||||
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
|
<el-table-column label="操作人员" prop="admin_name" show-overflow-tooltip />
|
||||||
|
<el-table-column label="操作" width="170" fixed="right">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button v-if="row.is_check == 0" v-perms="['withdraw.merchant_withdraw/edit']" type="primary"
|
||||||
|
link @click="handleEdit(row)">
|
||||||
|
审核
|
||||||
|
</el-button>
|
||||||
|
<el-button v-if="row.is_check == 2" v-perms="['withdraw.merchant_withdraw/edit']" type="primary"
|
||||||
|
link @click="handleDelete(row.id)">
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
<el-button v-if="row.is_check == 1" v-perms="['withdraw.merchant_withdraw/delete']"
|
||||||
|
type="primary" link @click="handleEdit(row)">
|
||||||
|
提现到账
|
||||||
|
</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>
|
||||||
|
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup name="merchantWithdrawLists">
|
||||||
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
|
import { apiMerchantWithdrawLists, apiMerchantWithdrawDelete } from '@/api/merchant_withdraw'
|
||||||
|
import { timeFormat } from '@/utils/util'
|
||||||
|
import feedback from '@/utils/feedback'
|
||||||
|
import EditPopup from './edit.vue'
|
||||||
|
|
||||||
|
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||||
|
// 是否显示编辑框
|
||||||
|
const showEdit = ref(false)
|
||||||
|
|
||||||
|
|
||||||
|
// 查询条件
|
||||||
|
const queryParams = reactive({
|
||||||
|
user_type: '',
|
||||||
|
mer_id: '',
|
||||||
|
supplier_id: '',
|
||||||
|
merchant_bank_id: '',
|
||||||
|
amout: '',
|
||||||
|
is_check: '',
|
||||||
|
is_arrival: '',
|
||||||
|
arrival_proof: '',
|
||||||
|
admin_id: ''
|
||||||
|
})
|
||||||
|
|
||||||
|
// 选中数据
|
||||||
|
const selectData = ref<any[]>([])
|
||||||
|
|
||||||
|
// 表格选择后回调事件
|
||||||
|
const handleSelectionChange = (val: any[]) => {
|
||||||
|
selectData.value = val.map(({ id }) => id)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取字典数据
|
||||||
|
const { dictData } = useDictData('')
|
||||||
|
|
||||||
|
// 分页相关
|
||||||
|
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||||
|
fetchFun: apiMerchantWithdrawLists,
|
||||||
|
params: queryParams
|
||||||
|
})
|
||||||
|
|
||||||
|
// 添加
|
||||||
|
const handleAdd = async () => {
|
||||||
|
showEdit.value = true
|
||||||
|
await nextTick()
|
||||||
|
editRef.value?.open('add')
|
||||||
|
}
|
||||||
|
|
||||||
|
// 编辑
|
||||||
|
const handleEdit = async (data: any) => {
|
||||||
|
showEdit.value = true
|
||||||
|
await nextTick()
|
||||||
|
editRef.value?.open('edit')
|
||||||
|
editRef.value?.setFormData(data)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除
|
||||||
|
const handleDelete = async (id: number | any[]) => {
|
||||||
|
await feedback.confirm('确定要删除?')
|
||||||
|
await apiMerchantWithdrawDelete({ id })
|
||||||
|
getLists()
|
||||||
|
}
|
||||||
|
|
||||||
|
getLists()
|
||||||
|
</script>
|
||||||
|
|
|
@ -1,15 +1,23 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose"
|
||||||
|
:bottom-btn="false">
|
||||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||||
<el-form-item label="用户id" prop="uid">
|
<el-form-item label="用户id" prop="uid">
|
||||||
<el-input v-model="formData.uid" clearable placeholder="请输入用户id" :readonly="false" />
|
<el-input v-model="formData.uid" clearable placeholder="请输入用户id" :readonly="false" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="反馈内容" prop="content">
|
<el-form-item label="反馈内容" prop="content">
|
||||||
<el-input v-model="formData.content" clearable placeholder="请输入反馈内容" :readonly="false" />
|
<el-input v-model="formData.content" type="textarea" clearable placeholder="请输入反馈内容"
|
||||||
|
:readonly="false" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="反馈图片" prop="images">
|
<el-form-item label="反馈图片" prop="images">
|
||||||
<el-input v-model="formData.images" clearable placeholder="请输入反馈图片" :readonly="false" />
|
<!-- <el-input v-model="formData.images" clearable placeholder="请输入反馈图片" :readonly="false" /> -->
|
||||||
|
|
||||||
|
<el-image v-for="(item, index) in formData.images" :key="index" style="width: 100px; height: 100px"
|
||||||
|
:src="item" :zoom-rate="1.2" :max-scale="7" :min-scale="0.2" :preview-src-list="formData.images"
|
||||||
|
:initial-index="4" fit="cover" />
|
||||||
|
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="联系姓名" prop="name">
|
<el-form-item label="联系姓名" prop="name">
|
||||||
<el-input v-model="formData.name" clearable placeholder="请输入联系姓名" :readonly="false" />
|
<el-input v-model="formData.name" clearable placeholder="请输入联系姓名" :readonly="false" />
|
||||||
|
|
Loading…
Reference in New Issue