You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

916 lines
32 KiB

1 month ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
2 months ago
2 months ago
1 month ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
2 months ago
1 month ago
1 month ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
2 months ago
1 month ago
2 months ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
1 month ago
1 month ago
1 month ago
2 months ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
1 month ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
1 month ago
2 months ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
  1. <!-- 总部财务/管理员 -->
  2. <template>
  3. <el-card style="margin-bottom: 0.5vh;background-color: rgb(243,250,254);">
  4. <div class="condition">
  5. <div class="item1">
  6. <el-text size="large" style="width:4vw;">精网号</el-text>
  7. <el-input v-model="searchForm.jwcode" placeholder="请输入精网号" style="width:9vw;" clearable />
  8. </div>
  9. <div class="item1">
  10. <el-text size="large" style="width:4vw;">客户姓名</el-text>
  11. <el-input v-model="searchForm.name" placeholder="请输入客户姓名" style="width:9vw;" clearable />
  12. </div>
  13. <div class="item1">
  14. <el-text size="large" style="width:4vw;">所属地区</el-text>
  15. <el-cascader style="width: 9vw;" v-model="searchForm.markets" :options="market" placeholder="请选择所属地区"
  16. clearable @change="handleMarketChange" />
  17. </div>
  18. <div class="item1">
  19. <el-text size="large" style="width:4vw;">产品名称</el-text>
  20. <el-cascader v-model="searchForm.goodsName" :options="productList" style="width: 10vw;"
  21. placeholder="请选择产品名称" clearable />
  22. </div>
  23. <div class="item1">
  24. <el-text size="large" style="width:4vw;">订单状态</el-text>
  25. <el-select v-model="searchForm.statuses" style="width:9vw;" placeholder="请选择订单状态" clearable>
  26. <el-option v-for="item in statusList" :label="item" :value="item" :key="item" />
  27. </el-select>
  28. </div>
  29. </div>
  30. <div class="condition">
  31. <div class="item2">
  32. <el-text size="large" style="width:4vw;">付款币种</el-text>
  33. <el-select v-model="searchForm.paymentCurrency" style="width:9vw;" placeholder="请选择付款币种" clearable>
  34. <el-option v-for="item in currencies" :key="item.value" :label="item.label" :value="item.value" />
  35. </el-select>
  36. </div>
  37. <div class="item2">
  38. <el-text size="large" style="width:4vw;">支付方式</el-text>
  39. <el-select v-model="searchForm.payType" style="width:9vw;" placeholder="请选择支付方式" clearable>
  40. <el-option v-for="item in channelOptions" :key="item.value" :label="item.label"
  41. :value="item.value" />
  42. </el-select>
  43. </div>
  44. <div class="item2" style="width: 28.5vw;">
  45. <el-text size="large" style="width:4vw;">付款时间</el-text>
  46. <el-date-picker v-model="dateRange" type="datetimerange" range-separator="" start-placeholder="起始时间"
  47. end-placeholder="结束时间" style="width:22vw;" @change="handleDatePickerChange" clearable
  48. :disabled-date="disabledDate" :default-time="defaultTime" />
  49. </div>
  50. <div>
  51. <el-button type="primary" @click="getRefund">查询</el-button>
  52. <!-- <el-button type="warning">导出excel</el-button>
  53. <el-button type="primary">查看导出列表</el-button> -->
  54. <el-button type="success" @click="reset">重置</el-button>
  55. </div>
  56. </div>
  57. </el-card>
  58. <el-card style="margin-top: 0.5vh;background-color: rgb(231,244,253);">
  59. <el-table :data="tableData" style="height:64vh;width:82vw">
  60. <el-table-column type="index" label="序号" width="60" fixed="left" />
  61. <el-table-column prop="name" label="Homily ID" width="120" fixed="left" />
  62. <el-table-column prop="jwcode" label="姓名" width="120" fixed="left" show-overflow-tooltip />
  63. <el-table-column prop="marketName" label="所属地区" width="120" />
  64. <el-table-column prop="goodsName" label="产品名称" width="130" show-overflow-tooltip />
  65. <el-table-column prop="goodNum" label="产品数量" width="120" />
  66. <el-table-column prop="refundModel" label="退款方式" width="120">
  67. <template #default="scope">
  68. {{ scope.row.refundModel === 1 ? '部分退款' : '全部退款' }}
  69. </template>
  70. </el-table-column>
  71. <el-table-column prop="areaServise" label="提交人" width="120" />
  72. <el-table-column prop="refundReason" label="退款理由" width="120" show-overflow-tooltip />
  73. <el-table-column prop="remark" label="备注" width="150" show-overflow-tooltip />
  74. <el-table-column prop="status" label="订单状态" width="120">
  75. <template #default="scope">
  76. {{
  77. [30].includes(scope.row.status) ? '待审核' :
  78. [40].includes(scope.row.status) ? '审核通过' :
  79. scope.row.status === 32 ? '已驳回' :
  80. scope.row.status === 41 ? '退款成功' : scope.row.status
  81. }}
  82. </template>
  83. </el-table-column>
  84. <el-table-column prop="operation" label="操作" fixed="right" width="100px">
  85. <template #default="scope">
  86. <div class="operation">
  87. <el-button v-if="scope.row.status === 30" type="primary" text @click="showAudit(scope.row)">
  88. 审核
  89. </el-button>
  90. <el-button v-else type="primary" text @click="showStep(scope.row)">
  91. 查看进度
  92. </el-button>
  93. </div>
  94. </template>
  95. </el-table-column>
  96. </el-table>
  97. <el-pagination v-model:current-page="pagination.pageNum" v-model:page-size="pagination.pageSize"
  98. layout="total, sizes, prev, pager, next, jumper" :total="pagination.total"
  99. @size-change="handlePageSizeChange" @current-change="handleCurrentChange"
  100. style="margin-top: 1vh;"></el-pagination>
  101. </el-card>
  102. <el-dialog v-model="showAudit2" title="审核" class="audit2" width="35vw" overflow draggable>
  103. <div class="top">
  104. <el-button @click="" class="smallTitle" size="small">退款申请信息</el-button>
  105. <div class="top-item">
  106. <el-text style="width:4vw;" size="small">退款方式</el-text>
  107. <el-select v-model="auditRow.refundModel" size="small" style="width:10vw;" disabled>
  108. <el-option label="全部退款" :value="0"></el-option>
  109. <el-option label="部分退款" :value="1"></el-option>
  110. </el-select>
  111. </div>
  112. <div class="top-item">
  113. <el-text style="width:4vw;" size="small">退款理由</el-text>
  114. <el-input v-model="auditRow.refundReason" size="small" style="width:10vw;"
  115. :rows="3" maxlength="100" show-word-limit type="textarea" disabled />
  116. </div>
  117. </div>
  118. <el-button @click="" class="smallTitle" size="small">原订单信息</el-button>
  119. <div class="center">
  120. <div class="center-left">
  121. <div class="center-item">
  122. <el-text style="width:4vw;" size="small">精网号</el-text>
  123. <el-input v-model="auditRow.jwcode" size="small" style="width:10vw;" disabled />
  124. </div>
  125. <div class="center-item">
  126. <el-text style="width:4vw;" size="small">所属地区</el-text>
  127. <el-input v-model="auditRow.marketName" size="small" style="width:10vw;" disabled />
  128. </div>
  129. <div class="center-item">
  130. <el-text style="width:4vw;" size="small">产品名称</el-text>
  131. <el-input v-model="auditRow.goodsName" size="small" style="width:10vw;" disabled />
  132. </div>
  133. <div class="center-item">
  134. <el-text style="width:4vw;" size="small">付款金额</el-text>
  135. <el-input v-model="auditRow.paymentAmount" size="small" style="width:10vw;" disabled />
  136. </div>
  137. <div class="center-item">
  138. <el-text style="width:4vw;" size="small">到账金额</el-text>
  139. <el-input v-model="auditRow.receivedAmount" size="small" style="width:10vw;" disabled />
  140. </div>
  141. <div class="center-item">
  142. <el-text style="width:4vw;" size="small">支付方式</el-text>
  143. <el-input v-model="auditRow.payType" size="small" style="width:10vw;" disabled />
  144. </div>
  145. <div class="center-item">
  146. <el-text style="width:4vw;">转账凭证</el-text>
  147. <img v-if="auditRow.voucher" :src="auditRow.voucher"
  148. style="width: 80px; height: 80px; object-fit: cover;">
  149. <div v-else>
  150. 无转账凭证
  151. </div>
  152. </div>
  153. </div>
  154. <div class="center-right">
  155. <div class="right-item">
  156. <el-text style="width:4vw;" size="small">客户姓名</el-text>
  157. <el-input v-model="auditRow.name" size="small" style="width:10vw;" disabled />
  158. </div>
  159. <div class="right-item">
  160. <el-text style="width:4vw;" size="small">活动名称</el-text>
  161. <el-input v-model="auditRow.activity" size="small" style="width:10vw;" disabled />
  162. </div>
  163. <div class="right-item">
  164. <el-text style="width:4vw;" size="small">付款币种</el-text>
  165. <el-input v-model="auditRow.paymentCurrency" size="small" style="width:10vw;" disabled />
  166. </div>
  167. <div class="right-item">
  168. <el-text style="width:4vw;" size="small">到账币种</el-text>
  169. <el-input v-model="auditRow.receivedCurrency" size="small" style="width:10vw;" disabled />
  170. </div>
  171. <div class="right-item">
  172. <el-text style="width:4vw;" size="small">手续费</el-text>
  173. <el-input v-model="auditRow.handlingCharge" size="small" style="width:10vw;" disabled />
  174. </div>
  175. <div class="right-item">
  176. <el-text style="width:4vw;" size="small">付款时间</el-text>
  177. <el-input v-model="auditRow.payTime" size="small" style="width:10vw;" disabled />
  178. </div>
  179. <div class="right-item">
  180. <el-text style="width:4vw;" size="small">提交人</el-text>
  181. <el-input v-model="auditRow.submitterName" size="small" style="width:10vw;" disabled />
  182. </div>
  183. <div class="right-item">
  184. <el-text style="width:4vw;" size="small">到账时间</el-text>
  185. <el-input v-model="auditRow.receivedTime" size="small" style="width:10vw;" disabled />
  186. </div>
  187. <div class="right-item">
  188. <el-text style="width:4vw;" size="small">备注</el-text>
  189. <el-input v-model="auditRow.remark" size="small" style="width:10vw;" :row="3" maxlength="100"
  190. type="textarea" show-word-limit disabled />
  191. </div>
  192. </div>
  193. </div>
  194. <div class="bottom">
  195. <el-button class="smallTitle" size="small" v-show="showReject">驳回信息</el-button>
  196. <div class="bottom-item" v-show="showReject">
  197. <el-text style="width:4vw;" size="small">驳回备注</el-text>
  198. <el-input v-model="addForm.remark" placeholder="请输入驳回备注" size="small" style="width:10vw;" :row="3"
  199. maxlength="100" type="textarea" show-word-limit clearable />
  200. </div>
  201. <div class="bottom-item" v-show="showExecutor">
  202. <el-text style="width:4vw;" size="small">执行人</el-text>
  203. <el-select v-model="addForm.executor" style="width:9vw;">
  204. <el-option v-for="item in executorList" :key="item.value" :label="item.label" :value="item.value" />
  205. </el-select>
  206. </div>
  207. <div style="text-align: center;" v-show="!showReject && !showExecutor">
  208. <el-button type="default" @click="showReject = true">驳回</el-button>
  209. <el-button type="primary" @click="showExecutor = true">通过</el-button>
  210. </div>
  211. <div style="text-align: center;" v-show="showReject">
  212. <el-button type="default" @click="hideReject">取消</el-button>
  213. <el-button type="primary" @click="handleReject">确定</el-button>
  214. </div>
  215. <div style="text-align: center;" v-show="showExecutor">
  216. <el-button type="default" @click="hideExecutor">取消</el-button>
  217. <el-button type="primary" @click="handlePass">确定</el-button>
  218. </div>
  219. </div>
  220. </el-dialog>
  221. <el-dialog v-model="showSteps" title="退款进度" overflow draggable width="1206px" height="506px" :style="{
  222. backgroundImage: 'url(/src/assets/images/背景图.png)',
  223. backgroundSize: 'cover',
  224. backgroundPosition: 'center'
  225. }">
  226. <div class="steps">
  227. <div class="steps-content">
  228. <el-steps :active="currentStep" align-center>
  229. <el-step>
  230. <template #title>
  231. <div>
  232. 提交人<br>{{ submitterName || '未知提交人' }}
  233. </div>
  234. </template>
  235. <template #icon>
  236. <img src="@/assets/images/已审核.png" alt="已完成">
  237. </template>
  238. </el-step>
  239. <el-step>
  240. <template #title>
  241. <div>
  242. 地区财务<br>{{ areaFinance || '未记录审核人' }}
  243. </div>
  244. </template>
  245. <template #icon>
  246. <img v-if="currentStep === 2" src="@/assets/images/已驳回.png" alt="已驳回">
  247. <img v-else-if="currentStep === 1" src="@/assets/images/待审核.png" alt="待审核">
  248. <img v-else-if="currentStep > 2" src="@/assets/images/已审核.png" alt="已审核">
  249. </template>
  250. </el-step>
  251. <el-step>
  252. <template #title>
  253. <div>
  254. 地区负责人<br>{{ areaCharge || '未记录审核人' }}
  255. </div>
  256. </template>
  257. <template #icon>
  258. <img v-if="currentStep === 4" src="@/assets/images/已驳回.png" alt="已驳回">
  259. <img v-else-if="currentStep === 3" src="@/assets/images/待审核.png" alt="待审核">
  260. <img v-else-if="currentStep > 3 && currentStep != 4" src="@/assets/images/已审核.png" alt="已审核">
  261. <img v-else-if="currentStep < 3" src="@/assets/images/还没传到.png" alt="未开始">
  262. </template>
  263. </el-step>
  264. <el-step>
  265. <template #title>
  266. <div>
  267. 总部财务<br>{{ headFinance || '未记录审核人' }}
  268. </div>
  269. </template>
  270. <template #icon>
  271. <img v-if="currentStep === 6" src="@/assets/images/已驳回.png" alt="已驳回">
  272. <img v-else-if="currentStep === 5" src="@/assets/images/待审核.png" alt="待审核">
  273. <img v-else-if="currentStep > 5 && currentStep != 6" src="@/assets/images/已审核.png" alt="已审核">
  274. <img v-else-if="currentStep < 5" src="@/assets/images/还没传到.png" alt="未开始">
  275. </template>
  276. </el-step>
  277. <el-step>
  278. <template #title>
  279. <div>
  280. 指定执行人<br>{{ executor || '未记录执行人' }}
  281. </div>
  282. </template>
  283. <template #icon>
  284. <img v-if="currentStep === 7" src="@/assets/images/待审核.png" alt="待处理">
  285. <img v-else-if="currentStep === 8" src="@/assets/images/已审核.png" alt="已完成">
  286. <img v-else-if="currentStep < 7" src="@/assets/images/还没传到.png" alt="未开始">
  287. </template>
  288. </el-step>
  289. </el-steps>
  290. </div>
  291. <div class="steps-btn">
  292. <el-button type="primary" @click="showSteps = false">确定</el-button>
  293. </div>
  294. </div>
  295. </el-dialog>
  296. </template>
  297. <script setup>
  298. import { ref, onMounted } from 'vue'
  299. import { ElMessage } from 'element-plus'
  300. import API from '@/util/http.js'
  301. const uploadUrl = 'https://api.homilychart.com/hljw/api/aws/upload'
  302. import { useAdminStore } from "@/store/index.js"
  303. import { storeToRefs } from "pinia"
  304. import dayjs from 'dayjs'
  305. const adminStore = useAdminStore()
  306. const { adminData, menuTree } = storeToRefs(adminStore)
  307. import { permissionMapping, findMenuById, hasMenuPermission } from "@/utils/menuTreePermission.js"
  308. const currentStep = ref(0)// 进度图
  309. const searchForm = ref({
  310. jwcode: '',
  311. markets: [],
  312. statuses: []
  313. })
  314. const isReject = ref(false)// 进度图有没有驳回状态
  315. const addForm = ref({
  316. remark: ''
  317. })
  318. const market = ref([])
  319. const showReject = ref(false)
  320. const showExecutor = ref(false)
  321. const auditRow = ref({})// 审核回显
  322. const dateRange = ref([])
  323. const pagination = ref({
  324. pageNum: 1,
  325. pageSize: 50,
  326. total: 0
  327. })
  328. const showAudit2 = ref(false)
  329. const tableData = ref([])
  330. const showSteps = ref(false)
  331. const uploadRef = ref(null)
  332. const submitterName = ref('')// 提交人
  333. const areaFinance = ref('')// 地区财务
  334. const areaCharge = ref('')// 地区负责人
  335. const headFinance = ref('')// 总部财务
  336. const executor = ref('')// 指定执行人
  337. const statusStepMap = {
  338. 10: [1, false],
  339. 12: [2, true],
  340. 20: [3, false],
  341. 22: [4, true],
  342. 30: [5, false],
  343. 32: [6, true],
  344. 40: [7, false],
  345. 41: [8, false]
  346. }
  347. const currencies = ref([
  348. {
  349. value: '新币',
  350. label: '新币'
  351. },
  352. {
  353. value: '港币',
  354. label: '港币'
  355. },
  356. {
  357. value: '马币',
  358. label: '马币'
  359. },
  360. {
  361. value: '加币',
  362. label: '加币'
  363. },
  364. {
  365. value: '泰铢',
  366. label: '泰铢'
  367. },
  368. {
  369. value: '越南盾',
  370. label: '越南盾'
  371. }
  372. ])
  373. const channelOptions = ref([{
  374. value: '银行转账',
  375. label: '银行转账'
  376. },
  377. {
  378. value: '刷卡',
  379. label: '刷卡'
  380. },
  381. {
  382. value: '现金',
  383. label: '现金'
  384. },
  385. {
  386. value: '支票',
  387. label: '支票'
  388. },
  389. {
  390. value: 'Grabpay',
  391. label: 'Grabpay'
  392. },
  393. {
  394. value: 'Nets',
  395. label: 'Nets'
  396. },
  397. {
  398. value: 'E-Transfer',
  399. label: 'E-Transfer'
  400. },
  401. {
  402. value: 'PayPal',
  403. label: 'PayPal'
  404. },
  405. {
  406. value: 'Stripe-链接收款',
  407. label: 'Stripe-链接收款'
  408. },
  409. {
  410. value: 'PaymentAsia-链接收款',
  411. label: 'PaymentAsia-链接收款'
  412. },
  413. {
  414. value: 'Ipay88-链接收款',
  415. label: 'Ipay88-链接收款'
  416. }
  417. ])
  418. const statusList = ref(['待审核', '审核通过', '已驳回', '退款成功'])
  419. const executorList = ref([
  420. {
  421. value: '305485',
  422. label: '新:Zoe'
  423. },
  424. {
  425. value: '200723',
  426. label: '马:Jennifer'
  427. },
  428. {
  429. value: '301388',
  430. label: '港:林育平'
  431. },
  432. {
  433. value: '839448',
  434. label: '加:Mandy'
  435. },
  436. {
  437. value: '304904',
  438. label: '泰:杨丽娇'
  439. },
  440. {
  441. value: '315915',
  442. label: '越:范秋霞'
  443. },
  444. {
  445. value: '90047681',
  446. label: '李慧琳演示机'
  447. },
  448. {
  449. value: '90047947',
  450. label: '宋彤彤'
  451. }
  452. ])
  453. // 查全部
  454. const getRefund = async function () {
  455. if (!hasMenuPermission(menuTree.value, permissionMapping.refundHeaderShow)) {
  456. ElMessage.error('无此权限')
  457. return
  458. }
  459. try {
  460. const statusParam = ref([30, 32, 40, 41])// 默认:看不到进度没到这里的
  461. if (searchForm.value.statuses === '待审核') {
  462. statusParam.value = [30]
  463. } else if (searchForm.value.statuses === '审核通过') {
  464. statusParam.value = [40]
  465. } else if (searchForm.value.statuses === '已驳回') {
  466. statusParam.value = [32]
  467. } else if (searchForm.value.statuses === '退款成功') {
  468. statusParam.value = [41]
  469. } else {
  470. statusParam.value = [30, 32, 40, 41]
  471. }
  472. const params = {
  473. pageNum: pagination.value.pageNum,
  474. pageSize: pagination.value.pageSize,
  475. cashRecordDone: {
  476. jwcode: searchForm.value.jwcode,
  477. name: searchForm.value.name,
  478. markets: searchForm.value.markets,
  479. goodsNames: searchForm.value.goodsName,
  480. statuses: statusParam.value,
  481. paymentCurrency: searchForm.value.paymentCurrency,
  482. payType: searchForm.value.payType,
  483. startTime: dateRange.value && dateRange.value[0] ? dayjs(dateRange.value[0]).format('YYYY-MM-DD HH:mm:ss') : "",
  484. endTime: dateRange.value && dateRange.value[1] ? dayjs(dateRange.value[1]).format('YYYY-MM-DD HH:mm:ss') : "",
  485. adminId: adminData.value.id
  486. }
  487. }
  488. const result = await API({
  489. url: '/Money/select',
  490. method: 'POST',
  491. data: params
  492. })
  493. tableData.value = result.data.list || []
  494. pagination.value.total = result.data.total || 0
  495. } catch (error) {
  496. ElMessage.error(error.message || '查询失败')
  497. }
  498. }
  499. // 审核通过
  500. const handlePass = async function () {
  501. if (!hasMenuPermission(menuTree.value, permissionMapping.refundHeaderAudit)) {
  502. ElMessage.error('无此权限')
  503. return
  504. }
  505. try {
  506. const params = {
  507. id: auditRow.value.id,
  508. executor: addForm.value.executor,
  509. status: 40,
  510. headFinance: adminData.value.adminName,
  511. auditId: auditRow.value.auditId,
  512. goodsName: auditRow.value.goodsName
  513. }
  514. const result = await API({
  515. url: '/Money/finalReview',
  516. data: params
  517. })
  518. if (result.code === 200) {
  519. ElMessage.success('审核通过')
  520. showAudit2.value = false
  521. getRefund()
  522. }
  523. } catch (error) {
  524. ElMessage.error(error.message || '审核失败')
  525. }
  526. }
  527. // 审核驳回
  528. const handleReject = async function () {
  529. if (!hasMenuPermission(menuTree.value, permissionMapping.refundHeaderAudit)) {
  530. ElMessage.error('无此权限')
  531. return
  532. }
  533. try {
  534. const params = {
  535. id: auditRow.value.id,
  536. status: 32,
  537. rejectReason: addForm.value.remark,
  538. headFinance: adminData.value.adminName,
  539. auditId: auditRow.value.auditId,
  540. orderCode: auditRow.value.orderCode
  541. }
  542. const result = await API({
  543. url: '/Money/finalReview',
  544. data: params
  545. })
  546. if (result.code === 200) {
  547. ElMessage.success('审核驳回')
  548. showAudit2.value = false
  549. getRefund()
  550. addForm.value.remark = ''
  551. showReject.value = false
  552. }
  553. } catch (error) {
  554. ElMessage.error(error.message || '审核失败')
  555. }
  556. }
  557. const getMarket = async function () {
  558. try {
  559. const result = await API({
  560. url: '/market/selectMarket',
  561. })
  562. console.log('看看地区树', result)
  563. const transformTree = (nodes) => {
  564. const allChildren = nodes.flatMap(node => node.children || []);
  565. return allChildren.map(child => {
  566. const grandchildren = child.children && child.children.length
  567. ? transformTree([child])
  568. : null;
  569. return {
  570. value: child.id,
  571. label: child.name,
  572. children: grandchildren
  573. };
  574. });
  575. };
  576. market.value = transformTree(result.data)
  577. console.log('转换后的地区树==============', market.value)
  578. } catch (error) {
  579. console.log('请求失败', error)
  580. }
  581. }
  582. const hideReject = function () {
  583. showReject.value = false
  584. addForm.value.remark = ''
  585. }
  586. const reset = function () {
  587. searchForm.value = {
  588. jwcode: '',
  589. markets: [],
  590. statuses: []
  591. }
  592. dateRange.value = []
  593. getRefund()
  594. }
  595. const showStep = function (row) {
  596. if (!hasMenuPermission(menuTree.value, permissionMapping.refundHeaderProgShow)) {
  597. ElMessage.error('无此权限')
  598. return
  599. }
  600. isReject.value = false
  601. submitterName.value = row.areaServise || ''
  602. areaFinance.value = row.areaFinance || ''
  603. areaCharge.value = row.areaCharge || ''
  604. headFinance.value = row.headFinance || ''
  605. executor.value = row.executorName || ''
  606. currentStep.value = 1
  607. const status = row.status
  608. if (statusStepMap[status]) {
  609. const [step, reject] = statusStepMap[status]
  610. currentStep.value = step
  611. isReject.value = reject
  612. }
  613. console.log('步骤条状态', currentStep.value)
  614. showSteps.value = true
  615. }
  616. const productList = [
  617. {
  618. "value": "金币产品",
  619. "label": "金币产品",
  620. "children": [
  621. {
  622. "value": "金币充值",
  623. "label": "金币充值",
  624. }
  625. ]
  626. },
  627. {
  628. "value": "软件产品",
  629. "label": "软件产品",
  630. "children": [
  631. {
  632. "value": "美股",
  633. "label": "美股",
  634. "children": [
  635. {
  636. "value": "美股软件",
  637. "label": "美股软件"
  638. }
  639. ]
  640. },
  641. {
  642. "value": "港股",
  643. "label": "港股",
  644. "children": [
  645. {
  646. "value": "港股软件",
  647. "label": "港股软件"
  648. }
  649. ]
  650. },
  651. {
  652. "value": "A股",
  653. "label": "A股",
  654. "children": [
  655. {
  656. "value": "A股软件",
  657. "label": "A股软件"
  658. }
  659. ]
  660. },
  661. {
  662. "value": "新加坡股",
  663. "label": "新加坡股",
  664. "children": [
  665. {
  666. "value": "新加坡股软件",
  667. "label": "新加坡股软件"
  668. }
  669. ]
  670. },
  671. {
  672. "value": "马股",
  673. "label": "马股",
  674. "children": [
  675. {
  676. "value": "马股软件",
  677. "label": "马股软件"
  678. }
  679. ]
  680. },
  681. {
  682. "value": "日本股",
  683. "label": "日本股",
  684. "children": [
  685. {
  686. "value": "日本股软件",
  687. "label": "日本股软件"
  688. }
  689. ]
  690. },
  691. {
  692. "value": "泰股",
  693. "label": "泰股",
  694. "children": [
  695. {
  696. "value": "泰股软件",
  697. "label": "泰股软件"
  698. }
  699. ]
  700. },
  701. {
  702. "value": "越南股",
  703. "label": "越南股",
  704. "children": [
  705. {
  706. "value": "越南股软件",
  707. "label": "越南股软件"
  708. }
  709. ]
  710. },
  711. {
  712. "value": "印尼股",
  713. "label": "印尼股",
  714. "children": [
  715. {
  716. "value": "印尼股软件",
  717. "label": "印尼股软件"
  718. }
  719. ]
  720. },
  721. {
  722. "value": "韩国股",
  723. "label": "韩国股",
  724. "children": [
  725. {
  726. "value": "韩国股软件",
  727. "label": "韩国股软件"
  728. }
  729. ]
  730. },
  731. {
  732. "value": "台湾股",
  733. "label": "台湾股",
  734. "children": [
  735. {
  736. "value": "台湾股软件",
  737. "label": "台湾股软件"
  738. }
  739. ]
  740. }
  741. ]
  742. },
  743. ]
  744. const showAudit = function (row) {
  745. auditRow.value = row
  746. showAudit2.value = true
  747. }
  748. const defaultTime = [
  749. new Date(2000, 1, 1, 0, 0, 0),
  750. new Date(2000, 2, 1, 23, 59, 59),
  751. ]
  752. const disabledDate = (time) => {
  753. const limitDate = new Date(2025, 0, 1);
  754. return time.getTime() < limitDate.getTime();
  755. }
  756. onMounted(() => {
  757. console.log('???????????????????', adminData.value)
  758. getRefund()
  759. getMarket()
  760. })
  761. </script>
  762. <style scoped lang="scss">
  763. :deep(.el-table__header-wrapper),
  764. :deep(.el-table__body-wrapper),
  765. :deep(.el-table__cell),
  766. :deep(.el-table__body td) {
  767. background-color: #F3FAFE !important;
  768. }
  769. :deep(.el-table__header th) {
  770. background-color: #F3FAFE !important;
  771. }
  772. .condition {
  773. width: 82vw;
  774. display: flex;
  775. align-items: center;
  776. height: 4vh;
  777. .item1 {
  778. width: 18%;
  779. display: flex;
  780. align-items: center;
  781. margin-bottom: 1vh;
  782. margin-right: 0.5vw;
  783. }
  784. .item2 {
  785. width: 18%;
  786. display: flex;
  787. align-items: center;
  788. margin-right: 0.5vw;
  789. }
  790. }
  791. .audit1 {
  792. height: 47vh;
  793. .audit-item {
  794. display: flex;
  795. align-items: center;
  796. margin-bottom: 1vh;
  797. }
  798. }
  799. .audit2 {
  800. display: flex;
  801. justify-content: center;
  802. .top {
  803. width: 30vw;
  804. height: 17vh;
  805. .top-item {
  806. display: flex;
  807. align-items: center;
  808. margin-bottom: 1vh;
  809. }
  810. }
  811. .smallTitle {
  812. background-color: white;
  813. color: rgb(64, 158, 255);
  814. border-color: rgb(64, 158, 255);
  815. margin-bottom: 0.5vh;
  816. }
  817. .center {
  818. display: flex;
  819. width: 30vw;
  820. height: 35vh;
  821. .dialog-item {
  822. display: flex;
  823. align-items: center;
  824. margin-bottom: 1vh;
  825. }
  826. .center-left {
  827. width: 60%;
  828. height: 35vh;
  829. :deep(.el-upload--picture-card) {
  830. width: 4vw !important;
  831. height: 4vw !important;
  832. padding: 0 !important;
  833. }
  834. .center-item {
  835. display: flex;
  836. align-items: center;
  837. margin-bottom: 1vh;
  838. }
  839. }
  840. .center-right {
  841. height: 35vh;
  842. .right-item {
  843. display: flex;
  844. align-items: center;
  845. margin-bottom: 1vh;
  846. }
  847. }
  848. }
  849. .bottom {
  850. width: 30vw;
  851. height: 12vh;
  852. .bottom-item {
  853. display: flex;
  854. align-items: center;
  855. margin-bottom: 1vh;
  856. }
  857. }
  858. }
  859. .steps {
  860. .steps-content {
  861. padding-top: 15vw;
  862. }
  863. .steps-status {
  864. display: flex;
  865. align-items: center;
  866. justify-content: center;
  867. }
  868. .steps-btn {
  869. height: 15vh;
  870. display: flex;
  871. justify-content: center;
  872. align-items: center;
  873. }
  874. }
  875. </style>