Commit bd6f839b by liangjianmin

feat(apply, approve): enhance application and approval pages with improved data…

feat(apply, approve): enhance application and approval pages with improved data handling and UI updates

- Update application form to bind apply type name directly for better user experience
- Refactor approval detail page to display comprehensive order information, including agent fees and currency details
- Implement approval log section to track changes and decisions made during the approval process
- Add API endpoint for fetching order details to streamline data retrieval
- Improve overall layout and styling for better readability and user interaction
parent 3e43dae6
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<u-form :model="form" ref="formRef" labelWidth="210" labelPosition="left"> <u-form :model="form" ref="formRef" labelWidth="210" labelPosition="left">
<view class="form-section"> <view class="form-section">
<u-form-item label="申请类型" prop="apply_type" required borderBottom @click="showTypePicker = true"> <u-form-item label="申请类型" prop="apply_type" required borderBottom @click="showTypePicker = true">
<u--input v-model="form.apply_type" disabled disabledColor="#ffffff" placeholder="请选择" border="none" inputAlign="right"></u--input> <u--input v-model="apply_type_name" disabled disabledColor="#ffffff" placeholder="请选择" border="none" inputAlign="right"></u--input>
<u-icon slot="right" name="arrow-down" color="#c0c4cc"></u-icon> <u-icon slot="right" name="arrow-down" color="#c0c4cc"></u-icon>
</u-form-item> </u-form-item>
<u-form-item label="订单号" prop="order_no" required borderBottom> <u-form-item label="订单号" prop="order_no" required borderBottom>
...@@ -69,11 +69,12 @@ ...@@ -69,11 +69,12 @@
relief_reason: '', relief_reason: '',
status: 0 //待处理 status: 0 //待处理
}, },
apply_type_name: '',
errorMsg: '', errorMsg: '',
showTypePicker: false, showTypePicker: false,
showDeductionPicker: false, showDeductionPicker: false,
typeOptions: [ typeOptions: [
{ name: '费用减免申请', value: '1' } { name: '费用减免申请', value: 12 }
], ],
deductionOptions: [ deductionOptions: [
{ name: '代理费减免', value: '1' } { name: '代理费减免', value: '1' }
...@@ -87,7 +88,8 @@ ...@@ -87,7 +88,8 @@
* @return {void} * @return {void}
*/ */
onTypeSelect(item) { onTypeSelect(item) {
this.form.apply_type = item.name; this.form.apply_type = item.value;
this.apply_type_name = item.name;
this.showTypePicker = false; this.showTypePicker = false;
}, },
......
...@@ -21,8 +21,22 @@ ...@@ -21,8 +21,22 @@
<view class="section"> <view class="section">
<view class="section-title">订单信息</view> <view class="section-title">订单信息</view>
<u-cell-group> <u-cell-group>
<u-cell title="订单金额(商币)" :value="detail.apply_fee_amount"></u-cell> <u-cell title="订单金额(原币)" :value="orderInfo.order_price"></u-cell>
<u-cell title="减免明细" :value="detail.relief_detail" :border="false"></u-cell> <u-cell title="订单币别" :value="orderInfo.currency_id_cn"></u-cell>
<u-cell :border="false">
<template #title>
<view class="row verCenter bothSide" style="width: 100%;">
<view class="row verCenter">
<text>代理费金额:</text>
<text>{{ orderInfo.agent_price }}</text>
</view>
<view class="row verCenter">
<text>最低代理费:</text>
<text>{{ orderInfo.agent_min_amount }}</text>
</view>
</view>
</template>
</u-cell>
</u-cell-group> </u-cell-group>
</view> </view>
...@@ -40,7 +54,29 @@ ...@@ -40,7 +54,29 @@
</view> </view>
</view> </view>
<!-- 审批日志 - 暂不渲染,等通知 --> <!-- 审批日志 -->
<view class="section" v-if="detail.items && detail.items.length > 0">
<view class="section-title">审批日志</view>
<view class="timeline-wrap">
<view class="timeline-item" v-for="(log, index) in detail.items" :key="index">
<view class="timeline-dot"></view>
<view class="timeline-content">
<view class="log-header row verCenter bothSide">
<text class="log-time">{{ log.audit_time }}</text>
<text class="log-user">审批人:{{ log.auditor_name }}</text>
</view>
<view class="log-body" v-if="log.remark">
<text class="log-label">审批意见:</text>
<text class="log-text">{{ log.remark }}</text>
</view>
<view class="log-footer">
<text class="log-label">审批结果:</text>
<text :class="['log-status', log.approval_status === 1 ? 'approved' : 'rejected']">{{ log.approve_status_cn }}</text>
</view>
</view>
</view>
</view>
</view>
<view class="bottom-actions" v-if="detail.status === 0"> <view class="bottom-actions" v-if="detail.status === 0">
<u-button text="取消" shape="circle" :customStyle="{ flex: 1, marginRight: '24rpx', background: '#ffffff', color: '#606266', border: '1rpx solid #dcdfe6' }" @click="goBack"></u-button> <u-button text="取消" shape="circle" :customStyle="{ flex: 1, marginRight: '24rpx', background: '#ffffff', color: '#606266', border: '1rpx solid #dcdfe6' }" @click="goBack"></u-button>
...@@ -77,6 +113,7 @@ ...@@ -77,6 +113,7 @@
return { return {
id: '', id: '',
detail: {}, detail: {},
orderInfo: {},
showModal: false, showModal: false,
modalStatus: 1, modalStatus: 1,
remark: '', remark: '',
...@@ -105,7 +142,22 @@ ...@@ -105,7 +142,22 @@
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: `${this.detail.order_sn} - 审核详情` title: `${this.detail.order_sn} - 审核详情`
}); });
this.getOrderInfo(this.detail.order_sn);
}
} }
});
},
/**
* 获取订单信息
* @param {String} orderSn - 订单号
* @return {void}
*/
getOrderInfo(orderSn) {
this.request(API.getOrderDetail, 'GET', { order_sn: orderSn }).then(res => {
if (res.code === 0) {
var { list = [] } = res.data || {};
this.orderInfo = list[0] || {};
} }
}); });
}, },
......
...@@ -56,6 +56,10 @@ const API = { ...@@ -56,6 +56,10 @@ const API = {
*/ */
getCustomerName: API_BASE + '/ajax/customerNameOption', getCustomerName: API_BASE + '/ajax/customerNameOption',
/** /**
* 获取订单详情
*/
getOrderDetail: API_BASE + '/api/order/orderList',
/**
* 获取审批列表 * 获取审批列表
*/ */
feeApproveList: API_BASE + '/api/approve/feeApproveList', feeApproveList: API_BASE + '/api/approve/feeApproveList',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment