Browse Source

fix:区域字段优化

jiayubo 5 days ago
parent
commit
1b21b6fa77

+ 34 - 0
src/api/finance/settlement.js

@@ -25,6 +25,40 @@ export function exportEx(data) {
       data
     })
   }
+ //区域公司订单抽成结算
+ export function regionalsettlement(data) {
+  return request({
+    url: `/core/users/orders/area/settlement`,
+    method: 'post',
+    data
+  })
+}
+ //服务中心订单抽成结算
+ export function serviceSettlement(data) {
+  return request({
+    url: `/core/users/orders/serviceCentre/settlement`,
+    method: 'post',
+    data
+  })
+}
 
 
 
+  //结算申请
+export function applyOrderSettlement(data) {
+    return request({
+      url: `/core/orderSettlementApplication/web/applyOrderSettlement`,
+      method: 'post',
+      data
+    })
+  }
+
+
+//区域公司/服务中心订单结算审核
+export function auditorOrderSettlement(data) {
+  return request({
+    url: `/core/orderSettlementApplication/web/auditorOrderSettlement`,
+    method: 'post',
+    data
+  })
+}

+ 47 - 0
src/api/finance/withdrawal.js

@@ -0,0 +1,47 @@
+import request from '@/utils/request'
+
+//查询志愿者提现申请记录列表
+export function takeList(query) {
+  return request({
+    url: '/core/volunteer/take/list',
+    method: 'get',
+    params: query
+  })
+}
+//查询志愿者打款单记录列表
+export function paymentList(query) {
+    return request({
+      url: '/core/volunteer/payment/list',
+      method: 'get',
+      params: query
+    })
+  }
+  
+
+  //提现审批
+  export function takeApproval(data) {
+      return request({
+        url: `/core/volunteer/take/approval`,
+        method: 'post',
+        data
+      })
+    }
+ 
+    //创建志愿者打款单
+    export function careatPayment(data) {
+        return request({
+          url: `/core/volunteer/payment`,
+          method: 'post',
+          data
+        })
+      }
+    
+      
+//打款单验证
+      export function payoutCheck(data) {
+        return request({
+          url: `/core/volunteer/payment/payoutCheck`,
+          method: 'post',
+          data
+        })
+      }

+ 6 - 1
src/components/DictTag/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <template v-for="(item, index) in options">
-      <template v-if="values.includes(item.value)">
+      <template v-if="item&&values.includes(item.value)">
         <span
           v-if="(item.elTagType == 'default' || item.elTagType == '') && (item.elTagClass == '' || item.elTagClass == null)"
           :key="item.value"
@@ -73,6 +73,11 @@ function handleArray(array) {
     return pre + " " + cur;
   });
 }
+
+function test(values,item){
+  console.log(values,item);
+  
+}
 </script>
 
 <style scoped>

+ 21 - 6
src/views/components/DialogForm/index.vue

@@ -1,11 +1,11 @@
 <template>
     <el-dialog :title="title" v-model="open" width="700px" append-to-body>
-        <el-form ref="dialogFormRef" :model="form" label-width="100px">
+        <el-form ref="dialogFormRef" :model="form" :label-width="labelWidth" >
             <template v-for="item in column" :key="item.prop">
                 <!-- 输入框 -->
                 <el-form-item :label="item.label" v-if="item.type === 'input'" :prop="item.prop" :rules="item.rules">
                     <el-input v-model="form[item.prop]" :placeholder="'请输入' + item.label" clearable  :disabled="disables[item.prop]">
-                        <template v-if="item.dese" #append>{{ item.dese }}</template>
+                        <template v-if="item.dese" #append > <a @click="item.deseClick?item.deseClick(form):''">{{ item.dese }}</a> </template>
                     </el-input>
                 </el-form-item>
                 <!-- 文本域 -->
@@ -15,11 +15,12 @@
                      :placeholder="'请输入' + item.label" clearable  :disabled="disables[item.prop]"/>
                 </el-form-item>
 
-                <el-form-item :label="item.label" v-if="item.type === 'radio'" :prop="item.prop" :rules="item.rules">
+                <el-form-item :label="item.label" v-if="item.type === 'radio' && item.options" :prop="item.prop" :rules="item.rules">   
                     <el-radio-group v-model="form[item.prop]"  :disabled="disables[item.prop]">
                         <el-radio v-for="dict in item.options" :key="dict.value" :value="dict.value">{{ dict.label }}</el-radio>
                     </el-radio-group>
                 </el-form-item>
+    
 
                 <!-- 时间选择 -->
                 <el-form-item :label="item.label" v-if="item.type === 'date'" :prop="item.prop" :rules="item.rules">
@@ -42,6 +43,13 @@
                     </el-select>
                 </el-form-item>
 
+                <!-- <el-form-item :label="item.label" v-if="item.type === 'dict' && item.dict" :prop="item.prop" :rules="item.rules">
+                    <el-select v-model="form[item.prop]" :placeholder="'请选择' + item.label" clearable  :disabled="disables[item.prop]">
+                        <el-option v-for="dict in item.dict" :key="dict.value"
+                            :label="dict.label" :value="dict.value"></el-option>
+                    </el-select>
+                </el-form-item> -->
+
                  <!-- 联动选择框 -->
                 <el-form-item :label="item.label" v-if="item.type === 'cascader' " :prop="item.prop">
                     <el-cascader v-model="form[item.prop]" :options="item.options || []" style="width: 100%;"
@@ -59,11 +67,11 @@
             </template>
 
 
-            <el-form-item v-if="form.appStatus === '3'" label="驳回原因" prop="rejectReason" :rules="{ required: true, message: '请输入驳回原因', trigger: 'blur' }">
+            <!-- <el-form-item v-if="form.appStatus === '3'" label="驳回原因" prop="rejectReason" :rules="{ required: true, message: '请输入驳回原因', trigger: 'blur' }">
                     <el-input v-model="form.rejectReason" type="textarea"
                     :autosize="{ minRows: 2, maxRows: 4 }"
                      placeholder="请输入驳回原因" clearable  :disabled="disables.appStatus"/>
-                </el-form-item>
+                </el-form-item> -->
         </el-form>
         <template #footer>
             <div class="dialog-footer">
@@ -75,6 +83,7 @@
 </template>
 
 <script setup>
+import { toRaw } from 'vue';
 import { computed, reactive } from 'vue';
 const { proxy } = getCurrentInstance();
 
@@ -88,6 +97,11 @@ const props = defineProps({
         default: [],
         required: true
     },
+    labelWidth: {
+        type: String,
+        default: '120px',
+    },
+
 })
 
 const open = ref(false);
@@ -112,7 +126,8 @@ const getImages = (key) => {
 
 const handleInit = () => {
     try {
-        const keys = props.column.map(item => {
+        const data = props.column.value || props.column ;
+        const keys = data.map(item => {
             if (item.type === 'select' && item.dictionary) {
                 return item.dictionary;
             }

+ 8 - 1
src/views/components/ListPage/Search.vue

@@ -20,6 +20,12 @@
                             :label="dict.label" :value="dict.value"></el-option>
                     </el-select>
                 </el-form-item>
+                <el-form-item :label="item.label" v-if="item.type === 'dict'" :prop="item.prop">
+                    <el-select v-model="formInline[item.prop]" :placeholder="'请选择' + item.label" clearable>
+                        <el-option v-for="dict in item.dict" :key="dict.value"
+                            :label="dict.label" :value="dict.value"></el-option>
+                    </el-select>
+                </el-form-item>
                 <!-- 联动选择框 -->
                 <el-form-item :label="item.label" v-if="item.type === 'cascader' " :prop="item.prop">
                     <el-cascader v-model="formInline[item.prop]" :options="item.options || []" style="width: 100%;"
@@ -36,7 +42,8 @@
         <el-row :gutter="10" class="mb8">
             <el-col :span="1.5" v-for="item in searchBtns" :key="item.key">
                 <el-button :type="item.type || 'primary'" plain :icon="item.icon" @click="()=>item.func(formInline)"
-                    v-hasPermi="item.hasPermi">{{ item.label }}</el-button>
+                    v-if="item.show?item.show() :true"
+                    >{{ item.label }}</el-button>
             </el-col>
         </el-row>
     </div>

+ 3 - 2
src/views/components/ListPage/Table.vue

@@ -16,7 +16,8 @@
                 <el-table-column v-else-if="item.type === 'dict'" :label="item.label" :prop="item.tableProp || item.prop"
                     :width="item.width">
                     <template #default="scope">
-                        <dict-tag :options="item.dict" :value="scope.row[item.tableProp || item.prop]" />
+                        <dict-tag v-if="item.dict" :options="item.dict" :value="String(scope.row[item.tableProp || item.prop])" />
+
                     </template>
                 </el-table-column>
                 <el-table-column v-else-if="item.type === 'render'" :label="item.label" :prop="item.prop"
@@ -35,7 +36,7 @@
                         <div v-for="item in scopeBtns" :key="item.key">
                            <template v-if="item.show?item.show(scope.row) :true">
                                 <el-button  link :type="item.type"
-                                @click="item.func(scope.row)" v-hasPermi="item.hasPermi"> {{ item.label }}</el-button>
+                                @click="item.func(scope.row)" > {{ item.label }}</el-button>
                            </template>
                         </div>
                        

+ 7 - 1
src/views/components/ListPage/index.vue

@@ -56,6 +56,10 @@ const props = defineProps({
     isSelect:{
         type: Boolean,
         default: true
+    },
+    defaultTab:{
+        type: String,
+        default: '2'
     }
 })
 const tabsValue = ref('2')
@@ -142,9 +146,11 @@ const ids = computed(() =>{
 })
 
 onMounted(() => {
-  const tabs =   sessionStorage.getItem('tabsValue');  
+  const tabs = sessionStorage.getItem('tabsValue');  
   if(tabs){
     tabsValue.value = tabs;
+  }else{
+    tabsValue.value = props.defaultTab;
   }
   getList();
 })

+ 19 - 300
src/views/finance/examine/index.vue

@@ -1,317 +1,36 @@
 <template>
     <div>
-        <ListPage :column="listPageData.tableColumn" :tableApi="listPageData.tableApi" :isSelect="listPageData.isSelect"
-            :scopeBtns="listPageData.scopeBtns" :searchBtns="listPageData.searchBtns" ref="userTableRef"
-             />
-        <DialogForm ref="dialogFormRef" :title="title" :column="dialogData.column" @submit="submitForm" />
+        <ListPage :column="tableColumn" :tableApi="list" :isSelect="true" :scopeBtns="scopeBtns"
+            :searchBtns="searchBtns" ref="userTableRef" tableKey="mainOrderId" :tabList="tabList"
+            tabsearchKey="orderStatus" defaultTab="10" />
+        <DialogForm ref="dialogFormRef" :title="dialogData.title" :column="dialogData.column" @submit="submitForm"
+            labelWidth="120px" />
     </div>
 </template>
 
 <script setup>
-import { ref } from 'vue';
+import { ref, computed } from 'vue';
 import ListPage from '@/views/components/ListPage/index.vue';
-import { list } from "@/api/finance/settlement.js";
 import DialogForm from '@/views/components/DialogForm/index.vue';
-
+import { list } from "@/api/finance/settlement.js";
+import useData from './useData';
 const { proxy } = getCurrentInstance();
-const { lrr_service_status } = proxy.useDict("lrr_service_status");
-const router = useRouter();
-const userTableRef = ref();
-const dialogFormRef = ref(null);
-const listPageData = reactive({
-    tableColumn: [
-        {
-            label: '订单ID',
-            prop: 'mainOrderId',
-             width: '180px'
-        },
-        {
-            label: '时间',
-            prop: 'createTime',
-            type: 'date',
-            isSearch: false,
-            width: '180px'
-        },
-        {
-            label: '志愿者姓名',
-            prop: 'name',
-            type: 'input',
-            isSearch: true,
-        },
-        {
-            label: '志愿者手机号',
-            prop: 'phonenumber',
-            type: 'input',
-            isSearch: true
-        },
-        {
-            label: '用户手机号',
-            prop: 'clientTelephone',
-            type: 'input',
-            isSearch: true
-        },
-        {
-            label: '项目类别',
-            prop: 'businessTierName',
-        },
-        {
-            label: '评分',
-            prop: 'address',
-        },
-        {
-            label: '订单状态',
-            prop: 'orderStatus',
-            type: 'dict',
-            dict: lrr_service_status
-        },
-        {
-            label: '订单单价',
-            prop: 'serviceOnePrice',
-        },
-        {
-            label: '订单金额',
-            prop: 'serviceTotalPrice',
-        },
-        {
-            label: '用户收货地址姓名',
-            prop: 'clientName',
-        },
-        {
-            label: '用户收货地址电话',
-            prop: 'clientTelephone',
-        },
-        {
-            label: '区域抽成比例',
-            prop: 'areaDistributionRatio',
-        },
-        {
-            label: '区域抽成金额',
-            prop: 'areaDistributionAmount',
-        },
-        {
-            label: '服务中心抽成比例',
-            prop: 'serviceCentreDistributionRatio',
-        },
-        {
-            label: '服务中心抽成金额',
-            prop: 'serviceCentreDistributionAmount',
-        },
-        
-    ],
-    searchBtns: [
-        // {
-        //     label: '批量结算',
-        //     func: () => {
-        //         const ids = userTableRef.value.ids;
-        //         console.log('批量删除', ids)
-        //         handleDelete(ids);
-        //     },
-        //     key: 'deletes',
-        //     hasPermi: ['system:role:query'],
-        //     type: 'danger'
-        // },
-        // {
-        //     label: '导出',
-        //     func: (parmas) => {
-        //         exportFile(parmas);
-        //     },
-        //     key: 'deletes',
-        //     hasPermi: ['system:role:query'],
-        //     type: 'danger'
-        // },
-    ],
-    tableApi: list,//接口地址
-    isSelect: true,//是否勾选
-    scopeBtns: [
-        // {
-        //     label: '结算',
-        //     type: 'primary',
-        //     hasPermi: ['manage:examine'],
-        //     key: 'examine',
-        //     func: (row) => {
-        //         console.log(row)
-        //         openDialog(row, 'examine')
-        //     },
-        //     show: (row) => {
-        //         return row.appStatus == 1
-        //     }
-        // },
-        // {
-        //     label: '查看',
-        //     type: 'primary',
-        //     hasPermi: ['manage:details'],
-        //     key: 'details',
-        //     func: (row) => {
-        //         console.log(row)
-        //         // router.push("/order/order-details/" + row.mainOrderId);
-        //         // openDialog(row)
-        //     }
-        // },
-        // {
-        //     label: '删除',
-        //     type: 'danger',
-        //     hasPermi: ['manage:delete'],
-        //     key: 'delete',
-        //     func: (row) => {
-        //         console.log(row)
-        //         handleDelete([row.id])
-        //     }
-        // }
-    ]
-})
-const dialogData = reactive({
-    title: '',
-    column: [
-        {
-            label: '姓名',
-            prop: 'name',
-            type: 'input',
-
-        },
-        {
-            label: '年龄',
-            prop: 'age',
-            type: 'input',
-
-        },
-        {
-            label: '电话',
-            prop: 'phonenumber',
-            type: 'input',
-
-        },
-        {
-            label: '家庭地址',
-            prop: 'address',
-            type: 'input',
-
-        },
-        // {
-        //     label: '服务项目/类别',
-        //     prop: 'businessManagementId',
-        //     type: 'cascader',
-        //     isSearch: true,
-        //     options: options,
-        //     props: { label: 'businessName', value: 'id', checkStrictly:true },
-
-        // },
-        {
-            label: '身份证件',
-            prop: 'idCardPicture',
-            type: 'img',
-
-        },
-        {
-            label: '职业证书',
-            prop: 'certificationPicture',
-            type: 'img',
-
-        },
-        {
-            label: '技能简介',
-            prop: 'skillDescribe',
-            type: 'textarea',
-        },
-        {
-            label: '审核状态',
-            prop: 'appStatus',
-            type: 'radio',
-            rules: [
-                { required: true, message: '请选择审核状态', trigger: 'blur' }
-            ],
-            options: [
-                {
-                    label: '通过',
-                    value: '2'
-                },
-                {
-                    label: '不通过',
-                    value: '3'
-                }
-            ]
-        },
-    ]
-})
-const { title } = toRefs(dialogData);
-const parentId = ref(0);
-
-const openDialog = (row, type) => {
-    console.log('row', row);
-    try {
-        const disabledData = {
-            name: true,
-            age: true,
-            phonenumber: true,
-            address: true,
-            skillDescribe: true,
-            businessManagementId: true,
-        }
-
-        if (type) {
-            //审核
-            title.value = '审核'
-
-        } else {
-            disabledData['appStatus'] = true;
-            //查看详情
-            title.value = '查看详情'
-        }
-
-        dialogFormRef.value.initForm(row, disabledData)
-
-    } catch (error) {
-        console.log('error', error);
-    } finally {
-        console.log('dialogFormRef.value', dialogFormRef.value);
-
-        dialogFormRef.value.handleDialog(true);
-    }
-}
-const handleDelete = (ids) => {
-    proxy.$modal.confirm('是否确认删除角色编号为"' + ids + '"的数据项?').then(function () {
-        return true
-    }).then(() => {
-        userTableRef.value.resetForm();
-        proxy.$modal.msgSuccess("删除成功");
-    }).catch(() => { });
-}
 
-const submitForm = async (parmas) => {
+const jlzj_area_type = ref('0');// 0: 平台 10:区域公司
+const {
+    tableColumn,
+    dialogData,
+    tabList,
+    dialogFormRef,
+    userTableRef,
+    searchBtns,
+    scopeBtns
+} = useData({ proxy, jlzj_area_type });
+console.log('tableColumn', tableColumn);
 
-    try {
-        console.log('submit', parmas);
-        // if (title.value === '审核') {
-        //     const res = await approval({
-        //         volunteerInfoId: parmas.volunteerInfoId,
-        //         appStatus: parmas.appStatus,
-        //         rejectReason: parmas.rejectReason
-        //     })
-        //     if (up_res.code === 200) {
-        //         proxy.$modal.msgSuccess("审核成功");
-        //         return;
-        //     }
-        //     proxy.$modal.msgSuccess(res.msg);
-        // }
-    } catch (error) {
-        console.log('error', error);
 
-    } finally {
-        userTableRef.value.resetForm();
-        dialogFormRef.value.handleDialog(false);
-    }
 
-}
 
-const exportFile = async(parmas) => { 
-	console.log("TCL: exportFile -> parmas", parmas)
-    try {
-        proxy.download("core/orderSettlementApplication/export",{
-            ...queryParams.value,
-        }, `订单费用结算_${new Date().getTime()}.xlsx`);
-    } catch (error) {
-        
-    }
-}
 
 </script>
 

+ 280 - 0
src/views/finance/examine/useData.js

@@ -0,0 +1,280 @@
+import { ref,computed } from "vue";
+import { auditorOrderSettlement } from "@/api/finance/settlement.js";
+//功能
+export default ({proxy,jlzj_area_type}) => {
+    const router = useRouter();
+     const dialogFormRef = ref(null);
+     const userTableRef = ref(null);
+     const { 
+        lrr_service_status,
+        settlement_application_auditor_status
+     } = proxy.useDict("lrr_service_status","settlement_application_auditor_status");
+
+     const tabList =computed(() => {
+        let data = []
+        data = settlement_application_auditor_status.value.map(item => {
+            return {
+                title: item.label,
+                name: item.value
+            }
+        })
+        return data || [];
+    })
+     //打开弹窗
+     const openDialog = (ids) => {
+        console.log('ids', ids);
+        try {
+            const disabledData = {
+                // payeeMethod: true,
+                // payeeAccount: true,
+                // payeeBankName: true,
+                // payeeName: true,
+                // payeeRemark: true
+            }
+            dialogFormRef.value.initForm({mainOrderIds:ids}, disabledData)
+        } catch (error) {
+            console.log('error', error);
+        } finally {
+            console.log('dialogFormRef.value', dialogFormRef.value);
+            dialogFormRef.value.handleDialog(true);
+        }
+    }
+    //导出
+    const exportFile = async(parmas) => { 
+        console.log("TCL: exportFile -> parmas", parmas)
+        // try {
+        //     proxy.download("core/orderSettlementApplication/export",{
+        //         ...queryParams.value,
+        //     }, `订单费用结算_${new Date().getTime()}.xlsx`);
+        // } catch (error) { 
+        // }
+    }
+
+    //申请提交
+    const submitForm = async (data) => {
+
+        try {
+            console.log('submit', data);
+            const parmas = {
+                ids: data.mainOrderIds,
+                auditorStatus:  data.auditorStatus,
+                auditorRemark: data.auditorRemark
+            }
+            const res = await auditorOrderSettlement(parmas);
+               if (up_res.code === 200) {
+                    proxy.$modal.msgSuccess("审核成功");
+                    return;
+                }
+                proxy.$modal.msgSuccess(res.msg);
+        } catch (error) {
+            console.log('error', error);
+        } finally {
+            userTableRef.value.resetForm();
+            dialogFormRef.value.handleDialog(false);
+        }
+    }
+
+
+    
+    return {
+        dialogFormRef,
+        userTableRef,
+        tabList,
+        openDialog,
+        exportFile,
+        submitForm,
+        tableColumn:ref([
+            {
+                label: jlzj_area_type === '0'?'区域中心':'服务中心',
+                prop: 'applicantType',
+                type: 'input',
+                isSearch: true
+            },
+            {
+                label: '申请人',
+                prop: 'createBy',
+            },
+            {
+                label: '申请时间',
+                prop: 'createTime',
+            },
+            {
+                label: '订单号',
+                prop: 'orderId',
+            },
+            {
+                label: '订单开始时间',
+                prop: 'createTime',
+            },
+            {
+                label: '订单完成时间',
+                prop: 'updateTime',
+            },
+            {
+                label: '用户名称',
+                prop: 'createBy',
+            },
+            {
+                label: '志愿者名称',
+                prop: 'updateBy',
+        
+            },
+            {
+                label: '服务项目',
+                prop: '',
+            },
+            {
+                label: '订单总金额(元)',
+                prop: 'amount',
+            },
+            {
+                label: '订单状态',
+                prop: 'orderStatus',
+                type: 'dict',
+                dict: lrr_service_status
+            },
+            {
+                label: '抽成金额',
+                prop: 'amount',
+            },
+            {
+                label: '结算状态',
+                prop: 'auditorStatus',
+            },
+            {
+                label: '审核状态',
+                prop: 'auditorStatus',
+            },
+        ]),
+        dialogData: {
+            title: '结算申请',
+            column: [
+                {
+                    label: '区域',
+                    prop: 'payeeMethod',
+                    type: 'select',
+                    dictionary: 'settlement_application_payee_method',
+                    rules: [
+                        { required: true, message: '请选择收款方式', trigger: 'change' }
+                    ],
+                },
+                {
+                    label: '提交人',
+                    prop: 'payeeAccount',
+                    type: 'input',
+                    rules: [
+                        { required: true, message: '请输入收款账号', trigger: 'change' }
+                    ],
+        
+                },
+                {
+                    label: '区域抽成',
+                    prop: 'payeeBankName',
+                    type: 'input',
+                    rules: [
+                        { required: true, message: '请输入收款银行名称', trigger: 'change' }
+                    ],
+        
+                },
+                {
+                    label: '订单编号',
+                    prop: 'payeeName',
+                    type: 'input',
+                    rules: [
+                        { required: true, message: '请输入收款人', trigger: 'change' }
+                    ],
+                },
+                {
+                    label: '服务项目',
+                    prop: 'payeeName',
+                    type: 'input',
+                    rules: [
+                        { required: true, message: '请输入收款人', trigger: 'change' }
+                    ],
+                },
+                {
+                    label: '订单状态',
+                    prop: 'payeeName',
+                    type: 'input',
+                    rules: [
+                        { required: true, message: '请输入收款人', trigger: 'change' }
+                    ],
+                },
+                {
+                    label: '审核状态',
+                    prop: 'auditorStatus',
+                    type: 'radio',
+                    rules: [
+                        { required: true, message: '请选择审核状态', trigger: 'blur' }
+                    ],
+                    options: [
+                        {
+                            label: '通过',
+                            value: '20'
+                        },
+                        {
+                            label: '不通过',
+                            value: '30'
+                        }
+                    ]
+                },
+                {
+                    label: '驳回原因',
+                    prop: 'auditorRemark',
+                    type: 'textarea',
+                    show:(form)=>{
+                        console.log('驳回原因',form);
+                        return form.auditorStatus === '30'
+                    }
+                },
+            ]
+        },
+        searchBtns:[
+            {
+                label: '批量审核',
+                func: () => {
+                    const ids = userTableRef.value.ids;
+                    console.log('批量删除', ids)
+                    ids.length > 0 && openDialog(ids)
+                },
+                key: 'applicant',
+                type: 'primary'
+            },
+            {
+                label: '导出',
+                func: (parmas) => {
+                    exportFile(parmas);
+                },
+                key: 'export',
+                type: 'primary'
+            },
+        ],
+        scopeBtns:[
+            {
+                label: '审核',
+                type: 'primary',
+                key: 'examine',
+                func: (row) => {
+                    console.log(row)
+                    openDialog([row.mainOrderId])
+                },
+                // show: (row) => {
+                //     return jlzj_area_type.value === '20'
+                // }
+            },
+            {
+                label: '查看详情',
+                type: 'primary',
+                key: 'details',
+                func: (row) => {
+                    console.log(row)
+                    router.push({
+                        path: "/order-details",
+                        query: { id: row.mainOrderId }
+                    });
+                }
+            },
+        ]
+       
+    }
+}

+ 28 - 278
src/views/finance/settlement/index.vue

@@ -1,297 +1,47 @@
 <template>
     <div>
-        <ListPage :column="listPageData.tableColumn" :tableApi="listPageData.tableApi" :isSelect="listPageData.isSelect"
-            :scopeBtns="listPageData.scopeBtns" :searchBtns="listPageData.searchBtns" ref="userTableRef"
-             />
-        <DialogForm ref="dialogFormRef" :title="title" :column="dialogData.column" @submit="submitForm" />
+        <ListPage :column="tableColumn" :tableApi="settlementOrderList" :isSelect="true" :scopeBtns="scopeBtns"
+            :searchBtns="searchBtns" ref="userTableRef" tableKey="mainOrderId" :tabList="tabList"
+            tabsearchKey="orderStatus" defaultTab="10" />
+        <DialogForm ref="dialogFormRef" :title="dialogData.title" :column="dialogData.column" @submit="submitForm"
+            labelWidth="120px" />
     </div>
 </template>
 
 <script setup>
-import { ref } from 'vue';
+import { ref, computed } from 'vue';
 import ListPage from '@/views/components/ListPage/index.vue';
-import { settlementOrderList } from "@/api/finance/settlement.js";
 import DialogForm from '@/views/components/DialogForm/index.vue';
+import { settlementOrderList } from "@/api/finance/settlement.js";
 
+import useData from './useData';
+import usePlatform from './usePlatform';
+import useRegional from './useRegional';
+import useService from './useService';
 const { proxy } = getCurrentInstance();
-const { lrr_service_status } = proxy.useDict("lrr_service_status");
-const router = useRouter();
-const userTableRef = ref();
-const dialogFormRef = ref(null);
-const listPageData = reactive({
-    tableColumn: [
-        {
-            label: '订单ID',
-            prop: 'mainOrderId',
-            type: 'input',
-            isSearch: true,
-        },
-        {
-            label: '申请方类型',
-            prop: 'applicantType',
-        },
-        {
-            label: '结算金额',
-            prop: 'serviceTotalPrice',
-        },
-        {
-            label: '申请时间',
-            prop: 'createTime',
-        },
-        {
-            label: '收款方式',
-            prop: 'payeeMethod',
-        },
-        {
-            label: '收款账号',
-            prop: 'payeeAccount',
-        },
-        {
-            label: '收款银行名称',
-            prop: 'payeeBankName',
-        },
-
-        {
-            label: '收款人姓名',
-            prop: 'clientName',
-        },
-        {
-            label: '收款人手机号',
-            prop: 'clientTelephone',
-        },
-        {
-            label: '收款申请备注',
-            prop: 'payeeRemark',
-        },
-        {
-            label: '审核时间',
-            prop: 'auditorTime',
-        },
-        {
-            label: '审核状态',
-            prop: 'auditorStatus',
-            type: 'dict',
-            dict: lrr_service_status
-        },
-        {
-            label: '审核结果说明',
-            prop: 'auditorRemark',
-        },
-    ],
-    searchBtns: [
-        // {
-        //     label: '批量结算',
-        //     func: () => {
-        //         const ids = userTableRef.value.ids;
-        //         console.log('批量删除', ids)
-        //         handleDelete(ids);
-        //     },
-        //     key: 'deletes',
-        //     hasPermi: ['system:role:query'],
-        //     type: 'danger'
-        // },
-        // {
-        //     label: '导出',
-        //     func: (parmas) => {
-        //         exportFile(parmas);
-        //     },
-        //     key: 'deletes',
-        //     hasPermi: ['system:role:query'],
-        //     type: 'danger'
-        // },
-    ],
-    tableApi: settlementOrderList,//接口地址
-    isSelect: true,//是否勾选
-    scopeBtns: [
-        // {
-        //     label: '结算',
-        //     type: 'primary',
-        //     hasPermi: ['manage:examine'],
-        //     key: 'examine',
-        //     func: (row) => {
-        //         console.log(row)
-        //         openDialog(row, 'examine')
-        //     },
-        //     show: (row) => {
-        //         return row.appStatus == 1
-        //     }
-        // },
-        // {
-        //     label: '查看',
-        //     type: 'primary',
-        //     hasPermi: ['manage:details'],
-        //     key: 'details',
-        //     func: (row) => {
-        //         console.log(row)
-        //         // router.push("/order/order-details/" + row.mainOrderId);
-        //         // openDialog(row)
-        //     }
-        // },
-        // {
-        //     label: '删除',
-        //     type: 'danger',
-        //     hasPermi: ['manage:delete'],
-        //     key: 'delete',
-        //     func: (row) => {
-        //         console.log(row)
-        //         handleDelete([row.id])
-        //     }
-        // }
-    ]
-})
-const dialogData = reactive({
-    title: '',
-    column: [
-        {
-            label: '姓名',
-            prop: 'name',
-            type: 'input',
-
-        },
-        {
-            label: '年龄',
-            prop: 'age',
-            type: 'input',
-
-        },
-        {
-            label: '电话',
-            prop: 'phonenumber',
-            type: 'input',
-
-        },
-        {
-            label: '家庭地址',
-            prop: 'address',
-            type: 'input',
-
-        },
-        // {
-        //     label: '服务项目/类别',
-        //     prop: 'businessManagementId',
-        //     type: 'cascader',
-        //     isSearch: true,
-        //     options: options,
-        //     props: { label: 'businessName', value: 'id', checkStrictly:true },
-
-        // },
-        {
-            label: '身份证件',
-            prop: 'idCardPicture',
-            type: 'img',
-
-        },
-        {
-            label: '职业证书',
-            prop: 'certificationPicture',
-            type: 'img',
-
-        },
-        {
-            label: '技能简介',
-            prop: 'skillDescribe',
-            type: 'textarea',
-        },
-        {
-            label: '审核状态',
-            prop: 'appStatus',
-            type: 'radio',
-            rules: [
-                { required: true, message: '请选择审核状态', trigger: 'blur' }
-            ],
-            options: [
-                {
-                    label: '通过',
-                    value: '2'
-                },
-                {
-                    label: '不通过',
-                    value: '3'
-                }
-            ]
-        },
-    ]
-})
-const { title } = toRefs(dialogData);
-const parentId = ref(0);
 
-const openDialog = (row, type) => {
-    console.log('row', row);
-    try {
-        const disabledData = {
-            name: true,
-            age: true,
-            phonenumber: true,
-            address: true,
-            skillDescribe: true,
-            businessManagementId: true,
-        }
-
-        if (type) {
-            //审核
-            title.value = '审核'
-
-        } else {
-            disabledData['appStatus'] = true;
-            //查看详情
-            title.value = '查看详情'
-        }
-
-        dialogFormRef.value.initForm(row, disabledData)
-
-    } catch (error) {
-        console.log('error', error);
-    } finally {
-        console.log('dialogFormRef.value', dialogFormRef.value);
-
-        dialogFormRef.value.handleDialog(true);
-    }
+const jlzj_area_type = ref('0');// 0: 平台 10:区域公司 20:服务中心
+const useFun ={
+    "0":usePlatform,
+    "10":useRegional,
+    "20":useService,
 }
-const handleDelete = (ids) => {
-    proxy.$modal.confirm('是否确认删除角色编号为"' + ids + '"的数据项?').then(function () {
-        return true
-    }).then(() => {
-        userTableRef.value.resetForm();
-        proxy.$modal.msgSuccess("删除成功");
-    }).catch(() => { });
-}
-
-const submitForm = async (parmas) => {
+const {
+    tableColumn,
+    dialogData,
+    tabList,
+} = useFun[jlzj_area_type.value](proxy);
+const {
+    dialogFormRef,
+    userTableRef,
+    searchBtns,
+    scopeBtns
+} = useData({ proxy, jlzj_area_type });
+console.log('tableColumn', tableColumn);
 
-    try {
-        console.log('submit', parmas);
-        // if (title.value === '审核') {
-        //     const res = await approval({
-        //         volunteerInfoId: parmas.volunteerInfoId,
-        //         appStatus: parmas.appStatus,
-        //         rejectReason: parmas.rejectReason
-        //     })
-        //     if (up_res.code === 200) {
-        //         proxy.$modal.msgSuccess("审核成功");
-        //         return;
-        //     }
-        //     proxy.$modal.msgSuccess(res.msg);
-        // }
-    } catch (error) {
-        console.log('error', error);
 
-    } finally {
-        userTableRef.value.resetForm();
-        dialogFormRef.value.handleDialog(false);
-    }
 
-}
 
-const exportFile = async(parmas) => { 
-	console.log("TCL: exportFile -> parmas", parmas)
-    try {
-        proxy.download("core/orderSettlementApplication/export",{
-            ...queryParams.value,
-        }, `订单费用结算_${new Date().getTime()}.xlsx`);
-    } catch (error) {
-        
-    }
-}
 
 </script>
 

+ 200 - 0
src/views/finance/settlement/useData.js

@@ -0,0 +1,200 @@
+import { ref, computed } from "vue";
+import { regionalsettlement, serviceSettlement } from "@/api/finance/settlement.js";
+
+//功能
+export default ({ proxy, jlzj_area_type }) => {
+    const router = useRouter();
+    const dialogFormRef = ref(null);
+    const userTableRef = ref(null);
+
+    const dialogType = ref('applyfor');
+    //打开弹窗 applyfor:申请  settlement:结算
+    const openDialog = (params, type) => {
+        console.log('ids', ids);
+        try {
+            dialogType.value = type;
+
+            let params = {};
+            let disabledData = {};
+
+            if (type === 'applyfor') {
+                params = { mainOrderIds: params }
+            }
+            if (type === 'settlement') {
+                params = { ...params }
+                disabledData = {
+                    payeeMethod: true,
+                    payeeAccount: true,
+                    payeeBankName: true,
+                    payeeName: true,
+                    payeeRemark: true
+                }
+            }
+
+            dialogFormRef.value.initForm(params, disabledData)
+        } catch (error) {
+            console.log('error', error);
+        } finally {
+            console.log('dialogFormRef.value', dialogFormRef.value);
+            dialogFormRef.value.handleDialog(true);
+        }
+    }
+    //导出
+    const exportFile = async (parmas) => {
+        console.log("TCL: exportFile -> parmas", parmas)
+        // try {
+        //     proxy.download("core/orderSettlementApplication/export",{
+        //         ...queryParams.value,
+        //     }, `订单费用结算_${new Date().getTime()}.xlsx`);
+        // } catch (error) { 
+        // }
+    }
+
+    const applyforSubmit = (data) => {
+        return new Promise(async (resolve, reject) => {
+            const parmas = {
+                mainOrderIds: data.mainOrderIds,
+                payeeMethod: data.payeeMethod,
+                payeeAccount: data.payeeAccount,
+                payeeBankName: data.payeeBankName,
+                payeeName: data.payeeName,
+                payeeRemark: data.payeeRemark
+            }
+            const res = await applyOrderSettlement(parmas);
+            if (up_res.code === 200) {
+                proxy.$modal.msgSuccess("审核成功");
+                resolve()
+            }
+            proxy.$modal.msgSuccess(res.msg);
+            reject()
+        })
+    }
+
+    const settlementSubmit = async (data) => {
+        return new Promise(async (resolve, reject) => {
+            const parmas = {
+                orderId: data.orderId,
+                payeeId: data.payeeId,
+                payeeName: data.payeeName,
+                payeeBank: data.payeeBank,
+                payeeBankAccount: data.payeeBankAccount,
+                payeeRemark: data.payeeRemark
+            }
+            let res = null;
+            //平台结算区域的申请
+            if (jlzj_area_type.value === '0') {
+                res = await applyOrderSettlement(parmas)
+            }
+            //区域结算平台的申请
+
+            if (jlzj_area_type.value === '10') {
+                res = await serviceSettlement(parmas)
+            }
+
+            if (up_res.code === 200) {
+                proxy.$modal.msgSuccess("审核成功");
+                resolve()
+            }
+            proxy.$modal.msgSuccess(res.msg);
+            reject()
+        })
+    }
+
+    //申请提交
+    const submitForm = async (data) => {
+
+        try {
+            console.log('submit', data);
+            //申请
+            if (dialogType.value === 'applyfor') {
+                await applyforSubmit(data);
+            }
+            if (dialogType.value === 'settlement') {
+                await settlementSubmit(data);
+            }
+        } catch (error) {
+            console.log('error', error);
+        } finally {
+            userTableRef.value.resetForm();
+            dialogFormRef.value.handleDialog(false);
+        }
+    }
+
+
+
+    return {
+        dialogFormRef,
+        userTableRef,
+        openDialog,
+        exportFile,
+        submitForm,
+        searchBtns: [
+            {
+                label: '批量申请',
+                func: () => {
+                    const ids = userTableRef.value.ids;
+                    console.log('批量删除', ids)
+                    ids.length > 0 && openDialog(ids, 'applyfor')
+                },
+                key: 'applicant',
+                type: 'primary'
+            },
+            {
+                label: '批量结算',
+                func: () => {
+                    const ids = userTableRef.value.ids;
+                    console.log('批量删除', ids)
+                    ids.length > 0 && openDialog(ids, 'settlement')
+                },
+                key: 'settlement',
+                type: 'primary',
+                show: () => jlzj_area_type.value === '10',//区域公司才可以结算
+            },
+            {
+                label: '导出',
+                func: (parmas) => {
+                    exportFile(parmas);
+                },
+                key: 'export',
+                type: 'primary'
+            },
+        ],
+        scopeBtns: [
+            {
+                label: '结算申请',
+                type: 'primary',
+                key: 'examine',
+                func: (row) => {
+                    console.log(row)
+                    openDialog([row.mainOrderId], 'applyfor')
+                },
+                // show: (row) => {
+                //     return jlzj_area_type.value === '20'
+                // }
+            },
+            {
+                label: '费用结算',
+                type: 'primary',
+                key: 'examine',
+                func: (row) => {
+                    console.log(row)
+                    openDialog([row.mainOrderId], 'settlement')
+                },
+                show: () => jlzj_area_type.value === '10',//区域公司才可以结算
+            },
+            {
+                label: '查看详情',
+                type: 'primary',
+                key: 'details',
+                func: (row) => {
+                    console.log(row)
+                    router.push({
+                        path: "/order-details",
+                        query: { id: row.mainOrderId }
+                    });
+                }
+            },
+        ]
+
+    }
+}

+ 126 - 0
src/views/finance/settlement/usePlatform.js

@@ -0,0 +1,126 @@
+import { ref,computed } from "vue";
+// 平台
+export default (proxy) => {
+
+    const { 
+        lrr_service_status,
+        area_settlement_status
+     } = proxy.useDict("lrr_service_status","area_settlement_status");
+
+     const tabList =computed(() => {
+        let data = []
+        data = area_settlement_status.value.map(item => {
+            return {
+                title: item.label,
+                name: item.value
+            }
+        })
+        return data || [];
+    })
+
+    return {
+        tableColumn:ref(
+            [
+                {
+                    label: '订单号',
+                    prop: 'mainOrderId',
+                    type: 'input',
+                    isSearch: true
+                },
+                {
+                    label: '订单开始时间',
+                    prop: 'createTime',
+                },
+                {
+                    label: '订单完成时间',
+                    prop: '',
+                },
+                {
+                    label: '用户名称',
+                    prop: 'clientName',
+                },
+                {
+                    label: '志愿者名称',
+                    prop: 'name',
+                },
+                {
+                    label: '服务项目',
+                    prop: 'projectName',
+                },
+                {
+                    label: '订单总金额(元)',
+                    prop: 'serviceTotalPrice',
+                },
+                {
+                    label: '订单状态',
+                    prop: 'orderStatus',
+                    type: 'dict',
+                    dict: lrr_service_status
+                },
+                {
+                    label: '区域公司',
+                    prop: '',
+                },
+                {
+                    label: '区域公司抽成金额',
+                    prop: 'areaDistributionAmount',
+                },
+                {
+                    label: '区域公司结算状态',
+                    prop: '',
+                },
+                {
+                    label: '区域公司结算时间',
+                    prop: '',
+                }
+            ]
+            ),
+        dialogData: {
+            title: '结算申请',
+            column: [
+                {
+                    label: '收款方式',
+                    prop: 'payeeMethod',
+                    type: 'select',
+                    dictionary: 'settlement_application_payee_method',
+                    rules: [
+                        { required: true, message: '请选择收款方式', trigger: 'change' }
+                    ],
+                },
+                {
+                    label: '收款账号',
+                    prop: 'payeeAccount',
+                    type: 'input',
+                    rules: [
+                        { required: true, message: '请输入收款账号', trigger: 'change' }
+                    ],
+        
+                },
+                {
+                    label: '收款银行名称',
+                    prop: 'payeeBankName',
+                    type: 'input',
+                    rules: [
+                        { required: true, message: '请输入收款银行名称', trigger: 'change' }
+                    ],
+        
+                },
+                {
+                    label: '收款人',
+                    prop: 'payeeName',
+                    type: 'input',
+                    rules: [
+                        { required: true, message: '请输入收款人', trigger: 'change' }
+                    ],
+                },
+                {
+                    label: '收款人备注',
+                    prop: 'payeeRemark',
+                    type: 'textarea',
+                },
+            ]
+        },
+        tabList,
+      
+    }
+}

+ 133 - 0
src/views/finance/settlement/useRegional.js

@@ -0,0 +1,133 @@
+import { ref,computed } from "vue";
+// 区域
+export default (proxy) => {
+
+    const { 
+        lrr_service_status,
+        area_settlement_status
+     } = proxy.useDict("lrr_service_status","area_settlement_status");
+
+     const tabList =computed(() => {
+        let data = []
+        data = area_settlement_status.value.map(item => {
+            return {
+                title: item.label,
+                name: item.value
+            }
+        })
+        return data || [];
+    })
+
+    return {
+        tableColumn:ref([
+            {
+                label: '订单号',
+                prop: 'mainOrderId',
+                type: 'input',
+                isSearch: true
+            },
+            {
+                label: '订单开始时间',
+                prop: 'createTime',
+            },
+            {
+                label: '订单完成时间',
+                prop: '',
+            },
+            {
+                label: '用户名称',
+                prop: 'clientName',
+            },
+            {
+                label: '志愿者名称',
+                prop: 'name',
+            },
+            {
+                label: '服务项目',
+                prop: 'projectName',
+            },
+            {
+                label: '订单总金额(元)',
+                prop: 'serviceTotalPrice',
+            },
+            {
+                label: '订单状态',
+                prop: 'orderStatus',
+                type: 'dict',
+                dict: lrr_service_status
+        
+            },
+            {
+                label: '服务中心',
+                prop: '',
+            },
+            {
+                label: '抽成金额',
+                prop: 'serviceCentreDistributionAmount',
+            },
+            {
+                label: '结算状态',
+                prop: '',
+            },
+            {
+                label: '结算时间',
+                prop: '',
+            },
+            {
+                label: '服务中心抽成金额',
+                prop: 'serviceCentreDistributionAmount',
+            },
+            {
+                label: '服务中心结算状态',
+                prop: '',
+            },
+        ]),
+        dialogData: {
+            title: '结算申请',
+            column: [
+                {
+                    label: '收款方式',
+                    prop: 'payeeMethod',
+                    type: 'select',
+                    dictionary: 'settlement_application_payee_method',
+                    rules: [
+                        { required: true, message: '请选择收款方式', trigger: 'change' }
+                    ],
+                },
+                {
+                    label: '收款账号',
+                    prop: 'payeeAccount',
+                    type: 'input',
+                    rules: [
+                        { required: true, message: '请输入收款账号', trigger: 'change' }
+                    ],
+        
+                },
+                {
+                    label: '收款银行名称',
+                    prop: 'payeeBankName',
+                    type: 'input',
+                    rules: [
+                        { required: true, message: '请输入收款银行名称', trigger: 'change' }
+                    ],
+        
+                },
+                {
+                    label: '收款人',
+                    prop: 'payeeName',
+                    type: 'input',
+                    rules: [
+                        { required: true, message: '请输入收款人', trigger: 'change' }
+                    ],
+                },
+                {
+                    label: '收款人备注',
+                    prop: 'payeeRemark',
+                    type: 'textarea',
+                },
+            ]
+        },
+        tabList,
+      
+    }
+}

+ 120 - 0
src/views/finance/settlement/useService.js

@@ -0,0 +1,120 @@
+// 服务中心
+import { ref,computed } from "vue";
+export default (proxy) => {
+
+    const { 
+        lrr_service_status,
+        service_centre_settlement_stauts
+     } = proxy.useDict("lrr_service_status","service_centre_settlement_stauts");
+
+     const tabList =computed(() => {
+        let data = []
+        data = service_centre_settlement_stauts.value.map(item => {
+            return {
+                title: item.label,
+                name: item.value
+            }
+        })
+        return data || [];
+    })
+
+    return {
+        tableColumn:ref([
+            {
+                label: '订单号',
+                prop: 'mainOrderId',
+                type: 'input',
+                isSearch: true
+            },
+            {
+                label: '订单开始时间',
+                prop: 'createTime',
+            },
+            {
+                label: '订单完成时间',
+                prop: '',
+            },
+            {
+                label: '用户名称',
+                prop: 'clientName',
+            },
+            {
+                label: '志愿者名称',
+                prop: 'name',
+            },
+            {
+                label: '服务项目',
+                prop: 'projectName',
+            },
+            {
+                label: '订单总金额(元)',
+                prop: 'serviceTotalPrice',
+            },
+            {
+                label: '订单状态',
+                prop: 'orderStatus',
+                type: 'dict',
+                dict: lrr_service_status
+            },
+            {
+                label: '抽成金额',
+                prop: '',
+            },
+            {
+                label: '结算状态',
+                prop: '',
+            },
+            {
+                label: '结算时间',
+                prop: '',
+            },
+        ]),
+        dialogData: {
+            title: '结算申请',
+            column: [
+                {
+                    label: '收款方式',
+                    prop: 'payeeMethod',
+                    type: 'select',
+                    dictionary: 'settlement_application_payee_method',
+                    rules: [
+                        { required: true, message: '请选择收款方式', trigger: 'change' }
+                    ],
+                },
+                {
+                    label: '收款账号',
+                    prop: 'payeeAccount',
+                    type: 'input',
+                    rules: [
+                        { required: true, message: '请输入收款账号', trigger: 'change' }
+                    ],
+        
+                },
+                {
+                    label: '收款银行名称',
+                    prop: 'payeeBankName',
+                    type: 'input',
+                    rules: [
+                        { required: true, message: '请输入收款银行名称', trigger: 'change' }
+                    ],
+        
+                },
+                {
+                    label: '收款人',
+                    prop: 'payeeName',
+                    type: 'input',
+                    rules: [
+                        { required: true, message: '请输入收款人', trigger: 'change' }
+                    ],
+                },
+                {
+                    label: '收款人备注',
+                    prop: 'payeeRemark',
+                    type: 'textarea',
+                },
+            ]
+        },
+        tabList,
+      
+    }
+}

+ 49 - 0
src/views/finance/withdrawal/index.vue

@@ -0,0 +1,49 @@
+<template>
+    <div>
+        <ListPage :column="tabkey!=='4'? talkeColumn:paymentColumn" :tableApi="getList" :isSelect="true" :scopeBtns="scopeBtns"
+            :searchBtns="searchBtns" ref="userTableRef" tableKey="volunteerTakeRecordId" :tabList="tabList"
+            tabsearchKey="tabkeys" defaultTab="0" />
+        <DialogForm ref="dialogFormRef" :title="dialogData.title" :column="dialogData.column" @submit="submitForm"
+            labelWidth="120px"  />
+
+            <DialogForm ref="dialogVerifyRef" :title="dialogVerifyData.title" :column="dialogVerifyData.column" @submit="submitVerify"
+            labelWidth="120px"  />
+    </div>
+</template>
+
+<script setup>
+import { ref, computed } from 'vue';
+import ListPage from '@/views/components/ListPage/index.vue';
+import DialogForm from '@/views/components/DialogForm/index.vue';
+
+import useData from './useData';
+
+
+const { proxy } = getCurrentInstance();
+
+const jlzj_area_type = ref('0');// 0: 平台 10:区域公司
+const {
+    talkeColumn,
+    paymentColumn,
+    tabkey,
+    dialogData,
+    tabList,
+    dialogFormRef,
+    userTableRef,
+    searchBtns,
+    scopeBtns,
+    dialogVerifyRef,
+    dialogVerifyData,
+    getList,
+    submitForm,
+    submitVerify
+} = useData({ proxy, jlzj_area_type });
+console.log('tableColumn', dialogData);
+
+
+
+
+
+</script>
+
+<style lang='scss' scoped></style>

+ 399 - 0
src/views/finance/withdrawal/useData.js

@@ -0,0 +1,399 @@
+import { ref, computed } from "vue";
+import { auditorOrderSettlement } from "@/api/finance/settlement.js";
+
+import { takeList, paymentList, takeApproval, careatPayment,payoutCheck } from "@/api/finance/withdrawal.js";
+//功能
+export default ({ proxy, jlzj_area_type }) => {
+    const router = useRouter();
+    const dialogFormRef = ref(null);
+    const userTableRef = ref(null);
+    const dialogVerifyRef =ref(null);
+    const tabkey = ref('0');
+    const {
+        pay_type,
+        is_pay,
+        volunteer_app_status,
+        is_verified,
+        payment_status
+    } = proxy.useDict("pay_type", "is_pay", "volunteer_app_status","payment_status","is_verified");
+
+
+    //打开弹窗
+    const openDialog = (data, type) => {
+        console.log('data', data);
+        try {
+            const disabledData = {
+                alipayAccountNo: true,
+                alipayName: true,
+                takeAmount: true,
+                createTime: true,
+
+            }
+            //审核
+            if (type === 'examine') {
+
+                dialogFormRef.value.initForm(data, disabledData)
+            }
+            if (type === 'details') {
+                disabledData['appStatus'] = true;
+                disabledData['rejectReason'] = true;
+                dialogFormRef.value.initForm(data, disabledData)
+            }
+
+        } catch (error) {
+            console.log('error', error);
+        } finally {
+            console.log('dialogFormRef.value', dialogFormRef.value);
+            dialogFormRef.value.handleDialog(true);
+        }
+    }
+    //导出
+    const exportFile = async (parmas) => {
+        console.log("TCL: exportFile -> parmas", parmas)
+        // try {
+        //     proxy.download("core/orderSettlementApplication/export",{
+        //         ...queryParams.value,
+        //     }, `订单费用结算_${new Date().getTime()}.xlsx`);
+        // } catch (error) { 
+        // }
+    }
+
+    //审核提交
+    const submitForm = async (data) => {
+
+        try {
+            console.log('submit', data);
+            const parmas = {
+                volunteerTakeRecordId: data.volunteerTakeRecordId,
+                appStatus: data.appStatus,
+                rejectReason: data.rejectReason
+            }
+            const res = await takeApproval(parmas);
+            if (up_res.code === 200) {
+                proxy.$modal.msgSuccess("审核成功");
+                return;
+            }
+            proxy.$modal.msgSuccess(res.msg);
+        } catch (error) {
+            console.log('error', error);
+        } finally {
+            userTableRef.value.resetForm();
+            dialogFormRef.value.handleDialog(false);
+        }
+    }
+
+
+    const getList = (data) => {
+        const parmasData = JSON.parse(JSON.stringify(data));
+        if (parmasData.tabkeys) {
+            delete parmasData.tabkeys;
+        }
+        console.log("TCL: getList -> data", data, parmasData)
+        tabkey.value = data.tabkeys;
+        return data.tabkeys !== '4' ? takeList({ ...parmasData, appStatus: data.tabkeys }) : paymentList(parmasData)
+    }
+
+    const paymentSubmit = async (ids) => {
+        try {
+
+            const res = await careatPayment({
+                ids,
+                payType: '2'
+            })
+            if (res.code === 200) {
+                proxy.$modal.msgSuccess("创建成功!");
+                return;
+            }
+            proxy.$modal.msgSuccess(res.msg);
+        } catch (error) {
+            console.log('error', error);
+        } finally {
+            userTableRef.value.resetForm();
+        }
+    }
+
+    const openVerify = (data) => {
+        try {
+            const disabledData = {
+                volunteerPaymentRecordsId: true,
+                paymentOrderNumber:true,
+                payType:true
+
+            }
+            dialogVerifyRef.value.initForm(data, disabledData)
+        } catch (error) {
+            console.log('error', error);
+        } finally {
+            userTableRef.value.resetForm();
+            dialogVerifyRef.value.handleDialog(true);
+        }
+    }
+    const submitVerify = async(data) => {
+        try {
+            console.log('submit', data);
+            const parmas = {
+                volunteerPaymentRecordsId: data.volunteerPaymentRecordsId,
+                paymentOrderNumber: data.paymentOrderNumber,
+                payPassword:data.payPassword
+            }
+            const res = await payoutCheck(parmas);
+            if (up_res.code === 200) {
+                proxy.$modal.msgSuccess("审核成功");
+                return;
+            }
+            proxy.$modal.msgSuccess(res.msg);
+        } catch (error) {
+            console.log('error', error);
+        } finally {
+            userTableRef.value.resetForm();
+            dialogVerifyRef.value.handleDialog(false);
+        }
+    }
+    
+
+    return {
+        dialogFormRef,
+        userTableRef,
+        dialogVerifyRef,
+        tabList: [
+            {
+                title: '待审核',
+                name: '1'
+            },
+            {
+                title: '已驳回',
+                name: '3'
+            },
+            {
+                title: '待处理',
+                name: '2'
+            },
+            {
+                title: '打款单',
+                name: '4'
+            },
+        ],
+        openDialog,
+        exportFile,
+        submitForm,
+        getList,
+        submitVerify,
+        tabkey,
+        talkeColumn:ref([
+            {
+                label: '支付宝账户',
+                prop: 'alipayAccountNo',
+                type: 'input',
+                isSearch: true
+            },
+            {
+                label: '支付宝姓名',
+                prop: 'alipayName',
+                type: 'input',
+                isSearch: true
+            },
+            {
+                label: '提现申请金额',
+                prop: 'takeAmount',
+            },
+            {
+                label: '账户类型',
+                prop: 'payType',
+                type: 'dict',
+                dict: pay_type
+            },
+            {
+                label: '申请时间',
+                prop: 'createTime',
+            },
+            {
+                label: '数据情况',
+                prop: 'isPay',
+                type: 'dict',
+                dict: is_pay
+            },
+            {
+                label: '审核状态',
+                prop: 'appStatus',
+                type: 'dict',
+                dict: volunteer_app_status
+            }
+        ]),
+        paymentColumn: ref([
+            {
+                label: '打款单单号',
+                prop: 'paymentOrderNumber',
+                type: 'input',
+                isSearch: true
+            },
+            {
+                label: '打款单总金额',
+                prop: 'totalPaymentAmount',
+            },
+            {
+                label: '实际打款金额',
+                prop: 'actualPaymentAmount',
+            },
+            {
+                label: '验证状态',
+                prop: 'isVerified',
+                type: 'dict',
+                dict: is_verified
+            },
+            {
+                label: '打款状态',
+                prop: 'paymentStatus',
+                type: 'dict',
+                dict: payment_status
+            },
+            {
+                label: '打款结果',
+                prop: 'appStatus',
+                type: 'render',
+                render:(row) => {
+					console.log("TCL: exportFile -> row", row)
+                    return `成功:${row.successfulPaymentAmount}; 失败:${row.failedPaymentAmount}`
+                }
+            },
+            {
+                label: '生成时间',
+                prop: 'createTime',
+            },
+            {
+                label: '打款时间',
+                prop: 'createTime',
+            },
+        ]),
+        dialogData: {
+            title: '结算申请',
+            column: [
+                {
+                    label: '支付宝账户',
+                    prop: 'alipayAccountNo',
+                    type: 'input',
+                },
+                {
+                    label: '支付宝姓名',
+                    prop: 'alipayName',
+                    type: 'input',
+                },
+                {
+                    label: '提现申请金额',
+                    prop: 'takeAmount',
+                    type: 'input',
+                },
+                {
+                    label: '申请时间',
+                    prop: 'createTime',
+                    type: 'input',
+                },
+                {
+                    label: '审核状态',
+                    prop: 'appStatus',
+                    type: 'radio',
+                    rules: [
+                        { required: true, message: '请选择审核状态', trigger: 'blur' }
+                    ],
+
+                    options: [
+                        {
+                            label: '通过',
+                            value: '2'
+                        },
+                        {
+                            label: '不通过',
+                            value: '3'
+                        }
+                    ]
+                },
+                {
+                    label: '驳回原因',
+                    prop: 'rejectReason',
+                    type: 'textarea',
+                    show: (form) => {
+                        console.log('驳回原因', form);
+                        return form.appStatus === '3'
+                    }
+                },
+            ]
+        },
+        searchBtns: [
+            {
+                label: '创建打款单',
+                func: () => {
+                    const ids = userTableRef.value.ids;
+                    console.log('批量删除', ids)
+                    ids.length > 0 && paymentSubmit(ids)
+                },
+                key: 'applicant',
+                type: 'primary',
+                show: (row) => {
+                    return tabkey.value === '2'
+                }
+            },
+        ],
+        scopeBtns: [
+            {
+                label: '审核',
+                type: 'primary',
+                key: 'examine',
+                func: (row) => {
+                    console.log(row)
+                    openDialog(row, 'examine')
+                },
+                show: (row) => {
+                    return tabkey.value === '0' && row.appStatus === '1'
+                }
+            },
+            // {
+            //     label: '查看详情',
+            //     type: 'primary',
+            //     key: 'details',
+            //     func: (row) => {
+            //         console.log(row)
+            //         openDialog(row, 'details')
+            //     }
+            // },
+            {
+                label: '验证',
+                type: 'primary',
+                key: 'details',
+                func: (row) => {
+                    console.log(row)
+                    openVerify(row)
+                }
+            },
+        ],
+        dialogVerifyData: ref({
+            title: '结算申请',
+            column: [
+                {
+                    label: '打款id',
+                    prop: 'volunteerPaymentRecordsId',
+                    type: 'input',
+                },
+                {
+                    label: '打款单单号',
+                    prop: 'paymentOrderNumber',
+                    type: 'input',
+                },
+                {
+                    label: '打款方式',
+                    prop: 'payType',
+                    type: 'select',
+                    options: pay_type
+                },
+                {
+                    label: '打款验证密码',
+                    prop: 'payPassword',
+                    type: 'input',
+                    dese:'发送验证码',
+                    deseClick:(data)=>{
+						console.log("TCL: exportFile -> data", data)
+                    }
+                },
+            ]
+        }),
+
+    }
+}

+ 8 - 1
src/views/order/examine/index.vue

@@ -15,7 +15,7 @@ import { getTreeList } from "@/api/staff/price.js";
 
 import DialogForm from '@/views/components/DialogForm/index.vue';
 const { proxy } = getCurrentInstance();
-const { jlzj_order_refund } = proxy.useDict("jlzj_order_refund");
+const { jlzj_order_refund,lrr_service_status } = proxy.useDict("jlzj_order_refund","lrr_service_status");
 
 const options = ref([]);
 const userTableRef = ref();
@@ -56,6 +56,13 @@ const listPageData = reactive({
             label: '已完成次数',
             prop: 'finishTimes',
         },
+        {
+            label: '订单状态',
+            prop: 'orderStatus',
+            type: 'dict',
+            dict: lrr_service_status,
+            isSearch: true,
+        },
         {
             label: '退单状态',
             prop: 'orderRefundStatus',

+ 17 - 7
src/views/staff/volunteer/manage/index.vue

@@ -42,7 +42,7 @@ const listPageData = reactive({
             isSearch: true,
             tableProp: 'projectName',
             options: options,
-            props: { label: 'businessName', value: 'id', checkStrictly:true },
+            props: { label: 'businessName', value: 'id', checkStrictly: true },
 
 
         },
@@ -84,9 +84,10 @@ const listPageData = reactive({
         {
             label: '审核状态',
             prop: 'appStatus',
-            type:'dict',
+            type: 'dict',
             dict: volunteer_app_status
         },
+        
     ],
     searchBtns: [
         // {
@@ -170,19 +171,19 @@ const dialogData = reactive({
             prop: 'businessTierName',
             type: 'input',
             options: options,
-            props: { label: 'businessName', value: 'id', checkStrictly:true },
+            props: { label: 'businessName', value: 'id', checkStrictly: true },
         },
         {
             label: '服务时长',
             prop: 'businessDuration',
             type: 'input',
-            dese:'分钟'
+            dese: '分钟'
         },
         {
             label: '服务价格',
             prop: 'businessPrice',
             type: 'input',
-            dese:'元'
+            dese: '元'
         },
         {
             label: '职业证书',
@@ -212,6 +213,15 @@ const dialogData = reactive({
                 }
             ]
         },
+        {
+            label: '驳回原因',
+            prop: 'rejectReason',
+            type: 'textarea',
+            show: (form) => {
+                console.log('驳回原因', form);
+                return form.appStatus === '3'
+            }
+        },
     ]
 })
 const { title } = toRefs(dialogData);
@@ -236,8 +246,8 @@ const openDialog = (row, type) => {
             address: true,
             skillDescribe: true,
             businessTierName: true,
-            businessDuration:true,
-            businessPrice:true
+            businessDuration: true,
+            businessPrice: true
         }
 
         if (type) {

+ 2 - 2
vite.config.js

@@ -39,8 +39,8 @@ export default defineConfig(({ mode, command }) => {
         '/dev-api': {
           // target: 'http://localhost:9527',
           // target: 'http://192.168.100.95:9527',
-          // target: 'https://zybooks.tech/prod-api',
-          target: 'http://192.168.100.122:9527',
+          // target: 'https://zybooks.tech/prod-api', 
+          target: 'http://192.168.100.112:9527',
           changeOrigin: true,
           rewrite: (p) => p.replace(/^\/dev-api/, '')
         },