add
This commit is contained in:
parent
c081f3269f
commit
df45340476
|
@ -1,54 +1,65 @@
|
||||||
<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">
|
||||||
<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="提现商户">
|
||||||
|
<el-input v-model="formData.mer_name" clearable placeholder="请输入用户类型 1-商户 2-供应商" :readonly="true" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <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>
|
||||||
<el-form-item label="商户id" prop="mer_id">
|
<el-form-item label="提现银行">
|
||||||
<el-input v-model="formData.mer_id" clearable placeholder="请输入商户id" :readonly="false" />
|
<el-input v-model="formData.merchant_bank_info.bank_info.name" clearable placeholder="请输入商户id"
|
||||||
|
:readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="供应商id" prop="supplier_id">
|
<el-form-item label="提现金额">
|
||||||
<el-input v-model="formData.supplier_id" clearable placeholder="请输入供应商id" :readonly="false" />
|
<el-input v-model="formData.amount" clearable placeholder="请输入供应商id" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="提现账户id" prop="merchant_bank_id">
|
<el-form-item label="提现账号">
|
||||||
<el-input v-model="formData.merchant_bank_id" clearable placeholder="请输入提现账户id" :readonly="false" />
|
<el-input v-model="formData.merchant_bank_info.bank_code" clearable placeholder="请输入提现账户id"
|
||||||
|
:readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="提现金额" prop="amout">
|
<el-form-item label="开户网点">
|
||||||
<el-input v-model="formData.amout" clearable placeholder="请输入提现金额" :readonly="false" />
|
<el-input v-model="formData.merchant_bank_info.bank_branch" clearable placeholder="请输入提现金额"
|
||||||
|
:readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="审核状态 0-待审核 1-已审核 2-审核不通过" prop="is_check">
|
<el-form-item label="账户名称">
|
||||||
<el-input v-model="formData.is_check" clearable placeholder="请输入审核状态 0-待审核 1-已审核 2-审核不通过"
|
<el-input v-model="formData.merchant_bank_info.name" clearable placeholder="账户类型"
|
||||||
:readonly="false" />
|
:readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否到账 0-未到账 1-已到账" prop="is_arrival">
|
<el-form-item label="账户类型">
|
||||||
<el-input v-model="formData.is_arrival" clearable placeholder="请输入是否到账 0-未到账 1-已到账" :readonly="false" />
|
<el-select v-model="formData.merchant_bank_info.is_own">
|
||||||
|
<el-option label="对公" :value="1"></el-option>
|
||||||
|
<el-option label="个人" :value="0"></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="到账凭据" prop="arrival_proof">
|
<el-form-item label="审核状态">
|
||||||
<el-input v-model="formData.arrival_proof" clearable placeholder="请输入到账凭据" :readonly="false" />
|
<el-select v-model="formData.is_check">
|
||||||
|
<el-option label="审核不通过" :value="2"></el-option>
|
||||||
|
<el-option label="审核通过" :value="1"></el-option>
|
||||||
|
<el-option label="待审核" :value="0"></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="操作人员id" prop="admin_id">
|
<el-form-item label="是否到账">
|
||||||
<el-input v-model="formData.admin_id" clearable placeholder="请输入操作人员id" :readonly="false" />
|
<el-select v-model="formData.is_arrival">
|
||||||
|
<el-option label="到账" :value="1"></el-option>
|
||||||
|
<el-option label="未到账" :value="0"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="操作人员">
|
||||||
|
<el-input v-model="formData.admin_name" clearable placeholder="请输入操作人员id" :readonly="true" />
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item label="审核意见" prop="is_check" v-if="formData.is_check == 0">
|
<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-group v-model="form.is_check" class="ml-4">
|
||||||
<el-radio :label="1" size="large">通过</el-radio>
|
<el-radio :label="1" size="large">通过</el-radio>
|
||||||
<el-radio :label="2" size="large">不通过</el-radio>
|
<el-radio :label="2" size="large">不通过</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="拒绝原因" v-if="formData.is_check == 2" prop="fail_msg">
|
<el-form-item label="拒绝原因" v-if="form.is_check == 2" prop="fail_msg">
|
||||||
<el-input type="textarea" v-model="formData.fail_msg" clearable placeholder="请输入拒绝原因"
|
<el-input type="textarea" v-model="form.fail_msg" clearable placeholder="请输入拒绝原因"
|
||||||
:readonly="false" />
|
:readonly="false" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="上传凭证" prop="is_check" v-if="formData.is_check == 1">
|
<el-form-item label="上传凭证" prop="is_check" v-if="formData.is_check == 1">
|
||||||
<material-picker :limit="5" v-model="formData.arrival_proof" />
|
<material-picker :limit="5" v-model="form.arrival_proof" />
|
||||||
<!-- <el-radio-group v-model="formData.is_check" class="ml-4">
|
<!-- <el-radio-group v-model="formData.is_check" class="ml-4">
|
||||||
<el-radio :label="1" size="large">通过</el-radio>
|
<el-radio :label="1" size="large">通过</el-radio>
|
||||||
<el-radio :label="2" size="large">不通过</el-radio>
|
<el-radio :label="2" size="large">不通过</el-radio>
|
||||||
|
@ -80,15 +91,31 @@ const mode = ref('add')
|
||||||
|
|
||||||
// 弹窗标题
|
// 弹窗标题
|
||||||
const popupTitle = computed(() => {
|
const popupTitle = computed(() => {
|
||||||
return mode.value == 'edit' ? '编辑商户供应商提现表' : '新增商户供应商提现表'
|
return mode.value == 'edit' ? '商户供应商提现表' : '商户供应商提现表'
|
||||||
})
|
})
|
||||||
|
|
||||||
// 表单数据
|
// 表单数据
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
id: "",
|
id: "",
|
||||||
|
mer_name: "",
|
||||||
|
merchant_bank_info: {},
|
||||||
|
amount: "",
|
||||||
|
is_arrival: "",
|
||||||
|
is_check: '',
|
||||||
|
fail_msg: "",
|
||||||
|
admin_name: "",
|
||||||
|
arrival_proof: []
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
const form = reactive({
|
||||||
|
id: '',
|
||||||
is_check: '',
|
is_check: '',
|
||||||
fail_msg: "",
|
fail_msg: "",
|
||||||
arrival_proof: []
|
arrival_proof: []
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@ -145,8 +172,10 @@ const setFormData = async (data: Record<any, any>) => {
|
||||||
formData[key] = data[key]
|
formData[key] = data[key]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(data)
|
if (data.arrival_proof.length) {
|
||||||
|
form.arrival_proof = JSON.parse(data.arrival_proof)
|
||||||
|
}
|
||||||
|
form.id = data.id
|
||||||
}
|
}
|
||||||
|
|
||||||
const getDetail = async (row: Record<string, any>) => {
|
const getDetail = async (row: Record<string, any>) => {
|
||||||
|
@ -160,7 +189,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||||
// 提交按钮
|
// 提交按钮
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
await formRef.value?.validate()
|
await formRef.value?.validate()
|
||||||
const data = { ...formData, }
|
const data = { ...form, }
|
||||||
formData.is_check == 0 ?
|
formData.is_check == 0 ?
|
||||||
await apimerchantwithdrawCheck(data)
|
await apimerchantwithdrawCheck(data)
|
||||||
: await apimerchantwithdraw(data)
|
: await apimerchantwithdraw(data)
|
||||||
|
|
|
@ -1,21 +1,32 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-card class="!border-none mb-4" shadow="never">
|
<el-card class="!border-none mb-4" shadow="never">
|
||||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
<el-form class="mb-[-16px]" :model="queryParams" label-width="100px">
|
||||||
<el-form-item label="用户类型" prop="user_type">
|
<el-row>
|
||||||
<el-input class="w-[280px]" v-model="queryParams.user_type" clearable placeholder="请输入用户类型" />
|
<el-col :span="6">
|
||||||
</el-form-item>
|
<el-form-item label="审核状态" prop="user_type">
|
||||||
<el-form-item label="审核状态" prop="is_check">
|
<el-select v-model="queryParams.is_check">
|
||||||
<el-input class="w-[280px]" v-model="queryParams.is_check" clearable placeholder="请输入审核状态" />
|
<el-option label="审核不通过" :value="2"></el-option>
|
||||||
</el-form-item>
|
<el-option label="审核通过" :value="1"></el-option>
|
||||||
<el-form-item label="是否到账" prop="is_arrival">
|
<el-option label="待审核" :value="0"></el-option>
|
||||||
<el-input class="w-[280px]" v-model="queryParams.is_arrival" clearable placeholder="请输入是否到账" />
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-form-item>
|
<el-col :span="6">
|
||||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
<el-form-item label="是否到账" prop="is_arrival">
|
||||||
<el-button @click="resetParams">重置</el-button>
|
<el-select v-model="queryParams.is_arrival">
|
||||||
</el-form-item>
|
<el-option label="到账" :value="1"></el-option>
|
||||||
|
<el-option label="未到账" :value="0"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||||
|
<el-button @click="resetParams">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||||
|
@ -69,12 +80,12 @@
|
||||||
<el-table-column label="操作人员" prop="admin_name" show-overflow-tooltip />
|
<el-table-column label="操作人员" prop="admin_name" show-overflow-tooltip />
|
||||||
<el-table-column label="操作" width="170" fixed="right">
|
<el-table-column label="操作" width="170" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button v-if="row.is_check == 0" v-perms="['withdraw.merchant_withdraw/edit']" type="primary"
|
<el-button v-if="row.is_check == 0" v-perms="['withdraw.merchant_withdraw/edit']"
|
||||||
link @click="handleEdit(row)">
|
type="primary" link @click="handleEdit(row)">
|
||||||
审核
|
审核
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-if="row.is_check == 2" v-perms="['withdraw.merchant_withdraw/edit']" type="primary"
|
<el-button v-if="row.is_check == 2" v-perms="['withdraw.merchant_withdraw/edit']"
|
||||||
link @click="handleDelete(row.id)">
|
type="primary" link @click="handleDelete(row.id)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-if="row.is_check == 1" v-perms="['withdraw.merchant_withdraw/delete']"
|
<el-button v-if="row.is_check == 1" v-perms="['withdraw.merchant_withdraw/delete']"
|
||||||
|
@ -115,6 +126,7 @@ const queryParams = reactive({
|
||||||
amout: '',
|
amout: '',
|
||||||
is_check: '',
|
is_check: '',
|
||||||
is_arrival: '',
|
is_arrival: '',
|
||||||
|
is_own: "",
|
||||||
arrival_proof: '',
|
arrival_proof: '',
|
||||||
admin_id: ''
|
admin_id: ''
|
||||||
})
|
})
|
||||||
|
@ -160,4 +172,3 @@ const handleDelete = async (id: number | any[]) => {
|
||||||
|
|
||||||
getLists()
|
getLists()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue