feat: 新增账期价格初审 · 账期审核

This commit is contained in:
lonewolfyx 2026-03-12 13:10:30 +08:00
parent c39e986f94
commit 000e339e74
4 changed files with 332 additions and 4 deletions

View File

@ -9,3 +9,31 @@ export const getPricePreliminaryReviewList = (data, query) => {
params: query
})
}
// 根据 ID 获取账期价格初审详情
export const getPricePreliminaryReviewDetail = (query) => {
return request({
method: 'get',
url: '/bussiness/baseusercredithistory/get-creditline-creditperiod',
params: query
})
}
// 获取账期审核/额度审核列表(两个列表一个接口)
export const getLastPaymentAndQuotaList = (data, query) => {
return request({
method: 'post',
url: '/bussiness/baseusercredithistory/goods-credit-period-initial-review-list',
params: query,
data: data,
})
}
//账期终审/额度终审的回退(两个列表一个接口)
export const putBackDataLastPaymentOrQuota = (data) => {
return request({
method: 'put',
url: '/bussiness/baseusercredithistory/goods-credit-period-repeatedly-review-back',
data,
})
}

View File

@ -0,0 +1,107 @@
<template>
<uni-drawer ref="drawerContainerRef" :width="width" mode="right">
<uni-nav-bar
:border="false"
:fixed="true"
left-icon="left"
status-bar
title="账期审核"
@clickLeft="hideDrawer"
/>
<uni-collapse ref="collapse">
<uni-collapse-item
v-for="row in tableData"
:key="row.creditHistId"
:title="row.shortName"
open
>
<view class="padding">
<view class="context">
<view class="label">
<text>货主:</text>
<text>{{ row.companyName }}</text>
</view>
<view class="label">
<text>状态:</text>
<text>{{ row.state }}</text>
</view>
<view class="label">
<text>老账期:</text>
<text>{{ row.oldCreditPeriod }}</text>
</view>
<view class="label">
<text>新账期:</text>
<text>{{ row.creditPeriod }}</text>
</view>
<view class="label">
<text>申请日期:</text>
<text>{{ row.addDate }}</text>
</view>
<view class="label">
<text></text>
<button class="mini-btn" size="mini" type="primary" @click="handleReview(row)">查看</button>
</view>
</view>
</view>
</uni-collapse-item>
</uni-collapse>
</uni-drawer>
<AccountPeriodReview ref="AccountPeriodReviewRef" @refresh="handleQuery"/>
</template>
<script setup>
import {defineExpose, ref} from 'vue'
import {getLastPaymentAndQuotaList} from "../../../../api/AccountPricePreliminaryRreview.js";
import AccountPeriodReview from "./components/AccountPeriodReview.vue";
//
defineOptions({
name: 'AccountPeriod'
})
const width = ref(document.documentElement.clientWidth || document.body.clientWidth)
const id = ref('')
const queryParams = ref({})
const drawerContainerRef = ref()
const AccountPeriodReviewRef = ref()
const tableData = ref([])
const total = ref()
const paging = ref({
pageNum: 1,
pageSize: 100,
})
const handleQuery = async () => {
uni.showLoading({
title: '加载中'
});
const {rows, total:count} = await getLastPaymentAndQuotaList(queryParams.value, paging.value)
tableData.value = rows
total.value = count
uni.hideLoading()
}
const openDrawer = async (item) => {
drawerContainerRef.value.open()
queryParams.value = {
userId: item.userId,
type: 0
}
await handleQuery()
}
defineExpose({openDrawer})
const hideDrawer = () => {
drawerContainerRef.value.close()
}
const handleReview = (data) => {
AccountPeriodReviewRef.value.openDrawer(data)
}
</script>

View File

@ -0,0 +1,154 @@
<template>
<uni-drawer ref="drawerContainerRef" :width="width" mode="right">
<uni-nav-bar
:border="false"
:fixed="true"
left-icon="left"
status-bar
title="账期审核"
@clickLeft="hideDrawer"
/>
<view class="padding">
<uni-section :subTitle="queryParams.userName" title="商业公司名称:" type="line"/>
<uni-section :subTitle="queryParams.companyName" title="货主:" type="line"/>
<uni-section
:subTitle="`${queryParams.creditPeriod} - 现有信用账期:${queryParams.oldCreditPeriod}`"
:title="`${onCompanySelect(queryParams.companyId)}:`"
type="line"
/>
<uni-section :subTitle="queryParams.remark" title="备注:" type="line"/>
<uni-section class="margin-bottom" title="回退原因:" type="line">
<uni-easyinput v-model="queryParams.backReasonCredit" placeholder="请输入回退内容"/>
</uni-section>
<view class="flex">
<button class="mini-btn" size="mini" type="primary" @click="handleBack">回退</button>
<button class="mini-btn" size="mini" type="default" @click="handleSubmit">初审通过</button>
</view>
</view>
</uni-drawer>
</template>
<script setup>
import {defineEmits, defineExpose, ref} from 'vue'
import {putBackDataLastPaymentOrQuota} from "../../../../../api/AccountPricePreliminaryRreview";
//
defineOptions({
name: 'AccountPeriodReview'
})
const emit = defineEmits(['refresh'])
const width = ref(document.documentElement.clientWidth || document.body.clientWidth)
const queryParams = ref({})
const drawerContainerRef = ref()
const tableData = ref([])
const total = ref(0)
const paging = ref({
pageNum: 1,
pageSize: 100,
})
//
const onCompanySelect = (type) => {
switch (type) {
case '1':
return 'ZOP信用期限(天)'
case '2':
return 'GOP信用期限(天)'
case '3':
return 'LOP信用期限(天)'
case '4':
return 'HOP信用期限(天)'
default:
return '';
}
}
const openDrawer = async (data) => {
drawerContainerRef.value.open()
queryParams.value = data
}
defineExpose({openDrawer})
const hideDrawer = () => {
drawerContainerRef.value.close()
}
const handleBack = () => {
if (!queryParams.value.backReasonCredit) {
return uni.showToast({
title: '请填写回退内容',
icon: 'none',
})
}
uni.showModal({
title: '提示',
content: '您确定是否要回退记录?',
success: async function (res) {
if (res.confirm) {
uni.showLoading({
title: '加载中'
});
await putBackDataLastPaymentOrQuota({
creditHistId: queryParams.value.creditHistId,
});
uni.showToast({
title: '操作成功',
icon: 'none',
duration: 2000
});
uni.hideLoading()
hideDrawer()
emit('refresh')
}
}
})
}
const handleSubmit = () => {
uni.showModal({
title: '提示',
content: '您确认要进行审核通过吗?',
success: async function (res) {
if (res.confirm) {
uni.showLoading({
title: '加载中'
});
await directorLastReviewPayment({
creditHistId: queryParams.value.creditHistId
})
uni.showToast({
title: '操作成功',
icon: 'none',
duration: 2000
});
uni.hideLoading()
hideDrawer()
emit('refresh')
}
}
})
}
</script>

View File

@ -14,7 +14,6 @@
</uni-forms>
</MBCard>
<uni-table ref="table" :loading="loading" emptyText="暂无更多数据" stripe>
<uni-tr>
<uni-th align="center" width="50">序号</uni-th>
@ -30,22 +29,49 @@
<uni-td>{{ item.areaName }}</uni-td>
<uni-td>
<view v-if="item.zhangqi > 0">
<button class="uni-button" size="mini" type="submit">编辑</button>
<button
class="uni-button"
size="mini"
type="submit"
@click="handleShowAccountPeriod(item)"
>编辑
</button>
</view>
</uni-td>
<uni-td>
<view v-if="item.edu > 0">
<button class="uni-button" size="mini" type="submit">编辑</button>
<button
class="uni-button"
size="mini"
type="submit"
@click="handleShowCreditLimit(item)"
>编辑
</button>
</view>
</uni-td>
<uni-td>
<view v-if="item.bg > 0">
<button class="uni-button" size="mini" type="submit">编辑</button>
<button
class="uni-button"
size="mini"
type="submit"
@click="handleShowPrice(item)"
>编辑
</button>
</view>
</uni-td>
</uni-tr>
</uni-table>
<!-- 账期审核 -->
<AccountPeriod ref="AccountPeriodRef"/>
<!-- 额度审核 -->
<!-- 价格审核 -->
</view>
</template>
@ -57,6 +83,7 @@ import UniFormsItem from "../../../uni_modules/uni-forms/components/uni-forms-it
import BusinessCompany from "../../../components/BusinessCompany.vue";
import UniForms from "../../../uni_modules/uni-forms/components/uni-forms/uni-forms.vue";
import {getPricePreliminaryReviewList} from "../../../api/AccountPricePreliminaryRreview";
import AccountPeriod from "./children/AccountPeriod.vue";
defineOptions({
name: "AccountPricePreliminaryRreview"
@ -71,6 +98,8 @@ const paging = ref({
pageSize: 100,
})
const AccountPeriodRef = ref()
const handleQuery = async () => {
const data = await getPricePreliminaryReviewList(queryParams.value, paging.value)
tableData.value = data.rows
@ -81,4 +110,14 @@ const handleQuery = async () => {
onMounted(async () => {
await handleQuery()
})
const handleShowAccountPeriod = (item) => {
AccountPeriodRef.value.openDrawer(item)
}
const handleShowCreditLimit = (item) => {
}
const handleShowPrice = (item) => {
}
</script>