|
@@ -133,6 +133,14 @@
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
<span class="dialog-footer">
|
|
<span class="dialog-footer">
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="detailData.status === 1"
|
|
|
|
|
+ type="success"
|
|
|
|
|
+ @click="handleCreateApplication"
|
|
|
|
|
+ :loading="applyLoading"
|
|
|
|
|
+ >
|
|
|
|
|
+ 分账接收方创建申请
|
|
|
|
|
+ </el-button>
|
|
|
<el-button @click="handleCloseDetailDialog">关闭</el-button>
|
|
<el-button @click="handleCloseDetailDialog">关闭</el-button>
|
|
|
</span>
|
|
</span>
|
|
|
</template>
|
|
</template>
|
|
@@ -153,6 +161,7 @@ export default {
|
|
|
return {
|
|
return {
|
|
|
loading: false,
|
|
loading: false,
|
|
|
detailLoading: false,
|
|
detailLoading: false,
|
|
|
|
|
+ applyLoading: false,
|
|
|
searchForm: {
|
|
searchForm: {
|
|
|
order_no: '',
|
|
order_no: '',
|
|
|
status: ''
|
|
status: ''
|
|
@@ -285,6 +294,32 @@ export default {
|
|
|
this.detailData = {}
|
|
this.detailData = {}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
+ // 分账接收方创建申请
|
|
|
|
|
+ async handleCreateApplication() {
|
|
|
|
|
+ if (!this.axiosInstance) {
|
|
|
|
|
+ this.$message.error('无法获取请求实例')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ this.applyLoading = true
|
|
|
|
|
+ try {
|
|
|
|
|
+ const res = await this.axiosInstance.put(`/lakala/profit_share_receiver/${this.detailData.id}/apply`)
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ this.$message.success('分账接收方创建申请已提交')
|
|
|
|
|
+ this.handleCloseDetailDialog()
|
|
|
|
|
+ // 重新加载列表数据以更新状态
|
|
|
|
|
+ await this.fetchData()
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.error(res.msg || res.message || '申请提交失败')
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ console.error('分账接收方创建申请失败:', error)
|
|
|
|
|
+ this.$message.error('申请提交失败: ' + (error.message || '未知错误'))
|
|
|
|
|
+ } finally {
|
|
|
|
|
+ this.applyLoading = false
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
// 分页相关
|
|
// 分页相关
|
|
|
handleSizeChange(val) {
|
|
handleSizeChange(val) {
|
|
|
this.pagination.limit = val
|
|
this.pagination.limit = val
|