personAllDetails.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <template>
  2. <el-dialog
  3. :visible.sync="visible"
  4. ref="dialog"
  5. :title="'个人月度销售详情'"
  6. width="100%"
  7. lock-scroll
  8. append-to-body
  9. fullscreen
  10. close-on-press-escape
  11. destroy-on-close
  12. v-if="visible"
  13. @close="handleClose">
  14. <el-table
  15. :data="tableData.slice((currpage - 1) * pagesize, currpage * pagesize)"
  16. style="width: 100%"
  17. :row-class-name="tableRowClassName">
  18. <el-table-column
  19. prop="he_tong_bian_hao_"
  20. label="合同编号"
  21. width="180">
  22. </el-table-column>
  23. <el-table-column
  24. prop="zhuan_huan_ke_hu_"
  25. label="客户名称"
  26. width="180">
  27. </el-table-column>
  28. <el-table-column
  29. prop="sheng_xiao_shi_ji"
  30. label="生效时间"
  31. width="180">
  32. </el-table-column>
  33. <el-table-column
  34. prop="shi_xiao_shi_jian"
  35. label="失效时间"
  36. width="180">
  37. </el-table-column>
  38. <el-table-column
  39. prop="zhuang_tai_"
  40. label="合同状态"
  41. width="180">
  42. </el-table-column>
  43. <el-table-column
  44. prop="fu_kuan_fang_shi_"
  45. label="付款方式"
  46. width="180">
  47. </el-table-column>
  48. <el-table-column
  49. prop="jiage"
  50. label="总价(元)"
  51. width="180">
  52. </el-table-column>
  53. </el-table>
  54. <el-pagination
  55. layout="prev, pager, next, jumper"
  56. @size-change = 'handleSizeChange'
  57. @current-change='handleCurrentChange'
  58. :current-page='currpage'
  59. :page-size='pagesize'
  60. :total="tableData.length">
  61. </el-pagination>
  62. </el-dialog>
  63. </template>
  64. <script>
  65. import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'
  66. export default {
  67. props:{
  68. dialogOff:{ //当前表单示例
  69. type: Boolean,
  70. default:false,
  71. },
  72. data:{
  73. type:Array
  74. },
  75. date:{
  76. type:String
  77. },
  78. height:{
  79. type:String,
  80. default:window.screen.height * 0.5 +'px'
  81. }
  82. },
  83. beforeMount: function () {
  84. let tempid = this.$store.state.ibps.user.info.user.id
  85. const newmonth = this.data[0] > 10 ? this.data[0] : "0" + this.data[0];
  86. let sql = "select e.*,ibps_party_employee.NAME_ from (select d.*,t_mjwtsqb.zong_jia_ as jiage from (select * from t_bjd LEFT JOIN (select a.id_ as leibieid,a.lai_yuan_qu_dao_ as laiyuan,b.id_ as qudaoid, b.lei_bie_ from ((select id_, lai_yuan_qu_dao_ from t_qzkhb GROUP BY id_) UNION (select id_, lai_yuan_qu_dao_ from t_yxkh GROUP BY id_) UNION (select ke_hu_ming_cheng_, lai_yuan_qu_dao_ as khnum from t_khxx GROUP BY ke_hu_ming_cheng_)) as a LEFT JOIN (select t_qdgl.id_,t_qdlbb.lei_bie_ from t_qdgl LEFT JOIN t_qdlbb on t_qdgl.qu_dao_lei_bie_ = t_qdlbb.id_) as b on a.lai_yuan_qu_dao_ = b.id_) as c on t_bjd.ke_hu_ming_cheng_ = c.leibieid where c.lei_bie_ is not NULL and t_bjd.sheng_xiao_shi_ji like '"+ this.date.split('-')[0]+"-"+newmonth +"%' and t_bjd.bian_zhi_ren_ = '"+tempid+"') as d left join t_mjwtsqb on t_mjwtsqb.he_tong_bian_hao_ = d.id_ WHERE t_mjwtsqb.shi_fou_guo_shen_ = '1' ) as e LEFT JOIN ibps_party_employee on e.bian_zhi_ren_ = ibps_party_employee.id_ ORDER BY e.he_tong_bian_hao_ desc"
  87. curdPost('sql',sql).then(res=>{
  88. this.tableData = res.variables.data
  89. })
  90. },
  91. watch:{
  92. dialogOff: {
  93. handler: function(val, oldVal) {
  94. this.visible = JSON.parse(JSON.stringify(val));
  95. this.itemShow = true
  96. },
  97. immediate: true
  98. }
  99. },
  100. data() {
  101. return {
  102. visible:false,
  103. itemShow:false,
  104. tableData: [],
  105. curentPage1: 1, //默认最开始是第几页
  106. pagesize: 10, //每页数据条数
  107. currpage: 1, //默认开始页面
  108. }
  109. },
  110. methods:{
  111. // 关闭窗口
  112. handleClose(){
  113. this.$emit('close', false)
  114. },
  115. tableRowClassName({row, rowIndex}) {
  116. if (rowIndex === 1) {
  117. return 'warning-row';
  118. } else if (rowIndex === 3) {
  119. return 'success-row';
  120. }
  121. return '';
  122. },
  123. handleSizeChange(val) {
  124. this.pagesize = val
  125. },
  126. handleCurrentChange(val) {
  127. this.currpage = val
  128. }
  129. }
  130. }
  131. </script>
  132. <style scoped>
  133. .dataCont{
  134. border:0px;
  135. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  136. height: calc(100vh * 0.85);
  137. padding:20px;
  138. }
  139. </style>