InstitutionalExtraction.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. <template>
  2. <div>
  3. <templateTable :formList="formList" :searchData.sync="queryFrom" :tableConfig="tableConfig" :data="pageResult"
  4. @getList="findPage" @handleSearchList="handleSearchList" :pagination="pageData">
  5. </templateTable>
  6. <el-dialog title="详情" :visible.sync="dialogVisible" width="70%">
  7. <el-row>
  8. <el-col :span="5">
  9. <templateTable :tableConfig="personneltableConfig" :data="pageResultpersonnel" @getList="findPagepersonnel"
  10. @rowClick="rowClick">
  11. </templateTable>
  12. </el-col>
  13. <el-col :span="18" :offset="1">
  14. <templateTable :tableConfig="depttableConfig" :data="pageResultdept" @getList="findPagedept"
  15. :pagination="pageDatadept">
  16. </templateTable>
  17. </el-col>
  18. </el-row>
  19. <div slot="footer" class="dialog-footer">
  20. <el-button size="small" @click="dialogVisible = false">关 闭</el-button>
  21. </div>
  22. </el-dialog>
  23. </div>
  24. </template>
  25. <script>
  26. import templateTable from "../../components/TemplateTable/index.vue";
  27. export default {
  28. components: {
  29. templateTable,
  30. },
  31. data() {
  32. return {
  33. dialogVisible: false,
  34. formList: [
  35. {
  36. label: "工号",
  37. prop: "userId",
  38. type: "input",
  39. },
  40. {
  41. label: "名称",
  42. prop: "userName",
  43. type: "input",
  44. },
  45. ],
  46. tableConfig: {
  47. columns: [
  48. // 数据列
  49. { prop: "userId", label: "工号", type: "text" },
  50. {
  51. prop: "userName",
  52. label: "名称",
  53. type: "text",
  54. },
  55. { prop: "deptId", label: "机构编码", type: "text" },
  56. { prop: "deptName", label: "机构名称", type: "text" },
  57. { prop: "sumpremium", label: "总保费", type: "text" },
  58. { prop: "extractFee", label: "抽成总金额", type: "text" },
  59. { prop: "historyFee", label: "已提现金额", type: "text" },
  60. { prop: "cashFee", label: "可提现金额", type: "text" },
  61. ],
  62. optBtns: [
  63. {
  64. type: "primary",
  65. label: "详情",
  66. click: (row, index) => {
  67. return this.detail(row);
  68. },
  69. },
  70. ],
  71. loading: true,
  72. isPaginationShow: true,
  73. isShowIndex: true,
  74. },
  75. personneltableConfig: {
  76. columns: [
  77. // 数据列
  78. { prop: "name", label: "姓名", type: "text" },
  79. ],
  80. tableHeight:480,
  81. loading: true,
  82. isPaginationShow: false,
  83. isShowIndex: true,
  84. },
  85. depttableConfig: {
  86. columns: [
  87. // 数据列
  88. { prop: "userId", label: "员工编号", type: "text" },
  89. { prop: "userName", label: "员工姓名", type: "text" },
  90. { prop: "companyId", label: "子订单编号", type: "text" },
  91. { prop: "orderstatus", label: "订单状态", type: "statMap",options:[
  92. {
  93. label:'报价中',
  94. value:'0'
  95. },
  96. {
  97. label:'待核保',
  98. value:'1'
  99. },
  100. {
  101. label:'已核保待缴费',
  102. value:'2'
  103. },
  104. {
  105. label:'已承保',
  106. value:'3'
  107. },
  108. {
  109. label:'核保退回',
  110. value:'4'
  111. },
  112. ]},
  113. { prop: "licenseno", label: "车牌号", type: "text" },
  114. { prop: "jqpremium", label: "交强险", type: "text" },
  115. { prop: "sypremium", label: "商业险", type: "text" },
  116. { prop: "jypremium", label: "驾意险", type: "text" },
  117. { prop: "sumpremium", label: "总保费", type: "text" },
  118. { prop: "createtime", label: "创建时间 ", type: "text" },
  119. ],
  120. tableHeight:450,
  121. loading: true,
  122. isPaginationShow: true,
  123. isShowIndex: true,
  124. },
  125. pageResultpersonnel: [],
  126. pageResultdept: [],
  127. pageData: {
  128. pageNum: 1,
  129. pageSize: 10,
  130. totalSize: 0,
  131. },
  132. pageDatadept: {
  133. pageNum: 1,
  134. pageSize: 10,
  135. totalSize: 0,
  136. },
  137. queryFrom: {},
  138. pageResult: [],
  139. rowDept: '',
  140. userId: '',
  141. };
  142. },
  143. created() {
  144. this.findPage();
  145. },
  146. methods: {
  147. detail(row) {
  148. this.dialogVisible = true
  149. this.rowDept = row.deptId
  150. this.findPagepersonnel({ deptId: row.deptId })
  151. this.findPagedept()
  152. },
  153. rowClick(val) {
  154. this.userId =''
  155. this.userId = val.id
  156. this.pageDatadept= {
  157. pageNum: 1,
  158. pageSize: 10,
  159. totalSize: 0,
  160. },
  161. this.findPagedept()
  162. },
  163. findPagepersonnel(data) {
  164. this.personneltableConfig.loading = true;
  165. this.$api.insCompany
  166. .queryAgencyUser({
  167. ...data,
  168. })
  169. .then((res) => {
  170. this.personneltableConfig.loading = false;
  171. this.pageResultpersonnel = res.data;
  172. });
  173. },
  174. findPagedept(data) {
  175. this.depttableConfig.loading = true;
  176. this.$api.insCompany
  177. .queryAgencyUserInsAreaPage({
  178. userId: this.userId,
  179. deptId: this.rowDept,
  180. ...data,
  181. ...this.pageDatadept
  182. })
  183. .then((res) => {
  184. this.depttableConfig.loading = false;
  185. this.pageResultdept = res.data.records;
  186. this.pageDatadept.pageNum = res.data.current;
  187. this.pageDatadept.pageSize = res.data.size;
  188. this.pageDatadept.totalSize = res.data.total;
  189. });
  190. },
  191. // 查询Start
  192. queryStaffInfo() {
  193. this.findPage();
  194. },
  195. // 右侧列表的方法Start
  196. findPage(data) {
  197. this.tableConfig.loading = true;
  198. this.$api.insCompany
  199. .queryExtractFeeAll({
  200. ...this.pageData,
  201. ...data,
  202. })
  203. .then((res) => {
  204. this.tableConfig.loading = false;
  205. this.pageResult = res.data.content;
  206. this.pageData.pageNum = res.data.pageNum;
  207. this.pageData.pageSize = res.data.pageSize;
  208. this.pageData.totalSize = res.data.totalSize;
  209. });
  210. },
  211. handleSearchList(data) {
  212. this.findPage(data);
  213. },
  214. // 下一步
  215. },
  216. };
  217. </script>
  218. <style scoped></style>