3 Commits 3347aaea6a ... 198aee070b

Autor SHA1 Mensagem Data
  steelwei 198aee070b Merge branch 'master' of http://8.152.4.3:3000/yp_other/pet-system-admin-web 1 mês atrás
  steelwei 580344cf7d 1.调整app 1 mês atrás
  steelwei e8df6ba61f 1.调整app 1 mês atrás

+ 1 - 1
src/api/fulfiller/audit/types.ts

@@ -20,7 +20,7 @@ export interface FlfAuditVO {
   idCardFrontUrl: string;
   idCardBackUrl: string;
   qualifications: string;
-  qualificationUrls: string[];
+  qualificationUrls: string;
   serviceTypes: string;
   serviceTypeList: string[];
   stationId: string | number;

+ 1 - 1
src/api/fulfiller/pool/types.ts

@@ -32,7 +32,7 @@ export interface FlfFulfillerVO {
   authId: boolean;
   authQual: boolean;
   qualImages: string;
-  qualImageUrls: string[];
+  qualImageUrls: string;
   orderCount: number;
   rejectCount: number;
   rating: number;

+ 5 - 2
src/views/archieves/customer/index.vue

@@ -206,7 +206,7 @@
               :timestamp="log.createTime"
               type="primary"
             >
-              [{{ log.changeType }}] {{ log.content }}
+              [{{ log.logType }}] {{ log.content }}
               <div style="font-size: 12px; color: #999; margin-top: 4px">操作人: {{ log.operatorName }}</div>
             </el-timeline-item>
           </el-timeline>
@@ -801,7 +801,6 @@ const handleRemark = (row) => {
 
 const saveRemark = () => {
   if (!remarkForm.content) return ElMessage.warning('请输入内容')
-  // For now, update customer remark via API
   const data = { 
     id: currentUser.value.id, 
     name: currentUser.value.name,
@@ -812,6 +811,10 @@ const saveRemark = () => {
     ElMessage.success('备注添加成功')
     remarkDialogVisible.value = false
     getList()
+    // 刷新 drawer 中的变更日志
+    if (drawerVisible.value) {
+      loadDetailLogs(currentUser.value.id, 'customer')
+    }
   })
 }
 

+ 10 - 4
src/views/fulfiller/audit/index.vue

@@ -184,12 +184,12 @@
 
         <!-- 资质信息 -->
         <div class="section-title" style="margin-top: 20px">专业资质证明</div>
-        <div class="img-row" v-if="currentItem.qualificationUrls && currentItem.qualificationUrls.length">
-          <div class="img-box" v-for="(img, index) in currentItem.qualificationUrls" :key="index">
+        <div class="img-row" v-if="qualificationUrlList.length">
+          <div class="img-box" v-for="(img, index) in qualificationUrlList" :key="index">
             <el-image
               style="width: 120px; height: 120px; border-radius: 4px; border: 1px solid #eee"
               :src="img"
-              :preview-src-list="currentItem.qualificationUrls"
+              :preview-src-list="qualificationUrlList"
               fit="cover"
             />
             <span class="label">资质材料 {{ index + 1 }}</span>
@@ -222,7 +222,7 @@
 </template>
 
 <script setup lang="ts">
-import { ref, reactive, onMounted, nextTick } from 'vue';
+import { ref, reactive, computed, onMounted, nextTick } from 'vue';
 import { ElMessage, ElMessageBox } from 'element-plus';
 import { listAudit, getAudit, passAudit, rejectAudit, getPendingCount } from '@/api/fulfiller/audit';
 import type { FlfAuditVO, FlfAuditQuery } from '@/api/fulfiller/audit/types';
@@ -244,6 +244,12 @@ const rejectDialogVisible = ref(false);
 const rejectReason = ref('');
 const currentItem = ref<FlfAuditVO | null>(null);
 
+/** 资质图片URL列表(从逗号分隔字符串解析) */
+const qualificationUrlList = computed(() => {
+  if (!currentItem.value?.qualificationUrls) return [];
+  return currentItem.value.qualificationUrls.split(',').filter(Boolean);
+});
+
 /** 查询列表 */
 const getList = async () => {
   loading.value = true;

+ 22 - 11
src/views/fulfiller/pool/index.vue

@@ -123,7 +123,7 @@
         <el-table-column label="账户资产" width="160">
           <template #default="scope">
             <div class="finance-item">积分: <span class="num">{{ scope.row.points }}</span></div>
-            <div class="finance-item">余额: <span class="num">¥{{ scope.row.balance }}</span></div>
+            <div class="finance-item">余额: <span class="num">¥{{ (scope.row.balance / 100).toFixed(2) }}</span></div>
           </template>
         </el-table-column>
 
@@ -212,7 +212,7 @@
           </div>
           <div class="divider-v"></div>
           <div class="metric-item">
-            <div class="val text-danger">¥{{ currentItem.balance }}</div>
+            <div class="val text-danger">¥{{ (currentItem.balance / 100).toFixed(2) }}</div>
             <div class="lbl">账户余额</div>
           </div>
           <div class="divider-v"></div>
@@ -262,8 +262,8 @@
 
               <div class="section-block">
                 <div class="section-title">资质认证</div>
-                <div class="cert-row" v-if="currentItem.qualImageUrls && currentItem.qualImageUrls.length">
-                  <div class="cert-item" v-for="(img, index) in currentItem.qualImageUrls" :key="index" @click="handleViewImage(img)">
+                <div class="cert-row" v-if="qualImageUrlList.length">
+                  <div class="cert-item" v-for="(img, index) in qualImageUrlList" :key="index" @click="handleViewImage(img)">
                     <el-image :src="img" fit="cover" class="cert-img">
                       <template #error><div class="img-slot"><el-icon><Picture /></el-icon></div></template>
                     </el-image>
@@ -336,13 +336,13 @@
                 <el-table-column prop="amount" label="变动金额" width="120">
                   <template #default="{ row }">
                                     <span :style="{ color: row.amount > 0 ? '#67c23a' : '#f56c6c', fontWeight: 'bold', fontSize: '15px' }">
-                                        {{ row.amount > 0 ? '+' : '' }}{{ row.amount }}
+                                        {{ row.amount > 0 ? '+' : '' }}{{ (row.amount / 100).toFixed(2) }}
                                     </span>
                   </template>
                 </el-table-column>
                 <el-table-column prop="balanceAfter" label="变动后余额" width="120">
                   <template #default="{ row }">
-                    <span>¥{{ row.balanceAfter }}</span>
+                    <span>¥{{ (row.balanceAfter / 100).toFixed(2) }}</span>
                   </template>
                 </el-table-column>
                 <el-table-column prop="reason" label="备注说明" show-overflow-tooltip />
@@ -368,7 +368,7 @@
                 <el-table-column prop="amount" label="涉及数值" width="120">
                   <template #default="{ row }">
                                      <span :style="{ color: row.type==='reward' ? '#67c23a' : '#f56c6c', fontWeight: 'bold' }">
-                                         {{ row.type === 'reward' ? '+' : '-' }}{{ row.amount }} {{ row.target === 'points' ? '分' : '元' }}
+                                         {{ row.type === 'reward' ? '+' : '-' }}{{ row.target === 'balance' ? (row.amount / 100).toFixed(2) : row.amount }} {{ row.target === 'points' ? '分' : '元' }}
                                      </span>
                   </template>
                 </el-table-column>
@@ -561,7 +561,7 @@
     <el-dialog v-model="balanceDialog.visible" title="余额增减" width="450px">
       <el-form :model="balanceDialog.form" label-width="80px">
         <el-form-item label="当前余额">
-          <span style="color: #f56c6c; font-weight: bold">¥{{ balanceDialog.currentRow?.balance.toFixed(2) }}</span>
+          <span style="color: #f56c6c; font-weight: bold">¥{{ (balanceDialog.currentRow?.balance / 100).toFixed(2) }}</span>
         </el-form-item>
         <el-form-item label="扣减类型">
           <el-radio-group v-model="balanceDialog.form.type" @change="balanceDialog.form.subType = balanceDialog.form.type === 'add' ? 'reward' : 'punish'">
@@ -598,7 +598,7 @@
 </template>
 
 <script setup lang="ts">
-import { ref, reactive, onMounted } from 'vue'
+import { ref, reactive, computed, onMounted } from 'vue'
 import { ElMessage, ElMessageBox } from 'element-plus'
 import {
   listFulfiller, getFulfiller, addFulfiller, updateFulfiller,
@@ -636,6 +636,12 @@ const detailVisible = ref(false)
 const activeDetailTab = ref('info')
 const currentItem = ref<FlfFulfillerVO | null>(null)
 
+/** 资质图片URL列表(从逗号分隔字符串解析) */
+const qualImageUrlList = computed(() => {
+  if (!currentItem.value?.qualImageUrls) return []
+  return currentItem.value.qualImageUrls.split(',').filter(Boolean)
+})
+
 // Log data for detail tabs
 const pointsLogData = ref<FlfPointsLogVO[]>([])
 const balanceLogData = ref<FlfBalanceLogVO[]>([])
@@ -917,11 +923,15 @@ const handleReward = (row: FlfFulfillerVO) => {
 
 const submitReward = async () => {
   try {
+    // 余额目标时将元转为分
+    const amount = rewardDialog.form.target === 'balance'
+      ? Math.round(rewardDialog.form.amount * 100)
+      : rewardDialog.form.amount
     await reward({
       fulfillerId: rewardDialog.fulfillerId,
       type: rewardDialog.form.type,
       target: rewardDialog.form.target,
-      amount: rewardDialog.form.amount,
+      amount: amount,
       reason: rewardDialog.form.reason
     })
     ElMessage.success('操作成功')
@@ -980,11 +990,12 @@ const submitPointsAdjust = async () => {
 const submitBalanceAdjust = async () => {
   if (!balanceDialog.currentRow) return
   try {
+    // 将元转为分
     await adjustBalance({
       fulfillerId: balanceDialog.currentRow.id,
       type: balanceDialog.form.type,
       subType: balanceDialog.form.subType,
-      amount: balanceDialog.form.amount,
+      amount: Math.round(balanceDialog.form.amount * 100),
       reason: balanceDialog.form.reason
     })
     ElMessage.success('余额调整成功')

+ 1 - 1
vite.config.ts

@@ -24,7 +24,7 @@ export default defineConfig(({ mode, command }) => {
       // open: true,
       proxy: {
         [env.VITE_APP_BASE_API]: {
-          target: 'http://192.168.1.118:8080',
+          target: 'http://127.0.0.1:8080',
           changeOrigin: true,
           ws: true,
           rewrite: (path) => path.replace(new RegExp('^' + env.VITE_APP_BASE_API), '')