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.

638 lines
23 KiB

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
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
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
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
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
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
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
2 months ago
2 months ago
  1. <!-- 各地负责人 -->
  2. <template>
  3. <el-card style="margin-bottom: 0.5vh;">
  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-input v-model="searchForm.markets" placeholder="请输入所属地区" style="width:9vw;" clearable />
  16. </div>
  17. <div class="item1">
  18. <el-text size="large" style="width:4vw;">产品名称</el-text>
  19. <el-input v-model="searchForm.goodsName" placeholder="请输入产品名称" style="width:9vw;" clearable />
  20. </div>
  21. <div class="item1">
  22. <el-text size="large" style="width:4vw;">订单状态</el-text>
  23. <el-select v-model="searchForm.statuses" style="width:9vw;">
  24. <el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value" />
  25. </el-select>
  26. </div>
  27. </div>
  28. <div class="condition">
  29. <div class="item2">
  30. <el-text size="large" style="width:4vw;">付款币种</el-text>
  31. <el-input v-model="searchForm.payCurrency" placeholder="请输入付款币种" style="width:9vw;" clearable />
  32. </div>
  33. <div class="item2">
  34. <el-text size="large" style="width:4vw;">支付方式</el-text>
  35. <el-input v-model="searchForm.payType" placeholder="请输入支付方式" style="width:9vw;" clearable />
  36. </div>
  37. <div class="item2" style="width: 28.5vw;">
  38. <el-text size="large" style="width:4vw;">付款时间</el-text>
  39. <el-date-picker v-model="dateRange" type="datetimerange" range-separator="" start-placeholder="起始时间"
  40. end-placeholder="结束时间" style="width:22vw;" @change="handleDatePickerChange"
  41. :disabled-date="disabledDate" />
  42. </div>
  43. <div>
  44. <el-button type="primary" @click="getRefund">查询</el-button>
  45. <el-button type="success" @click="reset">重置</el-button>
  46. <el-button type="warning">导出excel</el-button>
  47. <el-button type="primary">查看导出列表</el-button>
  48. </div>
  49. </div>
  50. </el-card>
  51. <el-card style="margin-top: 0.5vh;">
  52. <el-table :data="tableData" style="height:64vh;width:82vw">
  53. <el-table-column type="index" label="序号" width="60" fixed="left" />
  54. <el-table-column prop="name" label="Homily ID" width="120" fixed="left" />
  55. <el-table-column prop="jwcode" label="姓名" width="120" fixed="left" show-overflow-tooltip />
  56. <el-table-column prop="marketName" label="所属地区" width="120" />
  57. <el-table-column prop="goodsName" label="产品名称" width="120" />
  58. <el-table-column prop="goodNum" label="产品数量" width="120" />
  59. <el-table-column prop="refundType" label="退款方式" width="120">
  60. <template #default="scope">
  61. {{ scope.row.refundType === 1 ? '部分退款' : '全部退款' }}
  62. </template>
  63. </el-table-column>
  64. <el-table-column prop="submitterName" label="提交人" width="120" />
  65. <el-table-column prop="refundReason" label="退款理由" width="120" />
  66. <el-table-column prop="remark" label="备注" width="150" show-overflow-tooltip />
  67. <el-table-column prop="status" label="订单状态" width="120">
  68. <template #default="scope">
  69. {{
  70. [30, 40].includes(scope.row.status) ? '审核中' :
  71. scope.row.status === 32 ? '审核驳回' :
  72. scope.row.status === 41 ? '退款完成' : scope.row.status
  73. }}
  74. </template>
  75. </el-table-column>
  76. <el-table-column prop="operation" label="操作" fixed="right" width="100px">
  77. <template #default="scope">
  78. <div class="operation">
  79. <el-button v-if="scope.row.status === 30" type="primary" text @click="showAudit(scope.row)">
  80. 审核
  81. </el-button>
  82. <el-button v-else type="primary" text @click="showSteps = true">
  83. 查看进度
  84. </el-button>
  85. </div>
  86. </template>
  87. </el-table-column>
  88. </el-table>
  89. <el-pagination v-model:current-page="pagination.pageNum" v-model:page-size="pagination.pageSize"
  90. layout="total, sizes, prev, pager, next, jumper" :total="pagination.total"
  91. @size-change="handlePageSizeChange" @current-change="handleCurrentChange"
  92. style="margin-top: 1vh;"></el-pagination>
  93. </el-card>
  94. <el-dialog v-model="showAudit2" title="审核" class="audit2" width="35vw" overflow draggable>
  95. <div class="top">
  96. <el-button @click="" class="smallTitle" size="small">退款申请信息</el-button>
  97. <div class="top-item">
  98. <el-text style="width:4vw;" size="small">退款类型</el-text>
  99. <el-input v-model="auditRow.refundModel" placeholder="请输入退款类型" size="small" style="width:10vw;"
  100. clearable></el-input>
  101. </div>
  102. <div class="top-item">
  103. <el-text style="width:4vw;" size="small">退款金额</el-text>
  104. <el-input v-model="auditRow.paymentAmount" placeholder="请输入退款金额" size="small" style="width:10vw;"
  105. clearable></el-input>
  106. </div>
  107. <div class="top-item">
  108. <el-text style="width:4vw;" size="small">退款备注</el-text>
  109. <el-input v-model="auditRow.refundReason" placeholder="请输入退款备注" size="small" style="width:10vw;"
  110. :rows="3" maxlength="100" show-word-limit type="textarea" />
  111. </div>
  112. </div>
  113. <el-button @click="" class="smallTitle" size="small">原订单信息</el-button>
  114. <div class="center">
  115. <div class="center-left">
  116. <div class="center-item">
  117. <el-text style="width:4vw;" size="small">精网号</el-text>
  118. <el-input v-model="auditRow.jwcode" size="small" style="width:10vw;" disabled />
  119. </div>
  120. <div class="center-item">
  121. <el-text style="width:4vw;" size="small">所属地区</el-text>
  122. <el-input v-model="auditRow.marketName" size="small" style="width:10vw;" disabled />
  123. </div>
  124. <div class="center-item">
  125. <el-text style="width:4vw;" size="small">产品名称</el-text>
  126. <el-input v-model="auditRow.goodsName" size="small" style="width:10vw;" disabled />
  127. </div>
  128. <div class="center-item">
  129. <el-text style="width:4vw;" size="small">付款金额</el-text>
  130. <el-input v-model="auditRow.paymentAmount" size="small" style="width:10vw;" disabled />
  131. </div>
  132. <div class="center-item">
  133. <el-text style="width:4vw;" size="small">到账金额</el-text>
  134. <el-input v-model="auditRow.receivedAmount" size="small" style="width:10vw;" disabled />
  135. </div>
  136. <div class="center-item">
  137. <el-text style="width:4vw;" size="small">支付方式</el-text>
  138. <el-input v-model="auditRow.payType" size="small" style="width:10vw;" disabled />
  139. </div>
  140. <div class="center-item">
  141. <el-text style="width:4vw;">转账凭证</el-text>
  142. <img v-if="auditRow.voucher" :src="auditRow.voucher" style="width: 100%; height: 100%; object-fit: cover;">
  143. <div v-else>
  144. 无转账凭证
  145. </div>
  146. </div>
  147. </div>
  148. <div class="center-right">
  149. <div class="right-item">
  150. <el-text style="width:4vw;" size="small">客户姓名</el-text>
  151. <el-input v-model="auditRow.name" size="small" style="width:10vw;" disabled />
  152. </div>
  153. <div class="right-item">
  154. <el-text style="width:4vw;" size="small">活动名称</el-text>
  155. <el-input v-model="auditRow.activity" size="small" style="width:10vw;" disabled />
  156. </div>
  157. <div class="right-item">
  158. <el-text style="width:4vw;" size="small">付款币种</el-text>
  159. <el-input v-model="auditRow.paymentCurrency" size="small" style="width:10vw;" disabled />
  160. </div>
  161. <div class="right-item">
  162. <el-text style="width:4vw;" size="small">到账币种</el-text>
  163. <el-input v-model="auditRow.receivedCurrency" size="small" style="width:10vw;" disabled />
  164. </div>
  165. <div class="right-item">
  166. <el-text style="width:4vw;" size="small">手续费</el-text>
  167. <el-input v-model="auditRow.handlingCharge" size="small" style="width:10vw;" disabled />
  168. </div>
  169. <div class="right-item">
  170. <el-text style="width:4vw;" size="small">付款时间</el-text>
  171. <el-input v-model="auditRow.payTime" size="small" style="width:10vw;" disabled />
  172. </div>
  173. <div class="right-item">
  174. <el-text style="width:4vw;" size="small">提交人</el-text>
  175. <el-input v-model="auditRow.submitterName" size="small" style="width:10vw;" disabled />
  176. </div>
  177. <div class="right-item">
  178. <el-text style="width:4vw;" size="small">到账时间</el-text>
  179. <el-input v-model="auditRow.receiveTime" size="small" style="width:10vw;" disabled />
  180. </div>
  181. <div class="right-item">
  182. <el-text style="width:4vw;" size="small">备注</el-text>
  183. <el-input v-model="auditRow.remark" size="small" style="width:10vw;" :row="3" maxlength="100"
  184. type="textarea" show-word-limit disabled />
  185. </div>
  186. </div>
  187. </div>
  188. <div class="bottom">
  189. <el-button class="smallTitle" size="small" v-show="showReject">驳回信息</el-button>
  190. <div class="bottom-item" v-show="showReject">
  191. <el-text style="width:4vw;" size="small">驳回备注</el-text>
  192. <el-input v-model="addForm.remark" placeholder="请输入驳回备注" size="small" style="width:10vw;" :row="3"
  193. maxlength="100" type="textarea" show-word-limit clearable />
  194. </div>
  195. <div class="bottom-item" v-show="showExecutor">
  196. <el-text style="width:4vw;" size="small">执行人</el-text>
  197. <el-select v-model="addForm.executor" style="width:9vw;">
  198. <el-option v-for="item in executorList" :key="item.value" :label="item.label" :value="item.value" />
  199. </el-select>
  200. </div>
  201. <div style="text-align: center;" v-show="!showReject && !showExecutor">
  202. <el-button type="default" @click="showReject = true">驳回</el-button>
  203. <el-button type="primary" @click="showExecutor = true">通过</el-button>
  204. </div>
  205. <div style="text-align: center;" v-show="showReject">
  206. <el-button type="default" @click="hideReject">取消</el-button>
  207. <el-button type="primary" @click="handleReject">确定</el-button>
  208. </div>
  209. <div style="text-align: center;" v-show="showExecutor">
  210. <el-button type="default" @click="hideExecutor">取消</el-button>
  211. <el-button type="primary" @click="handlePass">确定</el-button>
  212. </div>
  213. </div>
  214. </el-dialog>
  215. <el-dialog v-model="showSteps" title="唉!!!" overflow draggable width="1206px" height="506px" :style="{
  216. backgroundImage: 'url(/src/assets/images/背景图.png)',
  217. backgroundSize: 'cover',
  218. backgroundPosition: 'center'
  219. }">
  220. <div class="steps">
  221. <div class="steps-content">
  222. <el-steps style="min-width: 60vw" :active="1" align-center>
  223. <el-step> <template #title>
  224. <div>提交人<br>你是死的</div>
  225. </template>
  226. <template #icon>
  227. <img src="@/assets/images/已审核.png" alt="已审核图标">
  228. </template>
  229. </el-step>
  230. <el-step title="地区财务">
  231. <template #icon>
  232. <img src="@/assets/images/待审核.png" alt="待审核图标">
  233. </template>
  234. </el-step>
  235. <el-step title="地区负责人">
  236. <template #icon>
  237. <img src="@/assets/images/还没传到.png" alt="还没传到图标">
  238. </template>
  239. </el-step>
  240. <el-step title="总部财务">
  241. <template #icon>
  242. <img src="@/assets/images/还没传到.png" alt="还没传到图标">
  243. </template>
  244. </el-step>
  245. <el-step title="指定执行人">
  246. <template #icon>
  247. <img src="@/assets/images/还没传到.png" alt="还没传到图标">
  248. </template>
  249. </el-step>
  250. </el-steps>
  251. </div>
  252. <div class="steps-status">
  253. <el-steps style="min-width: 50vw" :active="1" finish-status="success" simple>
  254. <el-step title="已通过" />
  255. <el-step title="待审核" />
  256. <el-step title="待审核" />
  257. <el-step title="待审核" />
  258. <el-step title="待审核" />
  259. </el-steps>
  260. </div>
  261. <div class="steps-btn">
  262. <el-button type="primary">确定</el-button>
  263. </div>
  264. </div>
  265. </el-dialog>
  266. </template>
  267. <script setup>
  268. import { ref, onMounted } from 'vue'
  269. import { ElMessage } from 'element-plus'
  270. import API from '@/util/http.js'
  271. const uploadUrl = 'https://api.homilychart.com/hljw/api/aws/upload'
  272. import { useAdminStore } from "@/store/index.js"
  273. import { storeToRefs } from "pinia"
  274. import dayjs from 'dayjs'
  275. const adminStore = useAdminStore()
  276. const { adminData, menuTree } = storeToRefs(adminStore)
  277. import { permissionMapping, findMenuById } from "@/utils/menuTreePermission.js"
  278. const searchForm = ref({
  279. jwcode: '',
  280. markets: [],
  281. statuses: []
  282. })
  283. const addForm = ref({
  284. remark: ''
  285. })
  286. const showReject = ref(false)
  287. const showExecutor = ref(false)
  288. const auditRow = ref({})// 审核回显
  289. const dateRange = ref([])
  290. const pagination = ref({
  291. pageNum: 1,
  292. pageSize: 50,
  293. total: 0
  294. })
  295. const showAudit2 = ref(false)
  296. const tableData = ref([])
  297. const showSteps = ref(false)
  298. const uploadRef = ref(null)
  299. const payments = ref([{
  300. value: '银行转账',
  301. label: '银行转账'
  302. },
  303. {
  304. value: '现金',
  305. label: '现金'
  306. },
  307. {
  308. value: '支票',
  309. label: '支票'
  310. },
  311. {
  312. value: '刷卡',
  313. label: '刷卡'
  314. },
  315. {
  316. value: 'Grabpay',
  317. label: 'Grabpay'
  318. },
  319. {
  320. value: 'Nets',
  321. label: 'Nets'
  322. },
  323. {
  324. value: 'PayPal',
  325. label: 'PayPal'
  326. },
  327. {
  328. value: 'Stripe-链接收款',
  329. label: 'Stripe-链接收款'
  330. },
  331. {
  332. value: 'Ipay88-链接收款',
  333. label: 'Ipay88-链接收款'
  334. },
  335. {
  336. value: 'PaymentAsia-链接收款',
  337. label: 'PaymentAsia-链接收款'
  338. },
  339. {
  340. value: 'Stripe-Link平台',
  341. label: 'Stripe-Link平台'
  342. },
  343. {
  344. value: 'PaymentAsia-Link平台',
  345. label: 'PaymentAsia-Link平台'
  346. },
  347. {
  348. value: 'FirstData-Link平台-Link平台',
  349. label: 'FirstData-Link平台-Link平台'
  350. },
  351. {
  352. value: 'IOS-Link平台',
  353. label: 'IOS-Link平台'
  354. },
  355. {
  356. value: 'Ipay88-Link平台',
  357. label: 'Ipay88-Link平台'
  358. }
  359. ])
  360. const statusList = ref([
  361. { value: 30, label: '待审核' },
  362. { value: 40, label: '审核通过' },
  363. { value: 32, label: '审核驳回' },
  364. { value: 41, label: '退款完成' }
  365. ])
  366. const executorList = ref([
  367. {
  368. value: '305485',
  369. label: '新:Zoe'
  370. },
  371. {
  372. value: '200723',
  373. label: '马:Jennifer'
  374. },
  375. {
  376. value: '301388',
  377. label: '港:林育平'
  378. },
  379. {
  380. value: '839448',
  381. label: '加:Mandy'
  382. },
  383. {
  384. value: '304904',
  385. label: '泰:杨丽娇'
  386. },
  387. {
  388. value: '315915',
  389. label: '越:范秋霞'
  390. },
  391. {
  392. value: '90047681',
  393. label: '李慧琳演示机'
  394. },
  395. {
  396. value: '90047947',
  397. label: '宋彤彤'
  398. }
  399. ])
  400. // 查全部
  401. const getRefund = async function () {
  402. try {
  403. searchForm.value.statuses = [30, 32, 40, 41] // 默认:看不到进度没到这里的
  404. const params = {
  405. pageNum: pagination.value.pageNum,
  406. pageSize: pagination.value.pageSize,
  407. cashRecordDone: {
  408. jwcode: searchForm.value.jwcode,
  409. name: searchForm.value.name,
  410. markets: searchForm.value.markets,
  411. goodsName: searchForm.value.goodsName,
  412. statuses: searchForm.value.statuses,//10:地区财务待审核;12:地区财务驳回;
  413. // 20:地区负责人待审核;22:地区负责人驳回;
  414. // 30:总部财务待审核;32:总部财务驳回;
  415. // 40:执行人待处理;41:执行人已处理,退款完成;
  416. paymentCurrency: searchForm.value.paymentCurrency,
  417. payType: searchForm.value.payType,
  418. startTime: dateRange.value && dateRange.value[0] ? moment(dateRange.value[0]).format('YYYY-MM-DD HH:mm:ss') : "",
  419. endtime: dateRange.value && dateRange.value[1] ? moment(dateRange.value[1]).format('YYYY-MM-DD HH:mm:ss') : "",
  420. adminId: adminData.value.id
  421. }
  422. }
  423. const result = await API({
  424. url: '/Money/select',
  425. method: 'POST',
  426. data: params
  427. })
  428. tableData.value = result.data.list || []
  429. } catch (error) {
  430. ElMessage.error(error.message || '查询失败')
  431. }
  432. }
  433. // 审核通过
  434. const handlePass = async function () {
  435. try {
  436. const params = {
  437. id: auditRow.value.id,
  438. executor: addForm.value.executor,
  439. status: 40,
  440. adminId: adminData.value.id
  441. }
  442. const result = await API({
  443. url: '/Money/review',
  444. data: params
  445. })
  446. if (result.code === 200) {
  447. ElMessage.success('审核通过')
  448. showAudit2.value = false
  449. getRefund()
  450. }
  451. } catch (error) {
  452. ElMessage.error(error.message || '审核失败')
  453. }
  454. }
  455. // 审核驳回
  456. const handleReject = async function () {
  457. try {
  458. const params = {
  459. id: auditRow.value.id,
  460. status: 32,
  461. rejectReason: addForm.value.remark,
  462. adminId: adminData.value.id
  463. }
  464. const result = await API({
  465. url: '/Money/review',
  466. data: params
  467. })
  468. if (result.code === 200) {
  469. ElMessage.success('审核驳回')
  470. showAudit2.value = false
  471. getRefund()
  472. }
  473. } catch (error) {
  474. ElMessage.error(error.message || '审核失败')
  475. }
  476. }
  477. const hideReject = function () {
  478. showReject.value = false
  479. addForm.value.remark = ''
  480. }
  481. const reset = function () {
  482. searchForm.value = {
  483. jwcode: ''
  484. }
  485. dateRange.value = []
  486. getRefund()
  487. }
  488. const showAudit = function (row) {
  489. auditRow.value = row
  490. showAudit2.value = true
  491. }
  492. onMounted(() => {
  493. console.log('???????????????????', adminData.value)
  494. getRefund()
  495. })
  496. </script>
  497. <style scoped lang="scss">
  498. .condition {
  499. width: 82vw;
  500. display: flex;
  501. align-items: center;
  502. height: 4vh;
  503. .item1 {
  504. width: 18%;
  505. display: flex;
  506. align-items: center;
  507. margin-bottom: 1vh;
  508. margin-right: 0.5vw;
  509. }
  510. .item2 {
  511. width: 18%;
  512. display: flex;
  513. align-items: center;
  514. margin-right: 0.5vw;
  515. }
  516. }
  517. .audit1 {
  518. height: 47vh;
  519. .audit-item {
  520. display: flex;
  521. align-items: center;
  522. margin-bottom: 1vh;
  523. }
  524. }
  525. .audit2 {
  526. display: flex;
  527. justify-content: center;
  528. .top {
  529. width: 30vw;
  530. height: 17vh;
  531. .top-item {
  532. display: flex;
  533. align-items: center;
  534. margin-bottom: 1vh;
  535. }
  536. }
  537. .smallTitle {
  538. background-color: white;
  539. color: rgb(64, 158, 255);
  540. border-color: rgb(64, 158, 255);
  541. margin-bottom: 0.5vh;
  542. }
  543. .center {
  544. display: flex;
  545. width: 30vw;
  546. height: 35vh;
  547. .dialog-item {
  548. display: flex;
  549. align-items: center;
  550. margin-bottom: 1vh;
  551. }
  552. .center-left {
  553. width: 60%;
  554. height: 35vh;
  555. .image {
  556. width: 4vw !important;
  557. height: 4vw !important;
  558. }
  559. :deep(.el-upload--picture-card) {
  560. width: 4vw !important;
  561. height: 4vw !important;
  562. padding: 0 !important;
  563. }
  564. .center-item {
  565. display: flex;
  566. align-items: center;
  567. margin-bottom: 1vh;
  568. }
  569. }
  570. .center-right {
  571. height: 35vh;
  572. .right-item {
  573. display: flex;
  574. align-items: center;
  575. margin-bottom: 1vh;
  576. }
  577. }
  578. }
  579. .bottom {
  580. width: 30vw;
  581. height: 7vh;
  582. .bottom-item {
  583. display: flex;
  584. align-items: center;
  585. margin-bottom: 1vh;
  586. }
  587. }
  588. }
  589. .steps {
  590. .steps-content {
  591. width: 45vw;
  592. height: 15vh;
  593. display: flex;
  594. justify-content: center;
  595. padding-top: 15vw;
  596. padding-left: 8vw;
  597. }
  598. .steps-status {
  599. display: flex;
  600. align-items: center;
  601. justify-content: center;
  602. }
  603. .steps-btn {
  604. height: 15vh;
  605. display: flex;
  606. justify-content: center;
  607. align-items: center;
  608. }
  609. }
  610. </style>