Browse Source

fix: 财务管理

chenjj 1 week ago
parent
commit
09e721846b

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

@@ -0,0 +1,30 @@
+import request from '@/utils/request'
+
+//查询订单费用结算申请列表
+export function list(query) {
+  return request({
+    url: '/core/orderSettlementApplication/list',
+    method: 'get',
+    params: query
+  })
+}
+
+//获取结算订单列表
+export function settlementOrderList(query) {
+    return request({
+      url: '/core/users/orders/web/settlementOrderList',
+      method: 'get',
+      params: query
+    })
+  }
+//导出订单费用结算申请列表
+export function exportEx(data) {
+    return request({
+      url: `/core/orderSettlementApplication/export`,
+      method: 'post',
+      data
+    })
+  }
+
+
+

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

@@ -35,7 +35,7 @@
         </el-form>
         <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"
+                <el-button :type="item.type || 'primary'" plain :icon="item.icon" @click="()=>item.func(formInline)"
                     v-hasPermi="item.hasPermi">{{ item.label }}</el-button>
             </el-col>
         </el-row>

+ 318 - 0
src/views/finance/examine/index.vue

@@ -0,0 +1,318 @@
+<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" />
+    </div>
+</template>
+
+<script setup>
+import { ref } 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';
+
+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) => {
+
+    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>
+
+<style lang='scss' scoped></style>

+ 298 - 0
src/views/finance/settlement/index.vue

@@ -0,0 +1,298 @@
+<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" />
+    </div>
+</template>
+
+<script setup>
+import { ref } 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';
+
+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 handleDelete = (ids) => {
+    proxy.$modal.confirm('是否确认删除角色编号为"' + ids + '"的数据项?').then(function () {
+        return true
+    }).then(() => {
+        userTableRef.value.resetForm();
+        proxy.$modal.msgSuccess("删除成功");
+    }).catch(() => { });
+}
+
+const submitForm = async (parmas) => {
+
+    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>
+
+<style lang='scss' scoped></style>

+ 7 - 3
src/views/login.vue

@@ -59,7 +59,8 @@
     </el-form>
     <!--  底部  -->
     <div class="el-login-footer">
-      <span>Copyright © 2018-2025 ruoyi.vip All Rights Reserved.</span>
+      <span>Copyright © 2021 - 2024  重庆金树林科技有限公司 版权所有</span>
+      <a @click="handleBA">备案号: 渝ICP备2021012302号-5</a>
     </div>
   </div>
 </template>
@@ -88,7 +89,7 @@ const loginRules = {
   username: [{ required: true, trigger: "blur", message: "请输入您的账号" }],
   password: [{ required: true, trigger: "blur", message: "请输入您的密码" }],
   code: [{ required: true, trigger: "change", message: "请输入验证码" }]
-};
+};  
 
 const codeUrl = ref("");
 const loading = ref(false);
@@ -147,7 +148,9 @@ function getCode() {
     }
   });
 }
-
+function handleBA() {
+  window.open("https://beian.miit.gov.cn/com/top/sales/#/Integrated/recordQuery");
+}
 function getCookie() {
   const username = Cookies.get("username");
   const password = Cookies.get("password");
@@ -159,6 +162,7 @@ function getCookie() {
   };
 }
 
+
 getCode();
 getCookie();
 </script>

+ 40 - 9
src/views/system/dept/index.vue

@@ -31,17 +31,24 @@
       <el-table v-if="refreshTable" v-loading="loading" :data="deptList" row-key="deptId"
          :default-expand-all="isExpandAll" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
          <el-table-column prop="deptName" label="部门名称" width="260"></el-table-column>
-         <el-table-column prop="orderNum" label="排序" width="200"></el-table-column>
-         <el-table-column prop="provinceName" label="省级" width="200"></el-table-column>
-         <el-table-column prop="cityName" label="市级" width="200"></el-table-column>
-         <el-table-column prop="districtName" label="区级" width="200"></el-table-column>
+         <el-table-column prop="orderNum" label="排序" ></el-table-column>
+         <el-table-column prop="provinceName" label="省级" ></el-table-column>
+         <el-table-column prop="cityName" label="市级" ></el-table-column>
+         <el-table-column prop="districtName" label="区级" ></el-table-column>
+         <el-table-column prop="distributionRatio" label="分账比例" ></el-table-column>
+         <el-table-column prop="areaType" label="类型" >
+            <template #default="scope">
+               <dict-tag :options="jlzj_area_type" :value="scope.row.areaType" />
+            </template>
+         </el-table-column>
+
 
-         <el-table-column prop="status" label="状态" width="100">
+         <el-table-column prop="status" label="状态" width="80">
             <template #default="scope">
                <dict-tag :options="sys_normal_disable" :value="scope.row.status" />
             </template>
          </el-table-column>
-         <el-table-column label="创建时间" align="center" prop="createTime" width="200">
+         <el-table-column label="创建时间" align="center" prop="createTime" >
             <template #default="scope">
                <span>{{ parseTime(scope.row.createTime) }}</span>
             </template>
@@ -128,6 +135,24 @@
                      </el-radio-group>
                   </el-form-item>
                </el-col>
+
+
+               <el-col :span="12">
+                  <el-form-item label="分账比例" prop="distributionRatio">
+                     <el-input v-model="form.distributionRatio" placeholder="请输入分账比例" maxlength="50" type="number"  :step="0.1" :min="0" :max="1">
+                        <!-- <template #append>%</template> -->
+                     </el-input>
+                  </el-form-item>
+               </el-col>
+               <el-col :span="12">
+                  <el-form-item label="状态">
+                     <el-radio-group v-model="form.areaType">
+                        <el-radio v-for="dict in jlzj_area_type" :key="dict.value" :value="dict.value">{{ dict.label
+                           }}</el-radio>
+                     </el-radio-group>
+                  </el-form-item>
+               </el-col>
+               
             </el-row>
          </el-form>
          <template #footer>
@@ -145,7 +170,7 @@ import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild }
 import address from "./address";
 const router = useRouter();
 const { proxy } = getCurrentInstance();
-const { sys_normal_disable } = proxy.useDict("sys_normal_disable");
+const { sys_normal_disable,jlzj_area_type } = proxy.useDict("sys_normal_disable","jlzj_area_type");
 
 const deptList = ref([]);
 const open = ref(false);
@@ -157,7 +182,9 @@ const isExpandAll = ref(true);
 const refreshTable = ref(true);
 
 const data = reactive({
-   form: {},
+   form: {
+      distributionRatio: 0.3
+   },
    queryParams: {
       deptName: undefined,
       status: undefined
@@ -211,7 +238,8 @@ function reset() {
       leader: undefined,
       phone: undefined,
       email: undefined,
-      status: "0"
+      status: "0",
+      distributionRatio: 0.3
    };
    proxy.resetForm("deptRef");
 }
@@ -272,6 +300,9 @@ function handleUpdate(row) {
 function submitForm() {
    proxy.$refs["deptRef"].validate(valid => {
       if (valid) {
+         if(form.value.distributionRatio){
+            form.value.distributionRatio = Number(form.value.distributionRatio);
+         }
          if (form.value.deptId != undefined) {
             updateDept(form.value).then(response => {
                proxy.$modal.msgSuccess("修改成功");

+ 2 - 1
vite.config.js

@@ -38,8 +38,9 @@ export default defineConfig(({ mode, command }) => {
         // https://cn.vitejs.dev/config/#server-proxy
         '/dev-api': {
           // target: 'http://localhost:9527',
-          target: 'http://192.168.100.95:9527',
+          // target: 'http://192.168.100.95:9527',
           // target: 'https://zybooks.tech/prod-api',
+          target: 'http://192.168.100.122:9527',
           changeOrigin: true,
           rewrite: (p) => p.replace(/^\/dev-api/, '')
         },