This commit is contained in:
zmj 2024-05-14 22:46:30 +08:00
parent c081f3269f
commit df45340476
2 changed files with 94 additions and 54 deletions

View File

@ -1,54 +1,65 @@
<template>
<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-item label="用户类型 1-商户 2-供应商" prop="user_type">
<el-input v-model="formData.user_type" clearable placeholder="请输入用户类型 1-商户 2-供应商" :readonly="false" />
<el-form-item label="提现商户">
<el-input v-model="formData.mer_name" clearable placeholder="请输入用户类型 1-商户 2-供应商" :readonly="true" />
</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 label="提现银行">
<el-input v-model="formData.merchant_bank_info.bank_info.name" clearable placeholder="请输入商户id"
:readonly="true" />
</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 label="提现金额">
<el-input v-model="formData.amount" clearable placeholder="请输入供应商id" :readonly="true" />
</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 label="提现账号">
<el-input v-model="formData.merchant_bank_info.bank_code" clearable placeholder="请输入提现账户id"
:readonly="true" />
</el-form-item>
<el-form-item label="提现金额" prop="amout">
<el-input v-model="formData.amout" clearable placeholder="请输入提现金额" :readonly="false" />
<el-form-item label="开户网点">
<el-input v-model="formData.merchant_bank_info.bank_branch" clearable placeholder="请输入提现金额"
:readonly="true" />
</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 label="账户名称">
<el-input v-model="formData.merchant_bank_info.name" clearable placeholder="账户类型"
:readonly="true" />
</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 label="账户类型">
<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 label="到账凭据" prop="arrival_proof">
<el-input v-model="formData.arrival_proof" clearable placeholder="请输入到账凭据" :readonly="false" />
<el-form-item label="审核状态">
<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 label="操作人员id" prop="admin_id">
<el-input v-model="formData.admin_id" clearable placeholder="请输入操作人员id" :readonly="false" />
<el-form-item label="是否到账">
<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 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="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="请输入拒绝原因"
<el-form-item label="拒绝原因" v-if="form.is_check == 2" prop="fail_msg">
<el-input type="textarea" v-model="form.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" />
<material-picker :limit="5" v-model="form.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>
@ -80,15 +91,31 @@ const mode = ref('add')
//
const popupTitle = computed(() => {
return mode.value == 'edit' ? '编辑商户供应商提现表' : '新增商户供应商提现表'
return mode.value == 'edit' ? '商户供应商提现表' : '商户供应商提现表'
})
//
const formData = reactive({
id: "",
mer_name: "",
merchant_bank_info: {},
amount: "",
is_arrival: "",
is_check: '',
fail_msg: "",
admin_name: "",
arrival_proof: []
})
const form = reactive({
id: '',
is_check: '',
fail_msg: "",
arrival_proof: []
})
@ -145,8 +172,10 @@ const setFormData = async (data: Record<any, any>) => {
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>) => {
@ -160,7 +189,7 @@ const getDetail = async (row: Record<string, any>) => {
//
const handleSubmit = async () => {
await formRef.value?.validate()
const data = { ...formData, }
const data = { ...form, }
formData.is_check == 0 ?
await apimerchantwithdrawCheck(data)
: await apimerchantwithdraw(data)

View File

@ -1,21 +1,32 @@
<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 class="mb-[-16px]" :model="queryParams" label-width="100px">
<el-row>
<el-col :span="6">
<el-form-item label="审核状态" prop="user_type">
<el-select v-model="queryParams.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-col>
<el-col :span="6">
<el-form-item label="是否到账" prop="is_arrival">
<el-select v-model="queryParams.is_arrival">
<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-card>
<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="操作" 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 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 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']"
@ -115,6 +126,7 @@ const queryParams = reactive({
amout: '',
is_check: '',
is_arrival: '',
is_own: "",
arrival_proof: '',
admin_id: ''
})
@ -160,4 +172,3 @@ const handleDelete = async (id: number | any[]) => {
getLists()
</script>