index.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <template>
  2. <div id="">
  3. <BaseDialog
  4. width="1000px"
  5. :isShow.sync="isShow"
  6. title="业务员分销订单"
  7. @close="close"
  8. @submit="submit"
  9. :isShowFooter="false"
  10. >
  11. <template>
  12. <table-list
  13. rowKey="orderGoodsId"
  14. ref="tableList"
  15. :tableSets="tableSet"
  16. :tableData="tableData"
  17. :navText="navText"
  18. :loading="loading"
  19. >
  20. <template slot="btn" slot-scope="props">
  21. <el-button type="text" @click="editClick(props.scope.row)"
  22. >详情</el-button
  23. >
  24. </template>
  25. </table-list>
  26. <pagination
  27. :total="total"
  28. :pageSize="formData.pageSize"
  29. :currentPage="formData.pageNum"
  30. @handleSizeChange="handleSizeChange"
  31. @handleCurrentChange="handleCurrentChange"
  32. />
  33. </template>
  34. </BaseDialog>
  35. </div>
  36. </template>
  37. <script>
  38. import tableList from "@/components/tableList";
  39. import pagination from "@/components/pagination";
  40. export default {
  41. components: { tableList, pagination },
  42. data() {
  43. return {
  44. isShow: false,
  45. loading: false, //当前表单加载是否加载动画
  46. navText: {
  47. tableHide: true,
  48. title: "业务员分销订单",
  49. index: 0,
  50. ch: "条",
  51. num: true,
  52. choice: false,
  53. addHide: true,
  54. openCheckMore: true,
  55. changeWidth: "100px",
  56. backFatherBtn: {
  57. status: false,
  58. title: "配置下单填选模板",
  59. },
  60. },
  61. tableSet: [
  62. {
  63. label: "订单号",
  64. prop: "orderSn",
  65. width: "180",
  66. hidden: true,
  67. },
  68. {
  69. label: "订单金额",
  70. prop: "orderPrice",
  71. hidden: true,
  72. },
  73. {
  74. label: "订单时间",
  75. prop: "orderTime",
  76. scope: "aTimeList",
  77. width: "160",
  78. hidden: true,
  79. },
  80. {
  81. label: "所属活动",
  82. prop: "distributionName",
  83. width: "180",
  84. hidden: true,
  85. },
  86. {
  87. label: "下单人",
  88. prop: "orderUserName",
  89. hidden: true,
  90. },
  91. {
  92. label: "佣金类型",
  93. prop: "cashType",
  94. hidden: true,
  95. scope: "isOptions",
  96. options: [
  97. {
  98. label: "百分比",
  99. value: 1,
  100. },
  101. {
  102. label: "固定金额",
  103. value: 2,
  104. },
  105. ],
  106. },
  107. {
  108. label: "佣金比例",
  109. prop: "cashRatio",
  110. hidden: true,
  111. scope:"cashRatio"
  112. },
  113. {
  114. label: "佣金金额(元)",
  115. prop: "cash",
  116. hidden: true,
  117. },
  118. {
  119. label: "佣金结算时间",
  120. prop: "cashTime",
  121. hidden: true,
  122. scope: "aTimeList",
  123. width: "160",
  124. },
  125. {
  126. label: "佣金状态",
  127. prop: "cashStatus",
  128. hidden: true,
  129. scope: "isOptions",
  130. options: [
  131. {
  132. label: "冻结",
  133. value: 1,
  134. },
  135. {
  136. label: "正常",
  137. value: 2,
  138. },
  139. {
  140. label: "退款",
  141. value: 3,
  142. },
  143. ],
  144. },
  145. ],
  146. tableData: [],
  147. formData: {
  148. sellerId: "",
  149. pageSize: 10,
  150. pageNum: 1,
  151. },
  152. total: 0,
  153. };
  154. },
  155. methods: {
  156. showBox(id) {
  157. this.formData.sellerId = id;
  158. this.search(2);
  159. this.isShow = true;
  160. },
  161. search(e) {
  162. this.loading = true;
  163. if (e === 2) {
  164. this.formData.pageSiz = 10;
  165. this.formData.pageNum = 1;
  166. }
  167. this.$api
  168. .distributionactivitysellerorder(this.formData)
  169. .then((res) => {
  170. this.tableData = res.rows;
  171. this.total = res.total;
  172. this.navText.index = res.total;
  173. })
  174. .finally(() => {
  175. this.loading = false;
  176. });
  177. },
  178. close() {},
  179. submit() {},
  180. handleSizeChange(v) {
  181. this.formData.pageSize = v;
  182. this.formData.pageNum = 1;
  183. this.search();
  184. },
  185. handleCurrentChange(v) {
  186. this.formData.pageNum = v;
  187. this.search();
  188. },
  189. },
  190. };
  191. </script>
  192. <style lang="scss" scoped></style>