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.

628 lines
24 KiB

2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
4 months ago
2 months ago
2 months ago
3 months ago
4 months ago
4 months ago
4 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
2 months ago
3 months ago
3 months ago
2 months ago
2 months ago
2 months ago
4 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
  1. <template>
  2. <el-card style="margin-bottom: 0.5vh;background-color: rgb(243,250,254);">
  3. <div class="condition1">
  4. <div class="search">
  5. <el-text size="large" style="width:4vw;">{{ t('common.name') }}</el-text>
  6. <el-input v-model="searchForm.name" :placeholder="t('common.pleaseInputName')" style="width:9vw;" clearable />
  7. </div>
  8. <div class="search">
  9. <el-text size="large" style="width:4vw;">{{ t('common.jwcode') }}</el-text>
  10. <el-input v-model="searchForm.jwcode" :placeholder="t('common.jwcodePlaceholder')" style="width:9vw;" clearable />
  11. </div>
  12. <div class="search">
  13. <el-text size="large" style="width:4vw;">{{ t('common.productName') }}</el-text>
  14. <el-cascader v-model="searchForm.goodsName" :options="productList" style="width: 10vw;" clearable />
  15. </div>
  16. <div class="search" v-if="adminData.markets === t('common.markets.headquarter')">
  17. <el-text size="large" style="width:4vw;">{{ t('common.market') }}</el-text>
  18. <el-cascader style="width: 9vw;" v-model="searchForm.markets" :options="market" :placeholder="t('common.marketPlaceholder')"
  19. clearable />
  20. </div>
  21. <div class="search">
  22. <el-text size="large" style="width:4vw;">{{ t('common.refundCurrency') }}</el-text>
  23. <el-select v-model="searchForm.refundCurrency" style="width:9vw;" clearable>
  24. <el-option v-for="item in currencies" :key="item" :label="item" :value="item" />
  25. </el-select>
  26. </div>
  27. </div>
  28. <div class="condition1">
  29. <div class="search2">
  30. <el-text size="large" style="width:4vw;">{{ t('common.refundMethod') }}</el-text>
  31. <el-select v-model="searchForm.refundChannels" style="width:9vw;" clearable>
  32. <el-option v-for="item in channelOptions" :key="item" :label="item" :value="item" />
  33. </el-select>
  34. </div>
  35. <div class="search2">
  36. <el-text size="large" style="width:4vw;">{{ t('common.orderStatus') }}</el-text>
  37. <el-select v-model="searchForm.statuses" style="width:9vw;" clearable>
  38. <el-option v-for="item in statusList" :label="item" :value="item" :key="item" />
  39. </el-select>
  40. </div>
  41. <div class="search2" style="width: 25.5vw;">
  42. <el-text size="large" style="width:4vw;">{{ t('common.refundTime') }}</el-text>
  43. <el-date-picker v-model="dateRange" type="datetimerange" :range-separator="t('common.to')"
  44. :start-placeholder="t('common.startTime')"
  45. :end-placeholder="t('common.endTime')" style="width:18vw;" clearable :disabled-date="disabledDate"
  46. :default-time="defaultTime" />
  47. </div>
  48. <div>
  49. <el-button type="primary" size="medium" @click="getRefund">{{ t('common.search') }}</el-button>
  50. <el-button type="success" size="medium" @click="reset">{{ t('common.reset') }}</el-button>
  51. </div>
  52. </div>
  53. </el-card>
  54. <el-card style="background-color: rgb(231,244,253);height:80vh;">
  55. <el-table :data="tableData" style="height:70vh;width:82vw;">
  56. <el-table-column type="index" :label="t('common_list.id')" width="60" fixed="left">
  57. <template #default="scope">
  58. {{ scope.$index + 1 + (pagination.pageNum - 1) * pagination.pageSize }}
  59. </template>
  60. </el-table-column>
  61. <el-table-column prop="jwcode" label="Homily ID" width="120" fixed="left" />
  62. <el-table-column prop="name" :label="t('common_list.name')" width="120" fixed="left" show-overflow-tooltip />
  63. <el-table-column prop="marketName" :label="t('common_list.market')" width="120" />
  64. <el-table-column prop="goodsName" :label="t('common_list.productName')" width="120" />
  65. <el-table-column prop="goodsNum" :label="t('common_list.productNum')" width="120" />
  66. <el-table-column prop="refundModel" :label="t('common_list.refundModel')" width="140">
  67. <template #default="scope">
  68. {{ scope.row.refundModel === 1 ? t('common_list.refundModelPart') : t('common_list.refundModelAll') }}
  69. </template>
  70. </el-table-column>
  71. <el-table-column prop="refundCurrency" :label="t('common_list.refundCurrency')" width="120">
  72. <template #default="scope">
  73. <div v-if="!scope.row.refundCurrency">
  74. <text style="color: #FA5A1E;">{{ t('common_list.toSupply') }}</text>
  75. </div>
  76. </template>
  77. </el-table-column>
  78. <el-table-column prop="refundAmount" :label="t('common_list.refundAmount')" width="120">
  79. <template #default="scope">
  80. <div v-if="!scope.row.refundAmount">
  81. <text style="color: #FA5A1E;">{{ t('common_list.toSupply') }}</text>
  82. </div>
  83. </template>
  84. </el-table-column>
  85. <el-table-column prop="refundChannels" :label="t('common_list.refundChannels')" width="120">
  86. <template #default="scope">
  87. <div v-if="!scope.row.refundChannels">
  88. <text style="color: #FA5A1E;">{{ t('common_list.toSupply') }}</text>
  89. </div>
  90. </template>
  91. </el-table-column>
  92. <el-table-column prop="refundVoucher" :label="t('common_list.refundVoucher')" width="120">
  93. <template #default="scope">
  94. <el-image v-if="scope.row.refundVoucher" :src="scope.row.refundVoucher"
  95. @click="previewImage(scope.row.refundVoucher)"
  96. style="width: 40px; height: 40px; cursor: pointer;z-index: 99999;" fit="cover" />
  97. <span v-else style="color: #FA5A1E;">{{ t('common_list.toSupply') }}</span>
  98. </template>
  99. </el-table-column>
  100. <el-table-column prop="refundTime" :label="t('common_list.refundTime')" width="180">
  101. <template #default="scope">
  102. <div v-if="!scope.row.refundTime">
  103. <text style="color: #FA5A1E;">{{ t('common_list.toSupply') }}</text>
  104. </div>
  105. </template>
  106. </el-table-column>
  107. <el-table-column prop="status" :label="t('common_list.orderStatus')" width="120">
  108. <template #default="scope">
  109. {{ scope.row.status === 41 ? t('common_list.refundSuccess') : t('common_list.pending') }}
  110. </template>
  111. </el-table-column>
  112. <el-table-column prop="operation" :label="t('common_list.operation')" fixed="right" width="100px">
  113. <template #default="scope">
  114. <div class="operation">
  115. <el-button v-if="scope.row.status === 40" type="primary" text @click="showEditDialog(scope.row)">
  116. {{ t('common.submit') }}
  117. </el-button>
  118. <el-button v-else type="primary" text @click="showEditDialog(scope.row)">
  119. {{ t('common.edit') }}
  120. </el-button>
  121. </div>
  122. </template>
  123. </el-table-column>
  124. </el-table>
  125. <el-pagination v-model:current-page="pagination.pageNum" v-model:page-size="pagination.pageSize"
  126. @size-change="handlePageSizeChange" @current-change="handleCurrentChange"
  127. layout="total, sizes, prev, pager, next, jumper" :total="pagination.total" style="margin-top: 1vh;" />
  128. </el-card>
  129. <el-dialog v-model="showEdit" class="edit" overflow draggable
  130. style="width: 40vw; background-color: #F3FAFE !important;">
  131. <div style="display: flex;">
  132. <div class="left">
  133. <div class="dialog-item">
  134. <el-text style="width:4vw;">{{ t('common_add.jwcode') }}</el-text>
  135. <el-input v-model="editRow.jwcode" style="width:10vw;" disabled />
  136. </div>
  137. <div class="dialog-item">
  138. <el-text style="width:4vw;">{{ t('common_add.customerName') }}</el-text>
  139. <el-input v-model="editRow.name" style="width:10vw;" disabled />
  140. </div>
  141. <div class="dialog-item">
  142. <el-text style="width:4vw;">{{ t('common_add.market') }}</el-text>
  143. <el-input v-model="editRow.marketName" style="width:10vw;" disabled />
  144. </div>
  145. <div class="dialog-item">
  146. <el-text style="width:4vw;">{{ t('common_add.productName') }}</el-text>
  147. <el-input v-model="editRow.goodsName" style="width:10vw;" disabled />
  148. </div>
  149. <div class="dialog-item">
  150. <el-text style="width:4vw;">{{ t('common_add.refundModel') }}</el-text>
  151. <el-select v-model="editRow.refundModel" style="width:10vw;" disabled>
  152. <el-option :label="t('common_add.refundModelAll')" :value="0"></el-option>
  153. <el-option :label="t('common_add.refundModelPart')" :value="1"></el-option>
  154. </el-select>
  155. </div>
  156. <div class="dialog-item">
  157. <el-text style="width:4vw;">{{ t('common_add.payCurrency') }}</el-text>
  158. <el-input v-model="editRow.paymentCurrency" style="width:10vw;" disabled />
  159. </div>
  160. <div class="dialog-item">
  161. <el-text style="width:4vw;">{{ t('common_add.payAmount') }}</el-text>
  162. <el-input v-model="editRow.paymentAmount" style="width:10vw;" disabled />
  163. </div>
  164. <div class="dialog-item">
  165. <el-text style="width:4vw;">{{ t('common_add.payMethod') }}</el-text>
  166. <el-input v-model="editRow.payType" style="width:10vw;" disabled />
  167. </div>
  168. <div class="dialog-item">
  169. <el-text style="width:4vw;">{{ t('common_add.payTime') }}</el-text>
  170. <el-input v-model="editRow.payTime" style="width:10vw;" disabled />
  171. </div>
  172. <div class="dialog-item">
  173. <el-text style="width:4vw;">{{ t('common_add.submitter') }}</el-text>
  174. <el-input v-model="editRow.submitter" style="width:10vw;" disabled />
  175. </div>
  176. <div class="dialog-item">
  177. <el-text style="width:4vw;">{{ t('common_add.transferVoucher') }}</el-text>
  178. <img v-if="editRow.payVoucher" :src="editRow.payVoucher"
  179. style="width: 80px; height: 80px; object-fit: cover;">
  180. <div v-else>
  181. {{ t('common_add.noTransferVoucher') }}
  182. </div>
  183. </div>
  184. <div class="dialog-item">
  185. <el-text style="width:4vw;">{{ t('common_add.remark') }}</el-text>
  186. <el-input v-model="editRow.payRemark" style="width:10vw;" :row="3" disabled maxlength="100" type="textarea"
  187. show-word-limit clearable />
  188. </div>
  189. </div>
  190. <div class="right">
  191. <div class="dialog-item">
  192. <el-text style="width:4vw;">{{ t('common_add.refundCurrency') }}</el-text>
  193. <el-select v-model="editForm.refundCurrency" :placeholder="t('common_add.refundCurrencyPlaceholder')" style="width:10vw;">
  194. <el-option v-for="item in currencies" :key="item" :label="item" :value="item" />
  195. </el-select>
  196. </div>
  197. <div class="dialog-item">
  198. <el-text style="width:4vw;">{{ t('common_add.refundAmount') }}</el-text>
  199. <el-input v-model="editForm.refundAmount" :placeholder="t('common_add.refundAmountPlaceholder')" style="width:10vw;" clearable />
  200. </div>
  201. <div class="dialog-item">
  202. <el-text style="width:4vw;">{{ t('common_add.refundChannels') }}</el-text>
  203. <el-select v-model="editForm.refundChannels" :placeholder="t('common_add.refundChannelsPlaceholder')" style="width:10vw;">
  204. <el-option v-for="item in channelOptions" :key="item" :label="item" :value="item" />
  205. </el-select>
  206. </div>
  207. <div class="dialog-item">
  208. <el-text style="width:4vw;">{{ t('common_add.refundTime') }}</el-text>
  209. <el-date-picker v-model="editForm.refundTime" type="datetime" :placeholder="t('common_add.refundTimePlaceholder')" style="width:10vw;"
  210. clearable />
  211. </div>
  212. <div class="dialog-item">
  213. <el-text style="width:4vw;">{{ t('common_add.refundVoucher') }}</el-text>
  214. <el-upload ref="uploadRef" :http-request="customUpload" list-type="picture-card" :auto-upload="false"
  215. :on-change="handleImageChange" :before-upload="beforeUpload" :show-file-list="false">
  216. <template #default>
  217. <img v-if="editForm.imageUrl" :src="editForm.imageUrl"
  218. style="width: 80px; height: 80px; object-fit: cover;">
  219. <el-icon v-else>
  220. <Plus />
  221. </el-icon>
  222. </template>
  223. </el-upload>
  224. </div>
  225. <div class="dialog-item">
  226. <el-text style="width:4vw;">{{ t('common_add.remark') }}</el-text>
  227. <el-input v-model="editForm.refundRemark" :placeholder="t('common_add.remarkPlaceholder')" style="width:10vw;" :rows="3" maxlength="100"
  228. show-word-limit type="textarea" clearable />
  229. </div>
  230. <div style="display:flex;justify-content: center;margin-top: 5vh;">
  231. <el-button type="default" @click="hideEditDialog" style="margin-right: 2vw;">{{ t('common.cancel') }}</el-button>
  232. <el-button type="primary" @click="submitRefund">{{ t('common.submit') }}</el-button>
  233. </div>
  234. </div>
  235. </div>
  236. </el-dialog>
  237. </template>
  238. <script setup>
  239. import { ref, onMounted } from 'vue'
  240. import { ElMessage } from 'element-plus'
  241. import API from '@/util/http.js'
  242. import dayjs from 'dayjs'
  243. import { useAdminStore } from "@/store/index.js"
  244. import { storeToRefs } from "pinia"
  245. import { Delete, Download, Plus, ZoomIn } from '@element-plus/icons-vue'
  246. import { productList, CurrencyForId } from '@/views/moneyManage/receiveDetail/utils/staticData.js'
  247. const adminStore = useAdminStore()
  248. const { adminData, menuTree } = storeToRefs(adminStore)
  249. import { permissionMapping, findMenuById } from "@/utils/menuTreePermission.js"
  250. import moment from 'moment'
  251. import { isNumber } from 'lodash'
  252. // 国际化
  253. import { useI18n } from 'vue-i18n'
  254. const { t } = useI18n()
  255. const uploadUrl = 'https://api.homilychart.com/hljw/api/aws/upload'
  256. const dateRange = ref([])
  257. const tableData = ref([])
  258. const editRow = ref({})// 编辑回显
  259. const statusList = ref([t('cash.pending'), t('cash.refundSuccess')])
  260. const pagination = ref({
  261. pageNum: 1,
  262. pageSize: 50,
  263. total: 0
  264. })
  265. const market = ref([])
  266. const uploadRef = ref(null)
  267. const searchForm = ref({
  268. jwcode: '',
  269. markets: []
  270. })
  271. const showEdit = ref(false)
  272. const editForm = ref({
  273. jwcode: ''
  274. })
  275. // 查全部
  276. const getRefund = async function () {
  277. try {
  278. const statusesParam = [40, 41] // 默认:看不到进度没到这里的
  279. if (searchForm.value.statuses === '待处理') {
  280. statusesParam.value = [40]
  281. } else if (searchForm.value.statuses === '退款成功') {
  282. statusesParam.value = [41]
  283. } else {
  284. statusesParam.value = [40, 41]
  285. }
  286. const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0
  287. ? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : ''
  288. if (searchForm.value.jwcode) {
  289. const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode);
  290. if (!isPositiveInteger) {
  291. ElMessage.error(t('elmessage.checkJwcodeFormat'))
  292. return;
  293. }
  294. }
  295. // 增加精网号长度限制,防止后端400错误
  296. if (searchForm.value.jwcode.length > 8) {
  297. ElMessage.error(t('elmessage.limitJwcodeLength'))
  298. return;
  299. }
  300. const params = {
  301. pageNum: pagination.value.pageNum,
  302. pageSize: pagination.value.pageSize,
  303. cashRecordDTO: {
  304. jwcode: searchForm.value.jwcode,
  305. name: searchForm.value.name,
  306. markets: searchForm.value.markets && searchForm.value.markets.length > 0 ? [searchForm.value.markets[searchForm.value.markets.length - 1]] : [],
  307. goodsName: goodsName,
  308. statuses: statusesParam.value,//10:地区财务待审核;12:地区财务驳回;
  309. // 20:地区负责人待审核;22:地区负责人驳回;
  310. // 30:总部财务待审核;32:总部财务驳回;
  311. // 40:执行人待处理;41:执行人已处理,退款完成;
  312. paymentCurrency: CurrencyForId(searchForm.value.paymentCurrency),
  313. refundCurrency: searchForm.value.refundCurrency,
  314. sTime: dateRange.value && dateRange.value[0] ? dayjs(dateRange.value[0]).format('YYYY-MM-DD HH:mm:ss') : "",
  315. eTime: dateRange.value && dateRange.value[1] ? dayjs(dateRange.value[1]).format('YYYY-MM-DD HH:mm:ss') : "",
  316. adminId: adminData.value.id,
  317. executor: adminData.value.account,
  318. refundChannels: searchForm.value.refundChannels
  319. }
  320. }
  321. const result = await API({
  322. url: '/Money/exSelect',
  323. method: 'POST',
  324. data: params
  325. })
  326. tableData.value = result.data.list || []
  327. pagination.value.total = result.data.total || 0
  328. } catch (error) {
  329. ElMessage.error(error.message || t('elmessage.searchFailed'))
  330. }
  331. }
  332. // 提交
  333. const submitRefund = async function () {
  334. try {
  335. const numberReg = /^[0-9]+(\.[0-9]+)?$/
  336. if (!numberReg.test(editForm.value.refundAmount)) {
  337. ElMessage.error(t('elmessage.checkNumberOrDecimal'))
  338. return
  339. }
  340. const params = {
  341. refundVoucher: editForm.value.imageUrl,
  342. refundTime: editForm.value.refundTime ? dayjs(editForm.value.refundTime).format('YYYY-MM-DD HH:mm:ss') : "",
  343. refundRemark: editForm.value.refundRemark,
  344. id: editRow.value.id,
  345. refundCurrency: editForm.value.refundCurrency,
  346. refundAmount: editForm.value.refundAmount,
  347. refundChannels: editForm.value.refundChannels,
  348. status: 41,
  349. auditId: editRow.value.auditId,
  350. executor: adminData.value.account
  351. }
  352. const result = await API({
  353. url: '/Money/executor',
  354. data: params
  355. })
  356. if (result.code === 200) {
  357. ElMessage.success(t('elmessage.submitSuccess'))
  358. hideEditDialog()
  359. getRefund()
  360. } else {
  361. ElMessage.error(result.msg || t('elmessage.submitFailed'))
  362. }
  363. } catch (error) {
  364. ElMessage.error(error.message || t('elmessage.submitFailed'))
  365. }
  366. }
  367. const getMarket = async function () {
  368. try {
  369. const result = await API({
  370. url: '/market/selectMarket',
  371. })
  372. console.log('看看地区树', result)
  373. const transformTree = (nodes) => {
  374. const allChildren = nodes.flatMap(node => node.children || []);
  375. return allChildren.map(child => {
  376. const grandchildren = child.children && child.children.length
  377. ? transformTree([child])
  378. : null;
  379. return {
  380. value: child.id,
  381. label: child.name,
  382. children: grandchildren
  383. };
  384. });
  385. };
  386. market.value = transformTree(result.data)
  387. console.log('转换后的地区树==============', market.value)
  388. } catch (error) {
  389. console.log('请求失败', error)
  390. }
  391. }
  392. const showEditDialog = (row) => {
  393. editRow.value = row
  394. editForm.value.refundCurrency = ''
  395. editForm.value.refundAmount = ''
  396. editForm.value.channels = []
  397. editForm.value.refundTime = ''
  398. editForm.value.refundRemark = ''
  399. editForm.value.imageUrl = ''
  400. showEdit.value = true
  401. }
  402. const hideEditDialog = () => {
  403. showEdit.value = false
  404. editForm.value = {
  405. jwcode: ''
  406. }
  407. }
  408. // const currencies = ref(['美元(USD)', '港币(HKD)', '新币(SGD)', '马币(MYR)', '泰铢(THB)', '加币(CAD)', '越南盾(VND)', '韩元(KRW)'])
  409. const currencies = ref([
  410. t('cash.currency.usd'), // 美元(USD)
  411. t('cash.currency.hkd'), // 港币(HKD)
  412. t('cash.currency.sgd'), // 新币(SGD)
  413. t('cash.currency.myr'), // 马币(MYR)
  414. t('cash.currency.thb'), // 泰铢(THB)
  415. t('cash.currency.cad'), // 加币(CAD)
  416. t('cash.currency.vnd'), // 越南盾(VND)
  417. t('cash.currency.krw') // 韩元(KRW)
  418. ])
  419. // const channelOptions = ref(["Stripe-链接收款", "PaymentAsia-链接收款", "Ipay88-链接收款", "银行转账", "刷卡", "现金", "支票", "Grabpay", "Nets", "E-Transfer", "Paypal"])
  420. const channelOptions = ref([
  421. t('cash.payMethods.stripe'),
  422. t('cash.payMethods.paymentAsia'),
  423. t('cash.payMethods.ipay88'),
  424. t('cash.payMethods.bankTransfer'),
  425. t('cash.payMethods.card'),
  426. t('cash.payMethods.cash'),
  427. t('cash.payMethods.check'),
  428. t('cash.payMethods.grabpay'),
  429. t('cash.payMethods.nets'),
  430. t('cash.payMethods.transfer'),
  431. t('cash.payMethods.paypal'),
  432. ])
  433. // 预览图片函数
  434. const previewImage = (imageUrl) => {
  435. // 使用 element-plus 的 el-image 组件实现图片预览功能
  436. const imageElement = document.createElement('img');
  437. imageElement.src = imageUrl;
  438. imageElement.style.maxWidth = '80vw';
  439. imageElement.style.maxHeight = '80vh';
  440. const viewer = document.createElement('div');
  441. viewer.style.position = 'fixed';
  442. viewer.style.top = '0';
  443. viewer.style.left = '0';
  444. viewer.style.width = '100vw';
  445. viewer.style.height = '100vh';
  446. viewer.style.backgroundColor = 'rgba(0, 0, 0, 0.7)';
  447. viewer.style.display = 'flex';
  448. viewer.style.justifyContent = 'center';
  449. viewer.style.alignItems = 'center';
  450. viewer.style.zIndex = '9999';
  451. viewer.style.overflow = 'auto';
  452. viewer.appendChild(imageElement);
  453. document.body.appendChild(viewer);
  454. viewer.addEventListener('click', () => {
  455. document.body.removeChild(viewer);
  456. });
  457. };
  458. const handleImageChange = (file) => {
  459. uploadRef.value.submit()
  460. }
  461. const beforeUpload = (file) => {
  462. const isJPG = file.type === 'image/jpeg'
  463. const isPNG = file.type === 'image/png'
  464. const isLt1 = file.size / 1024 < 2048
  465. if (!isJPG && !isPNG) {
  466. ElMessage.error(t('elmessage.onlyUploadJPGPNG'))
  467. return false
  468. }
  469. if (!isLt1) {
  470. ElMessage.error(t('elmessage.limitImageSize2MB'))
  471. return false
  472. }
  473. return true
  474. }
  475. const customUpload = async (options) => {
  476. try {
  477. const formData = new FormData()
  478. formData.append('file', options.file)
  479. const response = await API({
  480. url: uploadUrl,
  481. method: 'POST',
  482. data: formData,
  483. headers: {
  484. 'Content-Type': 'multipart/form-data'
  485. }
  486. })
  487. if (response.code === 200 && response.data) {
  488. editForm.value.imageUrl = response.data.url
  489. ElMessage.success(response.msg || t('elmessage.uploadSuccess'))
  490. } else {
  491. ElMessage.error(response.msg || t('elmessage.uploadFailed'))
  492. }
  493. } catch (error) {
  494. console.error('上传错误:', error)
  495. ElMessage.error(t('elmessage.uploadFailed') + `: ${error.msg || error.message || t('elmessage.inNetworkError')}`)
  496. }
  497. }
  498. const defaultTime = [
  499. new Date(2000, 1, 1, 0, 0, 0),
  500. new Date(2000, 2, 1, 23, 59, 59),
  501. ]
  502. const disabledDate = (time) => {
  503. const limitDate = new Date(2025, 0, 1);
  504. return time.getTime() < limitDate.getTime();
  505. }
  506. const reset = function () {
  507. searchForm.value = {
  508. jwcode: '',
  509. markets: [],
  510. statuses: []
  511. }
  512. // 重置页码
  513. pagination.value.pageNum = 1
  514. dateRange.value = []
  515. getRefund()
  516. }
  517. const handlePageSizeChange = function (val) {
  518. pagination.value.pageSize = val
  519. getRefund()
  520. }
  521. const handleCurrentChange = function (val) {
  522. pagination.value.pageNum = val
  523. getRefund()
  524. }
  525. onMounted(() => {
  526. console.log('???????????????????', adminData.value)
  527. getRefund()
  528. getMarket()
  529. })
  530. </script>
  531. <style scoped>
  532. :deep(.el-table__header-wrapper),
  533. :deep(.el-table__body-wrapper),
  534. :deep(.el-table__cell),
  535. :deep(.el-table__body td) {
  536. background-color: #F3FAFE !important;
  537. }
  538. :deep(.el-table__header th) {
  539. background-color: #F3FAFE !important;
  540. }
  541. :deep(.el-image-viewer) {
  542. z-index: 3000 !important;
  543. /* 确保高于固定列和对话框的层级 */
  544. }
  545. /* 若固定列仍遮挡,强制提高固定列容器的层级(可选) */
  546. :deep(.el-table__fixed),
  547. :deep(.el-table__fixed-right) {
  548. z-index: 10 !important;
  549. /* 低于预览层的 3000 即可 */
  550. }
  551. .condition1 {
  552. width: 82vw;
  553. display: flex;
  554. align-items: center;
  555. height: 4vh;
  556. .search {
  557. width: 18%;
  558. display: flex;
  559. align-items: center;
  560. margin-bottom: 1vh;
  561. margin-right: 0.5vw;
  562. }
  563. .search2 {
  564. width: 18%;
  565. display: flex;
  566. align-items: center;
  567. margin-right: 0.5vw;
  568. }
  569. }
  570. .edit {
  571. .left {
  572. width: 45%;
  573. height: 60vh;
  574. padding: 0 2vw;
  575. .dialog-item {
  576. display: flex;
  577. align-items: center;
  578. margin-bottom: 1vh;
  579. }
  580. .image {
  581. width: 4vw !important;
  582. height: 4vw !important;
  583. }
  584. :deep(.el-upload--picture-card) {
  585. width: 4vw !important;
  586. height: 4vw !important;
  587. padding: 0 !important;
  588. }
  589. }
  590. .right {
  591. width: 50%;
  592. .dialog-item {
  593. display: flex;
  594. align-items: center;
  595. margin-bottom: 1vh;
  596. }
  597. }
  598. }
  599. </style>