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.

2194 lines
87 KiB

2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
2 months 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
2 months ago
2 months 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
2 months ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months 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
1 month ago
2 months ago
1 month ago
1 month ago
2 months ago
1 month 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
2 months 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
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
2 months ago
1 month ago
2 months ago
2 months 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
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
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
1 month ago
1 month ago
1 month ago
1 month 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
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
1 month ago
2 months ago
2 months ago
2 months 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
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
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
2 months ago
2 months ago
1 month 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
2 months ago
2 months ago
2 months ago
2 months ago
2 months 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
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
1 month 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
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
2 months ago
1 month ago
2 months 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
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
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
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
1 month ago
1 month ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months 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
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months 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. <template>
  2. <div class="content">
  3. <div class="div-card1">
  4. <el-card class="card1" style="margin-bottom: 0.5vh; min-height: 110px;">
  5. <div class="row">
  6. <div class="rowItem">
  7. <el-text style="width: 4vw;">精网号</el-text>
  8. <el-input v-model="searchData.jwcode" placeholder="请输入精网号" style="width:10vw;"
  9. 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;"
  14. clearable></el-input>
  15. </div>
  16. <div class="rowItem">
  17. <el-text style="width: 4vw;">所属地区</el-text>
  18. <el-select v-model="searchData.market" placeholder="请选择所属地区" style="width:10vw;" clearable>
  19. <el-option v-for="item in marketList" :key="item" :label="item" :value="item" />
  20. </el-select>
  21. </div>
  22. <div v-if="kefu" class="rowItem">
  23. <el-text style="width: 4vw;">订单状态</el-text>
  24. <el-select v-model="searchData.status" placeholder="请选择订单状态" style="width: 10vw;" clearable>
  25. <el-option v-for="item in statusList" :key="item.name" :label="item.name"
  26. :value="item.value" /></el-select>
  27. </div>
  28. <div v-if="!kefu" class="rowItem">
  29. <el-text style="width: 4vw;">付款币种</el-text>
  30. <el-select v-model="searchData.paymentCurrency" placeholder="请选择付款币种" style="width: 10vw;"
  31. clearable>
  32. <el-option v-for="item in customOptions" :key="item" :label="item"
  33. :value="item" /></el-select>
  34. </div>
  35. <div class="rowItem">
  36. <el-text style="width: 4vw;">支付方式</el-text>
  37. <el-select v-model="searchData.payType" placeholder="请选择支付方式" style="width: 10vw;" clearable>
  38. <el-option v-for="item in paytypeList" :key="item" :label="item" :value="item" />
  39. </el-select>
  40. </div>
  41. </div>
  42. <div class="row" style="margin-top: 10px;">
  43. <div class="rowItem">
  44. <el-text style="width: 4vw;">活动名称</el-text>
  45. <el-select v-model="searchData.activity" placeholdert="请选择活动方式" style="width: 10vw;" clearable>
  46. <el-option v-for="item in activityList" :key="item" :label="item" :value="item" />
  47. </el-select>
  48. </div>
  49. <div class="rowItem">
  50. <el-text style="width: 4vw;">产品名称</el-text>
  51. <el-cascader v-model="searchData.goodsName" :options="productList" style="width: 10vw;"
  52. clearable />
  53. </div>
  54. <div class="rowItem" style="width: 30vw">
  55. <el-text style="width: 4vw; margin-left: 0.5vw;">付款时间</el-text>
  56. <el-date-picker v-model="getTime" type="datetimerange" range-separator=""
  57. start-placeholder="起始时间" end-placeholder="结束时间" style="width: 22vw; "
  58. @change="handleDatePickerChange" :default-time="defaultTime"
  59. :disabled-date="disabledDate" />
  60. </div>
  61. <div v-if="!superAdmin" class="buttons">
  62. <el-button type="primary" @click="search">查询</el-button>
  63. <el-button type="success" @click="reset">重置</el-button>
  64. <!-- <el-button type="primary">导出excel</el-button>
  65. <el-button type="primary" style="background-color: #5870FF;">导出列表</el-button> -->
  66. </div>
  67. </div>
  68. <div v-if="superAdmin" class="row" style="margin-top: 10px;">
  69. <div class="buttons">
  70. <el-button type="primary" @click="search">查询</el-button>
  71. <el-button type="success" @click="reset">重置</el-button>
  72. <!-- <el-button type="primary">导出excel</el-button>
  73. <el-button type="primary" style="background-color: #5870FF;">导出列表</el-button> -->
  74. <el-button v-if="superAdmin" type="primary" @click="checkKefu">切换客服</el-button>
  75. <el-button v-if="superAdmin" type="success" @click="checkCaiwu">切换地区财务</el-button>
  76. <el-button v-if="superAdmin" type="success" @click="checkHqCaiwu">切换总部财务</el-button>
  77. </div>
  78. </div>
  79. </el-card>
  80. </div>
  81. <div class="div-card2">
  82. <el-card class="card2">
  83. <div class="btns">
  84. <div class="tabs" v-if="caiwu || HQcaiwu">
  85. <el-button-group>
  86. <el-button class="btnItem" v-if="caiwu"
  87. :style="{ backgroundColor: activeTab === 'wait' ? '#2741DE' : '#E5EBFE', color: activeTab === 'wait' ? 'white' : '#666' }"
  88. @click="navigateTo('wait')">
  89. 待审核
  90. </el-button>
  91. <el-button class="btnItem"
  92. :style="{ backgroundColor: activeTab === 'pass' ? '#2741DE' : '#E5EBFE', color: activeTab === 'pass' ? 'white' : '#666' }"
  93. @click="navigateTo('pass')">
  94. 已通过
  95. </el-button>
  96. <el-button class="btnItem"
  97. :style="{ backgroundColor: activeTab === 'done' ? '#2741DE' : '#E5EBFE', color: activeTab === 'done' ? 'white' : '#666' }"
  98. @click="navigateTo('done')">
  99. 已完成
  100. </el-button>
  101. <el-button class="btnItem" v-if="caiwu"
  102. :style="{ backgroundColor: activeTab === 'reject' ? '#2741DE' : '#E5EBFE', color: activeTab === 'reject' ? 'white' : '#666' }"
  103. @click="navigateTo('reject')">
  104. 已驳回
  105. </el-button>
  106. </el-button-group>
  107. </div>
  108. <div class="btnAdd">
  109. <el-button @click="openAddForm" type="success" v-if="kefu">添加收款</el-button>
  110. </div>
  111. </div>
  112. <div class="table">
  113. <el-table :data="tableData" style="width: 80vw;height:54vh;" @sort-change="handleSortChange"
  114. :row-style="{ height: '60px' }" :header-cell-style="{ textAlign: 'center' }"
  115. :cell-style="{ textAlign: 'center' }">
  116. <el-table-column type="index" label="序号" width="100px" fixed="left">
  117. <template #default="scope">
  118. <span>{{ scope.$index + 1 + (pageInfo.pageNum - 1) * pageInfo.pageSize }}</span>
  119. </template>
  120. </el-table-column>
  121. <el-table-column fixed="left" prop="jwcode" label="Homily ID" width="110px" />
  122. <el-table-column fixed="left" prop="name" label="姓名" width="110px" />
  123. <el-table-column prop="marketName" label="所属地区" width="80px" />
  124. <el-table-column prop="activity" label="活动名称" width="120px" show-overflow-tooltip />
  125. <el-table-column prop="goodsName" label="产品名称" width="120px" />
  126. <el-table-column prop="goodNum" label="产品数量" width="130px">
  127. <template #default="scope">
  128. <span v-if="scope.row.goodsName == '金币充值'">{{ scope.row.permanentGold }}</span>
  129. <span v-else>{{ scope.row.goodNum }}</span>
  130. </template>
  131. </el-table-column>
  132. <el-table-column prop="paymentCurrency" label="付款币种" width="100px">
  133. </el-table-column>
  134. <el-table-column prop="paymentAmount" label="付款金额" width="120px">
  135. </el-table-column>
  136. <el-table-column prop="receivedCurrency" label="到账币种"
  137. v-if="!kefu && activeTab == 'pass' || activeTab == 'done'" width="150px"></el-table-column>
  138. <el-table-column prop="receivedAmount" label="到账金额"
  139. v-if="!kefu && activeTab == 'pass' || activeTab == 'done'" width="150px">
  140. <template #default="scope">
  141. <div v-if="!scope.row.receivedAmount">
  142. <text style="color: #FA5A1E;">待补充</text>
  143. </div>
  144. </template>
  145. </el-table-column>
  146. <el-table-column prop="handlingCharge" label="手续费"
  147. v-if="!kefu && activeTab == 'pass' || activeTab == 'done'" width="150px">
  148. <template #default="scope">
  149. <div v-if="!scope.row.handlingCharge">
  150. <text style="color: #FA5A1E;">待补充</text>
  151. </div>
  152. </template>
  153. </el-table-column>
  154. <el-table-column prop="payType" label="支付方式" width="130px">
  155. </el-table-column>
  156. <el-table-column prop="payTime" label="付款时间" width="180px" />
  157. <el-table-column prop="voucher" label="转账凭证" width="110px">
  158. <template #default="scope">
  159. <div v-if="scope.row.voucher"
  160. style="display: flex; justify-content: center; align-items: center; cursor: pointer;"
  161. @click="previewImage(scope.row.voucher)">
  162. <img :src="scope.row.voucher" alt="支付凭证" style="width: auto; height: 40px;">
  163. </div>
  164. <div v-else
  165. style="display: flex; justify-content: center; align-items: center; height: 40px;">
  166. </div>
  167. </template>
  168. </el-table-column>
  169. <!-- <el-table-column prop="bankCode" label="银行流水订单号" v-if="caiwu && activeTab == 'pass'"
  170. width="150px" show-overflow-tooltip></el-table-column> -->
  171. <el-table-column prop="submitterName" label="提交人" width="150px"
  172. show-overflow-tooltip></el-table-column>
  173. <el-table-column prop="auditName" label="审核人"
  174. v-if="!kefu && activeTab == 'pass' || activeTab == 'reject' || activeTab == 'done'"
  175. width="150px" show-overflow-tooltip></el-table-column>
  176. <el-table-column prop="receivedTime" label="到账时间"
  177. v-if="!kefu && activeTab == 'pass' || activeTab == 'done'" width="180px">
  178. </el-table-column>
  179. <el-table-column prop="remark" label="备注" v-if="activeTab != 'reject'" width="150px"
  180. show-overflow-tooltip></el-table-column>
  181. <el-table-column prop="status" label="订单状态" v-if="activeTab == 'done' && !kefu" width="150px"
  182. show-overflow-tooltip>
  183. <template #default="scope">
  184. <span v-if="scope.row.status == 6">退款</span>
  185. <span v-else>正常</span>
  186. </template>
  187. </el-table-column>
  188. <el-table-column prop="auditTime" label="驳回时间" v-if="activeTab == 'reject' && !kefu"
  189. width="180px" show-overflow-tooltip></el-table-column>
  190. <el-table-column prop="rejectReason" label="驳回理由" v-if="activeTab == 'reject' && !kefu"
  191. width="150px">
  192. <template #default="scope">
  193. <div class="ellipsis-container"
  194. @mouseenter="handleMouseEnter($event, scope.row.rejectReason)"
  195. @mouseleave="handleMouseLeave" @mousemove="handleMouseMove($event)">
  196. <span class="ellipsis-text">
  197. {{ scope.row.rejectReason || '—' }}
  198. </span>
  199. <!-- 自定义提示框 -->
  200. <div v-if="showTooltip && tooltipContent" class="custom-tooltip" :style="{
  201. left: `${tooltipLeft}px`,
  202. top: `${tooltipTop}px`
  203. }">
  204. {{ tooltipContent }}
  205. </div>
  206. </div>
  207. </template>
  208. </el-table-column>
  209. <el-table-column v-if="kefu" fixed="right" prop="status" label="订单状态" width="100px">
  210. <template #default="scope">
  211. <span v-if="scope.row.status == 0">待审核</span>
  212. <span v-else-if="scope.row.status == 1 || scope.row.status == 4">已通过</span>
  213. <span v-else-if="scope.row.status == 2">已驳回</span>
  214. <span v-else-if="scope.row.status == 5">已撤回</span>
  215. <span v-else-if="scope.row.status == 6">退款</span>
  216. <span v-else></span>
  217. </template>
  218. </el-table-column>
  219. <el-table-column fixed="right" label="操作" width="120px"
  220. v-if="activeTab != 'reject' && activeTab != 'done'">
  221. <template #default=scope>
  222. <span v-if="kefu && scope.row.status == 4" style="color: #FA5A1E;"
  223. @click="openConfirm('refund', scope.row)">退款</span>
  224. <span v-else-if="kefu && scope.row.status == 1" style="color: #2741DE;">待填写手续费</span>
  225. <span v-else-if="kefu && scope.row.status == 5" style="color: #2741DE;"
  226. @click="openAddForm(scope.row)">编辑</span>
  227. <span v-else-if="kefu && scope.row.status == 0" style="color: #FA5A1E;"
  228. @click="openConfirm('recall', scope.row)">撤回</span>
  229. <span v-else-if="kefu && scope.row.status == 2" style="color: #FA5A1E;"
  230. @click="openRejectReason(scope.row.rejectReason)">查看驳回理由</span>
  231. <span v-else-if="activeTab == 'wait' && !kefu" style="color: #2741DE;"
  232. @click="openAuditForm(scope.row)">审核</span>
  233. <span
  234. v-else-if="activeTab == 'pass' && !kefu && !(scope.row.status == 6 || scope.row.status == 4)"
  235. style="color: #2741DE;" @click="openEditForm(scope.row)">编辑</span>
  236. </template>
  237. </el-table-column>
  238. </el-table>
  239. </div>
  240. <div class="pagination">
  241. <el-pagination background :page-size="pageInfo.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
  242. layout="total, sizes, prev, pager, next, jumper" :total="total"
  243. @size-change="handlePagination('size', $event)"
  244. @current-change="handlePagination('page', $event)"></el-pagination>
  245. </div>
  246. </el-card>
  247. </div>
  248. <!-- 撤回确认 -->
  249. <div class="recallDialog" v-show="recallDialog">
  250. <div class="close">
  251. <button @click="closeRecall" class="Btn">关闭</button>
  252. </div>
  253. <div class="text">
  254. <text class="txt">{{ textContent }}</text>
  255. </div>
  256. <div class="cancle">
  257. <button @click="closeRecall" class="Btn">取消</button>
  258. </div>
  259. <div class="confirm">
  260. <button @click="handleRecall" class="Btn">确定</button>
  261. </div>
  262. </div>
  263. <!-- 退款确认 -->
  264. <div class="recallDialog" v-show="refundConfirmDialog">
  265. <div class="close">
  266. <button @click="closeConfirmRefund" class="Btn">关闭</button>
  267. </div>
  268. <div class="text">
  269. <text class="txt">{{ textContent }}</text>
  270. </div>
  271. <div class="cancle">
  272. <button @click="closeConfirmRefund" class="Btn">取消</button>
  273. </div>
  274. <div class="confirm">
  275. <button @click="openRefundDialog" class="Btn">确定</button>
  276. </div>
  277. </div>
  278. <!-- 客服新增弹窗 -->
  279. <el-dialog class="adddialog" v-model="addFormisible" width="20vw" :before-close="closeAddForm">
  280. <el-form class="addForm" ref="addFormRef" :rules="addFormRule" :model="addFormData" label-width="4vw"
  281. label-position="left">
  282. <el-form-item label="精网号" required prop="jwcode">
  283. <el-input v-model="addFormData.jwcode" placeholder="请输入精网号" @blur="jwcodeSeachMarket" />
  284. </el-form-item>
  285. <el-form-item label="客户姓名" required prop="name">
  286. <el-input disabled="true" v-model="addFormData.name" placeholder="请输入客户姓名" />
  287. </el-form-item>
  288. <el-form-item label="所属地区" required prop="market">
  289. <el-input disabled="true" v-model="addFormData.market" :value="addFormData.marketName"
  290. placeholder="请输入所属地区" />
  291. </el-form-item>
  292. <el-form-item label="活动名称" required prop="activity">
  293. <el-input v-model="addFormData.activity" placeholder="请输入活动名称" />
  294. </el-form-item>
  295. <el-form-item label="产品名称" required @change="ifGold" prop="goodsName">
  296. <ProductSelect ref="productSelectRef" v-model="addFormData.goodsName"></ProductSelect>
  297. </el-form-item>
  298. <el-form-item v-show="!isGold" label="产品数量" required prop="goodNum">
  299. <div style="padding-right: 50px; display: flex;">
  300. <el-input style="padding-right: 10px;" v-model="addFormData.goodNum" placeholder="请输入产品数量" />
  301. <span style="color: #999999;">{{ productUnit }}</span>
  302. </div>
  303. </el-form-item>
  304. <div v-show="isGold" style="margin-bottom: 15px; display: flex;">
  305. <div style=" display: flex; ">
  306. <span
  307. style="color: #999999; display: flex; white-space: nowrap;align-items: center;">永久金币</span>
  308. <el-input style="padding-right: 10px; padding-left: 10px; height: 30px; width: 110px;"
  309. v-model="addFormData.permanentGold" />
  310. </div>
  311. <div style="padding-right: 5px; display: flex;">
  312. <span
  313. style="color: #999999; display: flex; white-space: nowrap;align-items: center;">免费金币</span>
  314. <el-input style="padding-right: 10px; padding-left: 10px; height: 30px; width: 110px;"
  315. v-model="addFormData.freeGold" />
  316. </div>
  317. </div>
  318. <el-form-item label="付款币种" required prop="paymentCurrency">
  319. <CurrencySelect v-model="addFormData.paymentCurrency" :items="customOptions" placeholder="请选择付款币种"
  320. @change="handleCurrencyChange" />
  321. </el-form-item>
  322. <el-form-item label="付款金额" required prop="paymentAmount">
  323. <el-input v-model="addFormData.paymentAmount" placeholder="请输入付款金额" />
  324. </el-form-item>
  325. <el-form-item label="支付方式" required prop="payType">
  326. <CurrencySelect v-model="addFormData.payType" :items="paytypeOptions" placeholder="请选择支付方式"
  327. @change="ifGroup">
  328. </CurrencySelect>
  329. </el-form-item>
  330. <el-form-item label="到账地区" required prop="receivedMarket">
  331. <CurrencySelect v-model="addFormData.receivedMarket" :items="MoneyAddressOptions"
  332. :disabled="isGroup" placeholder="请选择到账地区">
  333. </CurrencySelect>
  334. </el-form-item>
  335. <el-form-item label="付款时间" required prop="payTime">
  336. <el-date-picker type="datetime" placement="right" v-model="addFormData.payTime"
  337. placeholder="请选择付款时间" />
  338. </el-form-item>
  339. <el-form-item label="转账凭证" required prop="voucher">
  340. <div class="pic">
  341. <el-upload ref="uploadRef" class="uploader" :show-file-list="false" list-type="picture-card"
  342. :auto-upload="false" :before-upload="beforeUpload" :on-error="handelImgErr"
  343. :on-change="handleImageChange" :http-request="customUpload">
  344. <img v-if="addFormData.voucher" :src="addFormData.voucher" class="avatar"
  345. style="height: 100%; width: 100%; object-fit: cover;" />
  346. <el-icon v-else class="avatar-uploader-icon">
  347. <Plus />
  348. </el-icon>
  349. </el-upload>
  350. </div>
  351. </el-form-item>
  352. <el-form-item label="备注" required prop="remark">
  353. <el-input v-model="addFormData.remark" type="textarea" :rows="4" placeholder="请输入备注" maxlength="100"
  354. show-word-limit />
  355. </el-form-item>
  356. </el-form>
  357. <template #footer>
  358. <span class="dialog-footer">
  359. <el-button style="background-color: #7E91FF;" @click="closeAddForm">取消</el-button>
  360. <el-button v-if="addOrEdit == 1" style="background-color: #2741DE; margin-left: 2.5vw;"
  361. type="primary" @click="throttledhandleAddForm">确定</el-button>
  362. <el-button v-else-if="addOrEdit == 2" style="background-color: #2741DE; margin-left: 2.5vw;"
  363. type="primary" @click="throttledhandleEditForm">编辑</el-button>
  364. </span>
  365. </template>
  366. </el-dialog>
  367. <!-- 审核弹窗 -->
  368. <el-dialog class="adddialog" v-model="auditFormisible" width="20vw" :before-close="closeAuditForm">
  369. <el-form class="addForm" label-width="4vw" label-position="left">
  370. <el-form-item label="精网号">
  371. <el-input disabled="true" v-model="auditFormData.jwcode" placeholder="请输入驳回理由" />
  372. </el-form-item>
  373. <el-form-item label="客户姓名">
  374. <el-input disabled="true" v-model="auditFormData.name" placeholder="请输入客户姓名" />
  375. </el-form-item>
  376. <el-form-item label="所属地区">
  377. <el-input disabled="true" v-model="auditFormData.market" />
  378. </el-form-item>
  379. <el-form-item label="活动名称">
  380. <el-input disabled="true" v-model="auditFormData.activity" placeholder="请输入活动名称" />
  381. </el-form-item>
  382. <el-form-item label="产品名称">
  383. <el-select disabled="true" v-model="auditFormData.goodsName" />
  384. </el-form-item>
  385. <el-form-item label="付款币种">
  386. <el-select disabled="true" v-model="auditFormData.paymentCurrency" placeholder="请选择付款币种"
  387. @change="handleCurrencyChange" />
  388. </el-form-item>
  389. <el-form-item label="付款金额">
  390. <el-input disabled="true" v-model="auditFormData.paymentAmount" placeholder="请输入付款金额" />
  391. </el-form-item>
  392. <el-form-item label="支付方式">
  393. <el-select disabled="true" v-model="auditFormData.payType" :items="paytypeOptions"
  394. placeholder="请选择支付方式" />
  395. </el-form-item>
  396. <el-form-item label="到账地区">
  397. <el-select disabled="true" v-model="auditFormData.receivedMarket" placeholder="到账地区" />
  398. </el-form-item>
  399. <el-form-item label="付款时间">
  400. <el-date-picker disabled="true" type="datetime" v-model="auditFormData.payTime"
  401. placeholder="请选择付款时间" />
  402. </el-form-item>
  403. <el-form-item label="转账凭证">
  404. <div class="pic">
  405. <el-upload ref="uploadRef" class="uploader" :show-file-list="false" list-type="picture-card"
  406. :auto-upload="false" :before-upload="beforeUpload" :on-error="handelImgErr"
  407. :on-change="handleImageChange" :http-request="customUpload">
  408. <img v-if="auditFormData.voucher" :src="auditFormData.voucher" class="avatar"
  409. style="height: 100%; width: 100%; object-fit: cover;" />
  410. <el-icon v-else class="avatar-uploader-icon">
  411. <Plus />
  412. </el-icon>
  413. </el-upload>
  414. <el-text class="picText">
  415. 仅支持.jpg .png格式文件 1 MB
  416. </el-text>
  417. </div>
  418. </el-form-item>
  419. <el-form-item label="备注">
  420. <el-input disabled="true" v-model="auditFormData.remark" type="textarea" :rows="3"
  421. placeholder="请输入备注" maxlength="100" show-word-limit />
  422. </el-form-item>
  423. <el-form-item label="驳回理由" v-if="ifReject" required>
  424. <el-input v-model="auditFormData.rejectReason" type="textarea" :rows="3" placeholder="请输入驳回理由"
  425. maxlength="100" show-word-limit />
  426. </el-form-item>
  427. </el-form>
  428. <template #footer>
  429. <span class="dialog-footer" v-if="!ifReject">
  430. <el-button style="background-color: #7E91FF;" @click="ifReject = true">驳回</el-button>
  431. <el-button :style="{
  432. backgroundColor: isBtnDisabled ? '#E5E5E5FF' : '#2741DEFF',
  433. marginLeft: '60px',
  434. color: isBtnDisabled ? '#8A8A8A' : '#F3FAFE'
  435. }" @click="handelAudit" :disabled="isBtnDisabled">{{ btnText }}</el-button>
  436. </span>
  437. <span class="dialog-footer" v-if="ifReject">
  438. <el-button style="background-color: #7E91FF;" @click="closeAuditForm">取消</el-button>
  439. <el-button style="background-color: #2741DE; margin-left: 2.5vw;" type="primary"
  440. @click="throttledhandelAuditReject">确定</el-button>
  441. </span>
  442. </template>
  443. </el-dialog>
  444. <!-- 编辑填手续费弹窗 -->
  445. <el-dialog class="editdialog" v-model="editFormisible" width="20vw" :before-close="closeEditForm">
  446. <div class="content">
  447. <div class="left">
  448. <el-form class="editForm" label-width="4.5vw" label-position="left">
  449. <el-form-item label="精网号">
  450. <el-input disabled="true" v-model="editFormData.jwcode" placeholder="请输入驳回理由" />
  451. </el-form-item>
  452. <el-form-item label="客户姓名">
  453. <el-input disabled="true" v-model="editFormData.name" placeholder="请输入客户姓名" />
  454. </el-form-item>
  455. <el-form-item label="所属地区">
  456. <el-input disabled="true" v-model="editFormData.marketName" placeholder="请输入所属地区" />
  457. </el-form-item>
  458. <el-form-item label="活动名称">
  459. <el-input disabled="true" v-model="editFormData.activity" placeholder="请输入活动名称" />
  460. </el-form-item>
  461. <el-form-item label="产品名称">
  462. <el-select disabled="true" v-model="editFormData.goodsName" placeholder="请选择产品名称"
  463. clearable></el-select>
  464. </el-form-item>
  465. <el-form-item v-show="!isEditGold" label="产品数量">
  466. <div style="padding-right: 50px; display: flex;">
  467. <el-input disabled="true" style="padding-right: 10px;" v-model="editFormData.goodNum"
  468. placeholder="请输入产品数量" />
  469. <span style="color: #999999;"></span>
  470. </div>
  471. </el-form-item>
  472. <div v-show="isEditGold" style="margin-bottom: 15px; display: flex;">
  473. <div style=" display: flex; ">
  474. <span
  475. style="color: #999999; display: flex; white-space: nowrap;align-items: center;">永久金币</span>
  476. <el-input disabled="true"
  477. style="padding-right: 10px; padding-left: 10px; height: 30px; width: 110px;"
  478. v-model="editFormData.permanentGold" />
  479. </div>
  480. <div style="padding-right: 5px; display: flex;">
  481. <span
  482. style="color: #999999; display: flex; white-space: nowrap;align-items: center;">免费金币</span>
  483. <el-input disabled="true"
  484. style="padding-right: 10px; padding-left: 10px; height: 30px; width: 110px;"
  485. v-model="editFormData.freeGold" />
  486. </div>
  487. </div>
  488. <el-form-item label="付款币种">
  489. <CurrencySelect :disabled="!ifOnline" v-model="editFormData.paymentCurrency"
  490. :items="customOptions" placeholder="请选择付款币种" />
  491. </el-form-item>
  492. <el-form-item label="付款金额">
  493. <el-input :disabled="!ifOnline" v-model="editFormData.paymentAmount"
  494. placeholder="请输入付款金额" />
  495. </el-form-item>
  496. <el-form-item label="支付方式">
  497. <el-select disabled="true" v-model="editFormData.payType" placeholder="请选择支付方式"
  498. clearable></el-select>
  499. </el-form-item>
  500. <el-form-item label="到账地区">
  501. <el-select disabled="true" v-model="editFormData.receivedMarket" placeholder="请选择到账地区"
  502. clearable></el-select>
  503. </el-form-item>
  504. <el-form-item label="付款时间">
  505. <el-date-picker disabled="true" type="datetime" v-model="editFormData.payTime"
  506. placeholder="请选择付款时间" />
  507. </el-form-item>
  508. <el-form-item label="转账凭证">
  509. <div class="pic">
  510. <el-upload disabled="true" ref="uploadRef" class="uploader" :show-file-list="false"
  511. list-type="picture-card" :auto-upload="false" :before-upload="beforeUpload"
  512. :on-error="handelImgErr" :on-change="handleImageChange"
  513. :http-request="customUpload">
  514. <img v-if="editFormData.voucher" :src="editFormData.voucher" class="avatar"
  515. style="height: 100%; width: 100%; object-fit: cover;" />
  516. <el-icon v-else class="avatar-uploader-icon">
  517. <Plus />
  518. </el-icon>
  519. </el-upload>
  520. <el-text class="picText">
  521. 仅支持.jpg .png格式文件 1 MB
  522. </el-text>
  523. </div>
  524. </el-form-item>
  525. <el-form-item label="备注">
  526. <el-input disabled="true" v-model="editFormData.remark" type="textarea" :rows="4"
  527. placeholder="请输入驳回理由" maxlength="100" show-word-limit />
  528. </el-form-item>
  529. </el-form>
  530. </div>
  531. <div class="right">
  532. <el-form ref="editFormRef" :rules="editFormRule" :model="editFormData" class="editFormRighrt"
  533. label-width="4.5vw" label-position="left">
  534. <el-form-item label="到账货币">
  535. <CurrencySelect v-model="editFormData.receivedCurrency" :items="customOptions"
  536. placeholder="请选择到账货币" />
  537. </el-form-item>
  538. <el-form-item label="到账金额" prop="receivedAmount">
  539. <el-input v-model="editFormData.receivedAmount" placeholder="请输入到账金额" />
  540. </el-form-item>
  541. <el-form-item label="手续费" prop="handlingCharge">
  542. <el-input v-model="editFormData.handlingCharge" placeholder="请输入手续费" />
  543. </el-form-item>
  544. <!-- <el-form-item label="银行流水订单号">
  545. <el-input v-model="editFormData.jwcode" placeholder="请输入银行流水订单号" />
  546. </el-form-item> -->
  547. <el-form-item label="到账时间">
  548. <el-date-picker type="datetime" v-model="editFormData.receivedTime" placeholder="请输入到账时间" />
  549. </el-form-item>
  550. </el-form>
  551. <span class="editBtns">
  552. <button class="editBtn1" @click="closeEditForm">
  553. <text class="txt">
  554. 取消
  555. </text>
  556. </button>
  557. <button class="editBtn2" @click="throttledsubmitEditForm">
  558. <text class="txt">
  559. 提交
  560. </text>
  561. </button>
  562. </span>
  563. </div>
  564. </div>
  565. </el-dialog>
  566. <!-- 新增退款 -->
  567. <el-dialog v-model="refundDialog" title="退款" class="refundDialog" overflow draggable style="width: 40vw;"
  568. :before-close="closeRefundForm">
  569. <div style="display: flex;">
  570. <div class="left">
  571. <div class="add-item">
  572. <el-text style="width:4vw;">精网号</el-text>
  573. <el-input v-model="refundFormData.jwcode" style="width:10vw;" disabled />
  574. </div>
  575. <div class="add-item">
  576. <el-text style="width:4vw;">客户姓名</el-text>
  577. <el-input v-model="refundFormData.name" style="width:10vw;" disabled />
  578. </div>
  579. <div class="add-item">
  580. <el-text style="width:4vw;">所属地区</el-text>
  581. <el-input v-model="refundFormData.marketName" style="width:10vw;" disabled />
  582. </div>
  583. <div class="add-item">
  584. <el-text style="width:4vw;">活动名称</el-text>
  585. <el-input v-model="refundFormData.activity" style="width:10vw;" disabled />
  586. </div>
  587. <div class="add-item">
  588. <el-text style="width:4vw;">产品名称</el-text>
  589. <el-input v-model="refundFormData.goodsName" style="width:10vw;" disabled />
  590. </div>
  591. <div class="add-item">
  592. <el-text style="width:4vw;">产品数量</el-text>
  593. <el-input v-model="refundFormData.goodNum" style="width:10vw;" disabled />
  594. &nbsp;
  595. </div>
  596. <div class="add-item">
  597. <el-text style="width:4vw;">付款币种</el-text>
  598. <el-input v-model="refundFormData.paymentCurrency" style="width:10vw;" disabled />
  599. </div>
  600. <div class="add-item">
  601. <el-text style="width:4vw;">付款金额</el-text>
  602. <el-input v-model="refundFormData.paymentAmount" style="width:10vw;" disabled />
  603. </div>
  604. <div class="add-item">
  605. <el-text style="width:4vw;">支付方式</el-text>
  606. <el-input v-model="refundFormData.payType" style="width:10vw;" disabled />
  607. </div>
  608. <div class="add-item">
  609. <el-text style="width:4vw;">付款时间</el-text>
  610. <el-date-picker v-model="refundFormData.payTime" type="datetime" style="width:10vw;" disabled />
  611. </div>
  612. <div class="add-item">
  613. <el-text style="width:4vw;" size="small">转账凭证</el-text>
  614. <el-form-item :rules="{ required: true, message: '请上传图片', trigger: 'change' }">
  615. <el-upload ref="uploadRef" :auto-upload="false" list-type="picture-card"
  616. :show-file-list="false">
  617. <template #default>
  618. <img v-if="refundFormData.voucher" :src="refundFormData.voucher"
  619. style="width: 100%; height: 100%; object-fit: cover;">
  620. <el-icon v-else>
  621. <Plus />
  622. </el-icon>
  623. </template>
  624. </el-upload>
  625. </el-form-item>
  626. </div>
  627. <div class="add-item">
  628. <el-text style="width:4vw;">备注</el-text>
  629. <el-input v-model="refundFormData.remark" style="width:10vw;" :rows="3" type="textarea"
  630. maxLength="100" disabled show-word-limit />
  631. </div>
  632. </div>
  633. <div class="right">
  634. <div class="add-item">
  635. <el-text style="width:4vw;">退款模式</el-text>
  636. <el-radio-group v-model="refundFormData.refundModel">
  637. <el-radio value="0">全部退款</el-radio>
  638. <el-radio value="1">部分退款</el-radio>
  639. </el-radio-group>
  640. </div>
  641. <div class="add-item">
  642. <el-text style="width:4vw;">退款理由</el-text>
  643. <el-input v-model="refundFormData.refundReason" style="width:10vw;" :rows="5" maxlength="150"
  644. show-word-limit type="textarea" />
  645. </div>
  646. <div>ps:请在退款理由表明用户的退款需求</div>
  647. <div style="display:flex;justify-content: center;margin-top: 5vh;">
  648. <el-button type="default" @click="">重置</el-button>
  649. <el-button type="primary" @click="throttledsubmitRefund">提交</el-button>
  650. </div>
  651. </div>
  652. </div>
  653. </el-dialog>
  654. </div>
  655. </template>
  656. <script setup>
  657. import { ref, watch, computed, onMounted } from 'vue';
  658. import { storeToRefs } from 'pinia';
  659. import { ElMessage, ElMessageBox } from 'element-plus'
  660. import API from '@/util/http.js'
  661. import { color } from 'echarts';
  662. import { template } from 'lodash';
  663. import CurrencySelect from '@/components/MoneyManage/CurrencySelect.vue'
  664. import ProductSelect from '@/components/MoneyManage/ProductSelect.vue'
  665. import { Search } from '@element-plus/icons-vue';
  666. import request from '@/util/http.js'
  667. import moment from 'moment'
  668. import { useAdminStore } from '@/store/index.js'
  669. import { hasMenuPermission } from '@/utils/menuTreePermission.js'
  670. import { isNode } from 'mathjs';
  671. const adminStore = useAdminStore();
  672. const { menuTree } = storeToRefs(adminStore);
  673. console.log('menutree', menuTree.value);
  674. import _ from 'lodash'
  675. import { addFormRule, editFormRule } from './utils/recriveFormRules.js'
  676. //===================== 查询相关 =================================
  677. const tableData = ref([])
  678. const searchData = ref({
  679. })
  680. const defaultTime = [
  681. new Date(2000, 1, 1, 0, 0, 0),
  682. new Date(2000, 2, 1, 23, 59, 59),
  683. ]
  684. const getTime = ref([])
  685. const search = () => {
  686. getlist()
  687. ElMessage.success('查询成功')
  688. }
  689. const reset = () => {
  690. searchData.value = {}
  691. getTime.value = []
  692. getlist()
  693. }
  694. //获得表格数据接口
  695. const getlist = async () => {
  696. try {
  697. let payCurrencySelect = ''
  698. let goodsName = ''
  699. if (getTime.value && getTime.value.length === 2) {
  700. searchData.value.startTime = moment(getTime.value[0]).format('YYYY-MM-DD HH:mm:ss')
  701. searchData.value.endTime = moment(getTime.value[1]).format('YYYY-MM-DD HH:mm:ss')
  702. }
  703. else {
  704. searchData.value.startTime = ''
  705. searchData.value.endTime = ''
  706. }
  707. if (searchData.value.goodsName) {
  708. goodsName = searchData.value.goodsName[searchData.value.goodsName.length - 1]
  709. }
  710. if (searchData.value.paymentCurrency) {
  711. payCurrencySelect = CurrencyForId(searchData.value.paymentCurrency)
  712. }
  713. //角色id 0:客服 1:地方财务 2:总部财务
  714. let cashRoleId = ''
  715. let receivedMarket = adminData.value.markets
  716. if (kefu.value) {
  717. cashRoleId = '0'
  718. receivedMarket = ''
  719. } else if (caiwu.value) {
  720. cashRoleId = '1'
  721. if (activeTab.value == 'wait') {
  722. searchData.value.status = 0
  723. } else if (activeTab.value == 'pass') {
  724. searchData.value.status = 13
  725. } else if (activeTab.value == 'done') {
  726. searchData.value.status = 46
  727. } else if (activeTab.value == 'reject') {
  728. searchData.value.status = 2
  729. }
  730. } else if (HQcaiwu.value) {
  731. cashRoleId = '2'
  732. console.log('ctiveTab.value', activeTab.value);
  733. if (activeTab.value == 'pass') {
  734. searchData.value.status = 13
  735. } else if (activeTab.value == 'done') {
  736. searchData.value.status = 46
  737. }
  738. }
  739. const result = await request({
  740. url: '/cashCollection/selectCollection',
  741. data: {
  742. ...pageInfo.value,
  743. cashCollection: {
  744. ...searchData.value,
  745. ...getTime.value,
  746. submitterId: adminData.value.id,
  747. receivedMarket: MarketNameForId(receivedMarket),
  748. cashRoleId: cashRoleId,
  749. paymentCurrency: payCurrencySelect,
  750. submitterMarket: receivedMarket,
  751. goodsName: goodsName,
  752. market: MarketNameForId(searchData.value.market)
  753. }
  754. }
  755. })
  756. if (result.code == 200) {
  757. console.log('返回参数:', result);
  758. tableData.value = result.data.list
  759. total.value = result.data.total
  760. } else {
  761. ElMessage.error('数据异常')
  762. console.log(result.msg);
  763. }
  764. } catch (error) {
  765. console.log(error);
  766. }
  767. }
  768. //==================== 标签切换 =========================
  769. const activeTab = ref('wait')
  770. const navigateTo = async (tab) => {
  771. if (tab === 'wait') {
  772. activeTab.value = 'wait'
  773. await getlist()
  774. } else if (tab === 'pass') {
  775. activeTab.value = 'pass'
  776. await getlist()
  777. } else if (tab === 'done') {
  778. activeTab.value = 'done'
  779. await getlist()
  780. }
  781. else if (tab === 'reject') {
  782. activeTab.value = 'reject'
  783. await getlist()
  784. }
  785. }
  786. //角色id 0:客服 1:地方财务 2:总部财务
  787. const cashRoleId = ref('')
  788. const kefu = ref(true)
  789. const caiwu = ref(false)
  790. const HQcaiwu = ref(false)
  791. const superAdmin = ref(false)
  792. const checkKefu = () => {
  793. kefu.value = true
  794. caiwu.value = false
  795. HQcaiwu.value = false
  796. searchData.value = {}
  797. getlist()
  798. }
  799. const checkCaiwu = () => {
  800. kefu.value = false
  801. caiwu.value = true
  802. HQcaiwu.value = false
  803. activeTab.value = 'wait'
  804. searchData.value = {}
  805. getlist()
  806. }
  807. const checkHqCaiwu = () => {
  808. kefu.value = false
  809. caiwu.value = false
  810. HQcaiwu.value = true
  811. activeTab.value = 'pass'
  812. searchData.value = {}
  813. getlist()
  814. }
  815. //================= 客服新增弹窗 ==================
  816. const addFormData = ref({
  817. name: '',
  818. market: '',
  819. permanentGold: 0,
  820. freeGold: 0,
  821. goodsName: ''
  822. })
  823. const addFormRef = ref(null)
  824. const isGold = ref(false)
  825. const isProduct = ref(false)
  826. const selectItems = [
  827. "AI机构追踪",
  828. "AI机构出击",
  829. "AI机构资金",
  830. "AI机活跃度",
  831. "超级机构透视",
  832. "超级机构伏击",
  833. "超级机构猎杀",
  834. "超级机构脉搏",
  835. "超级机构罗盘",
  836. "静态信息费",
  837. "博股会员"
  838. ];
  839. const productUnit = ref('个')
  840. const ifGold = () => {
  841. if (addFormData.value.goodsName === '金币充值') {
  842. isGold.value = true
  843. addFormData.value.goodNum = 0
  844. } else {
  845. isGold.value = false
  846. if (selectItems.includes(addFormData.value.goodsName)) {
  847. productUnit.value = '年'
  848. } else {
  849. productUnit.value = '个'
  850. }
  851. }
  852. }
  853. const isEditGold = ref(false)
  854. const EditifGold = () => {
  855. if (editFormData.value.goodsName === '金币充值') {
  856. isEditGold.value = true
  857. } else {
  858. isEditGold.value = false
  859. }
  860. }
  861. //是否为默认归属平台
  862. const isGroup = ref(false)
  863. const ifGroup = () => {
  864. if (addFormData.value.payType == 'Stripe-链接收款') {
  865. isGroup.value = true
  866. addFormData.value.receivedMarket = '香港'
  867. } else if (addFormData.value.payType == 'PaymentAsia-链接收款') {
  868. isGroup.value = true
  869. addFormData.value.receivedMarket = '香港'
  870. } else if (addFormData.value.payType == 'Ipay88-链接收款') {
  871. isGroup.value = true
  872. addFormData.value.receivedMarket = '马来西亚'
  873. } else {
  874. isGroup.value = false
  875. }
  876. }
  877. const addFormisible = ref(false)
  878. const jwcodeSeachMarket = async () => {
  879. try {
  880. const result = await request({
  881. url: '/cashCollection/getNameAndMarket',
  882. data: addFormData.value.jwcode
  883. })
  884. addFormData.value.market = result.data.market
  885. addFormData.value.marketName = result.data.marketName
  886. addFormData.value.name = result.data.name
  887. console.log('返回参数:', result);
  888. } catch (error) {
  889. console.log(error);
  890. }
  891. }
  892. const openRejectReason = (reason) => {
  893. ElMessageBox.alert(reason, '驳回理由', {
  894. // if you want to disable its autofocus
  895. // autofocus: false,
  896. confirmButtonText: '确认',
  897. customClass: 'reject-reason-box',
  898. })
  899. }
  900. const uploadRef = ref()
  901. const addOrEdit = ref(0) // 1 为新增 2 为编辑
  902. const productSelectRef = ref(null);
  903. const openAddForm = (row) => {
  904. productSelectRef.value?.resetSelect();
  905. if (row.jwcode) {
  906. console.log('编辑回显数据', row);
  907. addOrEdit.value = 2
  908. addFormData.value = { ...row };
  909. jwcodeSeachMarket()
  910. ifGold()
  911. addFormisible.value = true
  912. } else {
  913. addOrEdit.value = 1
  914. addFormData.value = {
  915. goodsName: ''
  916. }
  917. addFormisible.value = true
  918. }
  919. }
  920. const closeAddForm = () => {
  921. addFormisible.value = false
  922. addFormData.value = {}
  923. addOrEdit.value = 0
  924. isGold.value = false
  925. addFormRef.value?.resetFields();
  926. }
  927. //客服新增
  928. const handleAddForm = async () => {
  929. try {
  930. await addFormRef.value.validate();
  931. if (addFormData.value.payTime) {
  932. addFormData.value.payTime = moment(addFormData.value.payTime).format('YYYY-MM-DD HH:mm:ss')
  933. }
  934. console.log('客服新增的数据', addFormData.value);
  935. const result = await request({
  936. url: '/cashCollection/add',
  937. data: {
  938. ...addFormData.value,
  939. submitterId: adminData.value.id,
  940. permanentGold: (addFormData.value.permanentGold || 0) * 100,
  941. freeGold: (addFormData.value.freeGold || 0) * 100,
  942. goodNum: addFormData.value.goodNum || 0,
  943. paymentCurrency: CurrencyForId(addFormData.value.paymentCurrency) || '',
  944. receivedMarket: MarketNameForId(addFormData.value.receivedMarket) || '',
  945. paymentAmount: (addFormData.value.paymentAmount) * 100,
  946. submitterMarket: adminData.value.markets
  947. }
  948. })
  949. if (result.code == 200) {
  950. ElMessage.success('添加成功')
  951. getlist()
  952. closeAddForm()
  953. } else {
  954. }
  955. console.log('返回参数:', result);
  956. } catch (error) {
  957. console.log('出啥错了?',error);
  958. ElMessage.error('请完善表单信息后提交');
  959. }
  960. }
  961. //客服提交撤回的编辑记录
  962. const handleEditForm = async () => {
  963. try {
  964. if (addFormData.value.payTime) {
  965. addFormData.value.payTime = moment(addFormData.value.payTime).format('YYYY-MM-DD HH:mm:ss')
  966. }
  967. console.log('客服编辑的数据', addFormData.value);
  968. const result = await request({
  969. url: '/cashCollection/reSubmit',
  970. data: {
  971. ...addFormData.value,
  972. submitterId: adminData.value.id,
  973. permanentGold: (addFormData.value.permanentGold || 0) * 100,
  974. freeGold: (addFormData.value.freeGold || 0) * 100,
  975. goodNum: addFormData.value.goodNum || 0,
  976. paymentCurrency: CurrencyForId(addFormData.value.paymentCurrency) || '',
  977. receivedMarket: MarketNameForId(addFormData.value.receivedMarket) || '',
  978. paymentAmount: (addFormData.value.paymentAmount) * 100
  979. }
  980. })
  981. if (result.code == 200) {
  982. ElMessage.success('编辑成功')
  983. getlist()
  984. closeAddForm()
  985. }
  986. console.log('返回参数:', result);
  987. } catch (error) {
  988. console.log(error);
  989. }
  990. }
  991. //付款币种
  992. const selectedCurrency = ref('');
  993. const customOptions = ref(['美元(USD)', '港币(HKD)', '新币(SGD)', '马币(MYR)', '泰铢(THB)', '加币(CAD)', '越南盾(VDN)', '韩元(KRW)']);
  994. //支付方式
  995. const paytypeOptions = ref(["Stripe-链接收款", "PaymentAsia-链接收款", "Ipay88-链接收款", "银行转账", "刷卡", "现金", "支票", "Grabpay", "Nets", "E-Transfer", "Paypal"])
  996. const MoneyAddressOptions = ref(['马来西亚', '香港', '新加坡', '泰国', '越南HCM', '加拿大'])
  997. const handleCurrencyChange = (option) => {
  998. console.log('选中的币种:', option);
  999. };
  1000. //图片上传
  1001. const handleImgSuccess = (response, uploadFile) => {
  1002. try {
  1003. console.log('11', response)
  1004. addFormData.value.voucher = response.data.url
  1005. console.log('22', response.data.url)
  1006. } catch (error) {
  1007. console.log('报错信息', error)
  1008. ElMessage.error(response.msg || '图片上传失败')
  1009. }
  1010. }
  1011. const handelImgErr = (err) => {
  1012. console.log(err);
  1013. addFormData.value.imageUrl = null
  1014. ElMessage.error("图片上传失败")
  1015. }
  1016. const beforeUpload = (rawFile) => {
  1017. if (rawFile.type !== 'image/jpeg' && rawFile.type !== 'image/png') {
  1018. ElMessage.error('图片必须是jpg或png类型!')
  1019. return false
  1020. } else if (rawFile.size / 1024 / 1024 > 2) {
  1021. ElMessage.error('图片大小不能超过 2MB!')
  1022. return false
  1023. }
  1024. return true
  1025. }
  1026. const handleImageChange = (file) => {
  1027. uploadRef.value.submit()
  1028. }
  1029. const customUpload = async (options) => {
  1030. try {
  1031. const formData = new FormData()
  1032. formData.append('file', options.file)
  1033. const response = await API({
  1034. url: 'https://api.homilychart.com/hljw/api/aws/upload',
  1035. method: 'POST',
  1036. data: formData,
  1037. headers: {
  1038. 'Content-Type': 'multipart/form-data'
  1039. }
  1040. })
  1041. if (response.code === 200 && response.data) {
  1042. handleImgSuccess(response, options.file)
  1043. ElMessage.success('上传成功')
  1044. } else {
  1045. options.onError(response)
  1046. ElMessage.error(response.msg || '上传失败')
  1047. }
  1048. } catch (error) {
  1049. console.error('上传错误:', error)
  1050. ElMessage.error(`上传失败: ${error.msg || error.message || '网络异常'}`)
  1051. }
  1052. }
  1053. // 预览图片函数
  1054. const previewImage = (imageUrl) => {
  1055. // 使用 element-plus 的 el-image 组件实现图片预览功能
  1056. const imageElement = document.createElement('img');
  1057. imageElement.src = imageUrl;
  1058. imageElement.style.maxWidth = '80vw';
  1059. imageElement.style.maxHeight = '80vh';
  1060. const viewer = document.createElement('div');
  1061. viewer.style.position = 'fixed';
  1062. viewer.style.top = '0';
  1063. viewer.style.left = '0';
  1064. viewer.style.width = '100vw';
  1065. viewer.style.height = '100vh';
  1066. viewer.style.backgroundColor = 'rgba(0, 0, 0, 0.7)';
  1067. viewer.style.display = 'flex';
  1068. viewer.style.justifyContent = 'center';
  1069. viewer.style.alignItems = 'center';
  1070. viewer.style.zIndex = '9999';
  1071. viewer.style.overflow = 'auto';
  1072. viewer.appendChild(imageElement);
  1073. document.body.appendChild(viewer);
  1074. viewer.addEventListener('click', () => {
  1075. document.body.removeChild(viewer);
  1076. });
  1077. };
  1078. //========= 客服新增 退款/撤回 相关 ===============
  1079. const refundFormData = ref({
  1080. })
  1081. const refundDialog = ref(false)
  1082. const openRefundDialog = () => {
  1083. refundDialog.value = true
  1084. closeConfirmRefund()
  1085. }
  1086. const closeRefundForm = () => {
  1087. refundDialog.value = false
  1088. refundFormData.value = {}
  1089. }
  1090. const submitRefund = async () => {
  1091. try {
  1092. const result = await request({
  1093. url: '/Money/add',
  1094. data: {
  1095. jwcode: refundFormData.value.jwcode, // 精网号(必填)
  1096. name: refundFormData.value.name, // 姓名(必填)
  1097. market: refundFormData.value.marketName, // 所属地区(必填)
  1098. activity: refundFormData.value.activity, // 活动名称(可选)
  1099. bankCode: refundFormData.value.bankCode, // 银行流水订单号(必填)
  1100. goodsName: refundFormData.value.goodsName, // 商品名称(必填)
  1101. goodNum: refundFormData.value.goodNum, // 商品数量(必填,默认0)
  1102. paymentCurrency: refundFormData.value.paymentCurrency, // 付款币种(必填)
  1103. paymentAmount: (refundFormData.value.paymentAmount) * 100, // 付款金额(必填)
  1104. receivedCurrency: refundFormData.value.receivedCurrency, // 到账币种(必填)
  1105. receivedAmount: (refundFormData.value.receivedAmount) * 100, // 到账金额(必填)
  1106. handlingCharge: (refundFormData.value.handlingCharge) * 100, // 手续费(可选)
  1107. receivedMarket: refundFormData.value.receivedMarket, // 到账地区(可选)
  1108. payType: refundFormData.value.payType, // 支付方式(必填)
  1109. payTime: refundFormData.value.payTime, // 付款时间,格式:yyyy-MM-dd HH:mm:ss(可选)
  1110. receivedTime: refundFormData.value.receivedTime, // 到账时间,格式:yyyy-MM-dd HH:mm:ss(可选)
  1111. areaServise: adminData.value.adminName, // 提交人(可选)
  1112. submitterId: adminData.value.id,
  1113. voucher: refundFormData.value.voucher, // 转账凭证URL(可选)
  1114. remark: refundFormData.value.remark, // 备注信息(可选)
  1115. refundReason: refundFormData.value.refundReason, // 退款备注-客服填写(可选)
  1116. refundModel: refundFormData.value.refundModel, // 退款方式:0-全额,1-部分(可选)
  1117. id: refundFormData.value.id, //订单id
  1118. orderCode: refundFormData.value.orderCode,
  1119. permanentGold: (refundFormData.value.permanentGold) * 100 || null,
  1120. freeGold: (refundFormData.value.freeGold) * 100 || null
  1121. }
  1122. })
  1123. if (result.code == 200) {
  1124. ElMessage.success('新增退款成功')
  1125. getlist()
  1126. closeRefundForm()
  1127. } else {
  1128. ElMessage.error(result.msg)
  1129. getlist()
  1130. }
  1131. console.log('返回参数:', result);
  1132. } catch (error) {
  1133. console.log(error);
  1134. }
  1135. }
  1136. //撤回弹窗
  1137. const textContent = ref('')
  1138. const recallDialog = ref(false)
  1139. const refundConfirmDialog = ref(false)
  1140. const RecallNum = ref('')
  1141. const openConfirm = (val, row) => {
  1142. console.log('打开弹窗', val, row);
  1143. if (val == 'refund') {
  1144. textContent.value = '将要对该订单退款!'
  1145. refundConfirmDialog.value = true
  1146. refundFormData.value = { ...row }
  1147. }
  1148. if (val == 'recall') {
  1149. textContent.value = '将要撤回该信息!'
  1150. recallDialog.value = true
  1151. RecallNum.value = row.orderCode
  1152. }
  1153. }
  1154. const closeRecall = () => {
  1155. recallDialog.value = false
  1156. textContent.value = ''
  1157. RecallNum.value = ''
  1158. }
  1159. const handleRecall = async () => {
  1160. try {
  1161. const result = await request({
  1162. url: '/cashCollection/cancel',
  1163. data: {
  1164. orderCode: RecallNum.value,
  1165. }
  1166. })
  1167. if (result.code == 200) {
  1168. ElMessage.success('撤回成功')
  1169. getlist()
  1170. closeRecall()
  1171. }
  1172. console.log('返回参数:', result);
  1173. } catch (error) {
  1174. console.log(error);
  1175. }
  1176. }
  1177. const closeConfirmRefund = () => {
  1178. refundConfirmDialog.value = false
  1179. textContent.value = ''
  1180. }
  1181. //================== 财务编辑相关 =========================
  1182. const editFormData = ref({
  1183. })
  1184. const ifOnline = ref(false)
  1185. const editFormisible = ref(false)
  1186. const editFormRef = ref(null)
  1187. const openEditForm = (row) => {
  1188. console.log('编辑时该行数据:', row);
  1189. editFormData.value = row
  1190. EditifGold()
  1191. if (row.status == 3) {
  1192. ifOnline.value = true
  1193. } else {
  1194. ifOnline.value = false
  1195. }
  1196. editFormisible.value = true
  1197. }
  1198. const closeEditForm = () => {
  1199. editFormisible.value = false
  1200. editFormData.value = {}
  1201. getlist()
  1202. }
  1203. //提交编辑
  1204. const submitEditForm = async () => {
  1205. try {
  1206. await editFormRef.value.validate();
  1207. if (editFormData.value.receivedTime) {
  1208. editFormData.value.receivedTime = moment(editFormData.value.receivedTime).format('YYYY-MM-DD HH:mm:ss')
  1209. }
  1210. const result = await request({
  1211. url: '/cashCollection/complete',
  1212. data: {
  1213. orderCode: editFormData.value.orderCode,
  1214. handlingCharge: editFormData.value.handlingCharge * 100,
  1215. paymentCurrency: CurrencyForId(editFormData.value.paymentCurrency),
  1216. paymentAmount: (editFormData.value.paymentAmount) * 100,
  1217. receivedCurrency: CurrencyForId(editFormData.value.receivedCurrency),
  1218. receivedAmount: editFormData.value.receivedAmount * 100,
  1219. receivedTime: editFormData.value.receivedTime,
  1220. receivedRemark: editFormData.value.receivedRemark,
  1221. }
  1222. })
  1223. if (result.code == 200) {
  1224. ElMessage.success('提交成功')
  1225. getlist()
  1226. closeEditForm()
  1227. }
  1228. console.log('返回参数:', result);
  1229. } catch (error) {
  1230. console.log(error);
  1231. ElMessage.error('请检查表单数据格式');
  1232. }
  1233. }
  1234. //================== 审核相关 =========================
  1235. const auditFormData = ref({
  1236. })
  1237. //财务通过审核请求
  1238. const handelAudit = async () => {
  1239. try {
  1240. const result = await request({
  1241. url: '/cashAudit/collectionAudit',
  1242. data: {
  1243. orderCode: auditFormData.value.orderCode,
  1244. action: 1,
  1245. auditId: adminData.value.id
  1246. }
  1247. })
  1248. if (result.code == 200) {
  1249. ElMessage.success('审核成功')
  1250. getlist()
  1251. closeAuditForm()
  1252. } else {
  1253. ElMessage.error(result.msg)
  1254. getlist()
  1255. }
  1256. console.log('返回参数:', result);
  1257. } catch (error) {
  1258. console.log(error);
  1259. }
  1260. }
  1261. //财务驳回审核请求
  1262. const handelAuditReject = async () => {
  1263. try {
  1264. const result = await request({
  1265. url: '/cashAudit/collectionAudit',
  1266. data: {
  1267. orderCode: auditFormData.value.orderCode,
  1268. rejectReason: auditFormData.value.rejectReason,
  1269. action: 2,
  1270. auditId: adminData.value.id
  1271. }
  1272. })
  1273. if (result.code == 200) {
  1274. ElMessage.success('审核成功')
  1275. getlist()
  1276. closeAuditForm()
  1277. }
  1278. console.log('返回参数:', result);
  1279. } catch (error) {
  1280. console.log(error);
  1281. }
  1282. }
  1283. const auditFormisible = ref(false)
  1284. //判断弹窗中是否展示驳回
  1285. const ifReject = ref(false)
  1286. const openAuditForm = (row) => {
  1287. console.log('这是审核的数据', row);
  1288. auditFormData.value = {
  1289. ...row,
  1290. market: row.marketName
  1291. }
  1292. auditFormisible.value = true
  1293. }
  1294. const countdown = ref(0); // 倒计时秒数
  1295. const isBtnDisabled = ref(false); // 按钮是否禁用
  1296. const btnText = ref('通过(3)'); // 按钮显示的文字
  1297. const closeAuditForm = () => {
  1298. ifReject.value = false
  1299. auditFormisible.value = false
  1300. auditFormData.value = {}
  1301. }
  1302. //倒计时控制通过按钮
  1303. watch(auditFormisible, (val) => {
  1304. if (val) {
  1305. countdown.value = 3
  1306. isBtnDisabled.value = true
  1307. btnText.value = `通过(${countdown.value})`
  1308. const timer = setInterval(() => {
  1309. countdown.value--
  1310. btnText.value = `通过(${countdown.value})`
  1311. console.log(btnText.value);
  1312. if (countdown.value <= 0) {
  1313. isBtnDisabled.value = false
  1314. clearInterval(timer)
  1315. btnText.value = '通过'
  1316. }
  1317. }, 1000);
  1318. }
  1319. })
  1320. //========================分页相关==================
  1321. const pageInfo = ref({
  1322. pageSize: 10,
  1323. pageNum: 1
  1324. })
  1325. const total = ref(0)
  1326. const handlePagination = (type, val) => {
  1327. if (type === 'size') {
  1328. pageInfo.value.pageSize = val
  1329. } else {
  1330. pageInfo.value.pageNum = val
  1331. }
  1332. getlist()
  1333. }
  1334. // ============ 已驳回相关 ===========================
  1335. // 提示框状态管理
  1336. const showTooltip = ref(false);
  1337. const tooltipContent = ref('');
  1338. const tooltipLeft = ref(0);
  1339. const tooltipTop = ref(0);
  1340. const tooltipWidth = 200;
  1341. // 鼠标进入时显示提示框
  1342. const handleMouseEnter = (e, content) => {
  1343. if (content) {
  1344. showTooltip.value = true;
  1345. tooltipContent.value = content;
  1346. handleMouseMove(e);
  1347. }
  1348. };
  1349. // 鼠标离开时隐藏提示框
  1350. const handleMouseLeave = () => {
  1351. showTooltip.value = false;
  1352. tooltipContent.value = '';
  1353. };
  1354. // 鼠标移动时更新提示框位置(显示在鼠标左侧)
  1355. const handleMouseMove = (e) => {
  1356. // 左侧显示:鼠标X坐标 - 提示框宽度 - 偏移量
  1357. tooltipLeft.value = e.clientX - tooltipWidth - 10;
  1358. // Y坐标与鼠标保持一致(垂直居中对齐)
  1359. tooltipTop.value = e.clientY - 10;
  1360. };
  1361. const adminData = ref({})
  1362. // 获取管理员信息
  1363. const getAdminData = async function () {
  1364. try {
  1365. const result = await API({
  1366. url: '/admin/userinfo',
  1367. data: {}
  1368. })
  1369. adminData.value = result
  1370. console.log('请求成功', result)
  1371. } catch (error) {
  1372. console.log('请求失败', error)
  1373. }
  1374. }
  1375. const statusList = [
  1376. {
  1377. name: '待审核',
  1378. value: 0
  1379. },
  1380. {
  1381. name: '已通过',
  1382. value: 134
  1383. },
  1384. {
  1385. name: '已撤回',
  1386. value: 5
  1387. }, {
  1388. name: '退款',
  1389. value: 6
  1390. }, {
  1391. name: '已驳回',
  1392. value: 2
  1393. },
  1394. ]
  1395. const paytypeList = ["Stripe-链接收款", "PaymentAsia-链接收款", "Ipay88-链接收款", "银行转账", "刷卡", "现金", "支票", "Grabpay", "Nets", "E-Transfer", "Paypal"]
  1396. const activityList = ref([])
  1397. const marketList = ['马来西亚', '香港', '新加坡', '泰国', '越南HCM', '加拿大']
  1398. const productList = [
  1399. {
  1400. "value": "金币产品",
  1401. "label": "金币产品",
  1402. "children": [
  1403. {
  1404. "value": "金币充值",
  1405. "label": "金币充值"
  1406. }
  1407. ]
  1408. },
  1409. {
  1410. "value": "软件产品",
  1411. "label": "软件产品",
  1412. "children": [
  1413. {
  1414. "value": "软件",
  1415. "label": "软件",
  1416. "children": [
  1417. {
  1418. "value": "美股",
  1419. "label": "美股",
  1420. "children": [
  1421. {
  1422. "value": "美股软件",
  1423. "label": "美股软件"
  1424. }
  1425. ]
  1426. },
  1427. {
  1428. "value": "港股",
  1429. "label": "港股",
  1430. "children": [
  1431. {
  1432. "value": "港股软件",
  1433. "label": "港股软件"
  1434. }
  1435. ]
  1436. },
  1437. {
  1438. "value": "A股",
  1439. "label": "A股",
  1440. "children": [
  1441. {
  1442. "value": "A股软件",
  1443. "label": "A股软件"
  1444. }
  1445. ]
  1446. },
  1447. {
  1448. "value": "新加坡股",
  1449. "label": "新加坡股",
  1450. "children": [
  1451. {
  1452. "value": "新加坡股软件",
  1453. "label": "新加坡股软件"
  1454. }
  1455. ]
  1456. },
  1457. {
  1458. "value": "马股",
  1459. "label": "马股",
  1460. "children": [
  1461. {
  1462. "value": "马股软件",
  1463. "label": "马股软件"
  1464. }
  1465. ]
  1466. },
  1467. {
  1468. "value": "日本股",
  1469. "label": "日本股",
  1470. "children": [
  1471. {
  1472. "value": "日本股软件",
  1473. "label": "日本股软件"
  1474. }
  1475. ]
  1476. },
  1477. {
  1478. "value": "泰股",
  1479. "label": "泰股",
  1480. "children": [
  1481. {
  1482. "value": "泰股软件",
  1483. "label": "泰股软件"
  1484. }
  1485. ]
  1486. },
  1487. {
  1488. "value": "越南股",
  1489. "label": "越南股",
  1490. "children": [
  1491. {
  1492. "value": "越南股软件",
  1493. "label": "越南股软件"
  1494. }
  1495. ]
  1496. },
  1497. {
  1498. "value": "印尼股",
  1499. "label": "印尼股",
  1500. "children": [
  1501. {
  1502. "value": "印尼股软件",
  1503. "label": "印尼股软件"
  1504. }
  1505. ]
  1506. },
  1507. {
  1508. "value": "韩国股",
  1509. "label": "韩国股",
  1510. "children": [
  1511. {
  1512. "value": "韩国股软件",
  1513. "label": "韩国股软件"
  1514. }
  1515. ]
  1516. },
  1517. {
  1518. "value": "台湾股",
  1519. "label": "台湾股",
  1520. "children": [
  1521. {
  1522. "value": "台湾股软件",
  1523. "label": "台湾股软件"
  1524. }
  1525. ]
  1526. }
  1527. ]
  1528. },
  1529. {
  1530. "value": "AI机构探测神器",
  1531. "label": "AI机构探测神器",
  1532. "children": [
  1533. {
  1534. "value": "AI机构追踪",
  1535. "label": "AI机构追踪"
  1536. },
  1537. {
  1538. "value": "AI机构出击",
  1539. "label": "AI机构出击"
  1540. },
  1541. {
  1542. "value": "AI机构资金",
  1543. "label": "AI机构资金"
  1544. },
  1545. {
  1546. "value": "AI机活跃度",
  1547. "label": "AI机活跃度"
  1548. }
  1549. ]
  1550. },
  1551. {
  1552. "value": "超级机构探测神器",
  1553. "label": "超级机构探测神器",
  1554. "children": [
  1555. {
  1556. "value": "超级机构透视",
  1557. "label": "超级机构透视"
  1558. },
  1559. {
  1560. "value": "超级机构伏击",
  1561. "label": "超级机构伏击"
  1562. },
  1563. {
  1564. "value": "超级机构猎杀",
  1565. "label": "超级机构猎杀"
  1566. },
  1567. {
  1568. "value": "超级机构脉博",
  1569. "label": "超级机构脉博"
  1570. },
  1571. {
  1572. "value": "超级机构罗盘",
  1573. "label": "超级机构罗盘"
  1574. }
  1575. ]
  1576. },
  1577. {
  1578. "value": "其他",
  1579. "label": "其他",
  1580. "children": [
  1581. {
  1582. "value": "静态信息费",
  1583. "label": "静态信息费"
  1584. },
  1585. {
  1586. "value": "博股会员",
  1587. "label": "博股会员"
  1588. }
  1589. ]
  1590. }
  1591. ]
  1592. }
  1593. ]
  1594. // 获取活动信息
  1595. const getActivitys = async function () {
  1596. try {
  1597. const result = await API({
  1598. url: '/cashCollection/getActivityList',
  1599. data: {}
  1600. })
  1601. if (result.code == 200) {
  1602. activityList.value = result.data
  1603. console.log('请求成功', result)
  1604. } else {
  1605. ElMessage.error('活动列表获取失败')
  1606. console.log('活动列表获取失败', result.msg);
  1607. }
  1608. } catch (error) {
  1609. console.log('请求失败', error)
  1610. }
  1611. }
  1612. const MarketNameForId = (name) => {
  1613. if (name == '新加坡') {
  1614. return 4
  1615. } else if (name == '加拿大') {
  1616. return 24016
  1617. } else if (name == '马来西亚') {
  1618. return 5
  1619. } else if (name == '香港') {
  1620. return 13
  1621. } else if (name == '泰国') {
  1622. return 24018
  1623. } else if (name == '越南HCM') {
  1624. return 24022
  1625. } else {
  1626. return name
  1627. }
  1628. }
  1629. const CurrencyForId = (name) => {
  1630. if (name == '美元(USD)') {
  1631. return 1
  1632. } else if (name == '港币(HKD)') {
  1633. return 2
  1634. } else if (name == '新币(SGD)') {
  1635. return 3
  1636. } else if (name == '马币(MYR)') {
  1637. return 4
  1638. } else if (name == '泰铢(THB)') {
  1639. return 5
  1640. } else if (name == '加币(CAD)') {
  1641. return 6
  1642. } else if (name == '越南盾(VDN)') {
  1643. return 7
  1644. } else if (name == '越南盾(VDN)') {
  1645. return 8
  1646. } else {
  1647. return name
  1648. }
  1649. }
  1650. //节流
  1651. const throttledhandleAddForm = _.throttle(handleAddForm, 5000, {
  1652. trailing: false
  1653. })
  1654. const throttledhandleEditForm = _.throttle(handleEditForm, 5000, {
  1655. trailing: false
  1656. })
  1657. const throttledhandelAuditReject = _.throttle(handelAuditReject, 5000, {
  1658. trailing: false
  1659. })
  1660. const throttledsubmitEditForm = _.throttle(submitEditForm, 5000, {
  1661. trailing: false
  1662. })
  1663. const throttledsubmitRefund = _.throttle(submitRefund, 5000, {
  1664. trailing: false
  1665. })
  1666. onMounted(async function () {
  1667. await getAdminData()
  1668. await getActivitys()
  1669. if (hasMenuPermission(menuTree.value, 77) && hasMenuPermission(menuTree.value, 78) && hasMenuPermission(menuTree.value, 79)) {
  1670. superAdmin.value = true
  1671. getlist()
  1672. }
  1673. else if (hasMenuPermission(menuTree.value, 77)) {
  1674. checkKefu()
  1675. } else if (hasMenuPermission(menuTree.value, 78)) {
  1676. checkCaiwu()
  1677. } else if (hasMenuPermission(menuTree.value, 79)) {
  1678. checkHqCaiwu()
  1679. }
  1680. })
  1681. </script>
  1682. <style scoped lang="scss">
  1683. .content {
  1684. //整体内容
  1685. height: 100%;
  1686. width: 80vw;
  1687. .card1 {
  1688. // 筛选框
  1689. width: 100%;
  1690. .row {
  1691. height: 4vh;
  1692. width: 80vw;
  1693. display: flex;
  1694. min-height: 40px;
  1695. .rowItem {
  1696. display: flex;
  1697. width: 15vw;
  1698. align-items: center;
  1699. justify-content: center;
  1700. margin-right: 0.5vw;
  1701. }
  1702. .buttons {
  1703. display: flex;
  1704. justify-content: center;
  1705. align-items: center;
  1706. margin-left: 10px;
  1707. }
  1708. }
  1709. }
  1710. .div-card2 {
  1711. // 下方数据展示card
  1712. width: 100%;
  1713. margin-top: 2vh;
  1714. .btns {
  1715. //切换标签
  1716. display: flex;
  1717. align-items: center;
  1718. justify-content: space-between;
  1719. padding-bottom: 10px;
  1720. .tabs {
  1721. min-width: 300px;
  1722. .btnItem {
  1723. margin-left: 10px;
  1724. border-radius: 5px;
  1725. }
  1726. }
  1727. .btnAdd {
  1728. padding-left: 10px;
  1729. }
  1730. }
  1731. .table {
  1732. margin: 10px;
  1733. border-radius: 20px;
  1734. .ellipsis-container {
  1735. //内容过长悬浮展示框
  1736. position: relative;
  1737. width: 100%;
  1738. .ellipsis-text {
  1739. display: inline-block;
  1740. width: 100%;
  1741. white-space: nowrap;
  1742. overflow: hidden;
  1743. text-overflow: ellipsis;
  1744. cursor: pointer;
  1745. }
  1746. .custom-tooltip {
  1747. position: fixed;
  1748. z-index: 9999;
  1749. padding: 8px 12px;
  1750. width: 200px;
  1751. /* 固定宽度 */
  1752. background-color: #E4F0FC;
  1753. color: #333333;
  1754. border: 1px solid #e5e7eb;
  1755. border-radius: 4px;
  1756. box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  1757. /* 高度随内容自动适应 */
  1758. min-height: 30px;
  1759. max-height: 300px;
  1760. /* 限制最大高度,超出滚动 */
  1761. overflow-y: auto;
  1762. font-size: 14px;
  1763. line-height: 1.5;
  1764. }
  1765. }
  1766. }
  1767. .pagination {
  1768. margin-top: 10px;
  1769. padding: 10px 10px;
  1770. }
  1771. }
  1772. .recallDialog {
  1773. //撤回弹窗提示
  1774. height: 392px;
  1775. width: 700px;
  1776. background-image: url('/src/assets/收款明细撤回背景.png');
  1777. position: fixed; // 固定定位,相对于浏览器窗口
  1778. top: 50%; // 距离顶部50%
  1779. left: 50%; // 距离左侧50%
  1780. transform: translate(-50%, -50%); // 向左、向上平移自身宽高的50%,实现居中
  1781. z-index: 1000; // 确保在其他元素上层显示
  1782. .close {
  1783. position: absolute;
  1784. left: 625px;
  1785. top: 20px;
  1786. height: 38px;
  1787. width: 38px;
  1788. opacity: 0;
  1789. .Btn {
  1790. height: 100%;
  1791. width: 100%;
  1792. border-radius: 10px;
  1793. }
  1794. }
  1795. .text {
  1796. position: absolute;
  1797. left: 185px;
  1798. top: 190px;
  1799. height: 67px;
  1800. width: 500px;
  1801. .txt {
  1802. height: 100%;
  1803. width: 100%;
  1804. color: #001a42;
  1805. font-family: "PingFang SC";
  1806. font-size: 48px;
  1807. font-style: normal;
  1808. font-weight: 900;
  1809. line-height: normal;
  1810. }
  1811. }
  1812. .cancle {
  1813. position: absolute;
  1814. left: 185px;
  1815. top: 304px;
  1816. height: 55px;
  1817. width: 150px;
  1818. opacity: 0;
  1819. .Btn {
  1820. height: 100%;
  1821. width: 100%;
  1822. border-radius: 20px;
  1823. }
  1824. }
  1825. .confirm {
  1826. position: absolute;
  1827. left: 375px;
  1828. top: 304px;
  1829. height: 55px;
  1830. width: 150px;
  1831. opacity: 0;
  1832. .Btn {
  1833. height: 100%;
  1834. width: 100%;
  1835. border-radius: 20px;
  1836. }
  1837. }
  1838. }
  1839. :deep(.adddialog) {
  1840. //客服新增弹窗
  1841. min-width: 500px;
  1842. background-color: #F3FAFE !important;
  1843. margin-top: 8vh;
  1844. border-radius: 8px;
  1845. .addForm {
  1846. padding: 0 60px 1vh 60px;
  1847. .el-date-editor {
  1848. display: flex;
  1849. flex: 1;
  1850. }
  1851. .pic {
  1852. display: flex;
  1853. align-items: center;
  1854. .uploader {
  1855. height: 80px;
  1856. width: 80px;
  1857. .el-upload {
  1858. height: 100%;
  1859. width: 100%;
  1860. }
  1861. }
  1862. .picText {
  1863. color: #999999;
  1864. font-family: "PingFang SC";
  1865. font-size: 10px;
  1866. font-style: normal;
  1867. font-weight: 400;
  1868. line-height: 20px;
  1869. margin-left: 10px;
  1870. }
  1871. }
  1872. .moneyType {
  1873. position: relative;
  1874. width: 100%;
  1875. }
  1876. }
  1877. .dialog-footer {
  1878. display: flex;
  1879. justify-content: center;
  1880. padding-bottom: 1.5vh;
  1881. }
  1882. }
  1883. :deep(.editdialog) {
  1884. //编辑弹窗
  1885. min-width: 990px;
  1886. background-color: #F3FAFE !important;
  1887. margin-top: 8vh;
  1888. border-radius: 8px;
  1889. .editForm {
  1890. padding: 0 60px 1vh 60px;
  1891. .el-date-editor {
  1892. display: flex;
  1893. flex: 1;
  1894. }
  1895. .pic {
  1896. display: flex;
  1897. align-items: center;
  1898. .uploader {
  1899. height: 80px;
  1900. width: 80px;
  1901. .el-upload {
  1902. height: 100%;
  1903. width: 100%;
  1904. }
  1905. }
  1906. .picText {
  1907. color: #999999;
  1908. font-family: "PingFang SC";
  1909. font-size: 10px;
  1910. font-style: normal;
  1911. font-weight: 400;
  1912. line-height: 20px;
  1913. margin-left: 10px;
  1914. }
  1915. }
  1916. }
  1917. .content {
  1918. //编辑弹窗内容
  1919. display: flex;
  1920. height: 100%;
  1921. width: 100%;
  1922. .left {
  1923. min-width: 500px;
  1924. }
  1925. .right {
  1926. flex: 1;
  1927. .editFormRighrt {
  1928. padding: 0 60px 0 40px;
  1929. .el-date-editor {
  1930. display: flex;
  1931. flex: 1;
  1932. }
  1933. .pic {
  1934. display: flex;
  1935. align-items: center;
  1936. .uploader {
  1937. height: 80px;
  1938. width: 80px;
  1939. .el-upload {
  1940. height: 100%;
  1941. width: 100%;
  1942. }
  1943. }
  1944. .picText {
  1945. color: #999999;
  1946. font-family: "PingFang SC";
  1947. font-size: 10px;
  1948. font-style: normal;
  1949. font-weight: 400;
  1950. line-height: 20px;
  1951. margin-left: 10px;
  1952. }
  1953. }
  1954. }
  1955. .editBtns {
  1956. display: flex;
  1957. justify-content: center;
  1958. margin-top: 60px;
  1959. .txt {
  1960. color: #f3fafe;
  1961. text-align: center;
  1962. font-family: "PingFang SC";
  1963. font-size: 14px;
  1964. font-style: normal;
  1965. font-weight: 700;
  1966. line-height: 22px;
  1967. }
  1968. .editBtn1 {
  1969. min-width: 80px;
  1970. padding: 5px 12px;
  1971. justify-content: center;
  1972. align-items: center;
  1973. gap: 4px;
  1974. border-radius: 4px;
  1975. background: #7E91FF;
  1976. border: none;
  1977. box-shadow: 0 0 4px 0 #00000040;
  1978. }
  1979. .editBtn2 {
  1980. display: flex;
  1981. width: 80px;
  1982. min-width: 80px;
  1983. padding: 5px 12px;
  1984. justify-content: center;
  1985. align-items: center;
  1986. gap: 4px;
  1987. border-radius: 4px;
  1988. background: #2741DE;
  1989. border: none;
  1990. box-shadow: 0 0 4px 0 #00000040;
  1991. margin-left: 60px;
  1992. }
  1993. }
  1994. }
  1995. }
  1996. }
  1997. .refundDialog {
  1998. .left {
  1999. width: 50%;
  2000. height: 70vh;
  2001. min-height: 650px;
  2002. padding: 0 2vw;
  2003. .add-item {
  2004. display: flex;
  2005. align-items: center;
  2006. margin-bottom: 1vh;
  2007. }
  2008. .image {
  2009. width: 4vw !important;
  2010. height: 4vw !important;
  2011. }
  2012. }
  2013. .right {
  2014. width: 50%;
  2015. height: 50vh;
  2016. .add-item {
  2017. display: flex;
  2018. align-items: center;
  2019. margin-bottom: 1vh;
  2020. }
  2021. }
  2022. }
  2023. :deep(.adddialog .el-form-item__label) {
  2024. //设置新增弹窗表头
  2025. min-width: 80px;
  2026. width: auto;
  2027. font-weight: 800;
  2028. padding-bottom: 15px;
  2029. }
  2030. }
  2031. // 搜索的卡片样式
  2032. .card1 {
  2033. background: #F3FAFE;
  2034. }
  2035. // 表单的卡片样式
  2036. .card2 {
  2037. background: #E7F4FD;
  2038. }
  2039. // 表头背景等
  2040. :deep(.el-table__header-wrapper),
  2041. :deep(.el-table__body-wrapper),
  2042. :deep(.el-table__cell),
  2043. /* 表格 */
  2044. :deep(.el-table__body td) {
  2045. background-color: #F3FAFE !important;
  2046. }
  2047. /* 表头 */
  2048. :deep(.el-table__header th) {
  2049. background-color: #F3FAFE !important;
  2050. }
  2051. /* 鼠标悬停 */
  2052. :deep(.el-table__row:hover > .el-table__cell) {
  2053. background-color: #E5EBFE !important;
  2054. }
  2055. /* 自定义弹窗样式 */
  2056. .reject-reason-box {
  2057. /* 调整弹窗整体高度 */
  2058. --el-message-box-height: 500px;
  2059. /* 控制弹窗总高度 */
  2060. }
  2061. /* 调整内容区域样式,确保超出滚动 */
  2062. .reject-reason-box .el-message-box__content {
  2063. max-height: 350px;
  2064. /* 内容区域最大高度(根据总高度调整) */
  2065. overflow-y: auto;
  2066. /* 超出部分显示垂直滚动条 */
  2067. white-space: pre-wrap;
  2068. /* 处理换行符,避免内容挤在一起 */
  2069. }
  2070. </style>