index.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <template>
  2. <van-nav-bar :title="'利润预算表'" left-text="" left-arrow @click-left="onClickLeft">
  3. </van-nav-bar>
  4. <van-search v-model="req.keyword" :placeholder="$t('common.pleaseEnterKeywords')" @search="getList" />
  5. <div style="display:flex">
  6. <div style="width:132px;background:#fff;z-index:1">
  7. <table border class="table">
  8. <thead>
  9. <tr>
  10. <th style="min-width:131px;text-align:left;padding: 6px 0px">合同编号</th>
  11. </tr>
  12. </thead>
  13. <tbody>
  14. <tr v-for="row in listData" :key="row.id">
  15. <td>
  16. {{row.code}}
  17. </td>
  18. </tr>
  19. </tbody>
  20. </table>
  21. </div>
  22. <div style="width:calc(100vw - 132px);overflow-x: auto;background:#fff">
  23. <table border class="table">
  24. <thead>
  25. <tr>
  26. <!-- <th style="min-width:130px">合同编号</th> -->
  27. <th style="min-width:180px;text-align:left">客户名称</th>
  28. <th style="min-width:80px">业务员</th>
  29. <th style="min-width:100px">合同金额</th>
  30. <th style="min-width:100px"> 是否已结清</th>
  31. <th style="min-width:90px">收入合计</th>
  32. <th style="min-width:90px">支出合计</th>
  33. <th style="min-width:90px">毛利</th>
  34. <th style="min-width:90px">毛利率</th>
  35. <th style="min-width:90px">应付货款</th>
  36. <th style="min-width:90px">税率</th>
  37. <th style="min-width:90px">应退税金额</th>
  38. <th style="min-width:90px">包材金额</th>
  39. <th style="min-width:90px">配件金额</th>
  40. <th style="min-width:90px">拖车费</th>
  41. <th style="min-width:90px">报关费</th>
  42. <th style="min-width:90px">代理费</th>
  43. <th style="min-width:90px">港杂费</th>
  44. <th style="min-width:90px">验货红包</th>
  45. <th style="min-width:90px">佣金</th>
  46. <th style="min-width:90px">其他</th>
  47. </tr>
  48. </thead>
  49. <tbody>
  50. <tr v-for="row in listData" :key="row.id">
  51. <!-- <td>
  52. {{row.code}}
  53. </td> -->
  54. <td style="text-align:left">
  55. {{row.customerName}}
  56. </td>
  57. <td>
  58. {{row.userName}}
  59. </td>
  60. <td>
  61. {{ row.currency }} {{ moneyFormat( row.amount,2)}}
  62. </td>
  63. <td>
  64. {{ dictValueLabel( row.isSettled,isSettled)}}
  65. </td>
  66. <td>
  67. {{ moneyFormat( row.incomeAmount,2)}}
  68. </td>
  69. <td>
  70. {{ moneyFormat( row.expenditureAmount,2)}}
  71. </td>
  72. <td>
  73. {{ moneyFormat( row.gross,2)}}
  74. </td>
  75. <td>
  76. {{ moneyFormat( row.grossRate,2)}} %
  77. </td>
  78. <td>
  79. <span v-if="row.otherSumAmount">{{moneyFormat( row.otherSumAmount,2) }}</span>
  80. <span v-else>{{ moneyFormat(row.ehsdSumAmount,2) }}</span>
  81. </td>
  82. <td>
  83. 13%
  84. </td>
  85. <td>
  86. {{ moneyFormat( row.refundableAmount,2)}}
  87. </td>
  88. <td>
  89. {{ moneyFormat( row.peritectoidAmount,2)}}
  90. </td>
  91. <td>
  92. {{ moneyFormat( row.accessoriesAmount,2)}}
  93. </td>
  94. <td>
  95. {{ moneyFormat( row.trailerFee,2)}}
  96. </td>
  97. <td>
  98. {{ moneyFormat( row.customsFee,2)}}
  99. </td>
  100. <td>
  101. {{ moneyFormat( row.agencyFee,2)}}
  102. </td>
  103. <td>
  104. {{ moneyFormat( row.portMixedFee,2)}}
  105. </td>
  106. <td>
  107. {{ moneyFormat( row.inspectionRedPack,2)}}
  108. </td>
  109. <td>
  110. {{ moneyFormat( row.commission,2)}}
  111. </td>
  112. <td>
  113. {{ moneyFormat( row.other,2)}}
  114. </td>
  115. </tr>
  116. </tbody>
  117. </table>
  118. </div>
  119. </div>
  120. <div style="display:flex;align-items:center;background:#fff;padding:20px 20px 20px 0;justify-content:end">
  121. <van-button plain type="primary" size="small" @click="handleChangePage(false)" :disabled="req.pageNum==1">上一页</van-button>
  122. <span style="margin:0 15px">共{{total}}条</span>
  123. <van-button plain type="primary" size="small" @click="handleChangePage(true)" :disabled="(total/10)<= req.pageNum ">下一页</van-button>
  124. </div>
  125. </template>
  126. <script setup>
  127. import { ref, getCurrentInstance } from "vue";
  128. const proxy = getCurrentInstance().proxy;
  129. const onClickLeft = () => proxy.$router.push("/main/working");
  130. const req = ref({
  131. pageNum: 1,
  132. pageSize: 10,
  133. keyword: "",
  134. });
  135. const total = ref(0);
  136. const isSettled = ref([
  137. {
  138. label: "已结清",
  139. value: "1",
  140. },
  141. {
  142. label: "未结清",
  143. value: "0",
  144. },
  145. ]);
  146. const loading = ref(false);
  147. const listData = ref([]);
  148. const getList = () => {
  149. proxy.post("/contract/getProfitBudgetPage", req.value).then((res) => {
  150. listData.value = res.data.rows;
  151. total.value = res.data.total;
  152. });
  153. };
  154. getList();
  155. const handleChangePage = (flag) => {
  156. req.value.pageNum = flag ? req.value.pageNum + 1 : req.value.pageNum - 1;
  157. getList();
  158. };
  159. </script>
  160. <style lang="scss" scoped>
  161. .list {
  162. min-height: 70vh;
  163. }
  164. .table {
  165. border-collapse: collapse;
  166. border-spacing: 0;
  167. width: 100%;
  168. border-color: #ebeef5;
  169. color: #606266;
  170. thead tr th {
  171. padding: 6px 0px 6px 4px;
  172. text-align: left;
  173. }
  174. td {
  175. text-align: left;
  176. padding: 6px 0px 6px 4px;
  177. height: 40px;
  178. }
  179. }
  180. </style>