Explorar el Código

Merge remote-tracking branch 'origin/master'

LiRong hace 4 meses
padre
commit
3640bd172e

+ 19 - 0
src/api/order/examine.js

@@ -0,0 +1,19 @@
+import request from '@/utils/request'
+
+
+export function list(query) {
+  return request({
+    url: '/core/users/refund/web/list',
+    method: 'get',
+    params: query
+  })
+}
+
+
+export function checkOrderRefund(data) {
+  return request({
+    url: `/core/users/refund/checkOrderRefund`,
+    method: 'post',
+    data
+  })
+}

+ 1 - 1
src/router/index.js

@@ -162,7 +162,7 @@ export const dynamicRoutes = [
     path: '/order',
     component: Layout,
     hidden: true,
-    permissions: [],
+    permissions: ['order:manage:list'],
     children: [
       {
         path: 'order-details/:orderId(\\d+)',

+ 1 - 1
src/views/components/DialogForm/index.vue

@@ -9,7 +9,7 @@
                     </el-input>
                 </el-form-item>
                 <!-- 文本域 -->
-                <el-form-item :label="item.label" v-if="item.type === 'textarea'" :prop="item.prop" :rules="item.rules">
+                <el-form-item :label="item.label" v-if="item.type === 'textarea'&& (item.show ?  item.show(form): true)" :prop="item.prop" :rules="item.rules">
                     <el-input v-model="form[item.prop]" type="textarea"
                     :autosize="{ minRows: 2, maxRows: 4 }"
                      :placeholder="'请输入' + item.label" clearable  :disabled="disables[item.prop]"/>

+ 64 - 69
src/views/order/examine/index.vue

@@ -2,7 +2,7 @@
     <div>
         <ListPage :column="listPageData.tableColumn" :tableApi="listPageData.tableApi" :isSelect="listPageData.isSelect"
             :scopeBtns="listPageData.scopeBtns" :searchBtns="listPageData.searchBtns" ref="userTableRef"
-            v-if="options && options.length > 0" tabsearchKey="appStatus" />
+            v-if="options && options.length > 0" />
         <DialogForm ref="dialogFormRef" :title="title" :column="dialogData.column" @submit="submitForm" />
     </div>
 </template>
@@ -10,12 +10,12 @@
 <script setup>
 import { ref } from 'vue';
 import ListPage from '@/views/components/ListPage/index.vue';
-import { list, approval } from "@/api/staff/volunteer.js";
+import { list, checkOrderRefund } from "@/api/order/examine.js";
 import { getTreeList } from "@/api/staff/price.js";
 
 import DialogForm from '@/views/components/DialogForm/index.vue';
 const { proxy } = getCurrentInstance();
-const { volunteer_app_status } = proxy.useDict("volunteer_app_status");
+const { jlzj_order_refund } = proxy.useDict("jlzj_order_refund");
 
 const options = ref([]);
 const userTableRef = ref();
@@ -31,7 +31,7 @@ const listPageData = reactive({
         },
         {
             label: '姓名',
-            prop: 'name',
+            prop: 'volunteerName',
             type: 'input',
             isSearch: true,
         },
@@ -40,44 +40,35 @@ const listPageData = reactive({
             prop: 'businessManagementId',
             type: 'cascader',
             isSearch: true,
-            tableProp: 'projectName',
+            tableProp: 'businessTierName',
             options: options,
             props: { label: 'businessName', value: 'id', checkStrictly:true },
         },
-        {
-            label: '项目类别',
-            prop: 'projectTypeName',
-        },
-        {
-            label: '科目',
-            prop: 'serviceSubjectName',
-        },
         {
             label: '被服务人员',
-            prop: 'name',
+            prop: 'clientName',
         },
         {
-            label: '已服务',
-            prop: 'address',
+            label: '总次数',
+            prop: 'totalTimes',
         },
         {
-            label: '为服务',
-            prop: 'address',
+            label: '已完成次数',
+            prop: 'finishTimes',
         },
         {
             label: '退单状态',
-            prop: 'idCardPicture',
+            prop: 'orderRefundStatus',
             type: 'dict',
-            dict: volunteer_app_status
+            dict: jlzj_order_refund
         },
         {
             label: '退款金额',
-            prop: 'volunteerPicture',
-            type: 'img',
+            prop: 'refundAmount',
         },
         {
             label: '备注',
-            prop: 'address',
+            prop: 'refundReason',
         },
     ],
     searchBtns: [],
@@ -93,9 +84,22 @@ const listPageData = reactive({
                 console.log(row)
                 openDialog(row, 'examine')
             },
-            // show: (row) => {
-            //     return row.appStatus == 1
-            // }
+            show: (row) => {
+                return row.orderRefundStatus === '0'
+            }
+        },
+        {
+            label: '查看详情',
+            type: 'primary',
+            hasPermi: ['manage:details'],
+            key: 'details',
+            func: (row) => {
+                console.log(row)
+                openDialog(row)
+            },
+            show: (row) => {
+                return row.orderRefundStatus !== '0'
+            }
         },
     ]
 })
@@ -104,67 +108,44 @@ const dialogData = reactive({
     column: [
         {
             label: '时间',
-            prop: 'name',
+            prop: 'createTime',
             type: 'input',
 
         },
         {
             label: '姓名',
-            prop: 'name',
+            prop: 'volunteerName',
             type: 'input',
 
         },
         {
-            label: '电话',
-            prop: 'phonenumber',
-            type: 'input',
-
-        },
-        {
-            label: '服务项目/类别',
-            prop: 'businessManagementId',
-            type: 'cascader',
-            isSearch: true,
-            options: options,
-            props: { label: 'businessName', value: 'id', checkStrictly:true },
-        },
-        {
-            label: '科目',
-            prop: 'age',
+            label: '服务项目',
+            prop: 'businessTierName',
             type: 'input',
-
         },
         {
             label: '被服务人员',
-            prop: 'address',
+            prop: 'clientName',
             type: 'input',
         },
        
-        {
-            label: '手机号',
-            prop: 'idCardPicture',
-            type: 'img',
-
-        },
         {
             label: '退款金额',
-            prop: 'certificationPicture',
-            type: 'img',
-
+            prop: 'refundAmount',
         },
         {
             label: '照片上传',
-            prop: 'certificationPicture',
+            prop: 'refundPicture',
             type: 'img',
         },
         {
             label: '备注',
-            prop: 'skillDescribe',
+            prop: 'refundReason',
             type: 'textarea',
         },
         {
             label: '审核状态',
-            prop: 'appStatus',
+            prop: 'status',
             type: 'radio',
             rules: [
                 { required: true, message: '请选择审核状态', trigger: 'blur' }
@@ -180,6 +161,16 @@ const dialogData = reactive({
                 }
             ]
         },
+        {
+            label: '驳回原因',
+            prop: 'rejectionReason',
+            type: 'textarea',
+            show:(form)=>{
+                console.log('驳回原因',form);
+                
+                return form.status === '3'
+            }
+        },
     ]
 })
 const { title } = toRefs(dialogData);
@@ -189,12 +180,13 @@ const openDialog = (row, type) => {
     console.log('row', row);
     try {
         const disabledData = {
-            name: true,
-            age: true,
-            phonenumber: true,
-            address: true,
-            skillDescribe: true,
-            businessManagementId: true,
+            createTime:true,
+            volunteerName:true,
+            businessTierName:true,
+            clientName:true,
+            refundAmount:true,
+            refundReason:true,
+
         }
 
         if (type) {
@@ -202,7 +194,7 @@ const openDialog = (row, type) => {
             title.value = '审核'
 
         } else {
-            disabledData['appStatus'] = true;
+            disabledData['status'] = true;
             //查看详情
             title.value = '查看详情'
         }
@@ -231,10 +223,13 @@ 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
+            console.log('审核',);            
+            const res = await checkOrderRefund({
+                mainOrderId: parmas.mainOrderId,
+                orderRefundId: parmas.orderRefundId,
+                status: parmas.status,
+                rejectionReason: parmas.rejectionReason,
+                refundAmount: parmas.refundAmount
             })
             if (up_res.code === 200) {
                 proxy.$modal.msgSuccess("审核成功");

+ 2 - 1
vite.config.js

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