ahead.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <template>
  2. <div class="app-container">
  3. <div class="title-container">
  4. <breadcrumb id="breadcrumb-container" class="breadcrumb-container"/>
  5. </div>
  6. <y-page-list-layout :page-list="pageData" :page-para="listQuery" :get-page-list="getList">
  7. <parentTable
  8. v-loading="listLoading"
  9. :data="pageData.records"
  10. slot="table"
  11. style="width: 100%;"
  12. >
  13. <el-table-column label="项目名称" align="center" width="250">
  14. <template slot-scope="{row}">
  15. <span>{{ row.name }}</span>
  16. </template>
  17. </el-table-column>
  18. <el-table-column label="事业部流水号" align="center" width="135">
  19. <template slot-scope="{row}">
  20. <span>{{ row.businessNo }}</span>
  21. </template>
  22. </el-table-column>
  23. <el-table-column label="项目编号" align="center" width="180">
  24. <template slot-scope="{row}">
  25. <span>{{row.belongTo}}{{ row.oaNo }}</span>
  26. </template>
  27. </el-table-column>
  28. <el-table-column label="项目类型" align="center" width="130">
  29. <template slot-scope="{row}">
  30. <span>{{ row.cateName }}</span>
  31. </template>
  32. </el-table-column>
  33. <el-table-column label="业务来源" align="center" width="130">
  34. <template slot-scope="{row}">
  35. <span>{{ row.businessSourceName }}</span>
  36. </template>
  37. </el-table-column>
  38. <el-table-column label="委托单位" align="center" width="130">
  39. <template slot-scope="{row}">
  40. <span>{{ row.clientUnit}}</span>
  41. </template>
  42. </el-table-column>
  43. <el-table-column label="客户名字" align="center" width="130">
  44. <template slot-scope="{row}">
  45. <span>{{ row.clientName}}</span>
  46. </template>
  47. </el-table-column>
  48. <el-table-column label="合同金额(元)" align="center" width="110">
  49. <template slot-scope="{row}">
  50. <span>{{ row.amount}}</span>
  51. </template>
  52. </el-table-column>
  53. <el-table-column label="客户经理" align="center" width="100">
  54. <template slot-scope="{row}">
  55. <span>{{ row.clientManager}}</span>
  56. </template>
  57. </el-table-column>
  58. <el-table-column label="相关营销人员总提成(元)" align="center" width="160">
  59. <template slot-scope="{row}">
  60. <span>{{ row.marketerBrokerageAmount}}</span>
  61. </template>
  62. </el-table-column>
  63. <el-table-column label="客户经理提成率" align="center" width="150">
  64. <template slot-scope="{row}">
  65. <span>{{ row.brokerageRate}}%</span>
  66. </template>
  67. </el-table-column>
  68. <el-table-column label="是否预提" align="center" width="180" fixed="right">
  69. <template slot-scope="{row}">
  70. <el-switch
  71. style="display: block;height: 40px;padding-top: 8px"
  72. v-model= row.marketerAdvanceBrokerageAble
  73. active-color="#13ce66"
  74. inactive-color="#ff4949"
  75. active-text="可预提"
  76. inactive-text="不可预提"
  77. @change="updateAble(row)"
  78. >
  79. </el-switch>
  80. </template>
  81. </el-table-column>
  82. </parentTable>
  83. </y-page-list-layout>
  84. </div>
  85. </template>
  86. <script>
  87. import YPageListLayout from '@/components/YPageListLayout'
  88. import Breadcrumb from '@/components/Breadcrumb'
  89. import PermissionButton from '@/components/PermissionButton/PermissionButton'
  90. import { fileDown } from '../../utils/file'
  91. export default {
  92. name: 'ViewsBrokerageAhead',
  93. components: {
  94. Breadcrumb,
  95. YPageListLayout,
  96. },
  97. filters: {
  98. statusFilter(status) {
  99. const statusMap = {
  100. published: 'success',
  101. draft: 'info',
  102. deleted: 'danger',
  103. }
  104. return statusMap[status]
  105. },
  106. },
  107. data() {
  108. return {
  109. isDisable:false,
  110. tableKey: 0,
  111. pageData: { records: [] },
  112. total: 20,
  113. listLoading: true,
  114. listQuery: {
  115. page: 1,
  116. size: 10,
  117. descs: 'id',
  118. state:null
  119. },
  120. listQueryKey: 'keyword',
  121. importLoading: false,
  122. }
  123. },
  124. created() {
  125. this.getList();
  126. },
  127. methods: {
  128. updateAble(row){
  129. this.$api.itemBrokerageGeneral.marketerStatus({id:row.id, marketerStatus:row.marketerAdvanceBrokerageAble}).then(res=>{
  130. if (res.code === 200){
  131. this.$notify({
  132. title: '成功',
  133. message: '修改成功',
  134. type: 'success',
  135. duration: 2000
  136. });
  137. this.getList();
  138. }
  139. })
  140. },
  141. getList() {
  142. const that = this;
  143. this.listLoading = true;
  144. const key = {};
  145. this.$api.itemBrokerageGeneral.list(Object.assign({marketerAdvanceBrokerageAble:true, marketerAdvanceBrokerageDone:false}, that.listQuery, key)).then((res) => {
  146. that.pageData = res.data;
  147. setTimeout(() => {
  148. that.listLoading = false
  149. }, 200)
  150. })
  151. .catch(() => {
  152. that.listLoading = false
  153. })
  154. },
  155. }
  156. }
  157. </script>
  158. <style lang="scss" scoped>
  159. .right {
  160. flex: 1;
  161. .title {
  162. font-size: 16px;
  163. font-weight: 500;
  164. color: rgba(51, 51, 51, 1);
  165. line-height: 35px;
  166. margin-bottom: 8px;
  167. }
  168. .menu-2-box {
  169. display: flex;
  170. flex-wrap: wrap;
  171. width: 100%;
  172. }
  173. .menu-2-item {
  174. display: flex;
  175. align-items: center;
  176. color: #656565;
  177. font-size: 12px;
  178. width: 230px;
  179. height: 101px;
  180. background: rgb(255, 185, 129);
  181. border-radius: 3px;
  182. padding-left: 20px;
  183. margin-right: 10px;
  184. margin-bottom: 10px;
  185. cursor: pointer;
  186. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
  187. .text {
  188. margin-left: 16px;
  189. }
  190. }
  191. }
  192. </style>