Commit 377b10900fce540c4e7d107a68cf42ef13978439

Authored by “wangming”
1 parent 69379643

优化退款申请管理界面,增加搜索条件和统计信息展示,重构表格展示逻辑,提升用户体验。

.DS_Store
No preview for this file type
.cursor/.DS_Store 0 → 100644
No preview for this file type
.cursor/mcp.json 0 → 100644
  1 +{
  2 + "mcpServers": {
  3 + "my-sql-db": {
  4 + "command": "npx",
  5 + "args": [
  6 + "--yes",
  7 + "@davewind/mysql-mcp-server",
  8 + "mysql://devuser:WrdDevMySql!123@rm-bp198425456ln4lu6uo.mysql.rds.aliyuncs.com:3306/antis_net_wurenji"
  9 + ]
  10 + },
  11 + "my-api-spec": {
  12 + "command": "npx",
  13 + "args": [
  14 + "--yes",
  15 + "@ivotoby/openapi-mcp-server",
  16 + "--openapi-spec",
  17 + "http://localhost:2011/swagger/Default/swagger.json",
  18 + "--api-base-url",
  19 + "http://localhost:2011"
  20 + ]
  21 + },
  22 + "filesystem": {
  23 + "command": "npx",
  24 + "args": [
  25 + "@modelcontextprotocol/server-filesystem",
  26 + "."
  27 + ]
  28 + }
  29 + }
  30 +}
0 \ No newline at end of file 31 \ No newline at end of file
antis-ncc-admin/.nvmrc 0 → 100644
  1 +16
antis-ncc-admin/src/views/uavRefundApplication/Form.vue
1 <template> 1 <template>
2 - <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情' : '编辑'" :close-on-click-modal="false"  
3 - :visible.sync="visible" class="NCC-dialog NCC-dialog_center" lock-scroll width="600px">  
4 - <el-row :gutter="15" class="" style="height: 300px;">  
5 - <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right"  
6 - :disabled="!!isDetail" :rules="rules">  
7 - <el-col :span="24">  
8 - <el-form-item label="申请时间" prop="applyTime">  
9 - {{ dataForm.applyTime ? new Date(dataForm.applyTime).toLocaleString('zh-CN', {  
10 - year: 'numeric',  
11 - month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second:  
12 - '2-digit'  
13 - }).replace(/\//g, '-') : '' }}  
14 - </el-form-item>  
15 - </el-col>  
16 - <el-col :span="24">  
17 - <el-form-item label="订单编号" prop="orderNo">  
18 - {{ dataForm.orderNo }}  
19 - </el-form-item>  
20 - </el-col>  
21 - <el-col :span="24">  
22 - <el-form-item label="申请金额" prop="applyAmount">  
23 - {{ dataForm.applyAmount }}  
24 - </el-form-item>  
25 - </el-col>  
26 - <el-col :span="24">  
27 - <el-form-item label="用户ID" prop="userId">  
28 - {{ dataForm.userId }}  
29 - </el-form-item>  
30 - </el-col>  
31 - <el-col :span="24">  
32 - <el-form-item label="用户电话" prop="userPhone">  
33 - {{ dataForm.userPhone }}  
34 - </el-form-item>  
35 - </el-col>  
36 - <el-col :span="24">  
37 - <el-form-item label="退款原因" prop="userPhone">  
38 - {{ dataForm.refundReason }}  
39 - </el-form-item>  
40 - </el-col>  
41 - <el-col :span="24">  
42 - <el-form-item label="退款备注" prop="userPhone">  
43 - {{ dataForm.remark }}  
44 - </el-form-item>  
45 - </el-col>  
46 - <el-col :span="24">  
47 - <el-form-item label="退款处理结果" prop="userPhone">  
48 - <el-input v-model="dataForm.handleResult" type="textarea" />  
49 - </el-form-item>  
50 - </el-col>  
51 - </el-form>  
52 - </el-row> 2 + <el-dialog :title="isDetail ? '退款申请详情' : '处理退款申请'" :close-on-click-modal="false" :visible.sync="visible" class="refund-dialog" lock-scroll width="700px" :top="'8vh'">
  3 + <div class="dialog-content" v-loading="loading">
  4 + <!-- 申请信息 -->
  5 + <div class="info-section">
  6 + <div class="section-header">
  7 + <div class="header-icon">
  8 + <i class="el-icon-document"></i>
  9 + </div>
  10 + <div class="header-text">
  11 + <h3>申请信息</h3>
  12 + </div>
  13 + </div>
  14 + <div class="section-content">
  15 + <el-form :model="dataForm" size="small" label-width="100px" label-position="right">
  16 + <el-row :gutter="15">
  17 + <el-col :span="12">
  18 + <el-form-item label="申请时间">
  19 + <el-input :value="formatDateTime(dataForm.applyTime)" readonly class="readonly-input" />
  20 + </el-form-item>
  21 + </el-col>
  22 + <el-col :span="12">
  23 + <el-form-item label="订单编号">
  24 + <el-input v-model="dataForm.orderNo" readonly class="readonly-input" />
  25 + </el-form-item>
  26 + </el-col>
  27 + </el-row>
  28 + <el-row :gutter="15">
  29 + <el-col :span="12">
  30 + <el-form-item label="申请金额">
  31 + <el-input :value="'¥' + dataForm.applyAmount" readonly class="amount-input" />
  32 + </el-form-item>
  33 + </el-col>
  34 + <el-col :span="12">
  35 + <el-form-item label="当前状态">
  36 + <el-tag v-if="dataForm.refundStatus === 0" type="warning" size="small">
  37 + <i class="el-icon-time"></i> 待处理
  38 + </el-tag>
  39 + <el-tag v-else-if="dataForm.refundStatus === 1" type="success" size="small">
  40 + <i class="el-icon-check"></i> 已同意
  41 + </el-tag>
  42 + <el-tag v-else-if="dataForm.refundStatus === 2" type="danger" size="small">
  43 + <i class="el-icon-close"></i> 已拒绝
  44 + </el-tag>
  45 + <el-tag v-else-if="dataForm.refundStatus === 3" type="info" size="small">
  46 + <i class="el-icon-success"></i> 已退款
  47 + </el-tag>
  48 + <el-tag v-else type="info" size="small">未知</el-tag>
  49 + </el-form-item>
  50 + </el-col>
  51 + </el-row>
  52 + </el-form>
  53 + </div>
  54 + </div>
  55 +
  56 + <!-- 用户信息 -->
  57 + <div class="info-section">
  58 + <div class="section-header">
  59 + <div class="header-icon">
  60 + <i class="el-icon-user"></i>
  61 + </div>
  62 + <div class="header-text">
  63 + <h3>用户信息</h3>
  64 + </div>
  65 + </div>
  66 + <div class="section-content">
  67 + <el-form :model="dataForm" size="small" label-width="100px" label-position="right">
  68 + <el-row :gutter="15">
  69 + <el-col :span="12">
  70 + <el-form-item label="用户ID">
  71 + <el-input v-model="dataForm.userId" readonly class="readonly-input" />
  72 + </el-form-item>
  73 + </el-col>
  74 + <el-col :span="12">
  75 + <el-form-item label="用户电话">
  76 + <el-input v-model="dataForm.userPhone" readonly class="phone-input" />
  77 + </el-form-item>
  78 + </el-col>
  79 + </el-row>
  80 + </el-form>
  81 + </div>
  82 + </div>
  83 +
  84 + <!-- 退款详情 -->
  85 + <div class="info-section">
  86 + <div class="section-header">
  87 + <div class="header-icon">
  88 + <i class="el-icon-edit"></i>
  89 + </div>
  90 + <div class="header-text">
  91 + <h3>退款详情</h3>
  92 + </div>
  93 + </div>
  94 + <div class="section-content">
  95 + <el-form :model="dataForm" size="small" label-width="100px" label-position="right">
  96 + <el-row :gutter="15">
  97 + <el-col :span="24">
  98 + <el-form-item label="退款原因">
  99 + <el-input v-model="dataForm.refundReason" type="textarea" readonly class="readonly-textarea" :rows="2" />
  100 + </el-form-item>
  101 + </el-col>
  102 + </el-row>
  103 + <el-row :gutter="15">
  104 + <el-col :span="24">
  105 + <el-form-item label="申请备注">
  106 + <el-input v-model="dataForm.remark" type="textarea" readonly class="readonly-textarea" :rows="2" />
  107 + </el-form-item>
  108 + </el-col>
  109 + </el-row>
  110 + </el-form>
  111 + </div>
  112 + </div>
  113 +
  114 + <!-- 处理信息 -->
  115 + <div class="info-section" v-if="dataForm.refundStatus !== 0">
  116 + <div class="section-header">
  117 + <div class="header-icon">
  118 + <i class="el-icon-check"></i>
  119 + </div>
  120 + <div class="header-text">
  121 + <h3>处理信息</h3>
  122 + </div>
  123 + </div>
  124 + <div class="section-content">
  125 + <el-form :model="dataForm" size="small" label-width="100px" label-position="right">
  126 + <el-row :gutter="15">
  127 + <el-col :span="12">
  128 + <el-form-item label="处理时间">
  129 + <el-input :value="formatDateTime(dataForm.handleTime)" readonly class="readonly-input" />
  130 + </el-form-item>
  131 + </el-col>
  132 + <el-col :span="12">
  133 + <el-form-item label="处理人">
  134 + <el-input v-model="dataForm.handleUser" readonly class="readonly-input" />
  135 + </el-form-item>
  136 + </el-col>
  137 + </el-row>
  138 + <el-row :gutter="15">
  139 + <el-col :span="24">
  140 + <el-form-item label="处理结果">
  141 + <el-input v-model="dataForm.handleResult" type="textarea" readonly class="readonly-textarea" :rows="2" />
  142 + </el-form-item>
  143 + </el-col>
  144 + </el-row>
  145 + </el-form>
  146 + </div>
  147 + </div>
  148 +
  149 + <!-- 处理操作 -->
  150 + <div class="action-section" v-if="!isDetail && dataForm.refundStatus === 0">
  151 + <div class="section-header">
  152 + <div class="header-icon">
  153 + <i class="el-icon-edit"></i>
  154 + </div>
  155 + <div class="header-text">
  156 + <h3>处理操作</h3>
  157 + </div>
  158 + </div>
  159 + <div class="section-content">
  160 + <el-form ref="handleForm" :model="handleForm" :rules="handleRules" size="small" label-width="100px" label-position="right">
  161 + <el-row :gutter="15">
  162 + <el-col :span="24">
  163 + <el-form-item label="处理结果" prop="handleResult">
  164 + <el-input v-model="handleForm.handleResult" type="textarea" placeholder="请输入处理结果或备注信息" :rows="2" />
  165 + </el-form-item>
  166 + </el-col>
  167 + </el-row>
  168 + </el-form>
  169 + </div>
  170 + </div>
  171 + </div>
53 <span slot="footer" class="dialog-footer"> 172 <span slot="footer" class="dialog-footer">
54 <el-button @click="visible = false">取 消</el-button> 173 <el-button @click="visible = false">取 消</el-button>
55 - <el-button type="danger" @click="RejectRefund()" v-if="!isDetail">拒绝退款</el-button>  
56 - <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确定退款</el-button> 174 + <el-button type="danger" @click="RejectRefund()" v-if="!isDetail && dataForm.refundStatus === 0" :loading="submitLoading">拒绝退款</el-button>
  175 + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail && dataForm.refundStatus === 0" :loading="submitLoading">确定退款</el-button>
57 </span> 176 </span>
58 </el-dialog> 177 </el-dialog>
59 </template> 178 </template>
@@ -67,6 +186,7 @@ export default { @@ -67,6 +186,7 @@ export default {
67 data() { 186 data() {
68 return { 187 return {
69 loading: false, 188 loading: false,
  189 + submitLoading: false,
70 visible: false, 190 visible: false,
71 isDetail: false, 191 isDetail: false,
72 dataForm: { 192 dataForm: {
@@ -76,6 +196,20 @@ export default { @@ -76,6 +196,20 @@ export default {
76 applyAmount: undefined, 196 applyAmount: undefined,
77 userId: undefined, 197 userId: undefined,
78 userPhone: undefined, 198 userPhone: undefined,
  199 + refundReason: '',
  200 + remark: '',
  201 + refundStatus: 0,
  202 + handleTime: undefined,
  203 + handleUser: '',
  204 + handleResult: ''
  205 + },
  206 + handleForm: {
  207 + handleResult: ''
  208 + },
  209 + handleRules: {
  210 + handleResult: [
  211 + { required: true, message: '请填写处理结果', trigger: 'blur' }
  212 + ]
79 }, 213 },
80 rules: { 214 rules: {
81 }, 215 },
@@ -95,63 +229,293 @@ export default { @@ -95,63 +229,293 @@ export default {
95 this.dataForm.id = id || 0; 229 this.dataForm.id = id || 0;
96 this.visible = true; 230 this.visible = true;
97 this.isDetail = isDetail || false; 231 this.isDetail = isDetail || false;
  232 + this.loading = true;
98 this.$nextTick(() => { 233 this.$nextTick(() => {
99 - this.$refs['elForm'].resetFields();  
100 if (this.dataForm.id) { 234 if (this.dataForm.id) {
101 request({ 235 request({
102 url: '/api/Extend/UavRefundApplication/' + this.dataForm.id, 236 url: '/api/Extend/UavRefundApplication/' + this.dataForm.id,
103 method: 'get' 237 method: 'get'
104 }).then(res => { 238 }).then(res => {
105 this.dataForm = res.data; 239 this.dataForm = res.data;
  240 + this.handleForm.handleResult = res.data.handleResult || '';
  241 + this.loading = false;
  242 + }).catch(() => {
  243 + this.loading = false;
106 }) 244 })
  245 + } else {
  246 + this.loading = false;
107 } 247 }
108 }) 248 })
109 }, 249 },
  250 + formatDateTime(dateTime) {
  251 + if (!dateTime) return '-'
  252 + const date = new Date(dateTime)
  253 + return date.toLocaleString('zh-CN', {
  254 + year: 'numeric',
  255 + month: '2-digit',
  256 + day: '2-digit',
  257 + hour: '2-digit',
  258 + minute: '2-digit',
  259 + second: '2-digit'
  260 + })
  261 + },
110 RejectRefund() { 262 RejectRefund() {
111 - request({  
112 - url: `/api/Extend/UavRefundApplication/RejectRefund`,  
113 - method: 'post',  
114 - data: this.dataForm,  
115 - }).then((res) => {  
116 - this.$message({  
117 - message: res.msg,  
118 - type: 'success',  
119 - duration: 1000,  
120 - onClose: () => {  
121 - this.visible = false,  
122 - this.$emit('refresh', true)  
123 - }  
124 - }) 263 + this.$refs['handleForm'].validate((valid) => {
  264 + if (valid) {
  265 + this.$confirm('确认拒绝此退款申请吗?', '提示', {
  266 + type: 'warning'
  267 + }).then(() => {
  268 + this.submitLoading = true;
  269 + const submitData = {
  270 + ...this.dataForm,
  271 + handleResult: this.handleForm.handleResult
  272 + };
  273 + request({
  274 + url: `/api/Extend/UavRefundApplication/RejectRefund`,
  275 + method: 'post',
  276 + data: submitData,
  277 + }).then((res) => {
  278 + this.$message({
  279 + message: res.msg,
  280 + type: 'success',
  281 + duration: 1000,
  282 + onClose: () => {
  283 + this.visible = false;
  284 + this.$emit('refresh', true);
  285 + }
  286 + })
  287 + }).catch(() => {
  288 + this.submitLoading = false;
  289 + })
  290 + })
  291 + }
125 }) 292 })
126 }, 293 },
127 dataFormSubmit() { 294 dataFormSubmit() {
128 - //提示是否确认退款  
129 - this.$confirm('是否确认退款, 是否继续?', '提示', {  
130 - type: 'warning'  
131 - }).then(() => {  
132 - request({  
133 - url: `/api/Extend/AliPay/RefundPay`,  
134 - method: 'post',  
135 - data: {  
136 - OutOrderNo: this.dataForm.orderNo,  
137 - }  
138 - }).then((res) => {  
139 - this.$message({  
140 - message: res.data,  
141 - type: 'success',  
142 - duration: 1000,  
143 - onClose: () => {  
144 - this.visible = false,  
145 - this.$emit('refresh', true)  
146 - } 295 + this.$refs['handleForm'].validate((valid) => {
  296 + if (valid) {
  297 + this.$confirm('确认同意此退款申请并执行退款吗?', '提示', {
  298 + type: 'warning'
  299 + }).then(() => {
  300 + this.submitLoading = true;
  301 + request({
  302 + url: `/api/Extend/AliPay/RefundPay`,
  303 + method: 'post',
  304 + data: {
  305 + OutOrderNo: this.dataForm.orderNo,
  306 + handleResult: this.handleForm.handleResult
  307 + }
  308 + }).then((res) => {
  309 + this.$message({
  310 + message: res.data,
  311 + type: 'success',
  312 + duration: 1000,
  313 + onClose: () => {
  314 + this.visible = false;
  315 + this.$emit('refresh', true);
  316 + }
  317 + })
  318 + }).catch(() => {
  319 + this.submitLoading = false;
  320 + })
147 }) 321 })
148 - }) 322 + }
149 }) 323 })
150 }, 324 },
151 } 325 }
152 } 326 }
153 </script> 327 </script>
154 328
155 -<style> 329 +<style scoped>
  330 +/* 弹窗整体样式 */
  331 +.refund-dialog {
  332 + border-radius: 8px;
  333 + overflow: hidden;
  334 +}
  335 +
  336 +.refund-dialog >>> .el-dialog {
  337 + border-radius: 8px;
  338 + overflow: hidden;
  339 +}
  340 +
  341 +.refund-dialog >>> .el-dialog__header {
  342 + background: linear-gradient(135deg, #409EFF 0%, #66b1ff 100%);
  343 + color: white;
  344 + padding: 15px 20px;
  345 + margin: 0;
  346 +}
  347 +
  348 +.refund-dialog >>> .el-dialog__title {
  349 + color: white;
  350 + font-size: 16px;
  351 + font-weight: 600;
  352 +}
  353 +
  354 +.refund-dialog >>> .el-dialog__headerbtn .el-dialog__close {
  355 + color: white;
  356 + font-size: 18px;
  357 +}
  358 +
  359 +.refund-dialog >>> .el-dialog__body {
  360 + padding: 0;
  361 + background: #f8f9fa;
  362 + max-height: 80vh;
  363 + overflow-y: auto;
  364 +}
  365 +
  366 +.dialog-content {
  367 + padding: 15px;
  368 + max-height: none;
  369 + overflow: visible;
  370 +}
  371 +
  372 +/* 信息区块样式 */
  373 +.info-section, .action-section {
  374 + background: white;
  375 + border-radius: 8px;
  376 + margin-bottom: 15px;
  377 + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  378 + overflow: hidden;
  379 +}
  380 +
  381 +.section-header {
  382 + background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  383 + padding: 12px 20px;
  384 + border-bottom: 1px solid #e9ecef;
  385 + display: flex;
  386 + align-items: center;
  387 +}
  388 +
  389 +.header-icon {
  390 + width: 36px;
  391 + height: 36px;
  392 + border-radius: 50%;
  393 + background: linear-gradient(135deg, #409EFF, #66b1ff);
  394 + display: flex;
  395 + align-items: center;
  396 + justify-content: center;
  397 + margin-right: 12px;
  398 + box-shadow: 0 2px 8px rgba(64, 158, 255, 0.3);
  399 +}
  400 +
  401 +.header-icon i {
  402 + color: white;
  403 + font-size: 16px;
  404 +}
  405 +
  406 +.header-text h3 {
  407 + margin: 0;
  408 + font-size: 16px;
  409 + font-weight: 600;
  410 + color: #303133;
  411 +}
156 412
  413 +.section-content {
  414 + padding: 15px;
  415 +}
  416 +
  417 +/* 输入框样式 */
  418 +.readonly-input >>> .el-input__inner {
  419 + background-color: #f5f7fa;
  420 + border-color: #e4e7ed;
  421 + color: #606266;
  422 + cursor: not-allowed;
  423 +}
  424 +
  425 +.amount-input >>> .el-input__inner {
  426 + background-color: #f0f9ff;
  427 + border-color: #b3d8ff;
  428 + color: #409EFF;
  429 + font-weight: bold;
  430 + font-size: 14px;
  431 + cursor: not-allowed;
  432 +}
  433 +
  434 +.phone-input >>> .el-input__inner {
  435 + background-color: #f5f7fa;
  436 + border-color: #e4e7ed;
  437 + color: #606266;
  438 + font-family: 'Courier New', monospace;
  439 + font-size: 13px;
  440 + cursor: not-allowed;
  441 +}
  442 +
  443 +.readonly-textarea >>> .el-textarea__inner {
  444 + background-color: #f5f7fa;
  445 + border-color: #e4e7ed;
  446 + color: #606266;
  447 + cursor: not-allowed;
  448 +}
  449 +
  450 +/* 处理操作样式 */
  451 +.action-section {
  452 + border: 2px solid #409EFF;
  453 + background: linear-gradient(135deg, #f0f9ff 0%, #e6f7ff 100%);
  454 +}
  455 +
  456 +/* 底部按钮样式 */
  457 +.dialog-footer {
  458 + padding: 15px 20px;
  459 + background: #f8f9fa;
  460 + border-top: 1px solid #e9ecef;
  461 + text-align: right;
  462 +}
  463 +
  464 +.dialog-footer .el-button {
  465 + padding: 8px 20px;
  466 + border-radius: 4px;
  467 + font-weight: 500;
  468 + font-size: 14px;
  469 +}
  470 +
  471 +.dialog-footer .el-button--primary {
  472 + background: linear-gradient(135deg, #409EFF, #66b1ff);
  473 + border: none;
  474 +}
  475 +
  476 +.dialog-footer .el-button--primary:hover {
  477 + background: linear-gradient(135deg, #66b1ff, #409EFF);
  478 + box-shadow: 0 2px 8px rgba(64, 158, 255, 0.4);
  479 +}
  480 +
  481 +.dialog-footer .el-button--danger {
  482 + background: linear-gradient(135deg, #f56c6c, #f78989);
  483 + border: none;
  484 +}
  485 +
  486 +.dialog-footer .el-button--danger:hover {
  487 + background: linear-gradient(135deg, #f78989, #f56c6c);
  488 + box-shadow: 0 2px 8px rgba(245, 108, 108, 0.4);
  489 +}
  490 +
  491 +/* 响应式优化 */
  492 +@media (max-width: 768px) {
  493 + .dialog-content {
  494 + padding: 10px;
  495 + }
  496 +
  497 + .section-header {
  498 + padding: 10px 15px;
  499 + }
  500 +
  501 + .section-content {
  502 + padding: 12px;
  503 + }
  504 +
  505 + .refund-dialog >>> .el-dialog__body {
  506 + max-height: 85vh;
  507 + }
  508 +}
  509 +
  510 +/* 小屏幕优化 */
  511 +@media (max-width: 480px) {
  512 + .refund-dialog >>> .el-dialog {
  513 + width: 95% !important;
  514 + margin: 0 auto;
  515 + }
  516 +
  517 + .refund-dialog >>> .el-dialog__body {
  518 + max-height: 90vh;
  519 + }
  520 +}
157 </style> 521 </style>
antis-ncc-admin/src/views/uavRefundApplication/index.vue
1 <template> 1 <template>
2 <div class="NCC-common-layout"> 2 <div class="NCC-common-layout">
3 <div class="NCC-common-layout-center"> 3 <div class="NCC-common-layout-center">
4 - <el-row class="NCC-common-search-box" :gutter="16">  
5 - <el-form @submit.native.prevent>  
6 - <el-col :span="6">  
7 - <el-form-item label="订单编号">  
8 - <el-input v-model="query.orderNo" placeholder="订单编号" clearable />  
9 - </el-form-item>  
10 - </el-col>  
11 - <el-col :span="6">  
12 - <el-form-item label="用户ID">  
13 - <el-input v-model="query.userId" placeholder="用户ID" clearable />  
14 - </el-form-item>  
15 - </el-col>  
16 - <el-col :span="6">  
17 - <el-form-item label="用户电话">  
18 - <el-input v-model="query.userPhone" placeholder="用户电话" clearable />  
19 - </el-form-item>  
20 - </el-col>  
21 - <el-col :span="6">  
22 - <el-form-item>  
23 - <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button>  
24 - <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button>  
25 - </el-form-item>  
26 - </el-col> 4 + <!-- 搜索区域 -->
  5 + <el-card class="search-card" shadow="never">
  6 + <div slot="header" class="search-header">
  7 + <i class="el-icon-search"></i>
  8 + <span>搜索条件</span>
  9 + </div>
  10 + <el-form :model="query" size="small" label-width="80px" class="search-form">
  11 + <el-row :gutter="15" type="flex" align="top">
  12 + <el-col :span="4">
  13 + <el-form-item label="订单编号">
  14 + <el-input v-model="query.orderNo" placeholder="请输入订单编号" clearable prefix-icon="el-icon-document" />
  15 + </el-form-item>
  16 + </el-col>
  17 + <el-col :span="4">
  18 + <el-form-item label="用户ID">
  19 + <el-input v-model="query.userId" placeholder="请输入用户ID" clearable prefix-icon="el-icon-user" />
  20 + </el-form-item>
  21 + </el-col>
  22 + <el-col :span="4">
  23 + <el-form-item label="用户电话">
  24 + <el-input v-model="query.userPhone" placeholder="请输入用户电话" clearable prefix-icon="el-icon-phone" />
  25 + </el-form-item>
  26 + </el-col>
  27 + <el-col :span="4" class="button-group">
  28 + <el-form-item>
  29 + <el-button type="primary" icon="el-icon-search" @click="search()" :loading="listLoading">查询</el-button>
  30 + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button>
  31 + </el-form-item>
  32 + </el-col>
  33 + </el-row>
27 </el-form> 34 </el-form>
28 - </el-row> 35 + </el-card>
29 <div class="NCC-common-layout-main NCC-flex-main"> 36 <div class="NCC-common-layout-main NCC-flex-main">
30 <div class="NCC-common-head"> 37 <div class="NCC-common-head">
31 - <!-- <div>  
32 - <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button>  
33 - </div> --> 38 + <div class="NCC-common-head-left">
  39 + <h3 class="page-title">退款申请管理</h3>
  40 + </div>
34 <div class="NCC-common-head-right"> 41 <div class="NCC-common-head-right">
35 <el-tooltip effect="dark" content="刷新" placement="top"> 42 <el-tooltip effect="dark" content="刷新" placement="top">
36 - <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false"  
37 - @click="reset()" /> 43 + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" />
38 </el-tooltip> 44 </el-tooltip>
39 <screenfull isContainer /> 45 <screenfull isContainer />
40 </div> 46 </div>
41 </div> 47 </div>
42 - <NCC-table v-loading="listLoading" :data="list">  
43 - <el-table-column prop="refundStatusName" label="状态" align="left" width="60" />  
44 - <el-table-column prop="applyTime" label="申请时间" align="left" :formatter="ncc.tableDateFormat"  
45 - width="120" />  
46 - <el-table-column prop="orderNo" label="订单编号" align="left" width="180" />  
47 - <el-table-column prop="applyAmount" label="申请金额" align="left" width="70" />  
48 - <el-table-column prop="userId" label="用户ID" align="left" />  
49 - <el-table-column prop="userPhone" label="用户电话" align="left" width="100" />  
50 - <el-table-column prop="refundReason" label="退款原因" align="left" />  
51 - <el-table-column prop="remark" label="备注" align="left" />  
52 - <el-table-column label="操作" fixed="right" width="100"> 48 + <NCC-table v-loading="listLoading" :data="list" :table-layout="'auto'" stripe @sort-change="handleSortChange">
  49 + <el-table-column prop="refundStatus" label="状态" align="center" width="100" sortable="custom">
  50 + <template slot-scope="scope">
  51 + <el-tag v-if="scope.row.refundStatus === 0" type="warning" size="small">
  52 + <i class="el-icon-time"></i> 待处理
  53 + </el-tag>
  54 + <el-tag v-else-if="scope.row.refundStatus === 1" type="success" size="small">
  55 + <i class="el-icon-check"></i> 已同意
  56 + </el-tag>
  57 + <el-tag v-else-if="scope.row.refundStatus === 2" type="danger" size="small">
  58 + <i class="el-icon-close"></i> 已拒绝
  59 + </el-tag>
  60 + <el-tag v-else-if="scope.row.refundStatus === 3" type="info" size="small">
  61 + <i class="el-icon-success"></i> 已退款
  62 + </el-tag>
  63 + <el-tag v-else type="info" size="small">未知</el-tag>
  64 + </template>
  65 + </el-table-column>
  66 + <el-table-column prop="applyTime" label="申请时间" align="center" width="160" sortable="custom">
  67 + <template slot-scope="scope">
  68 + <span v-if="scope.row.applyTime">{{ formatDateTime(scope.row.applyTime) }}</span>
  69 + <span v-else class="text-muted">-</span>
  70 + </template>
  71 + </el-table-column>
  72 + <el-table-column prop="orderNo" label="订单编号" align="left" min-width="180" show-overflow-tooltip sortable="custom">
  73 + <template slot-scope="scope">
  74 + <el-link type="primary" @click="viewDetail(scope.row.id)">{{ scope.row.orderNo }}</el-link>
  75 + </template>
  76 + </el-table-column>
  77 + <el-table-column prop="applyAmount" label="申请金额" align="right" width="120" sortable="custom">
  78 + <template slot-scope="scope">
  79 + <span class="amount-text">¥{{ scope.row.applyAmount }}</span>
  80 + </template>
  81 + </el-table-column>
  82 + <el-table-column prop="userId" label="用户ID" align="left" min-width="120" show-overflow-tooltip sortable="custom" />
  83 + <el-table-column prop="userPhone" label="用户电话" align="left" width="130" show-overflow-tooltip sortable="custom">
53 <template slot-scope="scope"> 84 <template slot-scope="scope">
54 - <el-button type="text" v-if="scope.row.refundStatus==0" @click="addOrUpdateHandle(scope.row.id)">处理</el-button>  
55 - <!-- <el-button type="text" @click="handleDel(scope.row.id)"  
56 - class="NCC-table-delBtn">删除</el-button> --> 85 + <span class="phone-text">{{ scope.row.userPhone }}</span>
  86 + </template>
  87 + </el-table-column>
  88 + <el-table-column prop="refundReason" label="退款原因" align="left" min-width="150" show-overflow-tooltip />
  89 + <el-table-column prop="remark" label="备注" align="left" min-width="120" show-overflow-tooltip />
  90 + <el-table-column label="操作" fixed="right" width="140">
  91 + <template slot-scope="scope">
  92 + <el-button type="text" @click="viewDetail(scope.row.id)" size="mini" icon="el-icon-view">详情</el-button>
  93 + <el-button v-if="scope.row.refundStatus === 0" type="text" @click="addOrUpdateHandle(scope.row.id)" size="mini" icon="el-icon-edit" class="process-btn">处理</el-button>
57 </template> 94 </template>
58 </el-table-column> 95 </el-table-column>
59 </NCC-table> 96 </NCC-table>
60 - <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"  
61 - @pagination="initData" /> 97 + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" />
62 </div> 98 </div>
63 </div> 99 </div>
64 <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> 100 <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" />
@@ -155,13 +191,34 @@ export default { @@ -155,13 +191,34 @@ export default {
155 this.$refs.NCCForm.init(id, isDetail) 191 this.$refs.NCCForm.init(id, isDetail)
156 }) 192 })
157 }, 193 },
158 - search() {  
159 - this.listQuery = {  
160 - currentPage: 1,  
161 - pageSize: 20,  
162 - sort: "desc",  
163 - sidx: "", 194 + viewDetail(id) {
  195 + this.formVisible = true
  196 + this.$nextTick(() => {
  197 + this.$refs.NCCForm.init(id, true)
  198 + })
  199 + },
  200 + formatDateTime(dateTime) {
  201 + if (!dateTime) return '-'
  202 + const date = new Date(dateTime)
  203 + return date.toLocaleString('zh-CN', {
  204 + year: 'numeric',
  205 + month: '2-digit',
  206 + day: '2-digit',
  207 + hour: '2-digit',
  208 + minute: '2-digit',
  209 + second: '2-digit'
  210 + })
  211 + },
  212 + handleSortChange({ column, prop, order }) {
  213 + if (prop) {
  214 + // 确保排序字段名称与后端一致
  215 + this.listQuery.sidx = prop
  216 + this.listQuery.sort = order === 'ascending' ? 'asc' : 'desc'
  217 + this.initData()
164 } 218 }
  219 + },
  220 + search() {
  221 + this.listQuery.currentPage = 1
165 this.initData() 222 this.initData()
166 }, 223 },
167 refresh(isrRefresh) { 224 refresh(isrRefresh) {
@@ -182,4 +239,128 @@ export default { @@ -182,4 +239,128 @@ export default {
182 } 239 }
183 } 240 }
184 } 241 }
185 -</script>  
186 \ No newline at end of file 242 \ No newline at end of file
  243 +</script>
  244 +
  245 +<style scoped>
  246 +/* 搜索卡片样式 */
  247 +.search-card {
  248 + margin-bottom: 20px;
  249 + border-radius: 8px;
  250 +}
  251 +
  252 +.search-header {
  253 + display: flex;
  254 + align-items: center;
  255 + font-weight: 600;
  256 + color: #303133;
  257 +}
  258 +
  259 +.search-header i {
  260 + margin-right: 8px;
  261 + color: #409EFF;
  262 + font-size: 16px;
  263 +}
  264 +
  265 +/* 搜索表单样式 */
  266 +.search-form {
  267 + margin-bottom: 0;
  268 +}
  269 +
  270 +.search-form .el-form-item {
  271 + margin-bottom: 0;
  272 +}
  273 +
  274 +.search-form .el-form-item__label {
  275 + font-size: 13px;
  276 + color: #606266;
  277 + font-weight: 500;
  278 +}
  279 +
  280 +.search-form .el-input__inner {
  281 + font-size: 13px;
  282 +}
  283 +
  284 +.search-form .el-button {
  285 + margin-left: 8px;
  286 + font-size: 13px;
  287 +}
  288 +
  289 +.search-form .el-button:first-child {
  290 + margin-left: 0;
  291 +}
  292 +
  293 +/* 按钮组样式 */
  294 +.button-group .el-form-item {
  295 + margin-bottom: 0;
  296 + text-align: right;
  297 +}
  298 +
  299 +.button-group .el-form-item__content {
  300 + display: flex;
  301 + justify-content: flex-end;
  302 +}
  303 +
  304 +.button-group .el-button {
  305 + margin-left: 8px;
  306 +}
  307 +
  308 +.button-group .el-button:first-child {
  309 + margin-left: 0;
  310 +}
  311 +
  312 +/* 页面标题样式 */
  313 +.page-title {
  314 + margin: 0;
  315 + font-size: 18px;
  316 + font-weight: 600;
  317 + color: #303133;
  318 +}
  319 +
  320 +/* 表格样式优化 */
  321 +.amount-text {
  322 + color: #f56c6c;
  323 + font-weight: bold;
  324 + font-size: 14px;
  325 +}
  326 +
  327 +.phone-text {
  328 + font-family: 'Courier New', monospace;
  329 + font-size: 13px;
  330 + color: #606266;
  331 +}
  332 +
  333 +.text-muted {
  334 + color: #c0c4cc;
  335 +}
  336 +
  337 +/* 操作按钮样式 */
  338 +.process-btn {
  339 + color: #409EFF !important;
  340 +}
  341 +
  342 +.process-btn:hover {
  343 + color: #66b1ff !important;
  344 +}
  345 +
  346 +/* 响应式优化 */
  347 +@media (max-width: 1200px) {
  348 + .search-form .el-col {
  349 + margin-bottom: 10px;
  350 + }
  351 +}
  352 +
  353 +@media (max-width: 768px) {
  354 + .search-form .el-row {
  355 + flex-direction: column;
  356 + }
  357 +
  358 + .search-form .el-col {
  359 + width: 100% !important;
  360 + margin-bottom: 10px;
  361 + }
  362 +
  363 + .search-form .el-col:last-child {
  364 + text-align: left !important;
  365 + }
  366 +}
  367 +</style>
187 \ No newline at end of file 368 \ No newline at end of file
antis-ncc-admin/src/views/uavSite/index.vue
@@ -33,15 +33,40 @@ @@ -33,15 +33,40 @@
33 <screenfull isContainer /> 33 <screenfull isContainer />
34 </div> 34 </div>
35 </div> 35 </div>
36 - <NCC-table v-loading="listLoading" :data="list">  
37 - <el-table-column prop="id" label="主键" align="left" />  
38 - <el-table-column prop="siteName" label="场地名称" align="left" />  
39 - <el-table-column prop="address" label="场地地址" align="left" />  
40 - <el-table-column prop="lng" label="经度" align="left" />  
41 - <el-table-column prop="lat" label="纬度" align="left" />  
42 - <el-table-column prop="remark" label="备注" align="left" />  
43 - <el-table-column prop="creatorId" label="创建用户ID" align="left" />  
44 - <el-table-column label="操作" fixed="right" width="100"> 36 + <NCC-table v-loading="listLoading" :data="list" :table-layout="'auto'">
  37 + <el-table-column prop="id" label="主键" align="left" width="120" show-overflow-tooltip />
  38 + <el-table-column prop="siteName" label="场地名称" align="left" min-width="150" show-overflow-tooltip />
  39 + <el-table-column prop="address" label="场地地址" align="left" min-width="200" show-overflow-tooltip />
  40 + <el-table-column prop="deviceCount" label="机柜数量" align="center" width="100">
  41 + <template slot-scope="scope">
  42 + <el-tag type="primary" size="small">{{ scope.row.deviceCount }}</el-tag>
  43 + </template>
  44 + </el-table-column>
  45 + <el-table-column prop="lng" label="经度" align="left" width="120" show-overflow-tooltip v-if="hasCoordinateData">
  46 + <template slot-scope="scope">
  47 + <span v-if="scope.row.lng">{{ scope.row.lng }}</span>
  48 + <span v-else style="color: #c0c4cc;">-</span>
  49 + </template>
  50 + </el-table-column>
  51 + <el-table-column prop="lat" label="纬度" align="left" width="120" show-overflow-tooltip v-if="hasCoordinateData">
  52 + <template slot-scope="scope">
  53 + <span v-if="scope.row.lat">{{ scope.row.lat }}</span>
  54 + <span v-else style="color: #c0c4cc;">-</span>
  55 + </template>
  56 + </el-table-column>
  57 + <el-table-column prop="remark" label="备注" align="left" min-width="150" show-overflow-tooltip v-if="hasRemarkData">
  58 + <template slot-scope="scope">
  59 + <span v-if="scope.row.remark">{{ scope.row.remark }}</span>
  60 + <span v-else style="color: #c0c4cc;">-</span>
  61 + </template>
  62 + </el-table-column>
  63 + <el-table-column prop="creatorName" label="创建用户" align="left" width="150" show-overflow-tooltip>
  64 + <template slot-scope="scope">
  65 + <span v-if="scope.row.creatorName">{{ scope.row.creatorName.split('/')[0] }}</span>
  66 + <span v-else style="color: #c0c4cc;">-</span>
  67 + </template>
  68 + </el-table-column>
  69 + <el-table-column label="操作" fixed="right" width="120">
45 <template slot-scope="scope"> 70 <template slot-scope="scope">
46 <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> 71 <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button>
47 <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> 72 <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button>
@@ -91,7 +116,16 @@ @@ -91,7 +116,16 @@
91 ], 116 ],
92 } 117 }
93 }, 118 },
94 - computed: {}, 119 + computed: {
  120 + // 判断是否有坐标数据
  121 + hasCoordinateData() {
  122 + return this.list.some(item => item.lng || item.lat);
  123 + },
  124 + // 判断是否有备注数据
  125 + hasRemarkData() {
  126 + return this.list.some(item => item.remark);
  127 + }
  128 + },
95 created() { 129 created() {
96 this.initData() 130 this.initData()
97 }, 131 },
antis-ncc-admin/src/views/uavWalletWithdrawApply/AuditForm.vue 0 → 100644
  1 +<template>
  2 + <el-dialog :title="isDetail ? '审核详情' : '审核提现申请'" :close-on-click-modal="false" :visible.sync="visible" class="audit-dialog" lock-scroll width="900px" :show-close="true" :top="'5vh'">
  3 + <div class="dialog-content" v-loading="loading">
  4 + <!-- 申请信息 -->
  5 + <div class="info-section">
  6 + <div class="section-header">
  7 + <div class="header-icon">
  8 + <i class="el-icon-document"></i>
  9 + </div>
  10 + <div class="header-text">
  11 + <h3>申请信息</h3>
  12 + <p>提现申请的基本信息</p>
  13 + </div>
  14 + </div>
  15 + <div class="section-content">
  16 + <el-form :model="dataForm" size="small" label-width="120px" label-position="right">
  17 + <el-row :gutter="20">
  18 + <el-col :span="12">
  19 + <el-form-item label="提现申请号">
  20 + <el-input v-model="dataForm.walletNo" readonly class="readonly-input" />
  21 + </el-form-item>
  22 + </el-col>
  23 + <el-col :span="12">
  24 + <el-form-item label="申请时间">
  25 + <el-input :value="dataForm.applyTime ? new Date(dataForm.applyTime).toLocaleString() : '-'" readonly class="readonly-input" />
  26 + </el-form-item>
  27 + </el-col>
  28 + </el-row>
  29 + <el-row :gutter="20">
  30 + <el-col :span="12">
  31 + <el-form-item label="提现金额">
  32 + <el-input :value="'¥' + dataForm.amount" readonly class="amount-input" />
  33 + </el-form-item>
  34 + </el-col>
  35 + <el-col :span="12">
  36 + <el-form-item label="用户当前余额">
  37 + <el-input :value="'¥' + userBalance" readonly class="balance-input" />
  38 + </el-form-item>
  39 + </el-col>
  40 + </el-row>
  41 + </el-form>
  42 + </div>
  43 + </div>
  44 +
  45 + <!-- 银行卡信息 -->
  46 + <div class="info-section">
  47 + <div class="section-header">
  48 + <div class="header-icon">
  49 + <i class="el-icon-credit-card"></i>
  50 + </div>
  51 + <div class="header-text">
  52 + <h3>银行卡信息</h3>
  53 + <p>收款账户详细信息</p>
  54 + </div>
  55 + </div>
  56 + <div class="section-content">
  57 + <el-form :model="dataForm" size="small" label-width="120px" label-position="right">
  58 + <el-row :gutter="20">
  59 + <el-col :span="12">
  60 + <el-form-item label="收款账户户名">
  61 + <el-input v-model="dataForm.bankAccountName" readonly class="readonly-input" />
  62 + </el-form-item>
  63 + </el-col>
  64 + <el-col :span="12">
  65 + <el-form-item label="收款银行名称">
  66 + <el-input v-model="dataForm.bankName" readonly class="readonly-input" />
  67 + </el-form-item>
  68 + </el-col>
  69 + </el-row>
  70 + <el-row :gutter="20">
  71 + <el-col :span="24">
  72 + <el-form-item label="收款账户卡号">
  73 + <el-input v-model="dataForm.bankAccountNumber" readonly class="bank-card-input" />
  74 + </el-form-item>
  75 + </el-col>
  76 + </el-row>
  77 + </el-form>
  78 + </div>
  79 + </div>
  80 +
  81 + <!-- 审核信息 -->
  82 + <div class="info-section" v-if="dataForm.auditStatus !== 0">
  83 + <div class="section-header">
  84 + <div class="header-icon">
  85 + <i class="el-icon-check"></i>
  86 + </div>
  87 + <div class="header-text">
  88 + <h3>审核信息</h3>
  89 + <p>审核结果和相关信息</p>
  90 + </div>
  91 + </div>
  92 + <div class="section-content">
  93 + <el-form :model="dataForm" size="small" label-width="120px" label-position="right">
  94 + <el-row :gutter="20">
  95 + <el-col :span="12">
  96 + <el-form-item label="审核状态">
  97 + <el-tag v-if="dataForm.auditStatus === 1" type="success" size="medium">
  98 + <i class="el-icon-check"></i> 审核通过
  99 + </el-tag>
  100 + <el-tag v-else-if="dataForm.auditStatus === 2" type="danger" size="medium">
  101 + <i class="el-icon-close"></i> 审核驳回
  102 + </el-tag>
  103 + </el-form-item>
  104 + </el-col>
  105 + <el-col :span="12">
  106 + <el-form-item label="审核时间">
  107 + <el-input :value="dataForm.auditTime ? new Date(dataForm.auditTime).toLocaleString() : '-'" readonly class="readonly-input" />
  108 + </el-form-item>
  109 + </el-col>
  110 + </el-row>
  111 + <el-row :gutter="20" v-if="dataForm.auditStatus === 2">
  112 + <el-col :span="24">
  113 + <el-form-item label="驳回原因">
  114 + <el-input v-model="dataForm.rejectReason" type="textarea" readonly class="readonly-textarea" />
  115 + </el-form-item>
  116 + </el-col>
  117 + </el-row>
  118 + </el-form>
  119 + </div>
  120 + </div>
  121 +
  122 + <!-- 审核操作 -->
  123 + <div class="action-section" v-if="!isDetail && dataForm.auditStatus === 0">
  124 + <div class="section-header">
  125 + <div class="header-icon">
  126 + <i class="el-icon-edit"></i>
  127 + </div>
  128 + <div class="header-text">
  129 + <h3>审核操作</h3>
  130 + <p>请选择审核结果并填写相关信息</p>
  131 + </div>
  132 + </div>
  133 + <div class="section-content">
  134 + <el-form ref="auditForm" :model="auditForm" :rules="auditRules" size="small" label-width="120px" label-position="right">
  135 + <el-row :gutter="20">
  136 + <el-col :span="24">
  137 + <el-form-item label="审核结果" prop="auditStatus">
  138 + <el-radio-group v-model="auditForm.auditStatus" class="audit-radio-group">
  139 + <el-radio :label="1" class="audit-radio">
  140 + <i class="el-icon-check"></i>
  141 + <span>审核通过</span>
  142 + </el-radio>
  143 + <el-radio :label="2" class="audit-radio">
  144 + <i class="el-icon-close"></i>
  145 + <span>审核驳回</span>
  146 + </el-radio>
  147 + </el-radio-group>
  148 + </el-form-item>
  149 + </el-col>
  150 + </el-row>
  151 + <el-row :gutter="20" v-if="auditForm.auditStatus === 2">
  152 + <el-col :span="24">
  153 + <el-form-item label="驳回原因" prop="rejectReason">
  154 + <el-input v-model="auditForm.rejectReason" type="textarea" placeholder="请输入驳回原因" :rows="3" />
  155 + </el-form-item>
  156 + </el-col>
  157 + </el-row>
  158 + </el-form>
  159 + </div>
  160 + </div>
  161 + </div>
  162 + <span slot="footer" class="dialog-footer">
  163 + <el-button @click="visible = false">取 消</el-button>
  164 + <el-button v-if="!isDetail && dataForm.auditStatus === 0" type="primary" @click="auditSubmit()" :loading="submitLoading">确 定</el-button>
  165 + </span>
  166 + </el-dialog>
  167 +</template>
  168 +
  169 +<script>
  170 + import request from '@/utils/request'
  171 +
  172 + export default {
  173 + components: {},
  174 + props: [],
  175 + data() {
  176 + return {
  177 + loading: false,
  178 + submitLoading: false,
  179 + visible: false,
  180 + isDetail: false,
  181 + dataForm: {
  182 + id: '',
  183 + walletNo: '',
  184 + amount: 0,
  185 + bankAccountName: '',
  186 + bankAccountNumber: '',
  187 + bankName: '',
  188 + applyTime: '',
  189 + auditStatus: 0,
  190 + auditTime: '',
  191 + rejectReason: ''
  192 + },
  193 + userBalance: 0,
  194 + auditForm: {
  195 + auditStatus: 1,
  196 + rejectReason: ''
  197 + },
  198 + auditRules: {
  199 + auditStatus: [
  200 + { required: true, message: '请选择审核结果', trigger: 'change' }
  201 + ],
  202 + rejectReason: [
  203 + { required: true, message: '驳回时必须填写驳回原因', trigger: 'blur' }
  204 + ]
  205 + }
  206 + }
  207 + },
  208 + computed: {},
  209 + watch: {
  210 + 'auditForm.auditStatus'(newVal) {
  211 + if (newVal === 1) {
  212 + this.auditForm.rejectReason = ''
  213 + }
  214 + }
  215 + },
  216 + created() {},
  217 + mounted() {},
  218 + methods: {
  219 + goBack() {
  220 + this.$emit('refresh')
  221 + },
  222 + init(id, isDetail) {
  223 + this.dataForm.id = id || 0
  224 + this.visible = true
  225 + this.isDetail = isDetail || false
  226 + this.loading = true
  227 + this.$nextTick(() => {
  228 + if (this.dataForm.id) {
  229 + // 获取审核详情
  230 + request({
  231 + url: '/api/Extend/UavWalletWithdrawApply/' + this.dataForm.id + '/AuditDetail',
  232 + method: 'get'
  233 + }).then(res => {
  234 + this.dataForm = res.data
  235 + this.userBalance = res.data.userBalance || 0
  236 + this.loading = false
  237 + }).catch(() => {
  238 + this.loading = false
  239 + })
  240 + } else {
  241 + this.loading = false
  242 + }
  243 + })
  244 + },
  245 + auditSubmit() {
  246 + this.$refs['auditForm'].validate((valid) => {
  247 + if (valid) {
  248 + this.submitLoading = true
  249 + request({
  250 + url: '/api/Extend/UavWalletWithdrawApply/' + this.dataForm.id + '/Audit',
  251 + method: 'put',
  252 + data: this.auditForm
  253 + }).then((res) => {
  254 + this.$message({
  255 + message: res.msg,
  256 + type: 'success',
  257 + duration: 1000,
  258 + onClose: () => {
  259 + this.visible = false
  260 + this.$emit('refresh', true)
  261 + }
  262 + })
  263 + }).catch(() => {
  264 + this.submitLoading = false
  265 + })
  266 + }
  267 + })
  268 + }
  269 + }
  270 + }
  271 +</script>
  272 +
  273 +<style scoped>
  274 +/* 弹窗整体样式 */
  275 +.audit-dialog {
  276 + border-radius: 12px;
  277 + overflow: hidden;
  278 +}
  279 +
  280 +.audit-dialog >>> .el-dialog {
  281 + border-radius: 12px;
  282 + overflow: hidden;
  283 +}
  284 +
  285 +.audit-dialog >>> .el-dialog__header {
  286 + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  287 + color: white;
  288 + padding: 20px 30px;
  289 + margin: 0;
  290 +}
  291 +
  292 +.audit-dialog >>> .el-dialog__title {
  293 + color: white;
  294 + font-size: 18px;
  295 + font-weight: 600;
  296 +}
  297 +
  298 +.audit-dialog >>> .el-dialog__headerbtn .el-dialog__close {
  299 + color: white;
  300 + font-size: 20px;
  301 +}
  302 +
  303 +.audit-dialog >>> .el-dialog__body {
  304 + padding: 0;
  305 + background: #f8f9fa;
  306 + max-height: 85vh;
  307 + overflow-y: auto;
  308 +}
  309 +
  310 +.dialog-content {
  311 + padding: 20px;
  312 + max-height: none;
  313 + overflow: visible;
  314 +}
  315 +
  316 +/* 信息区块样式 */
  317 +.info-section, .action-section {
  318 + background: white;
  319 + border-radius: 12px;
  320 + margin-bottom: 20px;
  321 + box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  322 + overflow: hidden;
  323 +}
  324 +
  325 +.section-header {
  326 + background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  327 + padding: 20px 30px;
  328 + border-bottom: 1px solid #e9ecef;
  329 + display: flex;
  330 + align-items: center;
  331 +}
  332 +
  333 +.header-icon {
  334 + width: 50px;
  335 + height: 50px;
  336 + border-radius: 50%;
  337 + background: linear-gradient(135deg, #409EFF, #66b1ff);
  338 + display: flex;
  339 + align-items: center;
  340 + justify-content: center;
  341 + margin-right: 15px;
  342 + box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3);
  343 +}
  344 +
  345 +.header-icon i {
  346 + color: white;
  347 + font-size: 20px;
  348 +}
  349 +
  350 +.header-text h3 {
  351 + margin: 0 0 5px 0;
  352 + font-size: 18px;
  353 + font-weight: 600;
  354 + color: #303133;
  355 +}
  356 +
  357 +.header-text p {
  358 + margin: 0;
  359 + font-size: 14px;
  360 + color: #909399;
  361 +}
  362 +
  363 +.section-content {
  364 + padding: 20px;
  365 +}
  366 +
  367 +/* 输入框样式 */
  368 +.readonly-input >>> .el-input__inner {
  369 + background-color: #f5f7fa;
  370 + border-color: #e4e7ed;
  371 + color: #606266;
  372 + cursor: not-allowed;
  373 +}
  374 +
  375 +.amount-input >>> .el-input__inner {
  376 + background-color: #fef0f0;
  377 + border-color: #fbc4c4;
  378 + color: #f56c6c;
  379 + font-weight: bold;
  380 + font-size: 16px;
  381 + cursor: not-allowed;
  382 +}
  383 +
  384 +.balance-input >>> .el-input__inner {
  385 + background-color: #f0f9ff;
  386 + border-color: #b3d8ff;
  387 + color: #409EFF;
  388 + font-weight: bold;
  389 + cursor: not-allowed;
  390 +}
  391 +
  392 +.bank-card-input >>> .el-input__inner {
  393 + background-color: #f5f7fa;
  394 + border-color: #e4e7ed;
  395 + color: #606266;
  396 + font-family: 'Courier New', monospace;
  397 + font-size: 14px;
  398 + cursor: not-allowed;
  399 +}
  400 +
  401 +.readonly-textarea >>> .el-textarea__inner {
  402 + background-color: #f5f7fa;
  403 + border-color: #e4e7ed;
  404 + color: #606266;
  405 + cursor: not-allowed;
  406 +}
  407 +
  408 +/* 审核操作样式 */
  409 +.action-section {
  410 + border: 2px solid #409EFF;
  411 + background: linear-gradient(135deg, #f0f9ff 0%, #e6f7ff 100%);
  412 +}
  413 +
  414 +.audit-radio-group {
  415 + display: flex;
  416 + gap: 20px;
  417 +}
  418 +
  419 +.audit-radio {
  420 + display: flex;
  421 + align-items: center;
  422 + padding: 15px 25px;
  423 + border: 2px solid #e4e7ed;
  424 + border-radius: 8px;
  425 + background: white;
  426 + cursor: pointer;
  427 + transition: all 0.3s ease;
  428 + flex: 1;
  429 + justify-content: center;
  430 +}
  431 +
  432 +.audit-radio:hover {
  433 + border-color: #409EFF;
  434 + box-shadow: 0 2px 8px rgba(64, 158, 255, 0.2);
  435 +}
  436 +
  437 +.audit-radio.is-checked {
  438 + border-color: #409EFF;
  439 + background: linear-gradient(135deg, #f0f9ff, #e6f7ff);
  440 + box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3);
  441 +}
  442 +
  443 +.audit-radio i {
  444 + margin-right: 8px;
  445 + font-size: 16px;
  446 +}
  447 +
  448 +.audit-radio span {
  449 + font-weight: 500;
  450 +}
  451 +
  452 +/* 底部按钮样式 */
  453 +.dialog-footer {
  454 + padding: 20px 30px;
  455 + background: #f8f9fa;
  456 + border-top: 1px solid #e9ecef;
  457 + text-align: right;
  458 +}
  459 +
  460 +.dialog-footer .el-button {
  461 + padding: 10px 25px;
  462 + border-radius: 6px;
  463 + font-weight: 500;
  464 +}
  465 +
  466 +.dialog-footer .el-button--primary {
  467 + background: linear-gradient(135deg, #409EFF, #66b1ff);
  468 + border: none;
  469 +}
  470 +
  471 +.dialog-footer .el-button--primary:hover {
  472 + background: linear-gradient(135deg, #66b1ff, #409EFF);
  473 + box-shadow: 0 4px 12px rgba(64, 158, 255, 0.4);
  474 +}
  475 +
  476 +/* 响应式优化 */
  477 +@media (max-width: 768px) {
  478 + .dialog-content {
  479 + padding: 15px;
  480 + }
  481 +
  482 + .section-header {
  483 + padding: 15px 20px;
  484 + }
  485 +
  486 + .section-content {
  487 + padding: 15px;
  488 + }
  489 +
  490 + .audit-radio-group {
  491 + flex-direction: column;
  492 + gap: 10px;
  493 + }
  494 +
  495 + .audit-radio {
  496 + padding: 12px 20px;
  497 + }
  498 +
  499 + .audit-dialog >>> .el-dialog__body {
  500 + max-height: 90vh;
  501 + }
  502 +}
  503 +
  504 +/* 小屏幕优化 */
  505 +@media (max-width: 480px) {
  506 + .audit-dialog >>> .el-dialog {
  507 + width: 95% !important;
  508 + margin: 0 auto;
  509 + }
  510 +
  511 + .audit-dialog >>> .el-dialog__body {
  512 + max-height: 95vh;
  513 + }
  514 +}
  515 +</style>
antis-ncc-admin/src/views/uavWalletWithdrawApply/ProcessForm.vue 0 → 100644
  1 +<template>
  2 + <el-dialog title="处理提现申请" :close-on-click-modal="false" :visible.sync="visible" class="process-dialog" lock-scroll width="700px" :show-close="true" :top="'10vh'">
  3 + <div class="dialog-content" v-loading="loading">
  4 + <!-- 申请信息 -->
  5 + <div class="info-section">
  6 + <div class="section-header">
  7 + <div class="header-icon">
  8 + <i class="el-icon-document"></i>
  9 + </div>
  10 + <div class="header-text">
  11 + <h3>申请信息</h3>
  12 + <p>待处理的提现申请详情</p>
  13 + </div>
  14 + </div>
  15 + <div class="section-content">
  16 + <el-form :model="dataForm" size="small" label-width="120px" label-position="right">
  17 + <el-row :gutter="20">
  18 + <el-col :span="12">
  19 + <el-form-item label="提现申请号">
  20 + <el-input v-model="dataForm.walletNo" readonly class="readonly-input" />
  21 + </el-form-item>
  22 + </el-col>
  23 + <el-col :span="12">
  24 + <el-form-item label="提现金额">
  25 + <el-input :value="'¥' + dataForm.amount" readonly class="amount-input" />
  26 + </el-form-item>
  27 + </el-col>
  28 + </el-row>
  29 + <el-row :gutter="20">
  30 + <el-col :span="12">
  31 + <el-form-item label="收款账户户名">
  32 + <el-input v-model="dataForm.bankAccountName" readonly class="readonly-input" />
  33 + </el-form-item>
  34 + </el-col>
  35 + <el-col :span="12">
  36 + <el-form-item label="收款银行名称">
  37 + <el-input v-model="dataForm.bankName" readonly class="readonly-input" />
  38 + </el-form-item>
  39 + </el-col>
  40 + </el-row>
  41 + <el-row :gutter="20">
  42 + <el-col :span="24">
  43 + <el-form-item label="收款账户卡号">
  44 + <el-input v-model="dataForm.bankAccountNumber" readonly class="bank-card-input" />
  45 + </el-form-item>
  46 + </el-col>
  47 + </el-row>
  48 + </el-form>
  49 + </div>
  50 + </div>
  51 +
  52 + <!-- 处理操作 -->
  53 + <div class="action-section">
  54 + <div class="section-header">
  55 + <div class="header-icon">
  56 + <i class="el-icon-edit"></i>
  57 + </div>
  58 + <div class="header-text">
  59 + <h3>处理操作</h3>
  60 + <p>请选择处理结果并填写相关信息</p>
  61 + </div>
  62 + </div>
  63 + <div class="section-content">
  64 + <el-form ref="processForm" :model="processForm" :rules="processRules" size="small" label-width="120px" label-position="right">
  65 + <el-row :gutter="20">
  66 + <el-col :span="24">
  67 + <el-form-item label="处理结果" prop="transferStatus">
  68 + <el-radio-group v-model="processForm.transferStatus" class="process-radio-group">
  69 + <el-radio :label="1" class="process-radio">
  70 + <i class="el-icon-success"></i>
  71 + <span>已转账</span>
  72 + </el-radio>
  73 + <el-radio :label="2" class="process-radio">
  74 + <i class="el-icon-error"></i>
  75 + <span>转账失败</span>
  76 + </el-radio>
  77 + </el-radio-group>
  78 + </el-form-item>
  79 + </el-col>
  80 + </el-row>
  81 + <el-row :gutter="20">
  82 + <el-col :span="24">
  83 + <el-form-item label="转账时间" prop="transferTime">
  84 + <el-date-picker
  85 + v-model="processForm.transferTime"
  86 + type="datetime"
  87 + placeholder="请选择转账时间"
  88 + format="yyyy-MM-dd HH:mm:ss"
  89 + value-format="yyyy-MM-dd HH:mm:ss"
  90 + class="datetime-picker">
  91 + </el-date-picker>
  92 + </el-form-item>
  93 + </el-col>
  94 + </el-row>
  95 + <el-row :gutter="20">
  96 + <el-col :span="24">
  97 + <el-form-item label="备注信息" prop="transferRemark">
  98 + <el-input v-model="processForm.transferRemark" type="textarea"
  99 + :placeholder="processForm.transferStatus === 1 ? '请输入转账备注' : '请输入失败原因'"
  100 + :rows="3" class="remark-textarea" />
  101 + </el-form-item>
  102 + </el-col>
  103 + </el-row>
  104 + </el-form>
  105 + </div>
  106 + </div>
  107 + </div>
  108 + <span slot="footer" class="dialog-footer">
  109 + <el-button @click="visible = false">取 消</el-button>
  110 + <el-button type="primary" @click="processSubmit()" :loading="submitLoading">确 定</el-button>
  111 + </span>
  112 + </el-dialog>
  113 +</template>
  114 +
  115 +<script>
  116 + import request from '@/utils/request'
  117 +
  118 + export default {
  119 + components: {},
  120 + props: [],
  121 + data() {
  122 + return {
  123 + loading: false,
  124 + submitLoading: false,
  125 + visible: false,
  126 + dataForm: {
  127 + id: '',
  128 + walletNo: '',
  129 + amount: 0,
  130 + bankAccountName: '',
  131 + bankAccountNumber: '',
  132 + bankName: ''
  133 + },
  134 + processForm: {
  135 + transferStatus: 1,
  136 + transferTime: '',
  137 + transferRemark: ''
  138 + },
  139 + processRules: {
  140 + transferStatus: [
  141 + { required: true, message: '请选择处理结果', trigger: 'change' }
  142 + ],
  143 + transferTime: [
  144 + { required: true, message: '请选择转账时间', trigger: 'change' }
  145 + ],
  146 + transferRemark: [
  147 + { required: true, message: '请填写备注信息', trigger: 'blur' }
  148 + ]
  149 + }
  150 + }
  151 + },
  152 + computed: {},
  153 + watch: {},
  154 + created() {},
  155 + mounted() {},
  156 + methods: {
  157 + goBack() {
  158 + this.$emit('refresh')
  159 + },
  160 + init(id) {
  161 + this.dataForm.id = id || 0
  162 + this.visible = true
  163 + this.loading = true
  164 + this.$nextTick(() => {
  165 + if (this.dataForm.id) {
  166 + // 获取申请详情
  167 + request({
  168 + url: '/api/Extend/UavWalletWithdrawApply/' + this.dataForm.id,
  169 + method: 'get'
  170 + }).then(res => {
  171 + this.dataForm = res.data
  172 + this.loading = false
  173 + }).catch(() => {
  174 + this.loading = false
  175 + })
  176 + } else {
  177 + this.loading = false
  178 + }
  179 + })
  180 + },
  181 + processSubmit() {
  182 + this.$refs['processForm'].validate((valid) => {
  183 + if (valid) {
  184 + this.submitLoading = true
  185 + request({
  186 + url: '/api/Extend/UavWalletWithdrawApply/' + this.dataForm.id + '/Process',
  187 + method: 'put',
  188 + data: this.processForm
  189 + }).then((res) => {
  190 + this.$message({
  191 + message: res.msg,
  192 + type: 'success',
  193 + duration: 1000,
  194 + onClose: () => {
  195 + this.visible = false
  196 + this.$emit('refresh', true)
  197 + }
  198 + })
  199 + }).catch(() => {
  200 + this.submitLoading = false
  201 + })
  202 + }
  203 + })
  204 + }
  205 + }
  206 + }
  207 +</script>
  208 +
  209 +<style scoped>
  210 +/* 弹窗整体样式 */
  211 +.process-dialog {
  212 + border-radius: 12px;
  213 + overflow: hidden;
  214 +}
  215 +
  216 +.process-dialog >>> .el-dialog {
  217 + border-radius: 12px;
  218 + overflow: hidden;
  219 +}
  220 +
  221 +.process-dialog >>> .el-dialog__header {
  222 + background: linear-gradient(135deg, #67c23a 0%, #85ce61 100%);
  223 + color: white;
  224 + padding: 20px 30px;
  225 + margin: 0;
  226 +}
  227 +
  228 +.process-dialog >>> .el-dialog__title {
  229 + color: white;
  230 + font-size: 18px;
  231 + font-weight: 600;
  232 +}
  233 +
  234 +.process-dialog >>> .el-dialog__headerbtn .el-dialog__close {
  235 + color: white;
  236 + font-size: 20px;
  237 +}
  238 +
  239 +.process-dialog >>> .el-dialog__body {
  240 + padding: 0;
  241 + background: #f8f9fa;
  242 + max-height: 80vh;
  243 + overflow-y: auto;
  244 +}
  245 +
  246 +.dialog-content {
  247 + padding: 20px;
  248 + max-height: none;
  249 + overflow: visible;
  250 +}
  251 +
  252 +/* 信息区块样式 */
  253 +.info-section, .action-section {
  254 + background: white;
  255 + border-radius: 12px;
  256 + margin-bottom: 20px;
  257 + box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  258 + overflow: hidden;
  259 +}
  260 +
  261 +.section-header {
  262 + background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  263 + padding: 20px 30px;
  264 + border-bottom: 1px solid #e9ecef;
  265 + display: flex;
  266 + align-items: center;
  267 +}
  268 +
  269 +.header-icon {
  270 + width: 50px;
  271 + height: 50px;
  272 + border-radius: 50%;
  273 + background: linear-gradient(135deg, #67c23a, #85ce61);
  274 + display: flex;
  275 + align-items: center;
  276 + justify-content: center;
  277 + margin-right: 15px;
  278 + box-shadow: 0 4px 12px rgba(103, 194, 58, 0.3);
  279 +}
  280 +
  281 +.header-icon i {
  282 + color: white;
  283 + font-size: 20px;
  284 +}
  285 +
  286 +.header-text h3 {
  287 + margin: 0 0 5px 0;
  288 + font-size: 18px;
  289 + font-weight: 600;
  290 + color: #303133;
  291 +}
  292 +
  293 +.header-text p {
  294 + margin: 0;
  295 + font-size: 14px;
  296 + color: #909399;
  297 +}
  298 +
  299 +.section-content {
  300 + padding: 20px;
  301 +}
  302 +
  303 +/* 输入框样式 */
  304 +.readonly-input >>> .el-input__inner {
  305 + background-color: #f5f7fa;
  306 + border-color: #e4e7ed;
  307 + color: #606266;
  308 + cursor: not-allowed;
  309 +}
  310 +
  311 +.amount-input >>> .el-input__inner {
  312 + background-color: #fef0f0;
  313 + border-color: #fbc4c4;
  314 + color: #f56c6c;
  315 + font-weight: bold;
  316 + font-size: 16px;
  317 + cursor: not-allowed;
  318 +}
  319 +
  320 +.bank-card-input >>> .el-input__inner {
  321 + background-color: #f5f7fa;
  322 + border-color: #e4e7ed;
  323 + color: #606266;
  324 + font-family: 'Courier New', monospace;
  325 + font-size: 14px;
  326 + cursor: not-allowed;
  327 +}
  328 +
  329 +/* 处理操作样式 */
  330 +.action-section {
  331 + border: 2px solid #67c23a;
  332 + background: linear-gradient(135deg, #f0f9ff 0%, #e6f7ff 100%);
  333 +}
  334 +
  335 +.process-radio-group {
  336 + display: flex;
  337 + gap: 20px;
  338 +}
  339 +
  340 +.process-radio {
  341 + display: flex;
  342 + align-items: center;
  343 + padding: 15px 25px;
  344 + border: 2px solid #e4e7ed;
  345 + border-radius: 8px;
  346 + background: white;
  347 + cursor: pointer;
  348 + transition: all 0.3s ease;
  349 + flex: 1;
  350 + justify-content: center;
  351 +}
  352 +
  353 +.process-radio:hover {
  354 + border-color: #67c23a;
  355 + box-shadow: 0 2px 8px rgba(103, 194, 58, 0.2);
  356 +}
  357 +
  358 +.process-radio.is-checked {
  359 + border-color: #67c23a;
  360 + background: linear-gradient(135deg, #f0f9ff, #e6f7ff);
  361 + box-shadow: 0 4px 12px rgba(103, 194, 58, 0.3);
  362 +}
  363 +
  364 +.process-radio i {
  365 + margin-right: 8px;
  366 + font-size: 16px;
  367 +}
  368 +
  369 +.process-radio span {
  370 + font-weight: 500;
  371 +}
  372 +
  373 +/* 日期选择器样式 */
  374 +.datetime-picker {
  375 + width: 100%;
  376 +}
  377 +
  378 +.datetime-picker >>> .el-input__inner {
  379 + border-radius: 6px;
  380 + border-color: #dcdfe6;
  381 + transition: all 0.3s ease;
  382 +}
  383 +
  384 +.datetime-picker >>> .el-input__inner:focus {
  385 + border-color: #67c23a;
  386 + box-shadow: 0 0 0 2px rgba(103, 194, 58, 0.2);
  387 +}
  388 +
  389 +/* 备注文本框样式 */
  390 +.remark-textarea >>> .el-textarea__inner {
  391 + border-radius: 6px;
  392 + border-color: #dcdfe6;
  393 + transition: all 0.3s ease;
  394 + resize: none;
  395 +}
  396 +
  397 +.remark-textarea >>> .el-textarea__inner:focus {
  398 + border-color: #67c23a;
  399 + box-shadow: 0 0 0 2px rgba(103, 194, 58, 0.2);
  400 +}
  401 +
  402 +/* 底部按钮样式 */
  403 +.dialog-footer {
  404 + padding: 20px 30px;
  405 + background: #f8f9fa;
  406 + border-top: 1px solid #e9ecef;
  407 + text-align: right;
  408 +}
  409 +
  410 +.dialog-footer .el-button {
  411 + padding: 10px 25px;
  412 + border-radius: 6px;
  413 + font-weight: 500;
  414 +}
  415 +
  416 +.dialog-footer .el-button--primary {
  417 + background: linear-gradient(135deg, #67c23a, #85ce61);
  418 + border: none;
  419 +}
  420 +
  421 +.dialog-footer .el-button--primary:hover {
  422 + background: linear-gradient(135deg, #85ce61, #67c23a);
  423 + box-shadow: 0 4px 12px rgba(103, 194, 58, 0.4);
  424 +}
  425 +
  426 +/* 响应式优化 */
  427 +@media (max-width: 768px) {
  428 + .dialog-content {
  429 + padding: 15px;
  430 + }
  431 +
  432 + .section-header {
  433 + padding: 15px 20px;
  434 + }
  435 +
  436 + .section-content {
  437 + padding: 15px;
  438 + }
  439 +
  440 + .process-radio-group {
  441 + flex-direction: column;
  442 + gap: 10px;
  443 + }
  444 +
  445 + .process-radio {
  446 + padding: 12px 20px;
  447 + }
  448 +
  449 + .process-dialog >>> .el-dialog__body {
  450 + max-height: 90vh;
  451 + }
  452 +}
  453 +
  454 +/* 小屏幕优化 */
  455 +@media (max-width: 480px) {
  456 + .process-dialog >>> .el-dialog {
  457 + width: 95% !important;
  458 + margin: 0 auto;
  459 + }
  460 +
  461 + .process-dialog >>> .el-dialog__body {
  462 + max-height: 95vh;
  463 + }
  464 +}
  465 +</style>
antis-ncc-admin/src/views/uavWalletWithdrawApply/index.vue
1 <template> 1 <template>
2 <div class="NCC-common-layout"> 2 <div class="NCC-common-layout">
3 <div class="NCC-common-layout-center"> 3 <div class="NCC-common-layout-center">
4 - <el-row class="NCC-common-search-box" :gutter="16">  
5 - <el-form @submit.native.prevent>  
6 - <el-col :span="6">  
7 - <el-form-item label="提现申请号">  
8 - <el-input v-model="query.walletNo" placeholder="提现申请号" clearable />  
9 - </el-form-item>  
10 - </el-col>  
11 - <el-col :span="6">  
12 - <el-form-item label="收款账户卡号">  
13 - <el-input v-model="query.bankAccountNumber" placeholder="收款账户卡号" clearable />  
14 - </el-form-item>  
15 - </el-col>  
16 - <el-col :span="6">  
17 - <el-form-item>  
18 - <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> 4 + <!-- 搜索区域 -->
  5 + <el-card class="search-card" shadow="never">
  6 + <div slot="header" class="search-header">
  7 + <i class="el-icon-search"></i>
  8 + <span>搜索条件</span>
  9 + </div>
  10 + <el-form :model="query" size="small" label-width="80px" class="search-form">
  11 + <el-row :gutter="15" type="flex" align="middle">
  12 + <el-col :span="4">
  13 + <el-form-item label="申请号">
  14 + <el-input v-model="query.walletNo" placeholder="请输入申请号" clearable prefix-icon="el-icon-search" />
  15 + </el-form-item>
  16 + </el-col>
  17 + <el-col :span="4">
  18 + <el-form-item label="卡号">
  19 + <el-input v-model="query.bankAccountNumber" placeholder="请输入卡号" clearable prefix-icon="el-icon-credit-card" />
  20 + </el-form-item>
  21 + </el-col>
  22 + <el-col :span="3">
  23 + <el-form-item label="审核状态">
  24 + <el-select v-model="query.auditStatus" placeholder="审核状态" clearable style="width: 100%">
  25 + <el-option label="待审核" :value="0">
  26 + <el-tag type="warning" size="mini">待审核</el-tag>
  27 + </el-option>
  28 + <el-option label="审核通过" :value="1">
  29 + <el-tag type="success" size="mini">审核通过</el-tag>
  30 + </el-option>
  31 + <el-option label="审核驳回" :value="2">
  32 + <el-tag type="danger" size="mini">审核驳回</el-tag>
  33 + </el-option>
  34 + </el-select>
  35 + </el-form-item>
  36 + </el-col>
  37 + <el-col :span="3">
  38 + <el-form-item label="转账状态">
  39 + <el-select v-model="query.transferStatus" placeholder="转账状态" clearable style="width: 100%">
  40 + <el-option label="未转账" :value="0">
  41 + <el-tag type="info" size="mini">未转账</el-tag>
  42 + </el-option>
  43 + <el-option label="已转账" :value="1">
  44 + <el-tag type="success" size="mini">已转账</el-tag>
  45 + </el-option>
  46 + <el-option label="转账失败" :value="2">
  47 + <el-tag type="danger" size="mini">转账失败</el-tag>
  48 + </el-option>
  49 + </el-select>
  50 + </el-form-item>
  51 + </el-col>
  52 + <el-col :span="4" style="text-align: right;">
  53 + <el-button type="primary" icon="el-icon-search" @click="search()" :loading="listLoading">查询</el-button>
19 <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> 54 <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button>
20 - </el-form-item>  
21 - </el-col> 55 + </el-col>
  56 + </el-row>
22 </el-form> 57 </el-form>
  58 + </el-card>
  59 + <!-- 统计信息卡片 -->
  60 + <el-row :gutter="20" class="stats-row" v-if="statsData">
  61 + <el-col :span="6">
  62 + <el-card class="stats-card" shadow="hover">
  63 + <div class="stats-content">
  64 + <div class="stats-icon pending">
  65 + <i class="el-icon-time"></i>
  66 + </div>
  67 + <div class="stats-info">
  68 + <div class="stats-number">{{ statsData.pendingCount || 0 }}</div>
  69 + <div class="stats-label">待审核</div>
  70 + </div>
  71 + </div>
  72 + </el-card>
  73 + </el-col>
  74 + <el-col :span="6">
  75 + <el-card class="stats-card" shadow="hover">
  76 + <div class="stats-content">
  77 + <div class="stats-icon approved">
  78 + <i class="el-icon-check"></i>
  79 + </div>
  80 + <div class="stats-info">
  81 + <div class="stats-number">{{ statsData.approvedCount || 0 }}</div>
  82 + <div class="stats-label">审核通过</div>
  83 + </div>
  84 + </div>
  85 + </el-card>
  86 + </el-col>
  87 + <el-col :span="6">
  88 + <el-card class="stats-card" shadow="hover">
  89 + <div class="stats-content">
  90 + <div class="stats-icon transferred">
  91 + <i class="el-icon-success"></i>
  92 + </div>
  93 + <div class="stats-info">
  94 + <div class="stats-number">{{ statsData.transferredCount || 0 }}</div>
  95 + <div class="stats-label">已转账</div>
  96 + </div>
  97 + </div>
  98 + </el-card>
  99 + </el-col>
  100 + <el-col :span="6">
  101 + <el-card class="stats-card" shadow="hover">
  102 + <div class="stats-content">
  103 + <div class="stats-icon total">
  104 + <i class="el-icon-money"></i>
  105 + </div>
  106 + <div class="stats-info">
  107 + <div class="stats-number">¥{{ statsData.totalAmount || 0 }}</div>
  108 + <div class="stats-label">总金额</div>
  109 + </div>
  110 + </div>
  111 + </el-card>
  112 + </el-col>
23 </el-row> 113 </el-row>
  114 +
24 <div class="NCC-common-layout-main NCC-flex-main"> 115 <div class="NCC-common-layout-main NCC-flex-main">
25 <div class="NCC-common-head"> 116 <div class="NCC-common-head">
26 - <div v-if="false">  
27 - <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> 117 + <div class="NCC-common-head-left">
  118 + <h3 class="page-title">提现申请管理</h3>
28 </div> 119 </div>
29 <div class="NCC-common-head-right"> 120 <div class="NCC-common-head-right">
30 <el-tooltip effect="dark" content="刷新" placement="top"> 121 <el-tooltip effect="dark" content="刷新" placement="top">
@@ -33,51 +124,116 @@ @@ -33,51 +124,116 @@
33 <screenfull isContainer /> 124 <screenfull isContainer />
34 </div> 125 </div>
35 </div> 126 </div>
36 - <NCC-table v-loading="listLoading" :data="list">  
37 - <el-table-column prop="walletNo" label="提现申请号" align="left" />  
38 - <el-table-column prop="amount" label="提现金额" align="left" />  
39 - <el-table-column prop="bankAccountName" label="收款账户户名" align="left" />  
40 - <el-table-column prop="bankAccountNumber" label="收款账户卡号" align="left" />  
41 - <el-table-column prop="bankName" label="收款银行名称" align="left" />  
42 - <el-table-column label="操作" fixed="right" width="100">  
43 - <template slot-scope="scope">  
44 - <el-button type="text" @click="addOrUpdateHandle(scope.row.d)" >编辑</el-button>  
45 - <el-button type="text" @click="handleDel(scope.row.d)" class="NCC-table-delBtn" >删除</el-button> 127 + <NCC-table v-loading="listLoading" :data="list" :table-layout="'auto'" stripe>
  128 + <el-table-column prop="walletNo" label="提现申请号" align="left" min-width="160" show-overflow-tooltip>
  129 + <template slot-scope="scope">
  130 + <el-link type="primary" @click="viewDetail(scope.row.id)">{{ scope.row.walletNo }}</el-link>
  131 + </template>
  132 + </el-table-column>
  133 + <el-table-column prop="amount" label="提现金额" align="right" width="130" sortable="custom">
  134 + <template slot-scope="scope">
  135 + <span class="amount-text">¥{{ scope.row.amount }}</span>
  136 + </template>
  137 + </el-table-column>
  138 + <el-table-column prop="bankAccountName" label="收款户名" align="left" min-width="120" show-overflow-tooltip />
  139 + <el-table-column prop="bankAccountNumber" label="收款卡号" align="left" min-width="180" show-overflow-tooltip>
  140 + <template slot-scope="scope">
  141 + <span class="bank-card">{{ formatBankCard(scope.row.bankAccountNumber) }}</span>
  142 + </template>
  143 + </el-table-column>
  144 + <el-table-column prop="bankName" label="收款银行" align="left" min-width="120" show-overflow-tooltip />
  145 + <el-table-column prop="applyTime" label="申请时间" align="center" width="160" sortable="custom">
  146 + <template slot-scope="scope">
  147 + <span v-if="scope.row.applyTime">{{ formatDateTime(scope.row.applyTime) }}</span>
  148 + <span v-else class="text-muted">-</span>
  149 + </template>
  150 + </el-table-column>
  151 + <el-table-column prop="auditStatus" label="审核状态" align="center" width="110">
  152 + <template slot-scope="scope">
  153 + <el-tag v-if="scope.row.auditStatus === 0" type="warning" size="small">
  154 + <i class="el-icon-time"></i> 待审核
  155 + </el-tag>
  156 + <el-tag v-else-if="scope.row.auditStatus === 1" type="success" size="small">
  157 + <i class="el-icon-check"></i> 审核通过
  158 + </el-tag>
  159 + <el-tag v-else-if="scope.row.auditStatus === 2" type="danger" size="small">
  160 + <i class="el-icon-close"></i> 审核驳回
  161 + </el-tag>
  162 + <el-tag v-else type="info" size="small">未知</el-tag>
  163 + </template>
  164 + </el-table-column>
  165 + <el-table-column prop="transferStatus" label="转账状态" align="center" width="110">
  166 + <template slot-scope="scope">
  167 + <el-tag v-if="scope.row.transferStatus === 0" type="info" size="small">
  168 + <i class="el-icon-minus"></i> 未转账
  169 + </el-tag>
  170 + <el-tag v-else-if="scope.row.transferStatus === 1" type="success" size="small">
  171 + <i class="el-icon-success"></i> 已转账
  172 + </el-tag>
  173 + <el-tag v-else-if="scope.row.transferStatus === 2" type="danger" size="small">
  174 + <i class="el-icon-error"></i> 转账失败
  175 + </el-tag>
  176 + <el-tag v-else type="info" size="small">未知</el-tag>
  177 + </template>
  178 + </el-table-column>
  179 + <el-table-column prop="transferTime" label="转账时间" align="center" width="160">
  180 + <template slot-scope="scope">
  181 + <span v-if="scope.row.transferTime">{{ formatDateTime(scope.row.transferTime) }}</span>
  182 + <span v-else class="text-muted">-</span>
  183 + </template>
  184 + </el-table-column>
  185 + <el-table-column label="操作" fixed="right" width="180">
  186 + <template slot-scope="scope">
  187 + <el-button type="text" @click="viewDetail(scope.row.id)" size="small" icon="el-icon-view">详情</el-button>
  188 + <el-button v-if="scope.row.auditStatus === 0" type="text" @click="auditHandle(scope.row.id)" size="small" icon="el-icon-edit" class="audit-btn">审核</el-button>
  189 + <el-button v-if="scope.row.auditStatus === 1 && scope.row.transferStatus === 0" type="text" @click="processHandle(scope.row.id)" size="small" icon="el-icon-check" class="process-btn">处理</el-button>
46 </template> 190 </template>
47 </el-table-column> 191 </el-table-column>
48 </NCC-table> 192 </NCC-table>
49 <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> 193 <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" />
50 </div> 194 </div>
51 </div> 195 </div>
52 - <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> 196 + <AuditForm v-if="auditFormVisible" ref="AuditForm" @refresh="refresh" />
  197 + <ProcessForm v-if="processFormVisible" ref="ProcessForm" @refresh="refresh" />
53 <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> 198 <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
54 </div> 199 </div>
55 </template> 200 </template>
56 <script> 201 <script>
57 import request from '@/utils/request' 202 import request from '@/utils/request'
58 import { getDictionaryDataSelector } from '@/api/systemData/dictionary' 203 import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
59 - import NCCForm from './Form' 204 + import AuditForm from './AuditForm'
  205 + import ProcessForm from './ProcessForm'
60 import ExportBox from './ExportBox' 206 import ExportBox from './ExportBox'
61 import { previewDataInterface } from '@/api/systemData/dataInterface' 207 import { previewDataInterface } from '@/api/systemData/dataInterface'
62 export default { 208 export default {
63 - components: { NCCForm, ExportBox }, 209 + components: { AuditForm, ProcessForm, ExportBox },
64 data() { 210 data() {
65 return { 211 return {
66 query: { 212 query: {
67 walletNo:undefined, 213 walletNo:undefined,
68 bankAccountNumber:undefined, 214 bankAccountNumber:undefined,
  215 + auditStatus: undefined,
  216 + transferStatus: undefined,
69 }, 217 },
70 list: [], 218 list: [],
71 listLoading: true, 219 listLoading: true,
72 - multipleSelection: [], total: 0, 220 + multipleSelection: [],
  221 + total: 0,
73 listQuery: { 222 listQuery: {
74 currentPage: 1, 223 currentPage: 1,
75 pageSize: 20, 224 pageSize: 20,
76 sort: "desc", 225 sort: "desc",
77 sidx: "", 226 sidx: "",
78 }, 227 },
79 - formVisible: false, 228 + auditFormVisible: false,
  229 + processFormVisible: false,
80 exportBoxVisible: false, 230 exportBoxVisible: false,
  231 + statsData: {
  232 + pendingCount: 0,
  233 + approvedCount: 0,
  234 + transferredCount: 0,
  235 + totalAmount: 0
  236 + },
81 columnList: [ 237 columnList: [
82 { prop: 'walletNo', label: '提现申请号' }, 238 { prop: 'walletNo', label: '提现申请号' },
83 { prop: 'amount', label: '提现金额' }, 239 { prop: 'amount', label: '提现金额' },
@@ -106,39 +262,63 @@ @@ -106,39 +262,63 @@
106 query[key] = _query[key] 262 query[key] = _query[key]
107 } 263 }
108 } 264 }
109 - request({  
110 - url: `/api/Extend/UavWalletWithdrawApply`,  
111 - method: 'GET',  
112 - data: query  
113 - }).then(res => {  
114 - this.list = res.data.list  
115 - this.total = res.data.pagination.total  
116 - this.listLoading = false  
117 - })  
118 - },  
119 - handleDel(id) {  
120 - this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {  
121 - type: 'warning'  
122 - }).then(() => { 265 +
  266 + // 并行请求列表数据和统计数据
  267 + Promise.all([
  268 + request({
  269 + url: `/api/Extend/UavWalletWithdrawApply`,
  270 + method: 'GET',
  271 + data: query
  272 + }),
123 request({ 273 request({
124 - url: `/api/Extend/UavWalletWithdrawApply/${id}`,  
125 - method: 'DELETE'  
126 - }).then(res => {  
127 - this.$message({  
128 - type: 'success',  
129 - message: res.msg,  
130 - onClose: () => {  
131 - this.initData()  
132 - }  
133 - }); 274 + url: `/api/Extend/UavWalletWithdrawApply/Statistics`,
  275 + method: 'GET'
134 }) 276 })
  277 + ]).then(([listRes, statsRes]) => {
  278 + this.list = listRes.data.list
  279 + this.total = listRes.data.pagination.total
  280 + this.statsData = statsRes.data
  281 + this.listLoading = false
135 }).catch(() => { 282 }).catch(() => {
136 - }); 283 + this.listLoading = false
  284 + })
  285 + },
  286 + formatDateTime(dateTime) {
  287 + if (!dateTime) return '-'
  288 + const date = new Date(dateTime)
  289 + return date.toLocaleString('zh-CN', {
  290 + year: 'numeric',
  291 + month: '2-digit',
  292 + day: '2-digit',
  293 + hour: '2-digit',
  294 + minute: '2-digit',
  295 + second: '2-digit'
  296 + })
  297 + },
  298 + formatBankCard(cardNumber) {
  299 + if (!cardNumber) return '-'
  300 + // 银行卡号脱敏显示:前4位 + **** + 后4位
  301 + if (cardNumber.length > 8) {
  302 + return cardNumber.substring(0, 4) + ' **** **** ' + cardNumber.substring(cardNumber.length - 4)
  303 + }
  304 + return cardNumber
137 }, 305 },
138 - addOrUpdateHandle(id, isDetail) {  
139 - this.formVisible = true 306 + viewDetail(id) {
  307 + this.auditFormVisible = true
140 this.$nextTick(() => { 308 this.$nextTick(() => {
141 - this.$refs.NCCForm.init(id, isDetail) 309 + this.$refs.AuditForm.init(id, true)
  310 + })
  311 + },
  312 + auditHandle(id) {
  313 + this.auditFormVisible = true
  314 + this.$nextTick(() => {
  315 + this.$refs.AuditForm.init(id, false)
  316 + })
  317 + },
  318 + processHandle(id) {
  319 + this.processFormVisible = true
  320 + this.$nextTick(() => {
  321 + this.$refs.ProcessForm.init(id)
142 }) 322 })
143 }, 323 },
144 search() { 324 search() {
@@ -151,7 +331,8 @@ @@ -151,7 +331,8 @@
151 this.initData() 331 this.initData()
152 }, 332 },
153 refresh(isrRefresh) { 333 refresh(isrRefresh) {
154 - this.formVisible = false 334 + this.auditFormVisible = false
  335 + this.processFormVisible = false
155 if (isrRefresh) this.reset() 336 if (isrRefresh) this.reset()
156 }, 337 },
157 reset() { 338 reset() {
@@ -168,4 +349,184 @@ @@ -168,4 +349,184 @@
168 } 349 }
169 } 350 }
170 } 351 }
171 -</script>  
172 \ No newline at end of file 352 \ No newline at end of file
  353 +</script>
  354 +
  355 +<style scoped>
  356 +/* 搜索卡片样式 */
  357 +.search-card {
  358 + margin-bottom: 20px;
  359 + border-radius: 8px;
  360 +}
  361 +
  362 +.search-header {
  363 + display: flex;
  364 + align-items: center;
  365 + font-weight: 600;
  366 + color: #303133;
  367 +}
  368 +
  369 +.search-header i {
  370 + margin-right: 8px;
  371 + color: #409EFF;
  372 + font-size: 16px;
  373 +}
  374 +
  375 +/* 搜索表单样式 */
  376 +.search-form {
  377 + margin-bottom: 0;
  378 +}
  379 +
  380 +.search-form .el-form-item {
  381 + margin-bottom: 0;
  382 +}
  383 +
  384 +.search-form .el-form-item__label {
  385 + font-size: 13px;
  386 + color: #606266;
  387 + font-weight: 500;
  388 +}
  389 +
  390 +.search-form .el-input__inner {
  391 + font-size: 13px;
  392 +}
  393 +
  394 +.search-form .el-select {
  395 + width: 100%;
  396 +}
  397 +
  398 +.search-form .el-button {
  399 + margin-left: 8px;
  400 + font-size: 13px;
  401 +}
  402 +
  403 +.search-form .el-button:first-child {
  404 + margin-left: 0;
  405 +}
  406 +
  407 +/* 统计卡片样式 */
  408 +.stats-row {
  409 + margin-bottom: 20px;
  410 +}
  411 +
  412 +.stats-card {
  413 + border-radius: 8px;
  414 + transition: all 0.3s ease;
  415 +}
  416 +
  417 +.stats-card:hover {
  418 + transform: translateY(-2px);
  419 + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  420 +}
  421 +
  422 +.stats-content {
  423 + display: flex;
  424 + align-items: center;
  425 + padding: 10px 0;
  426 +}
  427 +
  428 +.stats-icon {
  429 + width: 50px;
  430 + height: 50px;
  431 + border-radius: 50%;
  432 + display: flex;
  433 + align-items: center;
  434 + justify-content: center;
  435 + margin-right: 15px;
  436 + font-size: 24px;
  437 + color: white;
  438 +}
  439 +
  440 +.stats-icon.pending {
  441 + background: linear-gradient(135deg, #ff9500, #ffb84d);
  442 +}
  443 +
  444 +.stats-icon.approved {
  445 + background: linear-gradient(135deg, #67c23a, #85ce61);
  446 +}
  447 +
  448 +.stats-icon.transferred {
  449 + background: linear-gradient(135deg, #409eff, #66b1ff);
  450 +}
  451 +
  452 +.stats-icon.total {
  453 + background: linear-gradient(135deg, #f56c6c, #f78989);
  454 +}
  455 +
  456 +.stats-info {
  457 + flex: 1;
  458 +}
  459 +
  460 +.stats-number {
  461 + font-size: 24px;
  462 + font-weight: bold;
  463 + color: #303133;
  464 + line-height: 1;
  465 + margin-bottom: 5px;
  466 +}
  467 +
  468 +.stats-label {
  469 + font-size: 14px;
  470 + color: #909399;
  471 +}
  472 +
  473 +/* 页面标题样式 */
  474 +.page-title {
  475 + margin: 0;
  476 + font-size: 18px;
  477 + font-weight: 600;
  478 + color: #303133;
  479 +}
  480 +
  481 +/* 表格样式优化 */
  482 +.amount-text {
  483 + color: #f56c6c;
  484 + font-weight: bold;
  485 + font-size: 14px;
  486 +}
  487 +
  488 +.bank-card {
  489 + font-family: 'Courier New', monospace;
  490 + font-size: 13px;
  491 + color: #606266;
  492 +}
  493 +
  494 +.text-muted {
  495 + color: #c0c4cc;
  496 +}
  497 +
  498 +/* 操作按钮样式 */
  499 +.audit-btn {
  500 + color: #409EFF !important;
  501 +}
  502 +
  503 +.audit-btn:hover {
  504 + color: #66b1ff !important;
  505 +}
  506 +
  507 +.process-btn {
  508 + color: #67C23A !important;
  509 +}
  510 +
  511 +.process-btn:hover {
  512 + color: #85ce61 !important;
  513 +}
  514 +
  515 +/* 响应式优化 */
  516 +@media (max-width: 1200px) {
  517 + .stats-card .stats-content {
  518 + flex-direction: column;
  519 + text-align: center;
  520 + }
  521 +
  522 + .stats-icon {
  523 + margin-right: 0;
  524 + margin-bottom: 10px;
  525 + }
  526 +}
  527 +
  528 +@media (max-width: 768px) {
  529 + .stats-row .el-col {
  530 + margin-bottom: 10px;
  531 + }
  532 +}
  533 +</style>
173 \ No newline at end of file 534 \ No newline at end of file
netcore/src/.DS_Store
No preview for this file type
netcore/src/Application/.DS_Store
No preview for this file type
netcore/src/Application/NCC.API/.DS_Store
No preview for this file type
netcore/src/Modularity/Extend/NCC.Extend.Entitys/uavSite/Dto/UavSiteListOutput.cs
@@ -42,5 +42,15 @@ namespace NCC.Extend.Entitys.Dto.UavSite @@ -42,5 +42,15 @@ namespace NCC.Extend.Entitys.Dto.UavSite
42 /// </summary> 42 /// </summary>
43 public string creatorId { get; set; } 43 public string creatorId { get; set; }
44 44
  45 + /// <summary>
  46 + /// 创建用户名称
  47 + /// </summary>
  48 + public string creatorName { get; set; }
  49 +
  50 + /// <summary>
  51 + /// 绑定的机柜数量
  52 + /// </summary>
  53 + public int deviceCount { get; set; }
  54 +
45 } 55 }
46 } 56 }
netcore/src/Modularity/Extend/NCC.Extend.Entitys/uavWalletWithdrawApply/Dto/UavWalletWithdrawApplyAuditDetailOutput.cs 0 → 100644
  1 +using System;
  2 +using System.Collections.Generic;
  3 +
  4 +namespace NCC.Extend.Entitys.Dto.UavWalletWithdrawApply
  5 +{
  6 + /// <summary>
  7 + /// 提现申请审核详情输出参数
  8 + /// </summary>
  9 + public class UavWalletWithdrawApplyAuditDetailOutput
  10 + {
  11 + /// <summary>
  12 + /// 主键ID
  13 + /// </summary>
  14 + public string id { get; set; }
  15 +
  16 + /// <summary>
  17 + /// 申请人用户ID
  18 + /// </summary>
  19 + public string userId { get; set; }
  20 +
  21 + /// <summary>
  22 + /// 提现金额
  23 + /// </summary>
  24 + public decimal amount { get; set; }
  25 +
  26 + /// <summary>
  27 + /// 申请时间
  28 + /// </summary>
  29 + public DateTime? applyTime { get; set; }
  30 +
  31 + /// <summary>
  32 + /// 审核状态(0待审核,1通过,2驳回)
  33 + /// </summary>
  34 + public int? auditStatus { get; set; }
  35 +
  36 + /// <summary>
  37 + /// 审核时间
  38 + /// </summary>
  39 + public DateTime? auditTime { get; set; }
  40 +
  41 + /// <summary>
  42 + /// 审核人用户ID
  43 + /// </summary>
  44 + public string auditUserId { get; set; }
  45 +
  46 + /// <summary>
  47 + /// 驳回原因
  48 + /// </summary>
  49 + public string rejectReason { get; set; }
  50 +
  51 + /// <summary>
  52 + /// 转账状态(0未转账,1已转账,2失败)
  53 + /// </summary>
  54 + public int? transferStatus { get; set; }
  55 +
  56 + /// <summary>
  57 + /// 转账时间
  58 + /// </summary>
  59 + public DateTime? transferTime { get; set; }
  60 +
  61 + /// <summary>
  62 + /// 转账备注或失败原因
  63 + /// </summary>
  64 + public string transferRemark { get; set; }
  65 +
  66 + /// <summary>
  67 + /// 收款账户户名
  68 + /// </summary>
  69 + public string bankAccountName { get; set; }
  70 +
  71 + /// <summary>
  72 + /// 收款账户卡号
  73 + /// </summary>
  74 + public string bankAccountNumber { get; set; }
  75 +
  76 + /// <summary>
  77 + /// 收款银行名称
  78 + /// </summary>
  79 + public string bankName { get; set; }
  80 +
  81 + /// <summary>
  82 + /// 提现申请号
  83 + /// </summary>
  84 + public string walletNo { get; set; }
  85 +
  86 + /// <summary>
  87 + /// 用户当前余额
  88 + /// </summary>
  89 + public decimal userBalance { get; set; }
  90 + }
  91 +}
netcore/src/Modularity/Extend/NCC.Extend.Entitys/uavWalletWithdrawApply/Dto/UavWalletWithdrawApplyAuditInput.cs 0 → 100644
  1 +using System;
  2 +using System.Collections.Generic;
  3 +
  4 +namespace NCC.Extend.Entitys.Dto.UavWalletWithdrawApply
  5 +{
  6 + /// <summary>
  7 + /// 提现申请审核输入参数
  8 + /// </summary>
  9 + public class UavWalletWithdrawApplyAuditInput
  10 + {
  11 + /// <summary>
  12 + /// 审核状态(1通过,2驳回)
  13 + /// </summary>
  14 + public int auditStatus { get; set; }
  15 +
  16 + /// <summary>
  17 + /// 驳回原因(驳回时必填)
  18 + /// </summary>
  19 + public string rejectReason { get; set; }
  20 + }
  21 +}
netcore/src/Modularity/Extend/NCC.Extend.Entitys/uavWalletWithdrawApply/Dto/UavWalletWithdrawApplyListOutput.cs
@@ -37,5 +37,30 @@ namespace NCC.Extend.Entitys.Dto.UavWalletWithdrawApply @@ -37,5 +37,30 @@ namespace NCC.Extend.Entitys.Dto.UavWalletWithdrawApply
37 /// </summary> 37 /// </summary>
38 public string walletNo { get; set; } 38 public string walletNo { get; set; }
39 39
  40 + /// <summary>
  41 + /// 申请时间
  42 + /// </summary>
  43 + public DateTime? applyTime { get; set; }
  44 +
  45 + /// <summary>
  46 + /// 审核状态(0待审核,1通过,2驳回)
  47 + /// </summary>
  48 + public int? auditStatus { get; set; }
  49 +
  50 + /// <summary>
  51 + /// 审核时间
  52 + /// </summary>
  53 + public DateTime? auditTime { get; set; }
  54 +
  55 + /// <summary>
  56 + /// 转账状态(0未转账,1已转账,2失败)
  57 + /// </summary>
  58 + public int? transferStatus { get; set; }
  59 +
  60 + /// <summary>
  61 + /// 转账时间
  62 + /// </summary>
  63 + public DateTime? transferTime { get; set; }
  64 +
40 } 65 }
41 } 66 }
netcore/src/Modularity/Extend/NCC.Extend.Entitys/uavWalletWithdrawApply/Dto/UavWalletWithdrawApplyListQueryInput.cs
@@ -29,5 +29,15 @@ namespace NCC.Extend.Entitys.Dto.UavWalletWithdrawApply @@ -29,5 +29,15 @@ namespace NCC.Extend.Entitys.Dto.UavWalletWithdrawApply
29 /// </summary> 29 /// </summary>
30 public string walletNo { get; set; } 30 public string walletNo { get; set; }
31 31
  32 + /// <summary>
  33 + /// 审核状态筛选(0待审核,1通过,2驳回)
  34 + /// </summary>
  35 + public int? auditStatus { get; set; }
  36 +
  37 + /// <summary>
  38 + /// 转账状态筛选(0未转账,1已转账,2失败)
  39 + /// </summary>
  40 + public int? transferStatus { get; set; }
  41 +
32 } 42 }
33 } 43 }
netcore/src/Modularity/Extend/NCC.Extend.Entitys/uavWalletWithdrawApply/Dto/UavWalletWithdrawApplyProcessInput.cs 0 → 100644
  1 +using System;
  2 +using System.Collections.Generic;
  3 +
  4 +namespace NCC.Extend.Entitys.Dto.UavWalletWithdrawApply
  5 +{
  6 + /// <summary>
  7 + /// 提现申请处理输入参数
  8 + /// </summary>
  9 + public class UavWalletWithdrawApplyProcessInput
  10 + {
  11 + /// <summary>
  12 + /// 转账状态(1已转账,2失败)
  13 + /// </summary>
  14 + public int transferStatus { get; set; }
  15 +
  16 + /// <summary>
  17 + /// 转账时间
  18 + /// </summary>
  19 + public DateTime? transferTime { get; set; }
  20 +
  21 + /// <summary>
  22 + /// 转账备注或失败原因
  23 + /// </summary>
  24 + public string transferRemark { get; set; }
  25 + }
  26 +}
netcore/src/Modularity/Extend/NCC.Extend/MqttPublisherService.cs
@@ -65,7 +65,7 @@ public class MqttPublisherService : IMqttPublisherService, ITransient, IDisposab @@ -65,7 +65,7 @@ public class MqttPublisherService : IMqttPublisherService, ITransient, IDisposab
65 /// </summary> 65 /// </summary>
66 private readonly IMqttClientOptions _mqttOptions; 66 private readonly IMqttClientOptions _mqttOptions;
67 private readonly IServiceProvider _serviceProvider; 67 private readonly IServiceProvider _serviceProvider;
68 - private readonly ISqlSugarClient _db; 68 + private ISqlSugarClient _db => _serviceProvider.GetRequiredService<ISqlSugarClient>();
69 private readonly Dictionary<string, (bool isOnline, DateTime lastCheck)> _onlineStatusCache = new Dictionary<string, (bool, DateTime)>(); 69 private readonly Dictionary<string, (bool isOnline, DateTime lastCheck)> _onlineStatusCache = new Dictionary<string, (bool, DateTime)>();
70 private readonly object _cacheLock = new object(); 70 private readonly object _cacheLock = new object();
71 private readonly Timer _healthCheckTimer; // 健康检查定时器 71 private readonly Timer _healthCheckTimer; // 健康检查定时器
@@ -114,10 +114,10 @@ public class MqttPublisherService : IMqttPublisherService, ITransient, IDisposab @@ -114,10 +114,10 @@ public class MqttPublisherService : IMqttPublisherService, ITransient, IDisposab
114 /// <summary> 114 /// <summary>
115 /// 构造函数:初始化客户端和配置、注册事件 115 /// 构造函数:初始化客户端和配置、注册事件
116 /// </summary> 116 /// </summary>
117 - public MqttPublisherService(IServiceProvider serviceProvider, ISqlSugarClient db) 117 + public MqttPublisherService(IServiceProvider serviceProvider)
118 { 118 {
119 _serviceProvider = serviceProvider; 119 _serviceProvider = serviceProvider;
120 - _db = db; 120 + // 延迟获取 ISqlSugarClient,避免在构造函数中从根提供者获取 Scoped 服务
121 // 创建 MQTT 客户端实例 121 // 创建 MQTT 客户端实例
122 var factory = new MqttFactory(); 122 var factory = new MqttFactory();
123 _mqttClient = factory.CreateMqttClient(); 123 _mqttClient = factory.CreateMqttClient();
@@ -385,11 +385,13 @@ public class MqttPublisherService : IMqttPublisherService, ITransient, IDisposab @@ -385,11 +385,13 @@ public class MqttPublisherService : IMqttPublisherService, ITransient, IDisposab
385 bool lastLog = false; 385 bool lastLog = false;
386 try 386 try
387 { 387 {
388 - lastLog = await _db.Queryable<UavMqttMessageLogEntity>() 388 + // 使用ToListAsync()然后检查Count来避免DataReader冲突
  389 + var existingLogs = await _db.Queryable<UavMqttMessageLogEntity>()
389 .Where(p => p.DeviceId == messageInfo.DeviceId && 390 .Where(p => p.DeviceId == messageInfo.DeviceId &&
390 p.Payload == messageInfo.Payload && 391 p.Payload == messageInfo.Payload &&
391 p.CreatedAt >= twoSecondsAgo) 392 p.CreatedAt >= twoSecondsAgo)
392 - .AnyAsync(); 393 + .ToListAsync();
  394 + lastLog = existingLogs.Any();
393 } 395 }
394 catch (Exception dbEx) 396 catch (Exception dbEx)
395 { 397 {
netcore/src/Modularity/Extend/NCC.Extend/NCC.Extend.xml
@@ -163,7 +163,7 @@ @@ -163,7 +163,7 @@
163 </summary> 163 </summary>
164 <returns>客户端ID</returns> 164 <returns>客户端ID</returns>
165 </member> 165 </member>
166 - <member name="M:NCC.Extend.MqttPublisherService.#ctor(System.IServiceProvider,SqlSugar.ISqlSugarClient)"> 166 + <member name="M:NCC.Extend.MqttPublisherService.#ctor(System.IServiceProvider)">
167 <summary> 167 <summary>
168 构造函数:初始化客户端和配置、注册事件 168 构造函数:初始化客户端和配置、注册事件
169 </summary> 169 </summary>
@@ -1764,17 +1764,32 @@ @@ -1764,17 +1764,32 @@
1764 <param name="input">参数</param> 1764 <param name="input">参数</param>
1765 <returns></returns> 1765 <returns></returns>
1766 </member> 1766 </member>
1767 - <member name="M:NCC.Extend.UavWalletWithdrawApply.UavWalletWithdrawApplyService.Update(System.String,NCC.Extend.Entitys.Dto.UavWalletWithdrawApply.UavWalletWithdrawApplyUpInput)"> 1767 + <member name="M:NCC.Extend.UavWalletWithdrawApply.UavWalletWithdrawApplyService.GetAuditDetail(System.String)">
1768 <summary> 1768 <summary>
1769 - 更新提现申请 1769 + 获取提现申请审核详情(包含用户余额)
  1770 + </summary>
  1771 + <param name="id">参数</param>
  1772 + <returns></returns>
  1773 + </member>
  1774 + <member name="M:NCC.Extend.UavWalletWithdrawApply.UavWalletWithdrawApplyService.Audit(System.String,NCC.Extend.Entitys.Dto.UavWalletWithdrawApply.UavWalletWithdrawApplyAuditInput)">
  1775 + <summary>
  1776 + 审核提现申请
  1777 + </summary>
  1778 + <param name="id">主键</param>
  1779 + <param name="input">参数</param>
  1780 + <returns></returns>
  1781 + </member>
  1782 + <member name="M:NCC.Extend.UavWalletWithdrawApply.UavWalletWithdrawApplyService.Process(System.String,NCC.Extend.Entitys.Dto.UavWalletWithdrawApply.UavWalletWithdrawApplyProcessInput)">
  1783 + <summary>
  1784 + 处理提现申请(转账)
1770 </summary> 1785 </summary>
1771 <param name="id">主键</param> 1786 <param name="id">主键</param>
1772 <param name="input">参数</param> 1787 <param name="input">参数</param>
1773 <returns></returns> 1788 <returns></returns>
1774 </member> 1789 </member>
1775 - <member name="M:NCC.Extend.UavWalletWithdrawApply.UavWalletWithdrawApplyService.Delete(System.String)"> 1790 + <member name="M:NCC.Extend.UavWalletWithdrawApply.UavWalletWithdrawApplyService.GetStatistics">
1776 <summary> 1791 <summary>
1777 - 删除提现申请 1792 + 获取提现申请统计数据
1778 </summary> 1793 </summary>
1779 <returns></returns> 1794 <returns></returns>
1780 </member> 1795 </member>
netcore/src/Modularity/Extend/NCC.Extend/UavSiteService.cs
@@ -18,6 +18,7 @@ using NCC.Extend.Entitys.Dto.UavSite; @@ -18,6 +18,7 @@ using NCC.Extend.Entitys.Dto.UavSite;
18 using Yitter.IdGenerator; 18 using Yitter.IdGenerator;
19 using NCC.Common.Helper; 19 using NCC.Common.Helper;
20 using NCC.JsonSerialization; 20 using NCC.JsonSerialization;
  21 +using NCC.System.Entitys.Permission;
21 22
22 namespace NCC.Extend.UavSite 23 namespace NCC.Extend.UavSite
23 { 24 {
@@ -68,7 +69,9 @@ namespace NCC.Extend.UavSite @@ -68,7 +69,9 @@ namespace NCC.Extend.UavSite
68 public async Task<dynamic> GetList([FromQuery] UavSiteListQueryInput input) 69 public async Task<dynamic> GetList([FromQuery] UavSiteListQueryInput input)
69 { 70 {
70 var sidx = input.sidx == null ? "id" : input.sidx; 71 var sidx = input.sidx == null ? "id" : input.sidx;
71 - var data = await _db.Queryable<UavSiteEntity>() 72 +
  73 + // 第一步:获取基础场地数据
  74 + var siteData = await _db.Queryable<UavSiteEntity>()
72 .WhereIF(!string.IsNullOrEmpty(input.siteName), p => p.SiteName.Contains(input.siteName)) 75 .WhereIF(!string.IsNullOrEmpty(input.siteName), p => p.SiteName.Contains(input.siteName))
73 .WhereIF(!string.IsNullOrEmpty(input.creatorId), p => p.CreatorId.Equals(input.creatorId)) 76 .WhereIF(!string.IsNullOrEmpty(input.creatorId), p => p.CreatorId.Equals(input.creatorId))
74 .Select(it => new UavSiteListOutput 77 .Select(it => new UavSiteListOutput
@@ -80,8 +83,42 @@ namespace NCC.Extend.UavSite @@ -80,8 +83,42 @@ namespace NCC.Extend.UavSite
80 lat = it.Lat, 83 lat = it.Lat,
81 remark = it.Remark, 84 remark = it.Remark,
82 creatorId = it.CreatorId, 85 creatorId = it.CreatorId,
83 - }).MergeTable().OrderBy(sidx + " " + input.sort).ToPagedListAsync(input.currentPage, input.pageSize);  
84 - return PageResult<UavSiteListOutput>.SqlSugarPageResult(data); 86 + creatorName = "", // 先设为空,后面单独查询
  87 + deviceCount = SqlFunc.Subqueryable<UavDeviceEntity>()
  88 + .Where(device => device.SiteId == it.Id)
  89 + .Count()
  90 + }).OrderBy(sidx + " " + input.sort).ToPagedListAsync(input.currentPage, input.pageSize);
  91 +
  92 + // 第二步:单独查询用户名称
  93 + if (siteData.list?.Any() == true)
  94 + {
  95 + var creatorIds = siteData.list.Where(x => !string.IsNullOrEmpty(x.creatorId))
  96 + .Select(x => x.creatorId).Distinct().ToList();
  97 +
  98 + if (creatorIds.Any())
  99 + {
  100 + var users = await _db.Queryable<UserEntity>()
  101 + .Where(u => creatorIds.Contains(u.Id))
  102 + .Select(u => new { u.Id, u.RealName, u.Account })
  103 + .ToListAsync();
  104 +
  105 + // 更新用户名称
  106 + foreach (var site in siteData.list)
  107 + {
  108 + if (!string.IsNullOrEmpty(site.creatorId))
  109 + {
  110 + var user = users.FirstOrDefault(u => u.Id == site.creatorId);
  111 + site.creatorName = user != null ? $"{user.RealName}/{user.Account}" : site.creatorId;
  112 + }
  113 + else
  114 + {
  115 + site.creatorName = "-";
  116 + }
  117 + }
  118 + }
  119 + }
  120 +
  121 + return PageResult<UavSiteListOutput>.SqlSugarPageResult(siteData);
85 } 122 }
86 #endregion 123 #endregion
87 124
netcore/src/Modularity/Extend/NCC.Extend/UavWalletWithdrawApplyService.cs
@@ -58,11 +58,11 @@ namespace NCC.Extend.UavWalletWithdrawApply @@ -58,11 +58,11 @@ namespace NCC.Extend.UavWalletWithdrawApply
58 return output; 58 return output;
59 } 59 }
60 60
61 - /// <summary>  
62 - /// 获取提现申请列表  
63 - /// </summary>  
64 - /// <param name="input">请求参数</param>  
65 - /// <returns></returns> 61 + /// <summary>
  62 + /// 获取提现申请列表
  63 + /// </summary>
  64 + /// <param name="input">请求参数</param>
  65 + /// <returns></returns>
66 [HttpGet("")] 66 [HttpGet("")]
67 public async Task<dynamic> GetList([FromQuery] UavWalletWithdrawApplyListQueryInput input) 67 public async Task<dynamic> GetList([FromQuery] UavWalletWithdrawApplyListQueryInput input)
68 { 68 {
@@ -70,6 +70,8 @@ namespace NCC.Extend.UavWalletWithdrawApply @@ -70,6 +70,8 @@ namespace NCC.Extend.UavWalletWithdrawApply
70 var data = await _db.Queryable<UavWalletWithdrawApplyEntity>() 70 var data = await _db.Queryable<UavWalletWithdrawApplyEntity>()
71 .WhereIF(!string.IsNullOrEmpty(input.bankAccountNumber), p => p.BankAccountNumber.Contains(input.bankAccountNumber)) 71 .WhereIF(!string.IsNullOrEmpty(input.bankAccountNumber), p => p.BankAccountNumber.Contains(input.bankAccountNumber))
72 .WhereIF(!string.IsNullOrEmpty(input.walletNo), p => p.WalletNo.Contains(input.walletNo)) 72 .WhereIF(!string.IsNullOrEmpty(input.walletNo), p => p.WalletNo.Contains(input.walletNo))
  73 + .WhereIF(input.auditStatus.HasValue, p => p.AuditStatus == input.auditStatus.Value)
  74 + .WhereIF(input.transferStatus.HasValue, p => p.TransferStatus == input.transferStatus.Value)
73 .Select(it => new UavWalletWithdrawApplyListOutput 75 .Select(it => new UavWalletWithdrawApplyListOutput
74 { 76 {
75 id = it.Id, 77 id = it.Id,
@@ -78,6 +80,11 @@ namespace NCC.Extend.UavWalletWithdrawApply @@ -78,6 +80,11 @@ namespace NCC.Extend.UavWalletWithdrawApply
78 bankAccountNumber = it.BankAccountNumber, 80 bankAccountNumber = it.BankAccountNumber,
79 bankName = it.BankName, 81 bankName = it.BankName,
80 walletNo = it.WalletNo, 82 walletNo = it.WalletNo,
  83 + applyTime = it.ApplyTime,
  84 + auditStatus = it.AuditStatus,
  85 + auditTime = it.AuditTime,
  86 + transferStatus = it.TransferStatus,
  87 + transferTime = it.TransferTime,
81 }).MergeTable().OrderBy(sidx + " " + input.sort).ToPagedListAsync(input.currentPage, input.pageSize); 88 }).MergeTable().OrderBy(sidx + " " + input.sort).ToPagedListAsync(input.currentPage, input.pageSize);
82 return PageResult<UavWalletWithdrawApplyListOutput>.SqlSugarPageResult(data); 89 return PageResult<UavWalletWithdrawApplyListOutput>.SqlSugarPageResult(data);
83 } 90 }
@@ -106,30 +113,131 @@ namespace NCC.Extend.UavWalletWithdrawApply @@ -106,30 +113,131 @@ namespace NCC.Extend.UavWalletWithdrawApply
106 } 113 }
107 114
108 /// <summary> 115 /// <summary>
109 - /// 更新提现申请 116 + /// 获取提现申请审核详情(包含用户余额)
  117 + /// </summary>
  118 + /// <param name="id">参数</param>
  119 + /// <returns></returns>
  120 + [HttpGet("{id}/AuditDetail")]
  121 + public async Task<dynamic> GetAuditDetail(string id)
  122 + {
  123 + var entity = await _db.Queryable<UavWalletWithdrawApplyEntity>().FirstAsync(p => p.Id == id);
  124 + _ = entity ?? throw NCCException.Oh(ErrorCode.COM1005);
  125 +
  126 + // 获取用户当前余额
  127 + var userBalance = await _db.Queryable<UavWalletFlowEntity>()
  128 + .Where(x => x.UserId == entity.UserId)
  129 + .SumAsync(x => x.Amount);
  130 +
  131 + var output = entity.Adapt<UavWalletWithdrawApplyAuditDetailOutput>();
  132 + output.userBalance = userBalance;
  133 + return output;
  134 + }
  135 +
  136 + /// <summary>
  137 + /// 审核提现申请
110 /// </summary> 138 /// </summary>
111 /// <param name="id">主键</param> 139 /// <param name="id">主键</param>
112 /// <param name="input">参数</param> 140 /// <param name="input">参数</param>
113 /// <returns></returns> 141 /// <returns></returns>
114 - [HttpPut("{id}")]  
115 - public async Task Update(string id, [FromBody] UavWalletWithdrawApplyUpInput input) 142 + [HttpPut("{id}/Audit")]
  143 + public async Task Audit(string id, [FromBody] UavWalletWithdrawApplyAuditInput input)
116 { 144 {
117 - var entity = input.Adapt<UavWalletWithdrawApplyEntity>();  
118 - var isOk = await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); 145 + var entity = await _db.Queryable<UavWalletWithdrawApplyEntity>().FirstAsync(p => p.Id == id);
  146 + _ = entity ?? throw NCCException.Oh(ErrorCode.COM1005);
  147 +
  148 + // 只有待审核状态才能审核
  149 + if (entity.AuditStatus != AuditStatusEnum.待审核.GetHashCode())
  150 + {
  151 + throw NCCException.Oh(ErrorCode.COM1003, "该申请已审核,无法重复审核");
  152 + }
  153 +
  154 + // 驳回时必须填写驳回原因
  155 + if (input.auditStatus == AuditStatusEnum.审核驳回.GetHashCode() && string.IsNullOrEmpty(input.rejectReason))
  156 + {
  157 + throw NCCException.Oh(ErrorCode.COM1003, "驳回时必须填写驳回原因");
  158 + }
  159 +
  160 + entity.AuditStatus = input.auditStatus;
  161 + entity.AuditTime = DateTime.Now;
  162 + entity.AuditUserId = _userManager.UserId;
  163 + entity.RejectReason = input.rejectReason;
  164 + entity.UpdateTime = DateTime.Now;
  165 + entity.UpdateUser = _userManager.UserId;
  166 +
  167 + var isOk = await _db.Updateable(entity).ExecuteCommandAsync();
119 if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001); 168 if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001);
120 } 169 }
121 170
122 /// <summary> 171 /// <summary>
123 - /// 删除提现申请 172 + /// 处理提现申请(转账)
124 /// </summary> 173 /// </summary>
  174 + /// <param name="id">主键</param>
  175 + /// <param name="input">参数</param>
125 /// <returns></returns> 176 /// <returns></returns>
126 - [HttpDelete("{id}")]  
127 - public async Task Delete(string id) 177 + [HttpPut("{id}/Process")]
  178 + public async Task Process(string id, [FromBody] UavWalletWithdrawApplyProcessInput input)
128 { 179 {
129 var entity = await _db.Queryable<UavWalletWithdrawApplyEntity>().FirstAsync(p => p.Id == id); 180 var entity = await _db.Queryable<UavWalletWithdrawApplyEntity>().FirstAsync(p => p.Id == id);
130 _ = entity ?? throw NCCException.Oh(ErrorCode.COM1005); 181 _ = entity ?? throw NCCException.Oh(ErrorCode.COM1005);
131 - var isOk = await _db.Deleteable<UavWalletWithdrawApplyEntity>().Where(d => d.Id == id).ExecuteCommandAsync();  
132 - if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002); 182 +
  183 + // 只有审核通过的才能处理
  184 + if (entity.AuditStatus != AuditStatusEnum.审核通过.GetHashCode())
  185 + {
  186 + throw NCCException.Oh(ErrorCode.COM1003, "只有审核通过的申请才能处理");
  187 + }
  188 +
  189 + // 只有未转账的才能处理
  190 + if (entity.TransferStatus != TransferStatusEnum.未转账.GetHashCode())
  191 + {
  192 + throw NCCException.Oh(ErrorCode.COM1003, "该申请已处理,无法重复处理");
  193 + }
  194 +
  195 + entity.TransferStatus = input.transferStatus;
  196 + entity.TransferTime = input.transferTime ?? DateTime.Now;
  197 + entity.TransferRemark = input.transferRemark;
  198 + entity.UpdateTime = DateTime.Now;
  199 + entity.UpdateUser = _userManager.UserId;
  200 +
  201 + var isOk = await _db.Updateable(entity).ExecuteCommandAsync();
  202 + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001);
  203 + }
  204 +
  205 + /// <summary>
  206 + /// 获取提现申请统计数据
  207 + /// </summary>
  208 + /// <returns></returns>
  209 + [HttpGet("Statistics")]
  210 + public async Task<dynamic> GetStatistics()
  211 + {
  212 + // 分别查询各个统计数据
  213 + var pendingCount = await _db.Queryable<UavWalletWithdrawApplyEntity>()
  214 + .Where(p => p.AuditStatus == AuditStatusEnum.待审核.GetHashCode())
  215 + .CountAsync();
  216 +
  217 + var approvedCount = await _db.Queryable<UavWalletWithdrawApplyEntity>()
  218 + .Where(p => p.AuditStatus == AuditStatusEnum.审核通过.GetHashCode())
  219 + .CountAsync();
  220 +
  221 + var transferredCount = await _db.Queryable<UavWalletWithdrawApplyEntity>()
  222 + .Where(p => p.TransferStatus == TransferStatusEnum.已转账.GetHashCode())
  223 + .CountAsync();
  224 +
  225 + // 查询所有金额数据,然后在内存中处理
  226 + var amounts = await _db.Queryable<UavWalletWithdrawApplyEntity>()
  227 + .Select(p => p.Amount)
  228 + .ToListAsync();
  229 +
  230 + var totalAmount = amounts.Sum(amount => amount < 0 ? -amount : amount);
  231 +
  232 + var stats = new
  233 + {
  234 + pendingCount = pendingCount,
  235 + approvedCount = approvedCount,
  236 + transferredCount = transferredCount,
  237 + totalAmount = totalAmount
  238 + };
  239 +
  240 + return stats;
133 } 241 }
134 } 242 }
135 } 243 }