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.

818 lines
29 KiB

  1. <template>
  2. <div class="content">
  3. <!-- 搜索区域删除客服专属的订单状态筛选保留总部财务所需筛选项 -->
  4. <div class="div-card1">
  5. <el-card class="card1" style="margin-bottom: 0.5vh; min-height: 110px;">
  6. <div class="row">
  7. <div class="rowItem">
  8. <el-text style="width: 4vw;">精网号</el-text>
  9. <el-input v-model="searchData.jwcode" placeholder="请输入精网号" style="width:10vw;" clearable></el-input>
  10. </div>
  11. <div class="rowItem">
  12. <el-text style="width: 4vw;">客户姓名</el-text>
  13. <el-input v-model="searchData.name" placeholder="请输入客户姓名" style="width:10vw;" clearable></el-input>
  14. </div>
  15. <div class="rowItem">
  16. <el-text style="width: 4vw;">所属地区</el-text>
  17. <el-select v-model="searchData.market" placeholder="请选择所属地区" style="width:10vw;" clearable>
  18. <el-option v-for="item in marketList" :key="item" :label="item" :value="item"/>
  19. </el-select>
  20. </div>
  21. <!-- 总部财务不显示订单状态显示付款币种 -->
  22. <div class="rowItem">
  23. <el-text style="width: 4vw;">付款币种</el-text>
  24. <el-select v-model="searchData.paymentCurrency" placeholder="请选择付款币种" style="width: 10vw;" clearable>
  25. <el-option v-for="item in customOptions" :key="item" :label="item" :value="item"/>
  26. </el-select>
  27. </div>
  28. <div class="rowItem">
  29. <el-text style="width: 4vw;">支付方式</el-text>
  30. <el-select v-model="searchData.payType" placeholder="请选择支付方式" style="width: 10vw;" clearable>
  31. <el-option v-for="item in paytypeList" :key="item" :label="item" :value="item"/>
  32. </el-select>
  33. </div>
  34. </div>
  35. <div class="row" style="margin-top: 10px;">
  36. <div class="rowItem">
  37. <el-text style="width: 4vw;">活动名称</el-text>
  38. <el-select v-model="searchData.activity" placeholder="请选择活动方式" style="width: 10vw;" clearable>
  39. <el-option v-for="item in activityList" :key="item.id" :label="item.activityName" :value="item.id"/>
  40. </el-select>
  41. </div>
  42. <div class="rowItem">
  43. <el-text style="width: 4vw;">产品名称</el-text>
  44. <el-cascader v-model="searchData.goodsName" :options="productList" style="width: 10vw;" clearable/>
  45. </div>
  46. <div class="rowItem" style="width: 30vw">
  47. <el-text style="width: 4vw; margin-left: 0.5vw;">付款时间</el-text>
  48. <el-date-picker v-model="getTime" type="datetimerange" range-separator=""
  49. start-placeholder="起始时间" end-placeholder="结束时间" style="width: 22vw; "
  50. @change="handleDatePickerChange" :default-time="defaultTime"
  51. :disabled-date="disabledDate"/>
  52. </div>
  53. <!-- 总部财务查询/重置按钮 -->
  54. <div class="buttons">
  55. <el-button type="primary" @click="search">查询</el-button>
  56. <el-button type="success" @click="reset">重置</el-button>
  57. </div>
  58. </div>
  59. </el-card>
  60. </div>
  61. <!-- 数据展示区域仅保留总部财务的已通过/已完成标签 -->
  62. <div class="div-card2">
  63. <el-card class="card2">
  64. <div class="btns">
  65. <!-- 总部财务仅显示已通过/已完成标签 -->
  66. <div class="tabs">
  67. <el-button-group>
  68. <el-button class="btnItem"
  69. :style="{ backgroundColor: activeTab === 'pass' ? '#2741DE' : '#E5EBFE', color: activeTab === 'pass' ? 'white' : '#666' }"
  70. @click="navigateTo('pass')">
  71. 已通过
  72. </el-button>
  73. <el-button class="btnItem"
  74. :style="{ backgroundColor: activeTab === 'done' ? '#2741DE' : '#E5EBFE', color: activeTab === 'done' ? 'white' : '#666' }"
  75. @click="navigateTo('done')">
  76. 已完成
  77. </el-button>
  78. </el-button-group>
  79. </div>
  80. </div>
  81. <!-- 表格删除客服/地区财务专属列 -->
  82. <div class="table">
  83. <el-table :data="tableData" style="width: 80vw;height:54vh;" @sort-change="handleSortChange"
  84. :row-style="{ height: '60px' }" :header-cell-style="{ textAlign: 'center' }"
  85. :cell-style="{ textAlign: 'center' }">
  86. <el-table-column type="index" label="序号" width="100px" fixed="left">
  87. <template #default="scope">
  88. <span>{{ scope.$index + 1 + (pageInfo.pageNum - 1) * pageInfo.pageSize }}</span>
  89. </template>
  90. </el-table-column>
  91. <el-table-column fixed="left" prop="jwcode" label="Homily ID" width="110px"/>
  92. <el-table-column fixed="left" prop="name" label="姓名" width="110px"/>
  93. <el-table-column prop="marketName" label="所属地区" width="80px"/>
  94. <el-table-column prop="activity" label="活动名称" width="120px" show-overflow-tooltip/>
  95. <el-table-column prop="goodsName" label="产品名称" width="120px"/>
  96. <el-table-column prop="goodNum" label="产品数量" width="130px">
  97. <template #default="scope">
  98. <span v-if="scope.row.goodsName == '金币充值'">{{ scope.row.permanentGold }}</span>
  99. <span v-else>{{ scope.row.goodNum }}</span>
  100. </template>
  101. </el-table-column>
  102. <el-table-column prop="paymentCurrency" label="付款币种" width="100px"/>
  103. <el-table-column prop="paymentAmount" label="付款金额" width="120px"/>
  104. <!-- 总部财务显示到账币种/金额/手续费 -->
  105. <el-table-column prop="receivedCurrency" label="到账币种"
  106. v-if="activeTab == 'pass' || activeTab == 'done'" width="150px"></el-table-column>
  107. <el-table-column prop="receivedAmount" label="到账金额"
  108. v-if="activeTab == 'pass' || activeTab == 'done'" width="150px">
  109. <template #default="scope">
  110. <div v-if="!scope.row.receivedAmount">
  111. <text style="color: #FA5A1E;">待补充</text>
  112. </div>
  113. </template>
  114. </el-table-column>
  115. <el-table-column prop="handlingCharge" label="手续费"
  116. v-if="activeTab == 'pass' || activeTab == 'done'" width="150px">
  117. <template #default="scope">
  118. <div v-if="!scope.row.handlingCharge == null">
  119. <text style="color: #FA5A1E;">待补充</text>
  120. </div>
  121. </template>
  122. </el-table-column>
  123. <el-table-column prop="payType" label="支付方式" width="130px"/>
  124. <el-table-column prop="payTime" label="付款时间" width="180px"/>
  125. <el-table-column prop="voucher" label="转账凭证" width="110px">
  126. <template #default="scope">
  127. <div v-if="scope.row.voucher"
  128. style="display: flex; justify-content: center; align-items: center; cursor: pointer;"
  129. @click="previewImage(scope.row.voucher)">
  130. <img :src="scope.row.voucher" alt="支付凭证" style="width: auto; height: 40px;">
  131. </div>
  132. <div v-else
  133. style="display: flex; justify-content: center; align-items: center; height: 40px;">
  134. </div>
  135. </template>
  136. </el-table-column>
  137. <el-table-column prop="submitterName" label="提交人" width="150px" show-overflow-tooltip></el-table-column>
  138. <!-- 总部财务显示审核人/到账时间 -->
  139. <el-table-column prop="auditName" label="审核人"
  140. v-if="activeTab == 'pass' || activeTab == 'done'"
  141. width="150px" show-overflow-tooltip></el-table-column>
  142. <el-table-column prop="receivedTime" label="到账时间"
  143. v-if="activeTab == 'pass' || activeTab == 'done'" width="180px"/>
  144. <el-table-column prop="remark" label="备注" width="150px" show-overflow-tooltip></el-table-column>
  145. <!-- 已完成状态显示订单状态正常/退款 -->
  146. <el-table-column prop="status" label="订单状态" v-if="activeTab == 'done'" width="150px"
  147. show-overflow-tooltip>
  148. <template #default="scope">
  149. <span v-if="scope.row.status == 6">退款</span>
  150. <span v-else>正常</span>
  151. </template>
  152. </el-table-column>
  153. <!-- 操作列仅保留总部财务的编辑功能 -->
  154. <el-table-column fixed="right" label="操作" width="120px"
  155. v-if="activeTab != 'reject'">
  156. <template #default=scope>
  157. <el-link
  158. v-if="activeTab == 'pass' && !(scope.row.status == 6 || scope.row.status == 4)"
  159. style="color: #2741DE;" @click="openEditForm(scope.row)">编辑
  160. </el-link>
  161. </template>
  162. </el-table-column>
  163. </el-table>
  164. </div>
  165. <!-- 分页组件 -->
  166. <div class="pagination">
  167. <el-pagination background :page-size="pageInfo.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
  168. layout="total, sizes, prev, pager, next, jumper" :total="total"
  169. @size-change="handlePagination('size', $event)"
  170. @current-change="handlePagination('page', $event)"></el-pagination>
  171. </div>
  172. </el-card>
  173. </div>
  174. <!-- 编辑填手续费弹窗 -->
  175. <el-dialog class="editdialog" v-model="editFormisible" width="20vw" :before-close="closeEditForm">
  176. <div class="content">
  177. <div class="left">
  178. <el-form class="editForm" label-width="4.5vw" label-position="left">
  179. <el-form-item label="精网号">
  180. <el-input disabled="true" v-model="editFormData.jwcode" placeholder="请输入驳回理由"/>
  181. </el-form-item>
  182. <el-form-item label="客户姓名">
  183. <el-input disabled="true" v-model="editFormData.name" placeholder="请输入客户姓名"/>
  184. </el-form-item>
  185. <el-form-item label="所属地区">
  186. <el-input disabled="true" v-model="editFormData.marketName" placeholder="请输入所属地区"/>
  187. </el-form-item>
  188. <el-form-item label="活动名称">
  189. <el-input disabled="true" v-model="editFormData.activity" placeholder="请输入活动名称"/>
  190. </el-form-item>
  191. <el-form-item label="产品名称">
  192. <el-select disabled="true" v-model="editFormData.goodsName" placeholder="请选择产品名称"
  193. clearable></el-select>
  194. </el-form-item>
  195. <el-form-item v-show="!isEditGold" label="产品数量">
  196. <div style="padding-right: 50px; display: flex;">
  197. <el-input disabled="true" style="padding-right: 10px;" v-model="editFormData.goodNum"
  198. placeholder="请输入产品数量"/>
  199. <span style="color: #999999;"></span>
  200. </div>
  201. </el-form-item>
  202. <div v-show="isEditGold" style="margin-bottom: 15px; display: flex;">
  203. <div style=" display: flex; ">
  204. <span style="color: #999999; display: flex; white-space: nowrap;align-items: center;">永久金币</span>
  205. <el-input disabled="true"
  206. style="padding-right: 10px; padding-left: 10px; height: 30px; width: 110px;"
  207. v-model="editFormData.permanentGold"/>
  208. </div>
  209. <div style="padding-right: 5px; display: flex;">
  210. <span style="color: #999999; display: flex; white-space: nowrap;align-items: center;">免费金币</span>
  211. <el-input disabled="true"
  212. style="padding-right: 10px; padding-left: 10px; height: 30px; width: 110px;"
  213. v-model="editFormData.freeGold"/>
  214. </div>
  215. </div>
  216. <el-form-item label="付款币种">
  217. <CurrencySelect :disabled="!ifOnline" v-model="editFormData.paymentCurrency"
  218. :items="customOptions" placeholder="请选择付款币种"/>
  219. </el-form-item>
  220. <el-form-item label="付款金额">
  221. <el-input :disabled="!ifOnline" v-model="editFormData.paymentAmount"
  222. placeholder="请输入付款金额"/>
  223. </el-form-item>
  224. <el-form-item label="支付方式">
  225. <el-select disabled="true" v-model="editFormData.payType" placeholder="请选择支付方式"
  226. clearable></el-select>
  227. </el-form-item>
  228. <el-form-item label="到账地区">
  229. <el-select disabled="true" v-model="editFormData.receivedMarket" placeholder="请选择到账地区"
  230. clearable></el-select>
  231. </el-form-item>
  232. <el-form-item label="付款时间">
  233. <el-date-picker disabled="true" type="datetime" v-model="editFormData.payTime"
  234. placeholder="请选择付款时间"/>
  235. </el-form-item>
  236. <el-form-item label="转账凭证">
  237. <div class="pic">
  238. <el-upload disabled="true" ref="uploadRef" class="uploader" :show-file-list="false"
  239. list-type="picture-card" :auto-upload="false" :before-upload="beforeUpload"
  240. :on-error="handelImgErr" :on-change="handleImageChange"
  241. :http-request="customUpload">
  242. <img v-if="editFormData.voucher" :src="editFormData.voucher" class="avatar"
  243. style="height: 100%; width: 100%; object-fit: cover;"/>
  244. <el-icon v-else class="avatar-uploader-icon">
  245. <Plus/>
  246. </el-icon>
  247. </el-upload>
  248. <el-text class="picText">
  249. 仅支持.jpg .png格式文件 1 MB
  250. </el-text>
  251. </div>
  252. </el-form-item>
  253. <el-form-item label="备注">
  254. <el-input disabled="true" v-model="editFormData.remark" type="textarea" :rows="4"
  255. placeholder="请输入驳回理由" maxlength="100" show-word-limit/>
  256. </el-form-item>
  257. </el-form>
  258. </div>
  259. <div class="right">
  260. <el-form ref="editFormRef" :rules="editFormRule" :model="editFormData" class="editFormRight"
  261. label-width="4.5vw" label-position="left">
  262. <el-form-item label="到账货币">
  263. <CurrencySelect v-model="editFormData.receivedCurrency" :items="customOptions"
  264. placeholder="请选择到账货币"/>
  265. </el-form-item>
  266. <el-form-item label="到账金额" prop="receivedAmount">
  267. <el-input v-model="editFormData.receivedAmount" placeholder="请输入到账金额"/>
  268. </el-form-item>
  269. <el-form-item label="手续费" prop="handlingCharge">
  270. <el-input v-model="editFormData.handlingCharge" placeholder="请输入手续费"/>
  271. </el-form-item>
  272. <el-form-item label="到账时间">
  273. <el-date-picker type="datetime" v-model="editFormData.receivedTime" placeholder="请输入到账时间"/>
  274. </el-form-item>
  275. </el-form>
  276. <span class="editBtns">
  277. <button class="editBtn1" @click="closeEditForm">
  278. <text class="txt">取消</text>
  279. </button>
  280. <button class="editBtn2" @click="throttledsubmitEditForm">
  281. <text class="txt">提交</text>
  282. </button>
  283. </span>
  284. </div>
  285. </div>
  286. </el-dialog>
  287. <!-- 查看驳回理由弹窗 -->
  288. <el-dialog v-model="showRejectReasonDialog" title="驳回理由" width="30vw" :before-close="closeRejectReasonDialog">
  289. <el-form label-width="80px">
  290. <el-form-item label="驳回原因">
  291. <el-input type="textarea" v-model="rejectReasonContent" disabled :rows="5" placeholder="无驳回理由"/>
  292. </el-form-item>
  293. </el-form>
  294. <template #footer>
  295. <span class="dialog-footer">
  296. <el-button @click="closeRejectReasonDialog">确认</el-button>
  297. </span>
  298. </template>
  299. </el-dialog>
  300. </div>
  301. </template>
  302. <script setup>
  303. import {ref, onMounted} from 'vue';
  304. import {storeToRefs} from 'pinia';
  305. import {ElMessage, ElMessageBox} from 'element-plus'
  306. import API from '@/util/http.js'
  307. import request from '@/util/http.js'
  308. import moment from 'moment'
  309. import {useAdminStore} from '@/store/index.js'
  310. import {hasMenuPermission} from '@/utils/menuTreePermission.js'
  311. import _ from 'lodash'
  312. import {editFormRule} from './utils/recriveFormRules.js'
  313. import {productList, MarketNameForId, CurrencyForId, marketList} from './utils/staticData.js'
  314. import CurrencySelect from '@/components/MoneyManage/CurrencySelect.vue'
  315. import {Plus} from '@element-plus/icons-vue';
  316. // 状态管理
  317. const adminStore = useAdminStore();
  318. const {menuTree} = storeToRefs(adminStore);
  319. const tableData = ref([])
  320. const searchData = ref({})
  321. const defaultTime = [new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 2, 1, 23, 59, 59)]
  322. const getTime = ref([])
  323. const activeTab = ref('pass')
  324. const HQcaiwu = ref(true)
  325. const superAdmin = ref(false)
  326. const editFormData = ref({})
  327. const ifOnline = ref(false)
  328. const editFormisible = ref(false)
  329. const editFormRef = ref(null)
  330. const isEditGold = ref(false)
  331. const showRejectReasonDialog = ref(false)
  332. const rejectReasonContent = ref('')
  333. const pageInfo = ref({pageSize: 10, pageNum: 1})
  334. const total = ref(0)
  335. const uploadRef = ref()
  336. const customOptions = ref(['美元(USD)', '港币(HKD)', '新币(SGD)', '马币(MYR)', '泰铢(THB)', '加币(CAD)', '越南盾(VDN)', '韩元(KRW)'])
  337. const paytypeList = ref(["Stripe-链接收款", "PaymentAsia-链接收款", "Ipay88-链接收款", "银行转账", "刷卡", "现金", "支票", "Grabpay", "Nets", "E-Transfer", "Paypal"])
  338. const activityList = ref([])
  339. const adminData = ref({})
  340. // 核心方法
  341. const search = () => {
  342. getlist()
  343. ElMessage.success('查询成功')
  344. }
  345. const reset = () => {
  346. searchData.value = {}
  347. getTime.value = []
  348. getlist()
  349. }
  350. const getlist = async () => {
  351. try {
  352. let payCurrencySelect = ''
  353. let goodsName = ''
  354. if (getTime.value && getTime.value.length === 2) {
  355. searchData.value.startTime = moment(getTime.value[0]).format('YYYY-MM-DD HH:mm:ss')
  356. searchData.value.endTime = moment(getTime.value[1]).format('YYYY-MM-DD HH:mm:ss')
  357. } else {
  358. searchData.value.startTime = ''
  359. searchData.value.endTime = ''
  360. }
  361. if (searchData.value.goodsName) {
  362. goodsName = searchData.value.goodsName[searchData.value.goodsName.length - 1]
  363. }
  364. if (searchData.value.paymentCurrency) {
  365. payCurrencySelect = CurrencyForId(searchData.value.paymentCurrency)
  366. }
  367. const cashRoleId = '2'
  368. if (activeTab.value === 'pass') {
  369. searchData.value.status = 13
  370. } else if (activeTab.value === 'done') {
  371. searchData.value.status = 46
  372. }
  373. const result = await request({
  374. url: '/cashCollection/selectCollection',
  375. data: {
  376. ...pageInfo.value,
  377. cashCollection: {
  378. ...searchData.value,
  379. submitterId: adminData.value.id,
  380. receivedMarket: MarketNameForId(adminData.value.markets),
  381. cashRoleId: cashRoleId,
  382. paymentCurrency: payCurrencySelect,
  383. submitterMarket: adminData.value.markets,
  384. goodsName: goodsName,
  385. market: MarketNameForId(searchData.value.market)
  386. }
  387. }
  388. })
  389. if (result.code === 200) {
  390. tableData.value = result.data.list
  391. total.value = result.data.total
  392. } else {
  393. ElMessage.error('数据异常')
  394. }
  395. } catch (error) {
  396. console.log(error);
  397. }
  398. }
  399. const navigateTo = async (tab) => {
  400. if (tab === 'pass') {
  401. activeTab.value = 'pass'
  402. await getlist()
  403. } else if (tab === 'done') {
  404. activeTab.value = 'done'
  405. await getlist()
  406. }
  407. }
  408. const EditifGold = () => {
  409. isEditGold.value = editFormData.value.goodsName === '金币充值'
  410. }
  411. const openEditForm = (row) => {
  412. editFormData.value = {...row}
  413. EditifGold()
  414. ifOnline.value = row.status === 3
  415. editFormisible.value = true
  416. }
  417. const closeEditForm = () => {
  418. editFormisible.value = false
  419. editFormData.value = {}
  420. getlist()
  421. }
  422. const submitEditForm = async () => {
  423. try {
  424. await editFormRef.value.validate();
  425. if (editFormData.value.receivedTime) {
  426. editFormData.value.receivedTime = moment(editFormData.value.receivedTime).format('YYYY-MM-DD HH:mm:ss')
  427. }
  428. const result = await request({
  429. url: '/cashCollection/complete',
  430. data: {
  431. orderCode: editFormData.value.orderCode,
  432. handlingCharge: editFormData.value.handlingCharge * 100,
  433. paymentCurrency: CurrencyForId(editFormData.value.paymentCurrency),
  434. paymentAmount: editFormData.value.paymentAmount * 100,
  435. receivedCurrency: CurrencyForId(editFormData.value.receivedCurrency),
  436. receivedAmount: editFormData.value.receivedAmount * 100,
  437. receivedTime: editFormData.value.receivedTime,
  438. receivedRemark: editFormData.value.receivedRemark,
  439. }
  440. })
  441. if (result.code === 200) {
  442. ElMessage.success('提交成功')
  443. getlist()
  444. closeEditForm()
  445. }
  446. } catch (error) {
  447. ElMessage.error('请检查表单数据格式');
  448. }
  449. }
  450. const openRejectReason = (reason) => {
  451. rejectReasonContent.value = reason || '无驳回理由'
  452. showRejectReasonDialog.value = true
  453. }
  454. const closeRejectReasonDialog = () => {
  455. showRejectReasonDialog.value = false
  456. rejectReasonContent.value = ''
  457. }
  458. const previewImage = (imageUrl) => {
  459. const imageElement = document.createElement('img');
  460. imageElement.src = imageUrl;
  461. imageElement.style.maxWidth = '80vw';
  462. imageElement.style.maxHeight = '80vh';
  463. const viewer = document.createElement('div');
  464. viewer.style.position = 'fixed';
  465. viewer.style.top = '0';
  466. viewer.style.left = '0';
  467. viewer.style.width = '100vw';
  468. viewer.style.height = '100vh';
  469. viewer.style.backgroundColor = 'rgba(0, 0, 0, 0.7)';
  470. viewer.style.display = 'flex';
  471. viewer.style.justifyContent = 'center';
  472. viewer.style.alignItems = 'center';
  473. viewer.style.zIndex = '9999';
  474. viewer.style.overflow = 'auto';
  475. viewer.appendChild(imageElement);
  476. document.body.appendChild(viewer);
  477. viewer.addEventListener('click', () => {
  478. document.body.removeChild(viewer);
  479. });
  480. }
  481. const handlePagination = (type, val) => {
  482. if (type === 'size') {
  483. pageInfo.value.pageSize = val
  484. } else {
  485. pageInfo.value.pageNum = val
  486. }
  487. getlist()
  488. }
  489. const beforeUpload = (rawFile) => {
  490. if (rawFile.type !== 'image/jpeg' && rawFile.type !== 'image/png') {
  491. ElMessage.error('图片必须是jpg或png类型!')
  492. return false
  493. } else if (rawFile.size / 1024 / 1024 > 2) {
  494. ElMessage.error('图片大小不能超过 2MB!')
  495. return false
  496. }
  497. return true
  498. }
  499. const handelImgErr = (err) => {
  500. ElMessage.error("图片加载失败")
  501. }
  502. const handleImageChange = (file) => {
  503. uploadRef.value.submit()
  504. }
  505. const customUpload = async (options) => {
  506. try {
  507. const formData = new FormData()
  508. formData.append('file', options.file)
  509. const response = await API({
  510. url: 'https://api.homilychart.com/hljw/api/aws/upload',
  511. method: 'POST',
  512. data: formData,
  513. headers: {
  514. 'Content-Type': 'multipart/form-data'
  515. }
  516. })
  517. if (response.code === 200 && response.data) {
  518. ElMessage.success('上传成功')
  519. } else {
  520. options.onError(response)
  521. ElMessage.error(response.msg || '上传失败')
  522. }
  523. } catch (error) {
  524. ElMessage.error(`上传失败: ${error.msg || error.message || '网络异常'}`)
  525. }
  526. }
  527. const getAdminData = async function () {
  528. try {
  529. const result = await API({
  530. url: '/admin/userinfo',
  531. data: {}
  532. })
  533. adminData.value = result
  534. } catch (error) {
  535. console.log('管理员信息获取失败', error)
  536. }
  537. }
  538. const getActivitys = async function () {
  539. try {
  540. const result = await API({
  541. url: '/cashCollection/getActivityList',
  542. data: {}
  543. })
  544. if (result.code === 200) {
  545. activityList.value = result.data
  546. } else {
  547. ElMessage.error('活动列表获取失败')
  548. }
  549. } catch (error) {
  550. console.log('活动列表请求失败', error)
  551. }
  552. }
  553. const throttledsubmitEditForm = _.throttle(submitEditForm, 5000, {
  554. trailing: false
  555. })
  556. onMounted(async function () {
  557. await getAdminData()
  558. await getActivitys()
  559. if (adminData.value.roleId === 2) {
  560. superAdmin.value = true
  561. }
  562. await getlist()
  563. })
  564. // 未使用方法占位
  565. const handleSortChange = () => {}
  566. const handleDatePickerChange = () => {}
  567. const disabledDate = () => {}
  568. </script>
  569. <style scoped lang="scss">
  570. .content {
  571. height: 100%;
  572. width: 80vw;
  573. .card1 {
  574. background: #F3FAFE;
  575. width: 100%;
  576. .row {
  577. height: 4vh;
  578. width: 80vw;
  579. display: flex;
  580. min-height: 40px;
  581. .rowItem {
  582. display: flex;
  583. width: 15vw;
  584. align-items: center;
  585. justify-content: center;
  586. margin-right: 0.5vw;
  587. }
  588. .buttons {
  589. display: flex;
  590. justify-content: center;
  591. align-items: center;
  592. margin-left: 10px;
  593. }
  594. }
  595. }
  596. .div-card2 {
  597. width: 100%;
  598. margin-top: 2vh;
  599. .card2 {
  600. background: #E7F4FD;
  601. }
  602. .btns {
  603. display: flex;
  604. align-items: center;
  605. justify-content: space-between;
  606. padding-bottom: 10px;
  607. .tabs {
  608. min-width: 300px;
  609. .btnItem {
  610. margin-left: 10px;
  611. border-radius: 5px;
  612. }
  613. }
  614. }
  615. .table {
  616. margin: 10px;
  617. border-radius: 20px;
  618. .ellipsis-container {
  619. position: relative;
  620. width: 100%;
  621. .ellipsis-text {
  622. display: inline-block;
  623. width: 100%;
  624. white-space: nowrap;
  625. overflow: hidden;
  626. text-overflow: ellipsis;
  627. cursor: pointer;
  628. }
  629. .custom-tooltip {
  630. position: fixed;
  631. z-index: 9999;
  632. padding: 8px 12px;
  633. width: 200px;
  634. background-color: #E4F0FC;
  635. color: #333333;
  636. border: 1px solid #e5e7eb;
  637. border-radius: 4px;
  638. box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  639. min-height: 30px;
  640. max-height: 300px;
  641. overflow-y: auto;
  642. font-size: 14px;
  643. line-height: 1.5;
  644. }
  645. }
  646. }
  647. .pagination {
  648. margin-top: 10px;
  649. padding: 10px 10px;
  650. }
  651. }
  652. :deep(.editdialog) {
  653. min-width: 990px;
  654. background-color: #F3FAFE !important;
  655. margin-top: 8vh;
  656. border-radius: 8px;
  657. .content {
  658. display: flex;
  659. height: 100%;
  660. width: 100%;
  661. .left {
  662. min-width: 500px;
  663. }
  664. .right {
  665. flex: 1;
  666. .editFormRight {
  667. padding: 0 60px 0 40px;
  668. .el-date-editor {
  669. display: flex;
  670. flex: 1;
  671. }
  672. }
  673. .editBtns {
  674. display: flex;
  675. justify-content: center;
  676. margin-top: 60px;
  677. .txt {
  678. color: #f3fafe;
  679. text-align: center;
  680. font-family: "PingFang SC";
  681. font-size: 14px;
  682. font-style: normal;
  683. font-weight: 700;
  684. line-height: 22px;
  685. }
  686. .editBtn1 {
  687. min-width: 80px;
  688. padding: 5px 12px;
  689. justify-content: center;
  690. align-items: center;
  691. gap: 4px;
  692. border-radius: 4px;
  693. background: #7E91FF;
  694. border: none;
  695. box-shadow: 0 0 4px 0 #00000040;
  696. }
  697. .editBtn2 {
  698. display: flex;
  699. width: 80px;
  700. min-width: 80px;
  701. padding: 5px 12px;
  702. justify-content: center;
  703. align-items: center;
  704. gap: 4px;
  705. border-radius: 4px;
  706. background: #2741DE;
  707. border: none;
  708. box-shadow: 0 0 4px 0 #00000040;
  709. margin-left: 60px;
  710. }
  711. }
  712. }
  713. }
  714. .editForm {
  715. padding: 0 60px 1vh 60px;
  716. .el-date-editor {
  717. display: flex;
  718. flex: 1;
  719. }
  720. .pic {
  721. display: flex;
  722. align-items: center;
  723. .uploader {
  724. height: 80px;
  725. width: 80px;
  726. .el-upload {
  727. height: 100%;
  728. width: 100%;
  729. }
  730. }
  731. .picText {
  732. color: #999999;
  733. font-family: "PingFang SC";
  734. font-size: 10px;
  735. font-style: normal;
  736. font-weight: 400;
  737. line-height: 20px;
  738. margin-left: 10px;
  739. }
  740. }
  741. }
  742. }
  743. :deep(.el-table__header-wrapper),
  744. :deep(.el-table__body-wrapper),
  745. :deep(.el-table__cell),
  746. :deep(.el-table__body td) {
  747. background-color: #F3FAFE !important;
  748. }
  749. :deep(.el-table__header th) {
  750. background-color: #F3FAFE !important;
  751. }
  752. :deep(.el-table__row:hover > .el-table__cell) {
  753. background-color: #E5EBFE !important;
  754. }
  755. .reject-reason-box {
  756. --el-message-box-height: 500px;
  757. }
  758. .reject-reason-box .el-message-box__content {
  759. max-height: 350px;
  760. overflow-y: auto;
  761. white-space: pre-wrap;
  762. }
  763. }
  764. </style>