index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836
  1. <template>
  2. <div class="page-payment-record">
  3. <div
  4. v-if="loading"
  5. v-loading="true"
  6. style="
  7. width: 100vw;
  8. height: 100vh;
  9. z-index: 999;
  10. position: fixed;
  11. top: 0;
  12. left: 0;
  13. "
  14. element-loading-text="Loading..."
  15. element-loading-background="rgba(0, 0, 0, 0.3)"
  16. ></div>
  17. <div class="main-content">
  18. <navPaymentRecord></navPaymentRecord>
  19. <div class="flex justify-between">
  20. <div class="flex btn-wrap">
  21. <el-button
  22. :disabled="multipleSelection.length < 1"
  23. type="danger"
  24. @click="onDelete"
  25. >
  26. Delete
  27. </el-button>
  28. <el-button @click="downloadSample">Download XLSX sample</el-button>
  29. <el-button
  30. type="primary"
  31. @click="dialogVisible = true"
  32. >
  33. Upload Statement
  34. </el-button>
  35. <el-button
  36. :disabled="!tableData.length"
  37. @click="addRow"
  38. >
  39. Add New Line
  40. </el-button>
  41. <el-button
  42. :disabled="trackingTable.length < 1"
  43. type="primary"
  44. @click="validateTrackingForm(trackingForm)"
  45. >
  46. Save
  47. </el-button>
  48. <!-- <el-button @click="validateTrackingForm(trackingForm)">
  49. test
  50. </el-button> -->
  51. </div>
  52. <div class="logo-area">
  53. <img :src="getLogoPath()" />
  54. </div>
  55. </div>
  56. <div class="flex items-start justify-between">
  57. <div class="table-left">
  58. <el-form
  59. ref="trackingForm"
  60. :model="trackingTable"
  61. :rules="{}"
  62. label-width="0"
  63. >
  64. <table
  65. border="0"
  66. cellspacing="0"
  67. >
  68. <thead>
  69. <tr>
  70. <th class="">Tracking_Number</th>
  71. <th class="">Total</th>
  72. <th class="">Description</th>
  73. </tr>
  74. </thead>
  75. <tbody>
  76. <tr
  77. v-for="(row, index) in trackingTable"
  78. :key="row.Tracking_Number"
  79. >
  80. <td>
  81. <div style="margin-bottom: 18px">
  82. {{ row.Tracking_Number }}
  83. </div>
  84. </td>
  85. <td>
  86. <el-form-item
  87. :prop="index + '.Total'"
  88. :rules="{
  89. required: true,
  90. message: '必填项',
  91. trigger: ['blur', 'change'],
  92. }"
  93. >
  94. <el-input
  95. v-model="row.Total"
  96. size="small"
  97. type="number"
  98. min="0"
  99. ></el-input>
  100. </el-form-item>
  101. </td>
  102. <td>
  103. <el-input
  104. v-model="row.Description"
  105. size="small"
  106. type="textarea"
  107. :rows="2"
  108. style="margin-bottom: 18px"
  109. ></el-input>
  110. </td>
  111. </tr>
  112. <tr>
  113. <td
  114. v-if="!trackingTable.length"
  115. colspan="3"
  116. style="text-align: center; color: #909399"
  117. >
  118. 暂无数据
  119. </td>
  120. </tr>
  121. </tbody>
  122. </table>
  123. </el-form>
  124. <div
  125. class="flex"
  126. style="margin-top: 12px"
  127. >
  128. <div class="">Sum Total:&nbsp;</div>
  129. <div class="">{{ totalSum }}</div>
  130. </div>
  131. <div class="flex">
  132. <div class="">Currency:&nbsp;</div>
  133. <div>
  134. {{ tableData[0]?.Currency || '0' }}
  135. </div>
  136. </div>
  137. </div>
  138. <div>
  139. <el-tooltip>
  140. <template #content>
  141. 每次点击都会重新生成左侧表单, 左侧已编辑的数据会丢失,
  142. <br />
  143. 强烈建议先检查右侧表格数据完全无误再生成左侧表单.
  144. </template>
  145. <el-button
  146. type="primary"
  147. @click="generateTrackingTable"
  148. >
  149. &lt;&lt; Generate
  150. </el-button>
  151. </el-tooltip>
  152. </div>
  153. <div class="po-table">
  154. <el-table
  155. :data="computedTableData"
  156. @selection-change="handleSelectionChange"
  157. >
  158. <el-table-column
  159. prop="Reference"
  160. label="Reference"
  161. align="center"
  162. width="110"
  163. />
  164. <el-table-column
  165. label-class-name="red-font"
  166. prop="CBM_Or_Chargable_Weight"
  167. label="CBM Or Chargable Weight"
  168. align="center"
  169. width="220"
  170. />
  171. <el-table-column
  172. prop="Tracking_Number"
  173. label="Tracking Number"
  174. align="center"
  175. width="200"
  176. label-class-name="red-font"
  177. />
  178. <el-table-column
  179. label="Action"
  180. width="80px"
  181. >
  182. <template #default="scope">
  183. <el-button
  184. size="small"
  185. type="warning"
  186. @click="editRow(scope.row, scope.$index)"
  187. >
  188. Edit
  189. </el-button>
  190. </template>
  191. </el-table-column>
  192. </el-table>
  193. <br />
  194. <div
  195. class="flex justify-between"
  196. style="align-items: flex-end"
  197. >
  198. <el-pagination
  199. v-model:currentPage="currentPage"
  200. v-model:pageSize="pageSize"
  201. style="display: none"
  202. layout="prev, pager, next, jumper, sizes"
  203. :page-sizes="[5, 10, 15, 20, 40, 100]"
  204. :total="tableData.length"
  205. @current-change="multipleSelection = []"
  206. @size-change="multipleSelection = []"
  207. />
  208. <div class="total-data">
  209. <div class="flex">
  210. <div>Total line:</div>
  211. <div>{{ tableData.length }}</div>
  212. </div>
  213. </div>
  214. </div>
  215. </div>
  216. </div>
  217. <!-- <el-table :data="finTable">
  218. <ElTableColumn prop="Total"></ElTableColumn>
  219. <ElTableColumn prop="Tracking_Number"></ElTableColumn>
  220. <ElTableColumn prop="Reference"></ElTableColumn>
  221. <ElTableColumn prop="CBM_Or_Chargable_Weight"></ElTableColumn>
  222. <ElTableColumn prop="Description"></ElTableColumn>
  223. </el-table> -->
  224. <div class="copyright">
  225. Copyright of Promocollection - Version 1.02 Released on 01/11/2024
  226. </div>
  227. </div>
  228. <dialog-upload
  229. v-model:visible="dialogVisible"
  230. v-model:currencyList="currencyList"
  231. @update-table-data="updateTableData"
  232. ></dialog-upload>
  233. <edit-item
  234. v-model:visible="dialogEditRowVisible"
  235. v-model:currencyList="currencyList"
  236. v-model:currentEditRow="computedCurrentEditRow"
  237. v-model:editMode="editMode"
  238. v-model:disableFlag="currentDisableFlag"
  239. :statement-list="computedStatementList"
  240. :locked-currency="tableData.length ? tableData[0].Currency : 'CNY'"
  241. @edit="onEditRow"
  242. @add="onAddRow"
  243. ></edit-item>
  244. </div>
  245. </template>
  246. <script lang="ts">
  247. export default defineComponent({
  248. name: 'PaymentRecord3',
  249. })
  250. </script>
  251. <script lang="ts" setup>
  252. import { defineComponent, ref, computed } from 'vue'
  253. import {
  254. ElButton,
  255. ElTable,
  256. ElTableColumn,
  257. ElPagination,
  258. ElMessage,
  259. ElNotification,
  260. ElInput,
  261. ElForm,
  262. ElFormItem,
  263. ElTooltip,
  264. } from 'element-plus'
  265. import type { FormInstance } from 'element-plus'
  266. import { useRoute } from 'vue-router'
  267. import dialogUpload from './components/upload.vue'
  268. import editItem from './components/edit.vue'
  269. import { IUser } from '@/interface'
  270. import { ITrackingNumberItem } from './inteface'
  271. import request from '@/utils/axios'
  272. import utils from '@/utils/index'
  273. import mathjs from '@/utils/math'
  274. import { savePrecision } from '@/utils/math'
  275. import * as XLSX from 'xlsx'
  276. import navPaymentRecord from '@/pages/payment-record/components/nav.vue'
  277. const loading = ref(false)
  278. const trackingForm = ref<FormInstance>()
  279. const getLogoPath = function () {
  280. return new URL('/assets/logo@2x.png', import.meta.url).href
  281. }
  282. const multipleSelection = ref<ITrackingNumberItem[]>([])
  283. const handleSelectionChange = (val: ITrackingNumberItem[]) => {
  284. multipleSelection.value = val
  285. }
  286. const onDelete = function () {
  287. const target = multipleSelection.value
  288. if (tableData.value.length) {
  289. tableData.value = tableData.value.filter((i) => {
  290. return !target.includes(i)
  291. })
  292. }
  293. }
  294. const sheetData = [
  295. {
  296. Reference: '',
  297. CBM_Or_Chargable_Weight: '',
  298. Tracking_Number: '',
  299. },
  300. ]
  301. const downloadSample = function () {
  302. const sheet1 = XLSX.utils.json_to_sheet(sheetData)
  303. const wb = XLSX.utils.book_new()
  304. sheet1['!cols'] = [{ wpx: 150 }, { wpx: 180 }, { wpx: 150 }]
  305. XLSX.utils.book_append_sheet(wb, sheet1, 'sheet1')
  306. XLSX.writeFile(wb, '国际运费模版.xlsx')
  307. }
  308. const tableData = ref([
  309. // {
  310. // Reference: '',
  311. // CBM_Or_Chargable_Weight: '2',
  312. // Tracking_Number: '12345',
  313. // Currency: 'AUD',
  314. // statement_name: '华信强0319测试上传月结单',
  315. // payment_type: '国际运费',
  316. // Weight_Unit: 'Kg',
  317. // },
  318. ] as ITrackingNumberItem[])
  319. const trackingTable = ref([] as any[]) // 左侧的表格.由tracking number生成, 所以叫这个名字
  320. const generateTrackingTable = function () {
  321. const temp = tableData.value.map((i) => i.Tracking_Number)
  322. trackingTable.value = Array.from(new Set(temp)).map((i) => {
  323. return {
  324. Tracking_Number: i,
  325. Total: '',
  326. Description: '',
  327. }
  328. })
  329. }
  330. const finTable = ref([] as any[]) // 最终发给接口的数据
  331. const generateFinTable = function () {
  332. const result = [] as any[]
  333. trackingTable.value.forEach((i) => {
  334. const temp = tableData.value.filter(
  335. (j) => j.Tracking_Number == i.Tracking_Number,
  336. )
  337. const sum = temp.reduce((total, current) => {
  338. total += Number(current.CBM_Or_Chargable_Weight)
  339. return total
  340. }, 0)
  341. temp.forEach((j) => {
  342. result.push({
  343. ...j,
  344. Total: savePrecision(
  345. mathjs
  346. .chain(i.Total)
  347. .multiply(Number(j.CBM_Or_Chargable_Weight))
  348. .divide(sum)
  349. .done(),
  350. 3,
  351. ),
  352. Description: i.Description,
  353. })
  354. })
  355. })
  356. finTable.value = result.map((i) => {
  357. return {
  358. ...i,
  359. Fee_Type: i.Reference ? 'Order' : 'Sample',
  360. Total_Accounts_Payable: i.Total,
  361. }
  362. })
  363. }
  364. // 左侧表格的total总和
  365. const totalSum = computed(() => {
  366. return trackingTable.value.reduce((t, c) => {
  367. t += Number(c.Total)
  368. return t
  369. }, 0)
  370. })
  371. const fileContainer = ref(null as any)
  372. const updateTableData = (
  373. p: { data: ITrackingNumberItem[]; mode: string },
  374. file: any,
  375. ) => {
  376. tableData.value = p.data as ITrackingNumberItem[]
  377. currentPage.value = 1
  378. fileContainer.value = file
  379. }
  380. const currentDisableFlag = computed(() => {
  381. return tableData.value.length > 0
  382. })
  383. const currentPage = ref(1)
  384. const pageSize = ref(100)
  385. // 手动分页. 可能会有很多条数据
  386. const computedTableData = computed(() => {
  387. return tableData.value.length < pageSize.value
  388. ? tableData.value
  389. : tableData.value.slice(
  390. (currentPage.value - 1) * pageSize.value,
  391. tableData.value.length > currentPage.value * pageSize.value
  392. ? currentPage.value * pageSize.value
  393. : tableData.value.length,
  394. )
  395. })
  396. const computedStatementList = computed(() => {
  397. const result: any[] = []
  398. if (tableData.value.length) {
  399. tableData.value.forEach((i) => {
  400. if (i.statement_name?.length && !result.includes(i.statement_name)) {
  401. result.push(i.statement_name)
  402. }
  403. })
  404. }
  405. return result.map((i, index) => {
  406. // statement调整成点击保存再创建了, 而不是之前的在上传对话框创建, 所以逻辑变动, 这里拿不到id, 只能拿name凑合.
  407. return {
  408. value: i,
  409. label: i,
  410. }
  411. })
  412. })
  413. const dialogEditRowVisible = ref(false)
  414. const currentEditIndex = ref(-1) // -1新增, 其余则为当前页的行号
  415. const editMode = ref(1) // 1新增 2编辑
  416. const computedCurrentEditRow = computed(() => {
  417. if (currentEditIndex.value > -1) {
  418. return tableData.value[
  419. (currentPage.value - 1) * pageSize.value + currentEditIndex.value
  420. ]
  421. }
  422. return {}
  423. })
  424. const addRow = function () {
  425. if (tableData.value.length) {
  426. // console.log('国内快递')
  427. editMode.value = 1
  428. currentEditIndex.value = -1
  429. dialogEditRowVisible.value = true
  430. }
  431. }
  432. const editRow = function (row: ITrackingNumberItem, index: number) {
  433. editMode.value = 2
  434. currentEditIndex.value = index
  435. if (tableData.value.length) {
  436. dialogEditRowVisible.value = true
  437. }
  438. }
  439. const onAddRow = function (data: ITrackingNumberItem) {
  440. if (tableData.value.length) {
  441. tableData.value.push(data as ITrackingNumberItem)
  442. dialogEditRowVisible.value = false
  443. }
  444. }
  445. const onEditRow = function (data: ITrackingNumberItem) {
  446. if (tableData.value.length) {
  447. dialogEditRowVisible.value = false
  448. tableData.value.splice(
  449. (currentPage.value - 1) * pageSize.value + currentEditIndex.value,
  450. 1,
  451. data as ITrackingNumberItem,
  452. )
  453. }
  454. }
  455. const validateTrackingForm = function (formEl: FormInstance | undefined) {
  456. if (!formEl) return
  457. formEl.validate((valid, fields) => {
  458. if (valid) {
  459. console.log('success')
  460. tryCreateStatement()
  461. } else {
  462. console.log('check form has not pass!', fields)
  463. ElMessage.error('请检查表单必填项')
  464. }
  465. })
  466. }
  467. const tryCreateStatement = function () {
  468. if (
  469. ![
  470. 'Finance Manager',
  471. 'CEO',
  472. 'Account Payable',
  473. 'Logistics Operator',
  474. 'Cashier',
  475. ].includes(userInfo.value.role.name)
  476. ) {
  477. ElMessage.error('当前用户没有处理的权限')
  478. return
  479. }
  480. generateFinTable()
  481. if (!finTable.value.length) {
  482. ElMessage.error('生成国际运费数据异常. 请不要关闭本页面并联系管理员.')
  483. return
  484. }
  485. if (tableData.value.length) {
  486. createInternationalPackage()
  487. createStatement()
  488. }
  489. }
  490. // 创建国际运费记录
  491. const createInternationalPackage = function () {
  492. console.log(finTable.value, 'createInternationalPackage data')
  493. request
  494. .post('/payment_request/internationalPackageUpsert', {
  495. Related_Sales_Order: finTable.value,
  496. })
  497. .then((response) => {
  498. if (response.data.code !== 1) {
  499. ElMessage.error('创建statement出错')
  500. ElNotification({
  501. type: 'error',
  502. duration: 0,
  503. title: '创建国际运费记录异常',
  504. message: ``,
  505. })
  506. return
  507. }
  508. })
  509. .catch((e) => {
  510. console.log(e, 'createInternationalPackage error')
  511. })
  512. }
  513. const statementID = ref('')
  514. // const statementID = ref('4791186000143466085')
  515. // 上传原文件保存副本. 业务要求.
  516. const uploadStatementFile = function () {
  517. const fileForm = new FormData()
  518. fileForm.append('id', statementID.value)
  519. fileForm.append('file', fileContainer.value)
  520. request
  521. .post('/payment_request/uploadOriginalFile', fileForm, {
  522. headers: {
  523. 'Content-Type': 'multipart/form-data',
  524. },
  525. })
  526. .then((res: any) => {
  527. if (res.data.code === 1) {
  528. ElNotification({
  529. duration: 0,
  530. title: '上传原始表格成功',
  531. type: 'success',
  532. message: '上传原始表格成功',
  533. })
  534. }
  535. })
  536. }
  537. const createStatement = function () {
  538. console.log(
  539. {
  540. Total_Amount: totalSum.value || 0,
  541. Currency: tableData.value[0].Currency,
  542. Name: tableData.value[0].statement_name,
  543. Payment_Type: tableData.value[0].payment_type,
  544. Owner: {
  545. name: userInfo.value.full_name,
  546. id: userInfo.value.id,
  547. },
  548. },
  549. 'createStatement data',
  550. )
  551. loading.value = true
  552. request
  553. .post('/payment_request/createStatementData2', [
  554. {
  555. Total_Amount: totalSum.value || 0,
  556. Currency: tableData.value[0].Currency,
  557. Name: tableData.value[0].statement_name,
  558. Payment_Type: tableData.value[0].payment_type,
  559. Owner: {
  560. name: userInfo.value.full_name,
  561. id: userInfo.value.id,
  562. },
  563. },
  564. ])
  565. .then((response) => {
  566. if (response.data.code !== 1) {
  567. ElMessage.error('创建statement出错')
  568. return
  569. }
  570. statementID.value = response.data.result.data[0].details.id
  571. splitPaymentRequestRecordForm() // 重写splitForm, 参数几乎完全不同
  572. uploadStatementFile() // 这步操作直接解开注释就行. 逻辑参数通用
  573. })
  574. .catch(() => {
  575. loading.value = false
  576. })
  577. }
  578. const splitPaymentRequestRecordForm = function () {
  579. const formData = finTable.value.reduce((t, i) => {
  580. const temp: any = {
  581. Tracking_Number: i.Tracking_Number,
  582. Unit_Price: 0,
  583. Quantity: '',
  584. Sample_Fee: 0,
  585. Setup_Service_Fee: 0,
  586. Total: i.Total || 0,
  587. Currency: i.Currency,
  588. Description: '',
  589. SKU: '',
  590. Unit_Price_Non_Currency: '',
  591. Payment_Type: i.payment_type,
  592. Statement: { name: i.statement_name, id: statementID.value },
  593. Request_Type: '月结申请',
  594. Name: '/',
  595. Owner: {
  596. name: userInfo.value.full_name,
  597. id: userInfo.value.id,
  598. },
  599. Payment_Status: 'Pending Verify',
  600. Batch_number: new Date().getTime().toString(),
  601. }
  602. t.push(temp)
  603. return t
  604. }, [] as any[])
  605. console.log(formData, 'splitPaymentRequestRecordForm')
  606. let size = 100
  607. const dataList = utils.splitArray(formData, size)
  608. const pool = []
  609. for (let i = 0; i < dataList.length; i++) {
  610. pool.push(
  611. createPaymentRequestRecord(
  612. dataList[i],
  613. i,
  614. size,
  615. i === dataList.length - 1 ? formData.length : 0,
  616. ),
  617. )
  618. }
  619. loading.value = true
  620. Promise.all(pool)
  621. }
  622. const createPaymentRequestRecord = function (
  623. data: any[],
  624. currentPage = 0,
  625. pageSize = 1,
  626. finalValue: number,
  627. ) {
  628. return new Promise((resolve, reject) => {
  629. request
  630. .post('/payment_request/createPaymentRequestRecord2', data)
  631. .then((response) => {
  632. if (response.data.code !== 1) {
  633. ElNotification({
  634. type: 'error',
  635. duration: 0,
  636. title: '创建异常',
  637. message: `第 ${currentPage * pageSize + 1} ~ ${
  638. finalValue || (currentPage + 1) * pageSize
  639. } 行数据创建异常`,
  640. })
  641. reject(0)
  642. return
  643. }
  644. const res = response.data.result
  645. if (Array.isArray(res.data)) {
  646. const temp = res.data.map((i: any, index: number) => {
  647. return {
  648. status: i.status,
  649. index,
  650. }
  651. })
  652. const temp2 = temp.filter((i: any) => i.status !== 'success')
  653. if (temp2.length) {
  654. ElNotification({
  655. type: 'error',
  656. duration: 0,
  657. title: '创建异常',
  658. message: `第 ${temp2
  659. .map((i: any) => i.index + 1 + currentPage * pageSize)
  660. .join(',')} 行数据创建异常`,
  661. })
  662. reject(0)
  663. } else {
  664. ElNotification({
  665. duration: 0,
  666. title: '创建成功',
  667. type: 'success',
  668. message: `第 ${currentPage * pageSize + 1} ~ ${
  669. finalValue || (currentPage + 1) * pageSize
  670. } 行数据创建成功`,
  671. })
  672. resolve(1)
  673. }
  674. }
  675. })
  676. })
  677. }
  678. const dialogVisible = ref(false)
  679. const currencyList = ref([
  680. {
  681. label: 'CNY',
  682. value: 'CNY',
  683. },
  684. {
  685. label: 'USD',
  686. value: 'USD',
  687. },
  688. {
  689. label: 'HKD',
  690. value: 'HKD',
  691. },
  692. {
  693. label: 'AUD',
  694. value: 'AUD',
  695. },
  696. {
  697. label: 'GBP',
  698. value: 'GBP',
  699. },
  700. {
  701. label: 'NZD',
  702. value: 'NZD',
  703. },
  704. {
  705. label: 'EUR',
  706. value: 'EUR',
  707. },
  708. ])
  709. const route = useRoute()
  710. const userInfo = ref({} as IUser)
  711. // console.log(route)
  712. loading.value = true
  713. request
  714. .post('/common/getUsersData', { id: route.query.user })
  715. .then((response) => {
  716. const res = response.data
  717. if (res.code !== 1) return
  718. if (res.result.users && res.result.users.length) {
  719. userInfo.value = res.result.users[0]
  720. } else if (res.result.id) {
  721. userInfo.value = res.result || {}
  722. } else if (Array.isArray(res.result) && res.result.length) {
  723. userInfo.value = res.result[0] || {}
  724. } else {
  725. ElMessage.error('获取当前用户身份异常, 请联系管理员')
  726. }
  727. })
  728. .finally(() => {
  729. loading.value = false
  730. })
  731. </script>
  732. <style lang="scss">
  733. .page-payment-record {
  734. .red-font {
  735. color: red;
  736. }
  737. }
  738. </style>
  739. <style lang="scss" scoped>
  740. .main-content {
  741. background-color: #fff;
  742. padding: 12px 40px;
  743. width: 1900px;
  744. min-width: 1200px;
  745. min-height: 100vh;
  746. margin: 0 auto;
  747. box-shadow:
  748. 0 0 0 1px rgba(255, 255, 255, 0.4) inset,
  749. 0 0.5em 1em rgba(0, 0, 0, 0.6);
  750. }
  751. .btn-wrap {
  752. width: 1600px;
  753. min-width: 1200px;
  754. padding: 12px 0;
  755. margin: 0 auto;
  756. }
  757. .logo-area {
  758. img {
  759. height: 60px;
  760. }
  761. }
  762. .table-left {
  763. width: 45%;
  764. table {
  765. border: 1pt solid #eee;
  766. width: 100%;
  767. }
  768. tr:nth-of-type(n + 2) td {
  769. border-top: 1pt solid #eee;
  770. }
  771. th {
  772. color: #909399;
  773. text-align: center;
  774. background-color: $tableHeaderBgColor;
  775. }
  776. td {
  777. text-align: center;
  778. padding: 8pt 8pt 4pt;
  779. min-width: 30pt;
  780. max-width: 100pt;
  781. }
  782. th + th,
  783. td + td {
  784. border-left: 1pt solid #eee;
  785. }
  786. }
  787. .po-table {
  788. width: 45%;
  789. min-height: 80vh;
  790. }
  791. .total-data {
  792. width: 150px;
  793. line-height: 22px;
  794. }
  795. .copyright {
  796. text-align: right;
  797. color: #ccc;
  798. font-family: Fun, sans-serif;
  799. font-size: 14px;
  800. line-height: 16px;
  801. font-style: italic;
  802. }
  803. </style>